Access method and device of equipment, equipment and storage medium

By generating operation instruction templates for the devices and periodically detecting changes in the function, the problem of low access efficiency for vehicle-mounted devices was solved, enabling the access and function synchronization of devices without configured operation instructions.

CN116367119BActive Publication Date: 2026-04-21CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING CHANGAN AUTOMOBILE CO LTD
Filing Date
2023-03-27
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, the efficiency of vehicle-mounted equipment accessing vehicles is low, and only devices configured with operating instructions are allowed to access vehicles.

Method used

The target vehicle receives the identifier of the access device, queries its functional information, and generates a template of operation instructions. It supports the access of devices that have not been configured with operation instructions, and manages the operation instructions by periodically detecting changes in the function to ensure the normal use of the device functions.

Benefits of technology

This improves the efficiency of device access to vehicles, ensures that vehicles can use the functions of the accessed devices normally, and promptly synchronizes changes in device function information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116367119B_ABST
    Figure CN116367119B_ABST
Patent Text Reader

Abstract

The application relates to an access method and device of an equipment, an equipment and a storage medium, and relates to the technical field of communication. The method is applied to a target vehicle, and the method comprises the following steps: receiving an access request message from a target access equipment, wherein the access request message comprises the identification of the target access equipment; if the identification of the target access equipment does not exist in a preset identification set, sending a first query message to the target access equipment, wherein the first query message is used for indicating the function information of the target access equipment; receiving first information from the target access equipment, wherein the first information is used for indicating the function information of the target access equipment; generating a template of a first instruction according to the first information, and storing the template of the first instruction and the first information, wherein the first instruction is used for indicating the running of the function corresponding to the first information; and sending a first prompt message to the target access equipment, wherein the first prompt message is used for indicating that the equipment access is successful. Therefore, the efficiency of the equipment access to the vehicle can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, specifically to an access method, apparatus, device, and storage medium for a device. Background Technology

[0002] In recent years, with the development of technology, vehicles have become increasingly feature-rich, and more and more in-vehicle devices (such as car audio systems and dashcams) have been connected to them.

[0003] Currently, before connecting in-vehicle equipment to a vehicle, staff need to pre-configure the equipment's operating instructions within the vehicle. After the equipment is connected, the vehicle can then utilize these instructions to perform the equipment's functions. However, this technical solution only allows in-vehicle equipment with pre-configured operating instructions to connect, resulting in low efficiency in connecting equipment to the vehicle. Summary of the Invention

[0004] This application provides a device access method, apparatus, device, and storage medium to at least solve the technical problem of low efficiency in device access to vehicles in related technologies. The technical solution of this application is as follows:

[0005] According to a first aspect of this application, a device access method is provided, applied to a target vehicle. The target vehicle stores a preset identifier set. The device access method includes: the target vehicle receiving an access request message from a target access device, the access request message including an identifier of the target access device. If the identifier of the target access device does not exist in the preset identifier set, the target vehicle sends a first query message to the target access device, the first query message indicating a query for the functional information of the target access device. The target vehicle receives first information from the target access device, the first information indicating the functional information of the target access device. Based on the first information, the target vehicle generates a template of a first instruction and stores the template of the first instruction and the first information, the first instruction indicating the execution of the function corresponding to the first information. The target vehicle sends a first prompt message to the target access device, the first prompt message indicating successful device access.

[0006] Based on the aforementioned technical means, vehicles can instantly acquire functional information from access devices and generate templates for operating instructions for those devices, enabling access devices that are not configured with operating instructions within the vehicle to connect. This improves the efficiency of device access to vehicles.

[0007] In one possible implementation, after the aforementioned "target vehicle sends a first prompt message to the target access device," the device access method further includes: the target vehicle sending a second query message to the target access device at a preset time, the second query message indicating the query for the target access device's functional information at the preset time. The target vehicle receives second information from the target access device, the second information indicating the target access device's functional information at the preset time. If the first information and the second information are different, the target vehicle generates a template for a second instruction based on the second information, the second instruction indicating the execution of the function corresponding to the second information. The target vehicle deletes the template of the first instruction and the first information, and stores the template of the second instruction and the second information.

[0008] Based on the above technical means, vehicles can periodically detect whether the functions of the access devices have changed, manage the templates and functional information of the stored access device operation instructions, and synchronize the status of the access devices, so that the vehicles can use the functions of the access devices normally.

[0009] In one possible implementation, after the aforementioned "target vehicle sends a first prompt message to the target access device," the device access method further includes: the target vehicle receiving an update message from the target access device, the update message indicating a change in the function of the target access device, the update message including: third information, the third information indicating the functional information of the target access device after the functional change. In response to the update message, the target vehicle generates a template for a third instruction based on the third information, the third instruction indicating the operation of the function corresponding to the third information. The target vehicle deletes the template of the stored instruction and the stored information, and stores the template of the third instruction and the third information, the stored information indicating the functional information of the target access device already stored in the target vehicle, and the stored instruction indicating the operation of the function corresponding to the stored information. The target vehicle sends a second prompt message to the target access device, the second prompt message indicating that the functional information has been synchronized.

[0010] Based on the aforementioned technical means, the access device can instantly provide the vehicle with updated functional information, enabling the vehicle to synchronously access the device's functional information and ensuring that the vehicle can use the access device's functions normally.

[0011] According to a second aspect of this application, a device access method is provided, applied to a target access device. The device access method includes: the target access device sending an access request message to a target vehicle, the access request message including an identifier of the target access device; the target access device receiving a first query message from the target vehicle, the first query message indicating a query for the target access device's functional information; the target access device responding to the first query message sending first information to the target vehicle, the first information indicating the target access device's functional information; and the target access device receiving a first notification message from the target vehicle, the first notification message indicating successful device access.

[0012] In one possible implementation, after the aforementioned "target access device receives a first prompt message from the target vehicle," the access method further includes: the target access device receiving a second query message from the target vehicle, the second query message indicating the query for the target access device's functional information at a preset time. In response to the second query message, the target access device sends second information to the target vehicle, the second information indicating the target access device's functional information at the preset time.

[0013] In one possible implementation, after the aforementioned "target access device receives a first prompt message from the target vehicle," the access method further includes: if it is determined that the function of the target access device has changed, the target access device sends an update message to the target vehicle. The update message indicates that the function of the target access device has changed, and includes third information indicating the functional information of the target access device after the functional change. The target access device receives a second prompt message from the target vehicle, indicating that the functional information has been synchronized.

