Vehicle service subscription method, device, system and computer readable storage medium

CN122994733APending Publication Date: 2026-10-27CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611430074.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-15
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0004]本申请提供了一种车辆服务订阅方法、装置、系统及计算机可读存储介质,以解决现有的车辆服务订阅方式需要用户在使用不同车型车辆或者同一车型车辆的UUID配置更新时手动对UUID映射表进行维护,导致维护成本高的问题

Benefits of technology

(1)本申请中移动终端可以利用车辆广播的广播包中所携带的服务标识信息,自动获取与该车辆匹配的UUID映射表,以此实现移动终端与车辆之间的服务UUID的自动协商与适配,无需用户在使用不同车型车辆或者同一车型车辆的UUID配置更新时手动对UUID映射表进行维护,从而降低了UUID映射表的维护成本。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122994733A_ABST
    Figure CN122994733A_ABST
Patent Text Reader

Abstract

The application relates to a vehicle service subscription method, device, system and computer readable storage medium, which comprises the following steps: receiving a broadcast packet sent by a vehicle, and extracting service identification information from the broadcast packet, wherein the service identification information comprises a vehicle model identification and a configuration version number of a latest universal unique identifier (UUID) of the vehicle; acquiring a UUID mapping table matched with the vehicle based on the vehicle model identification and the configuration version number, wherein the UUID mapping table is used to represent a mapping relationship between each service of the vehicle and the UUID of each service; and subscribing to each service of the vehicle based on the UUID mapping table in the case of establishing a Bluetooth connection with the vehicle. In this way, the user does not need to manually maintain the UUID mapping table when using different vehicle models or updating the UUID configuration of the same vehicle model, thereby reducing the maintenance cost of the UUID mapping table.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle networking technology, specifically to a vehicle service subscription method, apparatus, system, and computer-readable storage medium. Background Technology

[0002] With the continuous development of vehicle-to-everything (V2X) technology, more and more vehicles are connecting to smartphones and other mobile terminals via Bluetooth Low Energy (BLE) to achieve remote control (such as door unlocking and air conditioning preheating), status monitoring (such as battery level and tire pressure monitoring), and keyless entry. In practical applications, the Universally Unique Identifier (UUID) used by vehicles of different brands, years, and hardware suppliers is often inconsistent. Mobile terminals need to obtain the correct UUID configuration to subscribe to the vehicle's services.

[0003] In related technologies, a UUID mapping table for all known vehicle models needs to be built into the vehicle owner's application (APP) on the mobile terminal, and service subscriptions are made based on the vehicle model manually selected by the user. However, this approach requires users to manually maintain the UUID mapping table when using different vehicle models or updating the UUID configuration for the same vehicle model, resulting in high maintenance costs. Therefore, how to achieve automatic negotiation and adaptation of service UUIDs between vehicles and mobile terminals has become an urgent technical problem to be solved. Summary of the Invention

[0004] This application provides a vehicle service subscription method, apparatus, system, and computer-readable storage medium to solve the problem that existing vehicle service subscription methods require users to manually maintain the UUID mapping table when updating the UUID configuration of different vehicle models or the same vehicle model, resulting in high maintenance costs.

[0005] In a first aspect, this application provides a vehicle service subscription method applied to a mobile terminal, the method comprising: Receive broadcast packets sent by vehicles and extract service identification information from the broadcast packets, wherein the service identification information includes the vehicle model identifier and the configuration version number of the vehicle's latest universal unique identifier (UUID); Based on the vehicle model identifier and the configuration version number, a UUID mapping table matching the vehicle is obtained, wherein the UUID mapping table is used to represent the mapping relationship between each service of the vehicle and the UUID of each service; Once a Bluetooth connection is established with the vehicle, the various services of the vehicle are subscribed to based on the UUID mapping table.

[0006] Optionally, obtaining the UUID mapping table matching the vehicle based on the vehicle model identifier and the configuration version number includes: Determine whether a UUID mapping table matching the vehicle model identifier and the configuration version number exists in the local cache of the mobile terminal; If it is determined that a UUID mapping table matching the vehicle model identifier and the configuration version number exists in the local cache of the mobile terminal, the UUID mapping table matching the vehicle is obtained from the local cache; If it is determined that there is no UUID mapping table matching the vehicle model identifier and the configuration version number in the local cache of the mobile terminal, the UUID mapping table matching the vehicle is obtained from the cloud server.

[0007] Optionally, obtaining the UUID mapping table matching the vehicle from the cloud server includes: Send a request instruction to the cloud server, wherein the request instruction carries the vehicle model identifier and the configuration version number; The system receives the UUID mapping table returned by the cloud server. The UUID mapping table is a mapping table obtained by the cloud server from the configuration center in response to the request instruction. The configuration center has multiple UUID mapping tables pre-configured for different vehicle models and different configuration version numbers.

[0008] Optionally, after obtaining the UUID mapping table matching the vehicle from the cloud server, the method further includes: Update the local cache and mark the original UUID mapping table in the local cache as expired.

[0009] Optionally, the method further includes: When the mobile terminal meets the preset conditions, it switches to the downgrade exploration mode. The preset conditions include the mobile terminal being unable to extract the service identifier information from the broadcast packet and / or the mobile terminal being unable to obtain the UUID mapping table from the cloud server. Iterate through all services and features reported by the vehicle and perform heuristic matching based on the attribute combinations of the features.

[0010] Optionally, subscribing to various services of the vehicle based on the UUID mapping table includes: Call the preset service discovery interface to obtain the various services of the vehicle; Based on the UUID mapping table, determine the UUID of each service of the vehicle; Subscribe to the service objects corresponding to each service based on the UUID of each service.

[0011] Secondly, this application also provides a vehicle service subscription method, applied to a vehicle, the method comprising: Obtain the latest service identification information, wherein the service identification information includes the vehicle model identifier and the configuration version number of the vehicle's latest Universal Unique Identifier (UUID); The vehicle model identifier and the configuration version number are encoded into a broadcast packet, and the broadcast packet is broadcast so that the mobile terminal can extract the vehicle model identifier and the configuration version number from the broadcast packet, and obtain a UUID mapping table matching the vehicle based on the vehicle model identifier and the configuration version number in the service identifier information. When the mobile terminal establishes a Bluetooth connection with the vehicle, it subscribes to the various services of the vehicle based on the UUID mapping table, wherein the UUID mapping table is used to represent the mapping relationship between the various services of the vehicle and the UUIDs of the various services.

[0012] Optionally, obtaining the latest service identifier information includes: Each time a remote software upgrade is completed, check whether the UUID configuration in the target firmware has been updated. If a UUID configuration update is detected in the target firmware, the configuration version number of the vehicle is updated. Obtain the vehicle model identifier and use the vehicle model identifier and the updated configuration version number as the service identifier information.

[0013] Thirdly, this application also provides a vehicle service subscription device for use on a mobile terminal, the device comprising: The receiving and extracting module is used to receive broadcast packets sent by the vehicle and extract service identification information from the broadcast packets, wherein the service identification information includes the vehicle model identifier and the configuration version number of the vehicle's latest universal unique identifier (UUID); The first acquisition module is used to acquire a UUID mapping table matching the vehicle based on the vehicle model identifier and the configuration version number, wherein the UUID mapping table is used to represent the mapping relationship between each service of the vehicle and the UUID of each service; The subscription module is used to subscribe to various services of the vehicle based on the UUID mapping table when a Bluetooth connection is established with the vehicle.

[0014] Fourthly, this application also provides a vehicle service subscription device, applied to a vehicle, the device comprising: The second acquisition module is used to acquire the latest service identification information, wherein the service identification information includes the vehicle model identifier and the configuration version number of the vehicle's latest universal unique identifier (UUID); An encoding module is used to encode the vehicle model identifier and the configuration version number into a broadcast packet and broadcast the broadcast packet so that the mobile terminal can extract the vehicle model identifier and the configuration version number from the broadcast packet, obtain a UUID mapping table matching the vehicle based on the vehicle model identifier and the configuration version number in the service identifier information, and subscribe to the various services of the vehicle based on the UUID mapping table when the mobile terminal establishes a Bluetooth connection with the vehicle. The UUID mapping table is used to represent the mapping relationship between the various services of the vehicle and the UUIDs of the various services.

[0015] Fifthly, this application also provides a vehicle service subscription system, the system comprising: a mobile terminal and a vehicle; The mobile terminal is used to execute the vehicle service subscription method described in the first aspect; The vehicle is used to perform the vehicle service subscription method described in the second aspect.

[0016] Sixthly, this application also provides a computer-readable storage medium storing computer-executable instructions for performing the vehicle service subscription method described in the first aspect, or for performing the vehicle service subscription method described in the second aspect.

[0017] The beneficial effects of this application are: (1) In this application, the mobile terminal can use the service identifier information carried in the broadcast packet of the vehicle broadcast to automatically obtain the UUID mapping table that matches the vehicle, thereby realizing the automatic negotiation and adaptation of the service UUID between the mobile terminal and the vehicle. This eliminates the need for the user to manually maintain the UUID mapping table when using different vehicle models or updating the UUID configuration of the same vehicle model, thereby reducing the maintenance cost of the UUID mapping table.

[0018] (2) This application is transparent to users throughout the entire vehicle service subscription process, without requiring users to manually select a vehicle model or enter any information, thereby improving the user experience. Attached Figure Description

[0019] Figure 1 A flowchart illustrating a vehicle service subscription method provided in this application embodiment; Figure 2A flowchart illustrating yet another vehicle service subscription method provided in this application embodiment; Figure 3 This is a schematic diagram of the structure of a vehicle service subscription device provided in an embodiment of this application; Figure 4 A schematic diagram of the structure of another vehicle service subscription device provided in the embodiments of this application; Figure 5 This is a schematic diagram of the structure of a vehicle service subscription system provided in an embodiment of this application. Detailed Implementation

[0020] The embodiments of this application will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be understood that the preferred embodiments are only for illustrating this application and are not intended to limit the scope of protection of this application.

[0021] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. Therefore, the drawings only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0022] For ease of description, spatial relative terms may be used in the text to describe the relative position or movement of one element or feature relative to another element or feature, as shown in the figure. These relative terms include, for example, "inside," "outside," "middle," "outer," "below," "below," "above," "front," "back," etc. Such spatial relative terms are intended to include different orientations of the device in use or operation, other than those depicted in the figure. For example, if the device in the figure undergoes a positional flip, orientation change, or change of motion, these directional indications will change accordingly. For instance, an element described as "below other elements or features" or "below other elements or features" will subsequently be oriented "above other elements or features" or "above other elements or features." Therefore, the example term "below" can include both upper and lower orientations. The device may be otherwise oriented (rotated 90 degrees or in other directions), and the spatial relative descriptors used in the text will be interpreted accordingly.

[0023] To address the issue that existing vehicle service subscription methods require users to manually maintain the UUID mapping table when updating UUID configurations for different vehicle models or the same vehicle model, resulting in high maintenance costs, this application provides a vehicle service subscription method, apparatus, system, and computer-readable storage medium that enables automatic negotiation and adaptation of service UUIDs between vehicles and mobile terminals.