[0014] According to a third aspect of this application, a device access apparatus is provided, applied to a target vehicle. The target vehicle stores a preset identifier set. The device access apparatus includes a receiving module, a sending module, a processing module, and a storage module. The receiving module is configured to receive an access request message from a target access device, the access request message including an identifier of the target access device. The sending module is configured to send a first query message to the target access device if the identifier of the target access device is not found in the preset identifier set. The first query message indicates a query for the functional information of the target access device. The receiving module is further configured to receive first information from the target access device, the first information indicating the functional information of the target access device. The processing module is configured to generate a template of a first instruction based on the first information, the first instruction indicating the execution of the function corresponding to the first information. The storage module stores the template of the first instruction and the first information. The sending module is further configured to send a first prompt message to the target access device, the first prompt message indicating successful device access.

[0015] In one possible implementation, the sending module is further configured to send a second query message to the target access device at a preset time, the second query message indicating that the target access device's functional information at the preset time is to be queried. The receiving module is further configured to receive second information from the target access device, the second information indicating the target access device's functional information at the preset time. The processing module is further configured to, if the first information and the second information are different, generate a template for a second instruction based on the second information, the second instruction indicating the execution of the function corresponding to the second information. The storage module is further configured to delete the template of the first instruction and the first information, and store the template of the second instruction and the second information.

[0016] In one possible implementation, the receiving module is further configured to receive an update message from the target access device. The update message indicates a change in the function of the target access device, and includes third information indicating the functional information of the target access device after the functional change. The processing module is further configured to, in response to the update message, generate a template for a third instruction based on the third information. The third instruction indicates the operation of the function corresponding to the third information. The storage module is further configured to delete the template of the stored instruction and the stored information, and store the template of the third instruction and the third information. The stored information indicates the functional information of the target access device already stored in the target vehicle, and the stored instruction indicates the operation of the function corresponding to the stored information. The sending module is further configured to send a second prompt message to the target access device, indicating that the functional information has been synchronized.

[0017] According to a fourth aspect of this application, a device access apparatus is provided, applied to a target access device. The device access apparatus includes a sending module and a receiving module. The sending module is configured to send an access request message to a target vehicle, the access request message including an identifier of the target access device. The receiving module is configured to receive a first query message from the target vehicle, the first query message indicating a query for functional information of the target access device. The sending module is further configured to, in response to the first query message, send first information to the target vehicle, the first information indicating functional information of the target access device. The receiving module is further configured to receive a first notification message from the target vehicle, the first notification message indicating successful device access.

[0018] In one possible implementation, the receiving module is further configured to receive a second query message from the target vehicle, the second query message indicating the query for functional information of the target access device at a preset time. The sending module is further configured to, in response to the second query message, send second information to the target vehicle, the second information indicating the functional information of the target access device at the preset time.

[0019] In one possible implementation, the sending module is further configured to send an update message to the target vehicle if it is determined that the function of the target access device has changed. The update message indicates that the function of the target access device has changed and includes third information indicating the functional information of the target access device after the function change. The receiving module is further configured to receive a second prompt message from the target vehicle, indicating that the functional information has been synchronized.

[0020] According to a fifth aspect of this application, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions. The processor is configured to execute instructions to implement the methods described in the first aspect and any possible implementation thereof.

[0021] According to a sixth aspect provided in this application, a computer-readable storage medium is provided that, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the methods described in the first aspect and any possible implementation thereof.

[0022] According to the seventh aspect provided in this application, a computer program product is provided, the computer program product including computer instructions, which, when executed on an electronic device, cause the electronic device to perform the method described in the first aspect and any possible implementation thereof.

[0023] Therefore, the above-mentioned technical features of this application have the following beneficial effects:

[0024] (1) Vehicles can obtain the functional information of access devices in real time and generate templates for the operation instructions of the access devices, so that access devices that have not been configured with operation instructions in the vehicle can also access the vehicle. In this way, the efficiency of device access to vehicles can be improved.

[0025] (2) The vehicle can periodically detect whether the function of the access device has changed, manage the templates and function information of the stored access device operation instructions, synchronize the status of the access device, and enable the vehicle to use the function of the access device normally.

[0026] (3) The access device can provide the vehicle with the updated function information in real time, so that the vehicle can access the device's function information in real time and ensure that the vehicle can use the access device's function normally.

[0027] It should be noted that the technical effects of any of the implementation methods in aspects two through seven can be found in the technical effects of the corresponding implementation methods in aspect one, and will not be repeated here.

[0028] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0029] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application, and do not constitute an undue limitation of this application.

[0030] Figure 1 This is a schematic diagram of a communication system according to an exemplary embodiment;

[0031] Figure 2 This is a flowchart illustrating a device access method according to an exemplary embodiment;

[0032] Figure 3 This is a flowchart illustrating yet another device access method according to an exemplary embodiment;

[0033] Figure 4 This is a schematic diagram illustrating yet another device access method according to an exemplary embodiment;

[0034] Figure 5 This is a flowchart illustrating yet another device access method according to an exemplary embodiment;

[0035] Figure 6 This is a schematic diagram illustrating an example of a Bluetooth pairing connection according to an exemplary embodiment;

[0036] Figure 7 This is a flowchart illustrating yet another device access method according to an exemplary embodiment;

[0037] Figure 8 This is a schematic diagram illustrating an example of generating device information according to an exemplary embodiment;

[0038] Figure 9 This is a block diagram illustrating an access device for a device according to an exemplary embodiment;

[0039] Figure 10 This is a block diagram illustrating an access device for another device according to an exemplary embodiment;

[0040] Figure 11 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation

[0041] The embodiments of the present invention 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 the present invention from the content disclosed in this specification. The present invention 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 the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.

[0042] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention 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.

[0043] Before providing a detailed description of the device access method provided in the embodiments of this application, the implementation environment and application scenarios of the embodiments of this application will be introduced first.

[0044] First, the application scenarios of the embodiments of this application will be introduced.