[0024] See Figure 1 , Figure 1 This is a flowchart illustrating a vehicle service subscription method provided in an embodiment of this application. Figure 1 As shown, this vehicle service subscription method is applied to a mobile terminal, and the vehicle service subscription method may include the following steps: Step S102: Receive the broadcast packet sent by the vehicle and extract the service identification information from the broadcast packet. The service identification information includes the vehicle model identifier and the configuration version number of the vehicle's latest universal unique identifier (UUID).

[0025] Specifically, the aforementioned mobile terminal can refer to a portable electronic device with Bluetooth Low Energy (BLE) communication capabilities, such as a smartphone, tablet, smartwatch, wearable device, or in-vehicle handheld terminal, as long as it can wirelessly communicate with the vehicle via the BLE protocol. As an optional implementation, the mobile terminal can be a user's everyday smartphone with a vehicle-specific app installed on it, through which the steps in the embodiments of this application are executed.

[0026] The aforementioned broadcast packets refer to data packets periodically sent by the vehicle (i.e., a BLE peripheral device) on the broadcast channel. According to the BLE protocol specification, broadcast packets are used to announce the existence of the BLE peripheral device and carry its basic information. Broadcast packets mainly include the Broadcast Channel Protocol Data Unit (BCL), and their payload can carry information such as device name, transmit power, connection status, and vendor-defined data. In this invention, the vehicle, acting as a BLE peripheral device, continuously sends broadcast packets at regular intervals (e.g., 100 milliseconds) so that nearby mobile terminals can obtain the service identification information within them without establishing a connection.

[0027] The aforementioned service identification information refers to the set of information used to uniquely identify the current BLE service configuration status of a vehicle. This service identification information is embedded in the broadcast packets sent by the vehicle and is directly obtained by the mobile terminal during the scanning phase. Specifically, this service identification information includes at least a vehicle model identifier and a configuration version number. The vehicle model identifier is used to uniquely identify the specific model of the vehicle; different brands, series, years, or hardware configurations will have different vehicle model identifiers. The configuration version number is used to identify the version status of the UUID configuration in the vehicle's current BLE firmware. In the vehicle's BLE firmware, each Generic Attributes (GATT) service is assigned a corresponding UUID. When the vehicle's BLE firmware is updated via Over-The-Air (OTA) or other methods, if the UUID of any service changes, the vehicle's UUID configuration version number will increment accordingly. For example, the initial version number is 1, it increments to 2 after the first UUID configuration change, to 3 after the second UUID configuration change, and so on. This configuration version number allows the mobile terminal to determine whether the currently cached UUID mapping table is still valid: if the configuration version number obtained from the broadcast packet is consistent with the version number in the local cache, it means that the currently cached UUID mapping table is valid; if they are inconsistent, it means that the vehicle's UUID configuration has changed and the latest UUID mapping table needs to be obtained again.

[0028] In this step, the mobile terminal initiates a BLE scanning function to receive BLE broadcast packets periodically sent by surrounding vehicles. Since the broadcast packets are transmitted on a broadcast channel, the mobile terminal can receive and parse the content of the broadcast packets without establishing a BLE connection with the vehicles. After receiving the broadcast packets, the mobile terminal parses the service identification information from the payload of the broadcast packets, specifically including the vehicle model identifier and configuration version number. As an optional implementation, this service identification information can be carried in the Manufacturer Specific Data (MSD) field of the BLE broadcast packets; the mobile terminal can extract the service identification information by parsing this field.

[0029] Step S104: Based on the vehicle model identifier and configuration version number, obtain the UUID mapping table that matches the vehicle. The UUID mapping table is used to represent the mapping relationship between each service of the vehicle and the UUID of each service.

[0030] Specifically, the aforementioned UUID mapping table refers to a data structure used to describe the mapping relationship between various services of a vehicle and their corresponding UUIDs. The purpose of the UUID mapping table is to provide the mobile terminal with a service-UUID correspondence dictionary for the current vehicle, enabling the mobile terminal to quickly and accurately locate the target service after connection.

[0031] In this step, the mobile terminal uses the vehicle model identifier and configuration version number as the query key to first check the local cache. If a valid UUID mapping table with this combination as the key exists in the local cache, it is used directly without accessing the network. If no valid UUID mapping table with this combination as the key exists in the local cache, the mobile terminal can obtain a UUID mapping table matching the vehicle from the cloud server. After obtaining the UUID mapping table, it is stored in the local cache for direct use on the next connection. In this way, through a two-level retrieval mechanism of prioritizing local caching and on-demand cloud retrieval, the number of network accesses is minimized and connection latency is reduced while ensuring timely updates of configuration data.

[0032] Step S106: With a Bluetooth connection established with the vehicle, subscribe to the vehicle's various services based on the UUID mapping table.

[0033] In this step, after establishing a BLE connection with the vehicle, the mobile terminal can subscribe to various vehicle services based on the UUID mapping table. Specifically, the mobile terminal can first call a preset service discovery interface to trigger the vehicle to report all its configured GATT services. After service discovery is complete, the mobile terminal obtains a list of all services reported by the vehicle. Subsequently, the mobile terminal uses each service UUID in the UUID mapping table as a matching target, traversing the list of discovered services. When the UUID of a discovered service matches a service UUID in the mapping table, the match is considered successful, and that service is the target service. Through the above traversal and matching process, the mobile terminal can accurately locate each required target service from multiple discovered services. After all target services are matched, the mobile terminal has completed its subscription to all vehicle services. Subsequently, the mobile terminal can perform data read / write operations or set notifications based on the specific characteristics of the matched target services according to business needs, thereby realizing specific vehicle control or status monitoring functions.

[0034] In this way, the mobile terminal can automatically obtain the UUID mapping table matching the vehicle by utilizing the service identifier information carried in the vehicle's broadcast packets. This enables automatic negotiation and adaptation of service UUIDs between the mobile terminal and the vehicle, eliminating the need for users to manually maintain the UUID mapping table when using different vehicle models or updating the UUID configuration for the same vehicle model, thus reducing the maintenance cost of the UUID mapping table. Furthermore, the entire vehicle service subscription process is transparent to the user, requiring no manual selection of vehicle model or input of any information, thereby improving the user experience.

[0035] In an optional embodiment, step S104, obtaining a UUID mapping table matching the vehicle based on the vehicle model identifier and configuration version number, includes: Determine whether a UUID mapping table matching the vehicle model and configuration version number exists in the local cache of the mobile terminal; If it is determined that a UUID mapping table matching the vehicle model identifier and configuration version number exists in the local cache of the mobile terminal, the UUID mapping table matching the vehicle is retrieved from the local cache. If it is determined that there is no UUID mapping table matching the vehicle model and configuration version number in the local cache of the mobile terminal, the UUID mapping table matching the vehicle is obtained from the cloud server.

[0036] Specifically, the aforementioned local cache refers to the mobile terminal's local data storage area, used to persistently store the UUID mapping tables that have already been obtained. The purpose of the local cache is to save the mapping table locally after the mobile terminal successfully obtains it for the first time. Subsequent connections to the same vehicle model do not require repeated requests to the cloud server; the table can be read directly from the local cache. This mechanism significantly reduces the number of network communications between the mobile terminal and the cloud server, lowers connection latency, and avoids the risk of connection failure due to inability to access the cloud in scenarios with poor network signal.

[0037] When a UUID mapping table matching the vehicle model and configuration version number is found in the mobile terminal's local cache, the mobile terminal can directly read the mapping table from the local cache. Since users typically use the same vehicle daily (such as a family-owned vehicle), after the mobile terminal app connects to and caches the mapping table for the first time, subsequent uses will directly hit the local cache, keeping the service subscription time within a very short range and significantly improving the user experience.

[0038] When it is determined that the mobile terminal's local cache does not contain a UUID mapping table matching the vehicle model and configuration version number, the mobile terminal can obtain the matching UUID mapping table from the cloud server via wireless network. Although this consumes network traffic and waiting time, it ensures that the mobile terminal can obtain the correct UUID mapping table under any circumstances (including the first connection to a new vehicle, the first connection after a vehicle model UUID configuration update, etc.), thus achieving the integrity and robustness of the solution.

[0039] In this way, by prioritizing local caching, the mobile terminal can directly obtain the UUID mapping table without waiting for network communication when the cache is hit. This significantly shortens the overall time from connection establishment to service subscription completion, improving the user's operational response experience. Furthermore, local caching reduces duplicate requests to the cloud server, lowering the concurrent access pressure on the cloud server, reducing bandwidth consumption and server resource usage, thereby reducing operational costs.

[0040] In an optional embodiment, the above step of obtaining a UUID mapping table matching the vehicle from a cloud server includes: Send a request command to the cloud server, which includes the vehicle model identifier and configuration version number; Receive the UUID mapping table returned by the cloud server. The UUID mapping table is a mapping table obtained by the cloud server from the configuration center in response to the request command. The configuration center has multiple UUID mapping tables pre-configured for different vehicle models and different configuration version numbers.

[0041] Specifically, the aforementioned request instruction refers to a data message sent by the mobile terminal to the cloud server to request the retrieval of a UUID mapping table. This request instruction carries at least the vehicle model identifier and configuration version number extracted by the mobile terminal from the vehicle broadcast packet, enabling the cloud server to accurately locate the target mapping table based on these two key parameters. The specific implementation of this request instruction is not limited, but it can typically employ a request method based on the Hypertext Transfer Protocol (HTTP), such as an HTTP GET request or an HTTP POST request.

[0042] The aforementioned configuration center can refer to a system component that centrally stores and manages the UUID mapping tables for all vehicle models. This configuration center can be deployed on a cloud server backend, integrated within the cloud server as a functional module, or exist as an independent database system or configuration management service.

[0043] If the mobile terminal does not find the model in its local cache, it constructs a request command, including the vehicle model identifier and configuration version number, and sends it to the cloud server via wireless network. Upon receiving the request command, the cloud server parses out the vehicle model identifier and configuration version number, then uses these two parameters as indexes to search in the configuration center, and returns the found UUID mapping table to the mobile terminal. After receiving the UUID mapping table from the cloud server, the mobile terminal completes the acquisition process and can further store the acquired mapping table in its local cache for later use.

[0044] In this way, by centrally storing the UUID mapping table for all vehicle models in the configuration center, the UUID mapping data becomes a data asset that can be centrally maintained and independently updated. When a new vehicle is launched or the UUID configuration of an existing vehicle changes due to a BLE firmware upgrade, only the corresponding record needs to be added or modified in the configuration center. All deployed existing apps can automatically obtain the latest configuration through the above request mechanism, completely avoiding the drawbacks of traditional solutions that require app release updates.

[0045] In an optional embodiment, after the above steps of obtaining the UUID mapping table matching the vehicle from the cloud server, the method further includes: Update the local cache and mark the existing UUID mapping table in the local cache as expired.

[0046] Specifically, the mobile terminal uses the combination of the vehicle model identifier and configuration version number extracted from the vehicle broadcast packet as the key, and the newly obtained UUID mapping table from the cloud server as the value, writing this key-value pair into a local cache (such as a database table or key-value storage file). After successful writing, the new mapping table becomes a valid record in the local cache, which can be quickly read and used when connecting to vehicles of the same model. At the same time, after successfully obtaining and caching the new UUID mapping table, the mobile terminal can also perform a status marking operation on the existing old version UUID mapping table of the same model in the local cache, changing the status of the old records from valid to expired. This allows the mobile terminal to accurately identify which cached records are currently valid and which have become invalid due to version updates when performing local cache queries, thereby avoiding the misuse of expired configurations.