[0045] The device access method of this application embodiment is applied to a scenario where an in-vehicle device is connected to a vehicle. In related technologies, before the in-vehicle device is connected to the vehicle, staff need to pre-set the operating instructions for the in-vehicle device in the vehicle. After the in-vehicle device is connected to the vehicle, the vehicle can realize the functions of the in-vehicle device according to the configured operating instructions.

[0046] In summary, the current technical solution only allows onboard devices configured with operating commands to connect to the vehicle, resulting in low efficiency in device access.

[0047] To address the aforementioned issues, this application provides a device access method. A target vehicle determines whether it has stored operation instructions for the target access device by detecting the device's identifier. If the target vehicle determines that it has not stored operation instructions, it can query the target access device's functional information and generate a template of operation instructions based on the information provided. The target vehicle can then store this template and manage the target access device accordingly. In other words, the vehicle can generate operation instruction templates by instantly acquiring the access device's functional information, enabling access devices without pre-configured operation instructions to connect to the vehicle. This improves the efficiency of device access to the vehicle.

[0048] The implementation environment of the embodiments of this application is described below.

[0049] like Figure 1 The diagram illustrates a communication system provided in an embodiment of this application. The communication system includes a target vehicle (e.g., vehicle 101) and at least one target access device (e.g., vehicle-mounted device 102, vehicle-mounted device 103). Vehicle 101 can communicate with vehicle-mounted device 102 and vehicle-mounted device 103 via wired / wireless communication.

[0050] In this embodiment of the application, vehicle 101 can wirelessly communicate with vehicle-mounted device 102 and vehicle-mounted device 103 via Bluetooth Low Energy (BLE) function.

[0051] Specifically, vehicle 101 can receive an access request message from on-board device 102 and determine whether on-board device 102 is a historical access device based on the access request message. If vehicle 101 determines that on-board device 102 is not a historical access device, vehicle 101 sends a query message to on-board device 102 to query function information. On-board device 102 can receive the query message from vehicle 101 and, in response to the query message, send its function information to vehicle 101. Vehicle 101 can receive the function information from on-board device 102 and, based on the function information, generate a template of instructions for operating the functions of on-board device 102. Afterward, vehicle 101 can store the template of instructions for operating the functions of on-board device 102 and send an access success message to on-board device 102. Then, vehicle 101 can generate instructions for operating the functions of on-board equipment 102 based on the template of stored instructions, and operate the functions of on-board equipment 102.

[0052] Similarly, vehicle 101 can also receive access request messages from on-board device 103 and determine whether on-board device 103 is a historical access device based on the access request message from on-board device 103. If vehicle 101 determines that on-board device 103 is not a historical access device, vehicle 101 sends a query message to on-board device 103 to query function information. On-board device 103 can receive the query message from vehicle 101 and, in response to the query message, send its function information to vehicle 101. Vehicle 101 can receive the function information from on-board device 103 and, based on the function information, generate a template of instructions for operating the functions of on-board device 103. Afterward, vehicle 101 can store the template of instructions for operating the functions of on-board device 103 and send an access success message to on-board device 103. Then, vehicle 101 can generate instructions for operating the functions of on-board equipment 103 based on the template of stored instructions, and operate the functions of on-board equipment 103.

[0053] It should be noted that the vehicle (such as vehicle 101) can be a vehicle with transceiver capabilities, or it can be a vehicle supporting BLE functionality. This application does not impose any special restrictions on the specific form of the vehicle. It can interact with the user through one or more methods such as a keyboard, touchpad, touchscreen, remote control, voice interaction, or handwriting device. In the embodiments of this application, the vehicle can connect to in-vehicle equipment, and through interaction with the in-vehicle equipment, vehicle 101 can perform the functions of the in-vehicle equipment.

[0054] The in-vehicle device (such as in-vehicle device 102 or in-vehicle device 103) can be a device with transceiver capabilities, or it can be a device that supports BLE functionality. This application embodiment does not limit the in-vehicle device. For example, the in-vehicle device can be a car audio system. Another example is a dashcam. Yet another example is a car charger.

[0055] For ease of understanding, the access method of the device provided in this application will be described in detail below with reference to the accompanying drawings.

[0056] Figure 2 This is a flowchart illustrating a device access method according to an exemplary embodiment, such as... Figure 2 As shown, the access method of this device includes the following steps: S201-S211.

[0057] S201. The target access device sends an access request message to the target vehicle.

[0058] The access request message is used to request the establishment of a data link with the target vehicle.

[0059] In one possible implementation, the target access device supports BLE functionality. After establishing a physical link between the target access device and the target vehicle, the target access device can send an access request message to the target vehicle based on BLE functionality.

[0060] In other words, after the target access device establishes a physical link with the target vehicle, the target access device can request the target vehicle to establish a data link, enabling the target access device to interact with the target vehicle.

[0061] In one possible design, the access request message may include: the identifier of the target access device.

[0062] S202, The target vehicle receives an access request message from the target access device.

[0063] In one possible implementation, the target vehicle supports BLE functionality and can receive access request messages from the target access device based on BLE functionality.

[0064] S203. Determine whether the target vehicle has an identifier in the preset identifier set.

[0065] In one possible implementation, the target vehicle stores a preset identifier set, where all identifiers in the preset identifier set are identifiers of devices that have established data links with the target vehicle. The target vehicle can determine whether the identifier of the target access device exists in the preset identifier set based on the preset identifier set.

[0066] In other words, the target vehicle can manage the target access device by determining whether the target access device is a historical device that has established a data link with the target vehicle.

[0067] In some embodiments, if the target vehicle determines that the identifier of the target access device exists in the preset identifier set, the target vehicle establishes a data link with the target access device based on the historical data link corresponding to the identifier in the preset identifier set that is the same as the identifier of the target access device.

[0068] In other words, if the target vehicle determines that the target access device is a device with which it has a historical data link, the target vehicle can establish a data link with the target access device based on the historical data link. This reduces the steps required for the vehicle to establish a data link with the access device, improving the device's access efficiency.

[0069] In other embodiments, if the target vehicle determines that there is no identifier for the target access device in the preset identifier set, the target vehicle executes S204.

[0070] S204. The target vehicle sends the first query message to the target access device.

[0071] The first query message is used to indicate the functional information of the target access device to be queried.

[0072] In one possible design, functional information may include: functional type, functional description, and functional attributes.

[0073] For example, the functional information of a car audio system (i.e., the target access device) includes: audio playback functions (i.e., function type), music playback functions (i.e., function description), and volume control (function attribute).