[0047] In this way, by promptly updating the mobile terminal's local cache after obtaining the new UUID mapping table and marking the old UUID mapping table in the local cache as expired, the latest UUID mapping table is always retained in the local cache. When the mobile terminal subsequently connects to the same vehicle, it can directly hit the valid cache record, avoiding service subscription failures or connection anomalies caused by using expired configurations.

[0048] In an optional embodiment, the method further includes: When the mobile terminal meets the preset conditions, it switches to the downgrade exploration mode. The preset conditions include that the mobile terminal cannot extract service identifier information from the broadcast packet and / or the mobile terminal cannot obtain the UUID mapping table from the cloud server. Iterate through all services and features reported by the vehicle and perform heuristic matching based on the attribute combinations of the features.

[0049] Specifically, the aforementioned preset conditions refer to a set of predefined judgment conditions that trigger the mobile terminal to switch from normal mode to downgrade exploration mode. These preset conditions are not manually triggered by the user, but are automatically triggered when the mobile terminal cannot extract service identifier information from the broadcast packet, and / or the mobile terminal cannot obtain the UUID mapping table from the cloud server.

[0050] The aforementioned downgrade exploration mode refers to a backup working mode activated when a mobile terminal is unable to complete a service subscription through the normal process. The core value of this downgrade exploration mode lies in enabling the mobile terminal to potentially successfully complete a service subscription even under extreme conditions, demonstrating the comprehensive adaptability of the invention solution in different scenarios.

[0051] The aforementioned heuristic matching refers to a method of speculative matching based on empirical rules and feature attributes. Unlike exact matching (such as direct comparison through a UUID mapping table), heuristic matching does not rely on pre-known exact UUID values, but rather guesses which function type a feature might belong to based on the various attribute information exposed by BLE features.

[0052] The mobile terminal iterates through all services and features reported by the vehicle. After iterating through all reported services and features, it extracts the attribute combinations for each feature. These attribute combinations include, but are not limited to: Read (indicating whether read operations are supported), Write (indicating whether write operations are supported), Write WithoutResponse (indicating whether write operations without confirmation are supported), Notify (indicating whether proactive notifications are supported), and Indicate (indicating whether confirmation-required instructions are supported). Based on the different combinations of these attributes and combined with preset heuristic rules, the mobile terminal infers which services and features might be required by the business.

[0053] In this way, it is not only applicable to new models that support DSI broadcasting, but also backward compatible with older models that do not support the mechanism. Even if the vehicle cannot provide service identification information, or the mobile terminal is in a state of no network, the present invention can still try to complete the service subscription through heuristic matching, thus maximizing the user's basic connection experience.

[0054] In an optional embodiment, step S106, subscribing to various services of the vehicle based on the UUID mapping table, includes: Call the preset service discovery interface to obtain the vehicle's various services; Based on the UUID mapping table, determine the UUID of each service of the vehicle; Subscribe to the service objects corresponding to each service based on the UUID of each service.

[0055] Specifically, the aforementioned service discovery interface refers to the application programming interface (API) provided by the mobile terminal operating system, which is used to trigger BLE peripheral devices (i.e., vehicles) to report all their configured GATT services. By calling this interface, the mobile terminal actively initiates a service discovery request. After receiving the service discovery request, the vehicle reports complete information about all GATT services registered in its BLE protocol stack and their subordinate characteristics to the mobile terminal.

[0056] In Android, the specific implementation of the service discovery interface is the `BluetoothGatt.discoverServices()` method. Once the mobile terminal establishes a BLE connection with the vehicle and obtains a `BluetoothGatt` object, calling this `discoverServices()` method initiates service discovery. In iOS, the corresponding interface is the `CBPeripheral.discoverServices(nil)` method (passing in `nil` indicates discovering all services). Regardless of the specific operating system platform, the function of the service discovery interface is essentially the same: to trigger the vehicle to report a complete list of all its GATT services.

[0057] The aforementioned service object refers to a data structure or object instance representing a GATT service in the mobile terminal operating system. The service object encapsulates service data from the underlying Bluetooth protocol stack. Through this object, the mobile terminal can obtain information such as the service's UUID and type, and further obtain the service's feature list and feature objects, thereby enabling complete operation on the service. In the Android system, the specific type of the service object is BluetoothGattService; in the iOS system, the corresponding type is CBService. Regardless of the specific platform implementation, the core function of the service object remains consistent: as an operation handle between the mobile terminal and the vehicle's GATT service, the mobile terminal can perform subsequent operations on the service and its subordinate features by holding a reference to this object.

[0058] After establishing a BLE connection with the vehicle, the mobile terminal can subscribe to various vehicle services based on a UUID mapping table. Specifically, the mobile terminal first calls a pre-defined service discovery interface to trigger the vehicle to report all its configured GATT services. Once service discovery is complete, the mobile terminal obtains a list of all services reported by the vehicle. Then, using each service UUID in the UUID mapping table as a matching target, the mobile terminal iterates through the list of discovered services. When the UUID of a discovered service matches a service UUID in the mapping table, the match is considered successful, and that service is the target service. Through this iterative matching process, the mobile terminal can accurately locate each required target service from multiple discovered services. After all target services have been matched, the mobile terminal has completed its subscription to all vehicle services. Subsequently, the mobile terminal can perform data read / write operations or set notifications based on the specific characteristics of the matched target services, according to business needs, thereby realizing specific vehicle control or status monitoring functions.

[0059] In this way, by performing precise matching based on the service UUID in the UUID mapping table, rather than relying on fuzzy heuristic guesses, the mobile terminal can accurately locate the correct target service, avoiding the problem of missubscription caused by the low accuracy of heuristic matching in traditional solutions, and improving connection reliability.

[0060] See Figure 2 , Figure 2 This is a flowchart illustrating another vehicle service subscription method provided in an embodiment of this application. Figure 2 As shown, this vehicle service subscription method is applied to vehicles and may include the following steps: Step S202: Obtain the latest service identification information, which includes the vehicle model identifier and the configuration version number of the vehicle's latest universal unique identifier (UUID).

[0061] Specifically, the aforementioned vehicle can be any mode of transportation equipped with a BLE communication module, such as a smart connected vehicle, a new energy vehicle, a traditional fuel vehicle, an electric bicycle, or a motorcycle. As an optional implementation, the vehicle can be a smart connected vehicle, where its BLE module acts as a BLE peripheral, periodically sending broadcast packets and waiting for a mobile terminal (acting as the BLE central device) to scan and connect. The aforementioned service identification information may include vehicle model identification and configuration version number, the meaning of which has been explained in detail in the preceding embodiments and will not be repeated here.

[0062] In one implementation, the vehicle model identifier and UUID configuration version number are pre-configured (e.g., burned or written) in the vehicle's BLE firmware or non-volatile storage medium, and the vehicle's BLE module reads them directly from the storage medium during power-on initialization. In another implementation, the vehicle's BLE module communicates with other electronic control units (ECUs) in the vehicle via the vehicle's internal bus to obtain the vehicle model identifier and UUID configuration version number from these ECUs. In yet another implementation, the vehicle's BLE module receives a new UUID configuration version number via an OTA (Over-The-Air) upgrade mechanism and updates the locally stored version number after a successful upgrade.

[0063] Step S204: Encode the vehicle model identifier and configuration version number into the broadcast packet and broadcast the broadcast packet so that the mobile terminal can extract the vehicle model identifier and configuration version number from the broadcast packet, obtain the UUID mapping table matching the vehicle based on the vehicle model identifier and configuration version number in the service identifier information, and subscribe to the vehicle's various services based on the UUID mapping table when the mobile terminal establishes a Bluetooth connection with the vehicle. The UUID mapping table is used to represent the mapping relationship between the vehicle's various services and the UUIDs of the various services.

[0064] Specifically, the aforementioned service identification information is carried in a manufacturer-specific data field of the BLE broadcast packet. This field is a data area specifically reserved in the Bluetooth broadcast packet for manufacturer-defined use, and its structure includes, in sequence: Vendor ID (2 bytes): An identifier that conforms to the Bluetooth core specification and is used to indicate the vendor to which specific data belongs. Custom Data Section: Manufacturers can freely define the data format and content in this area.

[0065] In this invention, the vehicle encodes service identification information in the custom data section according to the following format: Frame type (occupies 1 byte): fixed at 0x01, used to identify whether the manufacturer-specific data carries a Dynamic Service Identifier (DSI) frame, which helps the mobile terminal distinguish different types of custom data during parsing; Vehicle model identifier (occupying 8 bytes): The vehicle model identifier is encoded in ASCII (American Standard Code for Information Interchange) string format, with spaces added to fill any gaps. Protocol version number (1 byte): Used to identify the protocol version of the DSI data format, facilitating future expansion; Configuration version number (1 byte): Used to identify the UUID configuration version of the current BLE firmware.

[0066] In this step, the vehicle can encode the vehicle model identifier and configuration version number into a broadcast packet and broadcast the broadcast packet. In this way, the mobile terminal can extract the vehicle model identifier and configuration version number from the broadcast packet, and obtain the UUID mapping table that matches the vehicle based on the vehicle model identifier and configuration version number in the service identifier information. Then, when the mobile terminal establishes a Bluetooth connection with the vehicle, it can subscribe to the vehicle's various services based on the UUID mapping table.

[0067] In this way, the vehicle only carries two lightweight parameters—the vehicle model identifier and the UUID configuration version number—in the broadcast packet, without needing to store the complete UUID mapping table or send it via broadcast. The UUID mapping table is centrally stored and managed by the cloud configuration center. This design greatly reduces the storage burden on the vehicle's BLE module and the limitation on the amount of broadcast data (the maximum payload of a BLE broadcast packet is 31 bytes), enabling this solution to operate efficiently even on resource-constrained BLE devices. Furthermore, the vehicle announces its service identification information via broadcast packets, allowing the mobile terminal to obtain the vehicle model identifier and UUID configuration version number during the scanning phase without establishing a BLE connection with the vehicle. This sequence of obtaining configuration first and then establishing a connection allows the mobile terminal to complete configuration preparation before connection and immediately perform service subscription after connection, significantly shortening the overall connection establishment time.

[0068] In an optional embodiment, step S202, obtaining the latest service identifier information, includes: Each time a remote software upgrade is completed, check whether the UUID configuration in the target firmware has been updated. If a UUID configuration update is detected in the target firmware, the vehicle's configuration version number is updated. Obtain the vehicle model identifier and use the model identifier and the updated configuration version number as service identifier information.

[0069] Specifically, the aforementioned remote software upgrade refers to the remote upgrade of the vehicle's BLE module-related firmware (also known as BLE firmware or target firmware), i.e., updating the vehicle's BLE communication module firmware via OTA. After completing the remote software upgrade, the vehicle checks and judges the UUID configuration status in the upgraded BLE firmware. When the vehicle detects that the UUID configuration has been updated, it increments or changes the locally stored configuration version number. This configuration version number is a value used to identify the UUID configuration version in the vehicle's current BLE firmware; the version number increments each time the UUID configuration changes (e.g., from 5 to 6).