[0074] S205, The target access device receives the first query message from the target vehicle.

[0075] In some embodiments, the target access device responds to the first query message and executes S206.

[0076] S206. The target access device sends the first information to the target vehicle.

[0077] The first piece of information is used to indicate the functional information of the target access device.

[0078] In one possible implementation, the target access device can encode its functional information into JSON format, add a message type identifier and a message header identifier, and generate the first message. Then, the target access device calls the Bluetooth protocol stack interface to send the first message.

[0079] In one possible design, the first information may include: functional information of the target access device and version information of the target access device. Each piece of functional information corresponds to one piece of version information, and the version information of the target access device is used to indicate the functional version of the target access device.

[0080] S207, The target vehicle receives the first information from the target access device.

[0081] S208. The target vehicle generates a template for the first instruction based on the first information.

[0082] In one possible implementation, the target vehicle can parse the first information to obtain the functional information of the target access device, and generate a template for the first instruction based on the functional information of the target access device.

[0083] In another possible implementation, the first information may further include: a first function of the target access device, which is used to modify parameters of the functional attributes of the target access device. The target vehicle can generate a template for a first instruction based on the first function and the functional information of the target access device. This first instruction is used to instruct the execution of the function corresponding to the first information.

[0084] For example, the first information of the car audio system includes: switch control (functional attribute) and write callback wirtecb function (i.e., the first function). Then the instruction template generated by the vehicle (i.e. the target vehicle) includes: an instruction template for writing bool values ​​into the car audio system, and the vehicle can control the switch of the car audio system based on the generated instruction template.

[0085] S209. The target vehicle stores the template of the first instruction and the first information.

[0086] In one possible implementation, the target vehicle can store a template of the first instruction and first information, and establish a correspondence between the first instruction and the first information.

[0087] In some embodiments, the target vehicle may present first information to the user and, based on the operation instructions input by the user based on the first information, fill in attribute parameters in a template of the first instruction to generate a first instruction. Subsequently, the target vehicle can execute the functions of the target access device by sending the first instruction to the target access device.

[0088] In other words, by presenting the user with the functional information of the access device, the target vehicle can provide the user with the functional services of the access device and respond to the user's needs by operating the functions of the access device. This can improve the user experience.

[0089] S210, The target vehicle sends a first prompt message to the target access device.

[0090] The first notification message indicates that the device has been successfully connected.

[0091] S211, The target access device receives the first prompt message from the target vehicle.

[0092] In other words, the target access device responds to the first notification message from the target vehicle, and the data link between the target access device and the target vehicle is successfully established.

[0093] The technical solution provided by the above embodiments brings at least the following beneficial effects: The target vehicle receives an access request message from a target access device, the access request message including the identifier of the target access device. Then, the target vehicle can determine whether the identifier of the target access device exists in the stored preset identifier set. If the identifier of the target access device does not exist in the preset identifier set, the target vehicle sends a first query message to the target access device, the first query message indicating the query for the functional information of the target access device. The target vehicle receives first information from the target access device, the first information indicating the functional information of the target access device. Based on the first information, the target vehicle generates a template of a first instruction and stores the template of the first instruction and the first information, the first instruction indicating the execution of the function corresponding to the first information. The target vehicle sends a first prompt message to the target access device, the first prompt message indicating successful device access. In other words, the vehicle can instantly obtain the functional information of the access device and generate a template of the operation instructions for the access device, enabling access devices that are not configured with operation instructions in the vehicle to also access the vehicle. This improves the efficiency of device access to the vehicle.

[0094] In some embodiments, the target vehicle detects whether the functional information of the target access device has changed, such as... Figure 3 As shown, after the target vehicle sends the first prompt message (i.e., S210) to the target access device, the access method of the device provided in this application embodiment further includes the following steps: S301-S307.

[0095] S301. The target vehicle sends a second query message to the target access device at a preset time.

[0096] The second query message is used to instruct the query target access device to provide its functional information at a preset time.

[0097] In one possible implementation, the first information may further include: a second function of the target access device, which is used to read the functional information of the target access device. The target vehicle can generate a second query message according to the second function of the target access device and send the second query message to the target access device at a preset time.

[0098] For example, the first information of the car audio system includes: the read callback function readcb (i.e., the second function). Then, the vehicle (i.e. the target vehicle) can generate a message to query the function information of the car audio system (i.e., the second query message) based on the read callback function readcb.

[0099] It should be noted that the order of S301 and S211 is not limited in the embodiments of this application. For example, the target vehicle may execute S301 first, and then the target access device may execute S211. Alternatively, the target access device may execute S211 first, and then the target vehicle may execute S301. Yet another example is that the target vehicle may execute S301 simultaneously with the target access device executing S211.

[0100] S302, The target access device receives a second query message from the target vehicle.

[0101] In some embodiments, the target access device responds to the second query message and executes S303.

[0102] S303, The target access device sends the second information to the target vehicle.

[0103] The second piece of information is used to indicate the functional information of the target access device at a preset time.

[0104] S304, The target vehicle receives the second information from the target access device.

[0105] S305. Determine whether the first and second information of the target vehicle are the same.

[0106] In one possible implementation, the second information may include: the functional information and version information of the target access device at a preset time. The target vehicle can determine whether the first information and the second information are the same by checking whether the functional information and version information in the first information are the same as those in the second information.

[0107] In one possible design, the target vehicle can determine whether the first information and the second information are the same simply by determining whether the functional information in the first information is the same as the functional information in the second information.

[0108] In another possible design, the target vehicle can determine whether the first information and the second information are the same simply by determining whether the version information in the first information is the same as the version information in the second information.

[0109] In other words, the target vehicle can detect whether the function of the target access device has changed by determining whether the first information and the second information are the same.

[0110] In some embodiments, if the target vehicle determines that the first information is the same as the second information, the target vehicle continues to use the template of the first instruction and the first information to manage the target access device.

[0111] In other words, by determining that the first information and the second information are the same, the target vehicle determines that the function of the target access device has not changed, so that the target vehicle can continue to use the stored template of the first instruction and the first information to manage the target access device.

[0112] In other embodiments, if the target vehicle determines that the first information and the second information are different, the target vehicle executes S306.

[0113] S306. The target vehicle generates a template for the second instruction based on the second information.

[0114] S307. The target vehicle deletes the template and first information of the first instruction, and stores the template and second information of the second instruction.

[0115] Understandably, vehicles can periodically check whether the functions of the access devices have changed, manage the templates and functional information of the stored access device operation instructions, and synchronize the status of the access devices so that the vehicle can use the functions of the access devices normally.

[0116] In some embodiments, the target access device changes its functional information to report changes to the target vehicle, such as... Figure 4 As shown, after the target vehicle sends the first prompt message (i.e., S210) to the target access device, the access method of the device provided in this application embodiment further includes the following steps: S401-S407.

[0117] S401. The target access device determines whether the function of the target access device has changed.

[0118] In one possible implementation, the target access device can determine whether its function has changed based on whether it has received an update instruction for its function.

[0119] It should be noted that the order of S301 and S401 is not limited in the embodiments of this application. For example, the target vehicle may execute S301 first, and then the target access device may execute S401. Alternatively, the target access device may execute S401 first, and then the target vehicle may execute S301. Yet another example is that the target vehicle may execute S301 simultaneously with the target access device executing S401.

[0120] In some embodiments, if the target access device determines that its function has not changed, the target access device continues to maintain its connection with the target vehicle.

[0121] In other words, if the target access device determines that its function has not changed, the target access device does not need to synchronize its function information with the target vehicle.

[0122] In other embodiments, if the target access device determines that the function of the target access device has changed, the target access device executes S402.

[0123] S402, The target access device sends an update message to the target vehicle.

[0124] The update message is used to indicate that the function of the target access device has changed. The update message may include: third information, which is used to indicate the function information of the target access device after the function has changed.

[0125] S403, The target vehicle receives an update message from the target access device.

[0126] In some embodiments, the target vehicle executes S404 in response to the update message.

[0127] S404. The target vehicle generates a template for a third instruction based on the third information.

[0128] S405. The target vehicle deletes the template and information of the stored instructions and stores the template and information of the third instructions.

[0129] Among them, the stored information is used to indicate the functional information of the target access device that has been stored in the target vehicle, and the stored instructions are used to instruct the operation of the function corresponding to the stored information.

[0130] It should be noted that the stored information can be either the first type of information or the second type of information. Similarly, the stored instruction can be either the first type of instruction or the second type of instruction.

[0131] S406. The target vehicle sends a second notification message to the target access device.

[0132] The second notification message indicates that the function information has been synchronized.

[0133] S407. The target access device receives a second prompt message from the target vehicle.

[0134] Understandably, the access device can provide real-time feedback on the changed functional information to the vehicle, enabling the vehicle to synchronize the access device's functional information and ensuring that the vehicle can use the access device's functions normally.

[0135] This application provides a device access method, such as... Figure 5 As shown, the access methods for this device may include: S501-S506.

[0136] S501, The target vehicle receives an access request message from the target access device.

[0137] It should be noted that the process of the target vehicle receiving the access request message from the target access device can be referred to the description in S201-S202 above, and will not be repeated here.

[0138] S502. Determine whether the target vehicle has an identifier in the preset identifier set.

[0139] It should be noted that the process of determining whether the target access device's identifier exists in the preset identifier set for the target vehicle can be referred to the description in S203 above, and will not be repeated here.

[0140] In some embodiments, if the target vehicle determines that there is no identifier for the target access device in the preset identifier set, the target vehicle executes S503.

[0141] S503, The target vehicle sends the first query message to the target access device.

[0142] It should be noted that the process of the target vehicle sending the first query message to the target access device can be referred to the description in S204 above, and will not be repeated here.

[0143] S504, The target vehicle receives the first information from the target access device.

[0144] It should be noted that the process of the target vehicle receiving the first information from the target access device can be referred to the description in S206-S207 above, and will not be repeated here.

[0145] S505. The target vehicle generates a template of the first instruction based on the first information, and stores the template of the first instruction and the first information.

[0146] It should be noted that the process of the target vehicle generating a template of the first instruction based on the first information and storing the template of the first instruction and the first information can be referred to the description in S208-S209 above, and will not be repeated here.

[0147] S506, The target vehicle sends a first prompt message to the target access device.

[0148] It should be noted that the process of the target vehicle sending the first prompt message to the target access device can be referred to the description in S210 above, and will not be repeated here.

[0149] In some embodiments, before the target access device sends an access request message to the target vehicle based on BLE functionality, the target access device needs to establish a Bluetooth pairing connection with the target vehicle. The Bluetooth pairing connection process between the target access device and the target vehicle in this embodiment is described below with specific examples. Figure 6As shown, the Bluetooth pairing connection process between the target access device and the target vehicle includes steps A, B, and C. Step A involves establishing a physical link between the pluggable BLE device (the target access device) and the vehicle's Android infotainment system (the target vehicle), and notifying the Android infotainment system to initiate secure pairing. Step B involves the Android infotainment system receiving a pairing request from the pluggable BLE device and initiating the pairing process. Step C involves both the pluggable BLE device and the Android infotainment system maintaining a long-term key locally.

[0150] It should be noted that, in this embodiment of the application, the vehicle-mounted Android terminal includes: an application layer, a service layer, and a communication layer based on the Message Queuing Telemetry Transport (MQTT) protocol, as well as a protocol channel based on BLE_Host. The pluggable BLE device includes: a protocol channel based on BLE_Host and an application module.

[0151] Step A above includes:

[0152] Step A1: Compared to the vehicle's infotainment system (i.e., the vehicle's Android system), the pluggable device (i.e., the pluggable BLE device) acts as a third-party device slave. First, BLE needs to be enabled and the initial configuration needs to be completed.

[0153] Step A2: The vehicle's infotainment system completes initial configuration and begins scanning;

[0154] Step A3: The vehicle-mounted system begins broadcasting, sending broadcast packets on channels 37, 38, and 39 respectively;

[0155] Step A4: The vehicle-mounted system continuously scans for broadcast packets based on the Generic Access Profile (GAP). If a broadcast packet is received, the MQTT service layer on the vehicle-mounted system determines whether it is a connectable device and whether it is a device that needs to be connected.

[0156] Step A5: If the vehicle terminal determines that it is a device that needs to be connected, the vehicle terminal service layer initiates a connection command, the vehicle terminal protocol channel executes the connection command, and sends a connection request through the BLE underlying protocol stack;