[0070] This allows the vehicle to automatically detect changes in its UUID configuration after each OTA update and automatically increment the configuration version number when changes occur. The entire detection and update process is completed automatically by the vehicle, requiring no manual operation or external triggering, reducing maintenance costs and avoiding version number outages due to human error.

[0071] See Figure 3 , Figure 3 This is a schematic diagram of a vehicle service subscription device provided in an embodiment of this application. Figure 3 As shown, the vehicle service subscription device is applied to a mobile terminal, and the vehicle service subscription device 300 may include: The receiving and extracting module 302 is used to receive broadcast packets sent by the vehicle and extract service identification information from the broadcast packets. The service identification information includes the vehicle model identifier and the configuration version number of the vehicle's latest universal unique identifier (UUID). The first acquisition module 304 is used to acquire a UUID mapping table matching the vehicle based on the vehicle model identifier and configuration version number. The UUID mapping table is used to represent the mapping relationship between each service of the vehicle and the UUID of each service. The subscription module 306 is used to subscribe to various services of the vehicle based on the UUID mapping table when a Bluetooth connection is established with the vehicle.

[0072] Furthermore, the first acquisition module 304 includes: The first determining submodule is used to determine whether there is a UUID mapping table in the local cache of the mobile terminal that matches the vehicle model identifier and configuration version number; The first acquisition submodule is used to acquire the UUID mapping table matching the vehicle from the local cache if it is determined that there is a UUID mapping table matching the vehicle model identifier and configuration version number in the local cache of the mobile terminal. The second acquisition submodule is used to obtain a UUID mapping table matching the vehicle from the cloud server if it is determined that there is no UUID mapping table matching the vehicle model identifier and configuration version number in the local cache of the mobile terminal.

[0073] Furthermore, the second acquisition submodule includes: The sending unit is used to send a request instruction to the cloud server, wherein the request instruction carries the vehicle model identifier and configuration version number; The receiving unit is used to receive the UUID mapping table returned by the cloud server. The UUID mapping table is a mapping table obtained by the cloud server from the configuration center in response to the request command. The configuration center has multiple UUID mapping tables pre-configured for different vehicle models and different configuration version numbers.

[0074] Furthermore, the vehicle service subscription device 300 also includes: The update module is used to update the local cache and mark the original UUID mapping table in the local cache as expired.

[0075] Furthermore, the vehicle service subscription device 300 also includes: The switching module is used to switch to the downgrade exploration mode when the mobile terminal meets preset conditions. The preset conditions include that the mobile terminal cannot extract service identifier information from the broadcast packet and / or the mobile terminal cannot obtain the UUID mapping table from the cloud server. The traversal module is used to traverse all services and features reported by vehicles and perform heuristic matching based on the combination of feature attributes.

[0076] Furthermore, subscription module 306 includes: The calling submodule is used to call the preset service discovery interface to obtain the various services of the vehicle; The second determination submodule is used to determine the UUID of each service of the vehicle based on the UUID mapping table; The subscription submodule is used to subscribe to the service objects corresponding to each service based on the UUID of each service.

[0077] It should be noted that the vehicle service subscription device 300 can achieve the aforementioned Figure 1 The vehicle service subscription method provided in the illustrated embodiment can achieve the same technical effect, and will not be described in detail here.

[0078] See Figure 4 , Figure 4 This is a schematic diagram of another vehicle service subscription device provided in an embodiment of this application. Figure 4 As shown, the vehicle service subscription device is applied to a vehicle, and the vehicle service subscription device 400 may include: The second acquisition module 402 is used to acquire the latest service identification information, wherein the service identification information includes the vehicle model identifier and the configuration version number of the vehicle's latest universal unique identifier (UUID). The encoding module 404 is used to encode the vehicle model identifier and configuration version number into the broadcast packet and broadcast the broadcast packet so that the mobile terminal can extract the vehicle model identifier and configuration version number from the broadcast packet, obtain the UUID mapping table matching the vehicle based on the vehicle model identifier and configuration version number in the service identifier information, and subscribe to the various services of the vehicle based on the UUID mapping table when the mobile terminal establishes a Bluetooth connection with the vehicle. The UUID mapping table is used to represent the mapping relationship between the various services of the vehicle and the UUIDs of the various services.

[0079] Furthermore, the second acquisition module 402 includes: The detection submodule is used to detect whether the UUID configuration in the target firmware has been updated after each remote software upgrade. The update submodule is used to update the vehicle's configuration version number when a UUID configuration update is detected in the target firmware; The third acquisition submodule is used to acquire the vehicle model identifier and determine the model identifier and the updated configuration version number as service identifier information.

[0080] It should be noted that the vehicle service subscription device 400 can achieve the aforementioned Figure 2 The vehicle service subscription method provided in the illustrated embodiment can achieve the same technical effect, and will not be described in detail here.

[0081] See Figure 5 , Figure 5 This is a schematic diagram of the structure of a vehicle service subscription system provided in an embodiment of this application. Figure 5 As shown, the vehicle service subscription system 500 includes: a mobile terminal 502 and a vehicle 504; Among them, the mobile terminal 502 is used to perform the aforementioned Figure 1 The steps of the vehicle service subscription method provided in the illustrated embodiment are the same as those of the method embodiment, and can achieve the same technical effect, so they will not be described in detail here; Vehicle 504 is used to perform the aforementioned Figure 2 The steps of the vehicle service subscription method provided in the illustrated embodiment are the same and can achieve the same technical effect, so they will not be described in detail here.

[0082] In addition, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the vehicle service subscription method provided in any of the foregoing method embodiments.

[0083] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0084] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0085] It should be understood that the terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “described” as used herein may also include the plural forms. The terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore indicate the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not construed as requiring them to be performed in a particular order described or illustrated unless the order of performance is explicitly indicated. It should also be understood that additional or alternative steps may be used.