[0157] Step A6: When the device (pluggable device) receives a connection request from the vehicle's infotainment system, it stops broadcasting and starts listening to the connection channel, waiting for the vehicle's infotainment system to send the first connection synchronization packet.

[0158] Step A7: After the time interval pre-negotiated in the connection request, the vehicle-mounted terminal sends the first synchronization packet P1 to connect the anchor point;

[0159] Step A8: If the pluggable device receives the synchronization packet P1 within the time interval pre-negotiated in the connection request, it replies with the synchronization packet P2 to the vehicle terminal.

[0160] Step A9: If the vehicle-mounted unit receives a synchronization packet P2 from the pluggable device, a physical link is successfully established.

[0161] Step A10: After successfully establishing a physical link channel, the device initiates a pairing request based on the security connection parameters set on the device. This may be an open connection without a key, in which case pairing is not required; or it may be a secure connection that requires a key or signature, in which case the pairing process needs to be enabled.

[0162] Step B above includes:

[0163] Step B1: The vehicle-mounted system determines which pairing mode to initiate based on the pairing request from the pluggable device.

[0164] Step B2: If it is an open connection, the vehicle's infotainment system will skip the pairing process and proceed directly to the communication process after successful pairing.

[0165] Step B3: If secure pairing is required, the vehicle-mounted unit sends out its own pairing capability identifier, indicating its own key exchange capability during pairing;

[0166] Step B4: After receiving the pairing key exchange method description from the vehicle terminal, the pluggable device returns its own pairing key exchange capability description. At this point, the first stage of feature exchange for pairing is completed between the two parties.

[0167] Step B5: Both parties choose a suitable method based on their key exchange capabilities. The vehicle terminal generates a set of random verification codes. Through the negotiated key exchange method (e.g., displayed on the vehicle terminal screen, or entered by the user on the device), both parties use the random codes according to their respective key calculation programs to obtain a set of short-term keys STK. They then verify the short-term keys STK received from the other party to confirm the other party's identity.

[0168] Step B6: Both parties use the short-term key STK and the encryption algorithm to generate a set of long-term keys;

[0169] Step B7: The long-term key is exchanged and distributed to the device and the vehicle terminal, and stored locally on each.

[0170] In step C above, the vehicle-mounted device adds the device to the local whitelist to complete the binding. Then, the next time you connect, you will connect directly without going through the pairing process.

[0171] The following describes a flowchart of the device access method provided in this application embodiment, with reference to specific embodiments. Figure 7As shown, the device access method provided in this application embodiment includes steps one, two, three, four, five, six, and seven. Step one involves the vehicle-mounted terminal (i.e., the vehicle-mounted client) discovering the device's Bluetooth service and its characteristics, and the device (i.e., the pluggable device server) determining whether it needs to report device information. Step two involves, if the device needs to report device information, packaging the device information into JSON format data, adding a header identifier according to existing protocols, completing the device information reporting, and the vehicle-mounted terminal receiving and parsing the information. Step three involves the vehicle-mounted terminal sending device control commands to the pluggable device via MQTT. Step four involves the vehicle-mounted terminal obtaining the local device attribute parameter structure through the protocol channel, writing the updated device capability attribute parameters into the transmission data structure according to the MQTT-issued device capability attribute description, and sending it. Step five involves the pluggable device receiving the message sent from the vehicle-mounted terminal, parsing it, and obtaining a flag indicating whether to update the device capability attribute parameters. Step six involves the pluggable device obtaining the latest device capability attribute parameter values ​​and executing the corresponding capability callback function to complete the operation on the corresponding peripheral driver. Step seven involves the device issuing a response according to the existing protocol after completing the corresponding control command.

[0172] Step two above includes:

[0173] Step (1): The pluggable device obtains local device parameters and device capability attribute information;

[0174] Step (2): Pack the device parameters and device capability attributes into JSON format on the device side;

[0175] Step (3): The device adds message header information according to the existing protocol;

[0176] Step (4): The device sends the packaging information to the Bluetooth channel;

[0177] Step (5): The Bluetooth channel triggers the underlying Bluetooth protocol stack to send device information through the registered callback function;

[0178] Step (6): The vehicle's underlying Bluetooth protocol stack obtains the Bluetooth message;

[0179] Step (7): The vehicle-mounted Bluetooth protocol stack receives the message;

[0180] Step (8): Parse the JSON data on the vehicle's infotainment system;

[0181] Step (9): Obtain the message header at the vehicle terminal;

[0182] Step (10): Obtain the device capability description attribute parameters from the vehicle terminal;

[0183] Step (11): The vehicle terminal uses the receive callback to send the device capability description attributes to the MQTT application;

[0184] Step (12): The MQTT application layer saves the device information to the local device information database.

[0185] Step three above includes:

[0186] Step (1): The MQTT application layer issues control commands based on the device's capability attributes;

[0187] Step (2): Parse MQTT commands on the vehicle-mounted terminal protocol channel;

[0188] Step (3): Change the device capability attribute parameter value on the vehicle terminal.

[0189] Step four above includes:

[0190] Step (1): Obtain local device capability attribute parameters;

[0191] Step (2): Write the latest device capability attribute parameters to the data to be sent;

[0192] Step (3): Package the device capability attribute parameters into JSON format;

[0193] Step (4): Add message header information according to the existing protocol;

[0194] Step (5): Call the underlying Bluetooth protocol stack send interface to send.

[0195] The following section, using specific examples, describes the process by which the target access device generates device information (i.e., the first information, the second information, or the third information).

[0196] For example, such as Figure 8 The diagram illustrates a data organization method for describing the capabilities of smart glasses, forming a complete information structure for the smart glasses device. This process includes steps 1, 2, 3, 4, 5, 6, 7, and 8. Step 1 involves the smart glasses acquiring the device parameter structure. Step 2 involves the smart glasses acquiring the device capability attributes. Step 3 involves the smart glasses packaging the device capability attribute structure and the device parameter structure into a device information structure. Step 4 involves the smart glasses converting the device information structure into JSON data format. Step 5 involves the smart glasses adding device message header information to the JSON data format file. The message header includes information such as the device message identifier (0x55), the device message type (active reporting 0x30, passive reporting 0x31), and the message length.

[0197] Step 1 above includes:

[0198] Step 1-1: Obtain the device type for smart glasses;

[0199] Steps 1-2: The smart glasses obtain the device's MAC address and ID number;

[0200] Steps 1-3: Obtain the device name for the smart glasses;

[0201] Steps 1-4: Smart glasses obtain device description information;

[0202] Steps 1-5: Smart glasses obtain device manufacturer information.

[0203] Step 2 above includes:

[0204] Step 2-1: The smart glasses acquire the number of device capability groups, indicating the number of minimum granularity capability attributes the device possesses;

[0205] Step 2-2: The smart glasses acquire capability attribute one, switch capability description, including: capability attribute parameter type bool type, capability instance ID number 0x10, capability attribute parameter value 0, and operation callbacks for changing the capability attribute parameter value: write wirtecb() function and read interface readcb() function;

[0206] Steps 2-3: The smart glasses acquire the second capability attribute, volume adjustment capability description, which includes: capability attribute parameter type u32 integer type, capability instance ID number 0x11, capability attribute parameter value 50, and the operation callback for changing the capability attribute parameter value: write wirtecb() function and read interface readcb() function.

[0207] Steps 2-4: The smart glasses acquire capability attribute three, the audio channel capability description, which includes: capability attribute parameter type u8 integer type, capability instance ID number 0x12, capability attribute parameter value 1, and the operation callbacks for changing the capability attribute parameter value: write wirtecb() function and read interface readcb() function.

[0208] The foregoing mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, the access device or electronic device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0209] This application embodiment can, based on the above method, exemplarily divide the access device or electronic device of a device into functional modules. For example, the access device or electronic device of a device may include various functional modules corresponding to each functional division, or two or more functions may be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division; in actual implementation, there may be other division methods.

[0210] Figure 9 This is a block diagram illustrating a device access apparatus according to an exemplary embodiment. (Refer to...) Figure 9 The access device of the device is applied to the target vehicle, which stores a preset set of identifiers. The access device of the device includes: a receiving module 901, a sending module 902, a processing module 903, and a storage module 904.

[0211] The receiving module 901 is used to receive an access request message from a target access device, the access request message including the identifier of the target access device. The sending module 902 is used to send a first query message to the target access device if the identifier of the target access device does not exist in the preset identifier set, the first query message indicating that the target access device's functional information is being queried. The receiving module 901 is also used to receive first information from the target access device, the first information indicating the functional information of the target access device. The processing module 903 is used to generate a template for a first instruction based on the first information, the first instruction indicating that the function corresponding to the first information is executed. The storage module 904 is used to store the template of the first instruction and the first information. The sending module 902 is also used to send a first prompt message to the target access device, the first prompt message indicating that the device access is successful.

[0212] In one possible implementation, the sending module 902 is further configured to send a second query message to the target access device at a preset time, the second query message indicating the query for the target access device's functional information at the preset time. The receiving module 901 is further configured to receive second information from the target access device, the second information indicating the target access device's functional information at the preset time. The processing module 903 is further configured to, if the first information and the second information are different, generate a template for a second instruction based on the second information, the second instruction indicating the execution of the function corresponding to the second information. The storage module 904 is further configured to delete the template of the first instruction and the first information, and store the template of the second instruction and the second information.

[0213] In one possible implementation, the receiving module 901 is further configured to receive an update message from the target access device. The update message indicates a change in the function of the target access device, and includes third information indicating the functional information of the target access device after the functional change. The processing module 903 is further configured to, in response to the update message, generate a template for a third instruction based on the third information. The third instruction indicates the operation of the function corresponding to the third information. The storage module 904 is further configured to delete the template of the stored instruction and the stored information, and store the template of the third instruction and the third information. The stored information indicates the functional information of the target access device already stored in the target vehicle, and the stored instruction indicates the operation of the function corresponding to the stored information. The sending module 902 is further configured to send a second prompt message to the target access device, indicating that the functional information has been synchronized.

[0214] Figure 10 This is a block diagram illustrating an access device for another device according to an exemplary embodiment. (Refer to...) Figure 10 The access device of the device is applied to the target access device, and the access device of the device includes: a transmitting module 1001 and a receiving module 1002.

[0215] The sending module 1001 is used to send an access request message to the target vehicle, the access request message including an identifier of the target access device. The receiving module 1002 is used to receive a first query message from the target vehicle, the first query message indicating the query for functional information of the target access device. The sending module 1001 is also used to, in response to the first query message, send first information to the target vehicle, the first information indicating the functional information of the target access device. The receiving module 1002 is also used to receive a first notification message from the target vehicle, the first notification message indicating successful device access.

[0216] In one possible implementation, the receiving module 1002 is further configured to receive a second query message from the target vehicle, the second query message indicating the query for functional information of the target access device at a preset time. The sending module 1001 is further configured to, in response to the second query message, send second information to the target vehicle, the second information indicating the functional information of the target access device at the preset time.

[0217] In one possible implementation, the sending module 1001 is further configured to send an update message to the target vehicle if it is determined that the function of the target access device has changed. The update message indicates that the function of the target access device has changed, and includes third information indicating the functional information of the target access device after the function change. The receiving module 1002 is further configured to receive a second prompt message from the target vehicle, indicating that the functional information has been synchronized.

[0218] Regarding the apparatus in the above embodiments, the specific manner in which each unit performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0219] Figure 11 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Figure 11 As shown, the electronic device 1100 includes, but is not limited to, a processor 1101 and a memory 1102.

[0220] The memory 1102 described above is used to store the executable instructions of the processor 1101. It is understood that the processor 1101 is configured to execute instructions to implement the device access method in the above embodiments.

[0221] It should be noted that those skilled in the art will understand that Figure 11 The electronic device structure shown does not constitute a limitation on the electronic device; the electronic device may include, but is not limited to, other electronic devices. Figure 11 This may indicate more or fewer components, or combinations of certain components, or different component arrangements.

[0222] Processor 1101 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in memory 1102, and by calling data stored in memory 1102, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Processor 1101 may include one or more processing units. Optionally, processor 1101 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into processor 1101.

[0223] The memory 1102 can be used to store software programs and various data. The memory 1102 may mainly include a program storage area and a data storage area, wherein the program storage area may store the operating system, application programs (such as processing units) required by at least one functional module, etc. In addition, the memory 1102 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0224] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 1102 including instructions, which can be executed by a processor 1101 of an electronic device 1100 to implement the device access method in the above embodiments.

[0225] In actual implementation, Figure 9 The functions of the receiving module 901, transmitting module 902, processing module 903, and storage module 904 are as follows: Figure 10 The functions of the transmitting module 1001 and the receiving module 1002 can both be provided by Figure 11 The processor 1101 calls the computer program stored in the memory 1102 to implement the process. The specific execution process can be found in the description of the device access method section of the previous embodiment, and will not be repeated here.

[0226] Optionally, the computer-readable storage medium may be a non-transitory computer-readable storage medium, such as a read-only memory (ROM), random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device.

[0227] In an exemplary embodiment, this application also provides a vehicle, the vehicle including Figure 11 The processor 1101 shown is used to execute the device access method described in the above embodiments.

[0228] In an exemplary embodiment, this application also provides a computer program product including one or more instructions, which can be executed by a processor of an electronic device to complete the device access method in the above embodiments.

[0229] It should be noted that when one or more instructions in the computer-readable storage medium or computer program product are executed by the processor of the electronic device, they implement the various processes of the above-described device access method embodiments and achieve the same technical effect as the above-described device access method. To avoid repetition, they will not be described again here.

[0230] Through the above description of the implementation methods, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0231] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0232] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0233] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0234] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0235] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for connecting a device, characterized in that, Applied to a target vehicle, the target vehicle storing a preset identifier set, the method includes: Receive an access request message from a target access device, the access request message including: the identifier of the target access device; If the identifier of the target access device does not exist in the preset identifier set, a first query message is sent to the target access device. The first query message is used to indicate that the functional information of the target access device is being queried. Receive first information from the target access device, the first information being used to indicate the functional information of the target access device; Based on the first information, a template for a first instruction is generated, and the template for the first instruction and the first information are stored. The first instruction is used to instruct the execution of the function corresponding to the first information. A first notification message is sent to the target access device, the first notification message being used to indicate that the device has successfully accessed the network.

2. The method according to claim 1, characterized in that, After sending the first notification message to the target access device, the method further includes: A second query message is sent to the target access device at a preset time. The second query message is used to indicate that the functional information of the target access device at the preset time is to be queried. Receive second information from the target access device, the second information being used to indicate the functional information of the target access device at the preset time; If the first information is different from the second information, then a template for the second instruction is generated based on the second information, and the second instruction is used to instruct the execution of the function corresponding to the second information; Delete the template of the first instruction and the first information, and store the template of the second instruction and the second information.

3. The method according to claim 1 or 2, characterized in that, After sending the first notification message to the target access device, the method further includes: Receive an update message from the target access device, the update message being used to indicate that the function of the target access device has changed, the update message including: third information, the third information being used to indicate the functional information of the target access device after the function has changed; In response to the update message, a template for a third instruction is generated based on the third information, the third instruction being used to instruct the execution of the function corresponding to the third information; Delete the template and stored information of the stored instructions, and store the template and the third information of the third instructions. The stored information is used to indicate the functional information of the target access device stored in the target vehicle, and the stored instructions are used to indicate the operation of the function corresponding to the stored information. A second notification message is sent to the target access device, the second notification message being used to indicate that the functional information has been synchronized.

4. A method for connecting a device, characterized in that, Applied to a target access device, the method includes: Send an access request message to the target vehicle, the access request message including: the identifier of the target access device; Receive a first query message from the target vehicle, the first query message being used to instruct querying the functional information of the target access device; In response to the first query message, first information is sent to the target vehicle, the first information being used to indicate the functional information of the target access device; the target vehicle generates a template of a first instruction based on the first information, and stores the template of the first instruction and the first information, the first instruction being used to instruct the execution of the function corresponding to the first information; A first notification message is received from the target vehicle, indicating that the device has successfully connected.

5. The method according to claim 4, characterized in that, After receiving the first prompt message indication from the target vehicle, the method further includes: Receive a second query message from the target vehicle, the second query message being used to instruct querying the functional information of the target access device at a preset time; In response to the second query message, second information is sent to the target vehicle, the second information being used to indicate the functional information of the target access device at the preset time.

6. The method according to claim 4, characterized in that, After receiving the first prompt message indication from the target vehicle, the method further includes: If it is determined that the function of the target access device has changed, an update message is sent to the target vehicle. The update message is used to indicate that the function of the target access device has changed. The update message includes: third information, which is used to indicate the function information of the target access device after the function has changed. A second prompt message is received from the target vehicle, the second prompt message indicating that the function information has been synchronized.

7. A device access device, characterized in that, Applied to a target vehicle, the target vehicle storing a preset identifier set, the device includes: The receiving module is configured to receive an access request message from a target access device, wherein the access request message includes: the identifier of the target access device; The sending module is configured to send a first query message to the target access device if the target access device does not exist in the preset identifier set. The first query message is used to indicate that the functional information of the target access device is being queried. The receiving module is further configured to receive first information from the target access device, wherein the first information is used to indicate the functional information of the target access device; The processing module is used to generate a template of a first instruction based on the first information, wherein the first instruction is used to instruct the execution of the function corresponding to the first information; A storage module is used to store the template of the first instruction and the first information; The sending module is further configured to send a first prompt message to the target access device, the first prompt message being used to indicate that the device has successfully accessed the network.

8. A device access device, characterized in that, Applied to a target access device, the device includes: The sending module is used to send an access request message to the target vehicle, the access request message including: the identifier of the target access device; The receiving module is configured to receive a first query message from the target vehicle, wherein the first query message is used to indicate the query of the functional information of the target access device; The sending module is further configured to respond to the first query message by sending first information to the target vehicle, the first information being used to indicate the functional information of the target access device; the target vehicle generates a template of a first instruction based on the first information, and stores the template of the first instruction and the first information, the first instruction being used to instruct the execution of the function corresponding to the first information; The receiving module is also configured to receive a first prompt message from the target vehicle, the first prompt message being used to indicate that the device has successfully connected.

9. An electronic device, characterized in that, include: processor; A memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, When the computer-executable instructions stored in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is capable of performing the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data query method and device based on vehicle-mounted terminal, vehicle and storage medium

    CN115604047A

  • Automobile control method and apparatus, computer device, and storage medium

    WO2023024680A1