[0086] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for subscribing to vehicle services, characterized in that, Applied to a mobile terminal, the method includes: Receive broadcast packets sent by vehicles and extract service identification information from the broadcast packets, wherein the service identification information includes the vehicle model identifier and the configuration version number of the vehicle's latest universal unique identifier (UUID); Based on the vehicle model identifier and the configuration version number, a UUID mapping table matching the vehicle is obtained, wherein the UUID mapping table is used to represent the mapping relationship between each service of the vehicle and the UUID of each service; Once a Bluetooth connection is established with the vehicle, the various services of the vehicle are subscribed to based on the UUID mapping table.

2. The method according to claim 1, characterized in that, The step of obtaining a UUID mapping table matching the vehicle based on the vehicle model identifier and the configuration version number includes: Determine whether a UUID mapping table matching the vehicle model identifier and the configuration version number exists in the local cache of the mobile terminal; If it is determined that a UUID mapping table matching the vehicle model identifier and the configuration version number exists in the local cache of the mobile terminal, the UUID mapping table matching the vehicle is obtained from the local cache. If it is determined that there is no UUID mapping table matching the vehicle model identifier and the configuration version number in the local cache of the mobile terminal, the UUID mapping table matching the vehicle is obtained from the cloud server.

3. The method according to claim 2, characterized in that, The step of obtaining the UUID mapping table matching the vehicle from the cloud server includes: Send a request instruction to the cloud server, wherein the request instruction carries the vehicle model identifier and the configuration version number; The system receives the UUID mapping table returned by the cloud server. The UUID mapping table is a mapping table obtained by the cloud server from the configuration center in response to the request instruction. The configuration center has multiple UUID mapping tables pre-configured for different vehicle models and different configuration version numbers.

4. The method according to claim 3, characterized in that, After obtaining the UUID mapping table matching the vehicle from the cloud server, the method further includes: Update the local cache and mark the original UUID mapping table in the local cache as expired.

5. The method according to claim 2, characterized in that, The method further includes: When the mobile terminal meets the preset conditions, it switches to the downgrade exploration mode. The preset conditions include that the mobile terminal cannot extract the service identifier information from the broadcast packet, and / or the mobile terminal cannot obtain the UUID mapping table from the cloud server. Iterate through all services and features reported by the vehicle and perform heuristic matching based on the attribute combinations of the features.

6. The method according to claim 1, characterized in that, The subscription to various services of the vehicle based on the UUID mapping table includes: Call the preset service discovery interface to obtain the various services of the vehicle; Based on the UUID mapping table, determine the UUID of each service of the vehicle; Subscribe to the service objects corresponding to each service based on the UUID of each service.

7. A method for subscribing to vehicle services, characterized in that, Applied to vehicles, the method includes: Obtain the latest service identification information, wherein the service identification information includes the vehicle model identifier and the configuration version number of the vehicle's latest Universal Unique Identifier (UUID); The vehicle model identifier and the configuration version number are encoded into a broadcast packet, and the broadcast packet is broadcast so that the mobile terminal can extract the vehicle model identifier and the configuration version number from the broadcast packet, and obtain a UUID mapping table matching the vehicle based on the vehicle model identifier and the configuration version number in the service identifier information. When the mobile terminal establishes a Bluetooth connection with the vehicle, it subscribes to the various services of the vehicle based on the UUID mapping table, wherein the UUID mapping table is used to represent the mapping relationship between the various services of the vehicle and the UUIDs of the various services.

8. The method according to claim 7, characterized in that, The process of obtaining the latest service identifier information includes: Each time a remote software upgrade is completed, check whether the UUID configuration in the target firmware has been updated. If a UUID configuration update is detected in the target firmware, the configuration version number of the vehicle is updated. Obtain the vehicle model identifier and use the vehicle model identifier and the updated configuration version number as the service identifier information.

9. A vehicle service subscription device, characterized in that, The device, applied to a mobile terminal, includes: The receiving and extracting module is used to receive broadcast packets sent by the vehicle and extract service identification information from the broadcast packets, wherein the service identification information includes the vehicle model identifier and the configuration version number of the vehicle's latest universal unique identifier (UUID); The first acquisition module is used to acquire a UUID mapping table matching the vehicle based on the vehicle model identifier and the configuration version number, wherein the UUID mapping table is used to represent the mapping relationship between each service of the vehicle and the UUID of each service; The subscription module is used to subscribe to various services of the vehicle based on the UUID mapping table when a Bluetooth connection is established with the vehicle.

10. A vehicle service subscription device, characterized in that, Applied to vehicles, the device includes: The second acquisition module is used to acquire the latest service identification information, wherein the service identification information includes the vehicle model identifier and the configuration version number of the vehicle's latest universal unique identifier (UUID); An encoding module is used to encode the vehicle model identifier and the configuration version number into a broadcast packet and broadcast the broadcast packet so that the mobile terminal can extract the vehicle model identifier and the configuration version number from the broadcast packet, obtain a UUID mapping table matching the vehicle based on the vehicle model identifier and the configuration version number in the service identifier information, and subscribe to the various services of the vehicle based on the UUID mapping table when the mobile terminal establishes a Bluetooth connection with the vehicle. The UUID mapping table is used to represent the mapping relationship between the various services of the vehicle and the UUIDs of the various services.

11. A vehicle service subscription system, characterized in that, The system includes: a mobile terminal and a vehicle; The mobile terminal is used to execute the vehicle service subscription method according to any one of claims 1-6; The vehicle is used to perform the vehicle service subscription method according to any one of claims 7-8.

12. A computer-readable storage medium, characterized in that, The device stores computer-executable instructions for performing the vehicle service subscription method according to any one of claims 1-6, or for performing the vehicle service subscription method according to any one of claims 7-8.