Vehicle machine port management method and device, vehicle and storage medium
By implementing priority judgment and resource release mechanisms, the connection problem when multiple users frequently switch USB devices is resolved, ensuring that the vehicle's infotainment port quickly returns to an available state, thereby improving the connection success rate and system stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LION AUTOMOTIVE TECH NANJING CO LTD
- Filing Date
- 2026-01-06
- Publication Date
- 2026-04-21
AI Technical Summary
Existing technology cannot recognize that a device, while maintaining a physical connection, has lost its effective communication capability when multiple users frequently switch between USB interconnected devices. This results in port resources not being released in a timely or complete manner, causing new devices to fail to connect properly, leading to a decline in system stability and user experience.
By determining the priority of the target device, the system releases the connection between the vehicle's port and the connected device, establishes a connection with the high-priority device, actively reclaims hardware and software resources, ensures that the port quickly returns to an available state, and uses port status monitoring and resource release mechanisms to handle abnormal occupation and pseudo-connections.
It improves the connection success rate when switching between multiple devices, enhances system stability and user experience, and avoids connection failures caused by residual port resources.
Smart Images

Figure CN121907908A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle technology, and in particular to a method, apparatus, vehicle, and storage medium for managing vehicle infotainment ports. Background Technology
[0002] In real-world use, users may frequently switch between multiple mobile devices for USB connectivity within a vehicle; for example, the driver and passengers may take turns using the vehicle's infotainment system. This frequent switching scenario places higher demands on the management of the vehicle's USB ports.
[0003] In related technologies, when a USB device is detected to be physically inserted or removed, the host controller generates an interrupt signal. The driver layer loads or unloads the corresponding device driver accordingly and sends a device enumeration completion or removal notification to the application layer. Some systems set a simple status flag at the application layer and attempt to terminate the current interconnect service process after receiving a device removal event.
[0004] However, the related technologies suffer from the following technical problems: First, they rely entirely on physical layer interrupt signals, failing to recognize situations where a device maintains a physical connection but has lost its effective communication capability. Second, if a device is forcibly removed without completing the normal disconnection process (e.g., by directly unplugging the USB cable), the system may fail to release the driver layer handle or application layer session resources in a timely manner, causing the USB port to remain marked as occupied at the software level. Third, the related technologies lack a coordination mechanism for multi-device switching scenarios, failing to handle access conflicts, priority differentiation, or waiting scheduling issues when multiple devices compete for the same port. Therefore, in scenarios with frequent switching, these technologies are prone to issues such as newly connected devices not being recognized, connection establishment failures, or abnormal system responses, impacting user experience and reducing system stability. Summary of the Invention
[0005] This application provides a method, device, vehicle, and storage medium for managing vehicle infotainment ports to solve the problem that new devices cannot connect properly when multiple users frequently switch between USB interconnected devices due to port resources not being released in a timely manner or completely. It can accurately identify scenarios such as physical disconnection and abnormal loss of connection, actively reclaim software and hardware resources, and ensure that the USB port quickly returns to a usable state, significantly improving the connection success rate, system stability, and user experience under multiple device switching.
[0006] The first aspect of this application provides a method for managing a vehicle infotainment port, comprising the following steps: Determine whether a port connection request from the target device has been received; If a port connection request from the target device is received, determine whether there is an already connected device on the vehicle's port; If the connected device exists at the vehicle's infotainment port, then determine whether the priority of the target device is higher than the priority of the connected device. If the priority of the target device is higher than that of the connected device, the vehicle port is released and a connection is established between the vehicle port and the target device.
[0007] Optionally, in some embodiments, after determining whether a connected device exists at the vehicle infotainment port, the method further includes: If the connected device is not present at the vehicle infotainment port, then determine whether the vehicle infotainment port is abnormally occupied; If the vehicle-mounted port is not abnormally occupied, then a connection between the vehicle-mounted port and the target device is established; otherwise, the vehicle-mounted port is released, and a connection between the vehicle-mounted port and the target device is established.
[0008] Optionally, in some embodiments, after determining whether the priority of the target device is higher than the priority of the connected device, the process includes: If the priority of the target device is not higher than that of the connected device, the target device will be added to the waiting queue according to the preset queue scheduling rules.
[0009] Optionally, in some embodiments, after adding the target device to the waiting queue, the process includes: The waiting time of the target device is determined. When the waiting time exceeds a preset time threshold, the target device is removed from the waiting queue, and a connection error reminder instruction is generated. A connection error reminder is then issued based on the connection error reminder instruction.
[0010] Optionally, in some embodiments, after establishing the connection between the vehicle-mounted port and the target device: Obtain the connection status, response status, and heartbeat data of the target device; Based on the connection status, the response status, and the heartbeat data, it is determined that the target device is in an abnormal connection state; If the target device is in the abnormal connection state, disconnect the vehicle port from the target device and release the vehicle port.
[0011] A second aspect of this application provides a management device for a vehicle infotainment port, comprising: The first judgment module is used to determine whether a port connection request from the target device has been received. The second judgment module is used to determine whether there is a connected device on the vehicle port when a port connection request is received from the target device. The third judgment module is used to determine whether the priority of the target device is higher than the priority of the connected device if the connected device exists on the vehicle terminal. The management module is used to release the vehicle port and establish a connection between the vehicle port and the target device when the priority of the target device is higher than that of the connected device.
[0012] Optionally, in some embodiments, after determining whether a connected device exists on the vehicle's infotainment port, the second determining module further includes: The first judgment unit is used to determine whether the vehicle port is abnormally occupied when the connected device is not present at the vehicle port. The establishment unit is used to establish a connection between the vehicle-mounted port and the target device when there is no abnormal occupation of the vehicle-mounted port; otherwise, it releases the vehicle-mounted port and establishes a connection between the vehicle-mounted port and the target device.
[0013] Optionally, in some embodiments, after determining whether the priority of the target device is higher than the priority of the connected device, the third determination module includes: A queuing unit is used to add the target device to a waiting queue according to a preset queue scheduling rule when the priority of the target device is not higher than that of the connected device.
[0014] Optionally, in some embodiments, after the target device is added to the waiting queue, the queuing unit includes: The reminder subunit is used to determine the waiting time of the target device, remove the target device from the waiting queue when the waiting time is higher than a preset time threshold, generate a connection error reminder instruction, and perform a connection error reminder according to the connection error reminder instruction.
[0015] Optionally, in some embodiments, after establishing the connection between the vehicle-mounted port and the target device, the management module includes: The acquisition unit is used to acquire the connection status, response status, and heartbeat data of the target device; The second judgment unit is used to determine that the target device is in an abnormal connection state based on the connection state, the response state and the heartbeat data. The disconnection unit is used to disconnect the vehicle-mounted port from the target device and release the vehicle-mounted port when the target device is in the abnormal connection state.
[0016] A third aspect of this application provides a vehicle, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the vehicle infotainment port management method as described in the above embodiments.
[0017] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the vehicle-mounted port management method as described in the above embodiments.
[0018] thus, Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0019] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a schematic diagram of a vehicle-mounted port resource management module according to an embodiment of this application; Figure 2 This is a flowchart of a vehicle infotainment port management method provided according to an embodiment of this application; Figure 3 This is a flowchart of a vehicle infotainment port management method according to an embodiment of this application; Figure 4 This is a flowchart of port status monitoring according to an embodiment of this application; Figure 5 A flowchart of a resource release process according to an embodiment of this application. Figure 6 This is a schematic diagram illustrating the principle of priority scheduling and preemption according to an embodiment of this application; Figure 7 This is a block diagram of a vehicle infotainment port management device provided according to an embodiment of this application; Figure 8 This is a structural schematic diagram of a vehicle provided according to an embodiment of this application. Detailed Implementation
[0020] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0021] The following description, with reference to the accompanying drawings, outlines a method, apparatus, vehicle, and storage medium for managing vehicle infotainment ports according to embodiments of this application. Addressing the problem mentioned in the background art where new devices cannot connect properly due to untimely or incomplete release of port resources when multiple users frequently switch between USB interconnected devices, this application provides a method for managing vehicle infotainment ports. In this method, it is determined whether a port connection request from a target device has been received; if so, it is determined whether a connected device already exists on the vehicle infotainment port; if a connected device already exists on the vehicle infotainment port, it is determined whether the priority of the target device is higher than the priority of the connected device; if the priority of the target device is higher than the priority of the connected device, the vehicle infotainment port is released, and a connection relationship is established between the vehicle infotainment port and the target device. This solves the problem of new devices being unable to connect properly when multiple users frequently switch between USB interconnected devices due to untimely or incomplete release of port resources. It accurately identifies scenarios such as physical disconnection and abnormal loss of connection, proactively reclaims hardware and software resources, ensures that USB ports quickly return to a usable state, and improves the connection success rate under multi-device switching.
[0022] Before introducing the vehicle infotainment port management method of this application embodiment, let's first introduce the vehicle infotainment port resource management module used in this application embodiment, such as... Figure 1 As shown, the vehicle interface port resource management module is integrated into the middleware layer of the vehicle operating system, responsible for managing all USB interface connection requests, status monitoring, resource release, and priority scheduling. The system includes: USB access request submodule: Receives USB device connection requests, determines port resource usage, and decides whether to allow access.
[0023] Port status monitoring submodule: Real-time acquisition of USB port physical connection signals and device heartbeat data, and maintenance of port status database; Resource release submodule: Detects abnormal disconnection or unresponsive devices, triggers port resource reclamation, and releases occupied resources; Priority scheduling submodule: Based on strategies such as device type, connection history, and protocol priority, it sorts and manages the device access order to achieve preemption control.
[0024] The vehicle port management method of this application embodiment can be implemented based on the above-mentioned vehicle port resource management module.
[0025] Specifically, Figure 2 This is a flowchart illustrating a vehicle infotainment port management method provided in an embodiment of this application.
[0026] like Figure 2 As shown, the management method for this vehicle-mounted port includes the following steps: In step S101, it is determined whether a port connection request from the target device has been received.
[0027] Among them, the target device is an external device that is currently attempting to establish an interconnection connection with the vehicle's infotainment system via a USB interface; port connection request: refers to the communication signal sent by the target device to the vehicle's infotainment system after physical access, used to establish an interconnection session.
[0028] It is understandable that, such as Figure 3 As shown, when a mobile phone or other connected device connects to the vehicle's infotainment system via USB, the device does not directly establish a connection. Instead, it first sends a connection request to the vehicle's infotainment system. The system determines whether to allow the device to connect based on the current usage status of the USB port, resource occupancy, and the device's identity information. Only when the port is idle or available for release will the system authorize the connection; otherwise, the system may refuse or queue the connection to prevent conflicts and connection failures caused by multiple devices competing for the same USB port.
[0029] Specifically, in combination Figure 4 As shown, the vehicle's infotainment system monitors the USB communication channel to determine if a port connection request has been received from the target device. This request is typically initiated by the device after it has completed USB enumeration. If the system detects a connection request conforming to the connectivity protocol specifications, it considers it "received" and the process proceeds to the next stage. If no valid request is detected (e.g., the device is only used for charging or the connectivity function is not enabled), subsequent resource allocation operations are not triggered. In actual execution, when the target device is plugged into the vehicle's USB port, the system detects a physical plug-in / plug-out event and triggers the access request process: the target device sends a connection request, including device identifier, protocol type, and other information.
[0030] In step S102, if a port connection request from the target device is received, it is determined whether there is a connected device on the vehicle's port.
[0031] Among them, "connected devices" refers to devices that have successfully established a valid interconnection connection with the vehicle's USB port at the current moment.
[0032] Specifically, after confirming that a port connection request from the target device has been received, the system queries the current connection status of the USB port to determine whether there is a connected device. If there is a valid connection, it is determined that there is a connected device; otherwise, it is determined that the port is idle.
[0033] Optionally, in some embodiments, after determining whether there is a connected device on the vehicle-mounted port, the method further includes: if there is no connected device on the vehicle-mounted port, determining whether there is abnormal occupation of the vehicle-mounted port; if there is no abnormal occupation of the vehicle-mounted port, establishing a connection between the vehicle-mounted port and the target device; otherwise, releasing the vehicle-mounted port and establishing a connection between the vehicle-mounted port and the target device.
[0034] Abnormal occupation refers to a situation where the vehicle's USB port is still marked as occupied at the software or system level, but there is actually no effective device connection or the device has lost its communication capability. For example, residual occupation caused by the failure to release resources due to abnormal device disconnection. Releasing the vehicle port involves performing a resource cleanup operation, including clearing the port's status mark, reclaiming driver and middleware layer associated resources, and restoring the port to an idle and usable state.
[0035] Specifically, such as Figure 5 As shown, after determining that no device is connected to the vehicle's infotainment port, the system further checks whether the port is abnormally occupied. If the check shows no abnormal occupation, the connection between the vehicle's infotainment port and the target device is established directly. If abnormal occupation exists, a port release operation is performed first to clear residual states and resources before establishing the connection between the vehicle's infotainment port and the target device. This process ensures that even if there is no active connection on the port, resource residue issues caused by previous abnormal disconnections can be handled.
[0036] Therefore, by adding steps to detect and release abnormal occupancy, the problem of new devices being unable to connect due to incomplete clearing of historical connections is avoided, the reliability of port reuse is improved, and the normal function of the port can be restored without user intervention.
[0037] In step S103, if there is a connected device on the vehicle's infotainment port, it is determined whether the priority of the target device is higher than that of the connected device.
[0038] Among them, priority is the connection priority level assigned to the device by the system according to preset rules. The rules can be based on device type, interconnection protocol type, historical connection records or user configuration policies.
[0039] Specifically, in combination Figure 3 As shown, when there is a connected device at the vehicle's infotainment port, the system obtains and compares the priorities of the target device and the connected device. If the priority of the target device is higher than that of the connected device, it is determined to be yes, and the connection preemption process can be triggered subsequently; otherwise, it is determined to be no, and the system enters the queuing or rejection processing logic. This judgment is executed according to the priority rules predefined by the system and does not involve dynamic learning or external intervention.
[0040] Optionally, in some embodiments, after determining whether the priority of the target device is higher than the priority of the connected devices, the process includes: if the priority of the target device is not higher than the priority of the connected devices, then adding the target device to the waiting queue according to a preset queue scheduling rule.
[0041] Furthermore, in some embodiments, after adding the target device to the waiting queue, the process includes: determining the waiting time of the target device; removing the target device from the waiting queue when the waiting time exceeds a preset time threshold; generating a connection error reminder instruction; and issuing a connection error reminder according to the connection error reminder instruction.
[0042] The waiting queue is used to temporarily store an ordered list of target devices that cannot be accessed immediately due to port occupancy and lack of preemption conditions; the preset queue scheduling rules are the logic for adding devices to the waiting queue predefined by the system, including the enqueue order, whether priority queue insertion is supported, etc.; the waiting time is the time elapsed from when the target device is added to the waiting queue until the current moment.
[0043] Specifically, after determining that the priority of the target device is not higher than that of the connected devices, the system adds the target device to the waiting queue according to the preset queue scheduling rules. Subsequently, the system continuously monitors the waiting time of the device in the queue; when the waiting time exceeds the preset time threshold, the system automatically removes the device from the waiting queue and generates a connection error reminder command, thereby triggering the corresponding connection error reminder.
[0044] In step S104, if the priority of the target device is higher than that of the connected device, the vehicle port is released and a connection relationship between the vehicle port and the target device is established.
[0045] Specifically, when the priority of the target device is determined to be higher than that of the connected devices, the system first performs a port release operation, including disconnecting the communication session of the connected devices and clearing the hardware and software resources they occupy; then, it immediately allocates the port to the target device and establishes a new connection. This process is executed sequentially to ensure that only one device uses the USB port at any given time.
[0046] Therefore, the high-priority devices preempt the connection of low-priority devices, ensuring the immediate access needs of key users (such as the driver), improving the response efficiency and user experience of the vehicle system in multi-user scenarios, and avoiding port resource conflicts.
[0047] Optionally, in some embodiments, after establishing the connection between the vehicle terminal port and the target device: the connection status, response status, and heartbeat data of the target device are obtained; based on the connection status, response status, and heartbeat data, it is determined that the target device is in an abnormal connection state; if the target device is in an abnormal connection state, the connection between the vehicle terminal port and the target device is disconnected, and the vehicle terminal port is released.
[0048] Specifically, after establishing a connection between the vehicle's infotainment port and the target device, the system continuously acquires the device's connection status, response status, and heartbeat data. If an abnormal connection status, response timeout, or continuous loss of heartbeat data is detected, the system determines that the target device is in an abnormal connection state. At this time, the system actively disconnects the device and performs a port resource release operation to ensure that the port can be reused by subsequent devices.
[0049] In actual operation, the system accurately determines whether a port is in a normal connection, abnormal disconnection, or pseudo-connection state by collecting real-time data on the physical connection status of the USB port, device response signals, and heartbeat data. This monitoring mechanism supports multiple detection methods, including USB plug-in / plug-out event monitoring, data transmission anomaly detection, and device online status confirmation, ensuring the accuracy and timeliness of port status information and providing a reliable basis for resource scheduling. The specific process is as follows: The port status monitoring submodule uses multiple methods to ensure accurate status: it monitors USB physical plug-in / plug-out signals and updates the connection status; it detects whether the device is online through device heartbeat packets, and determines that the device is abnormally disconnected if the heartbeat times out; it monitors data transmission anomalies, such as handshake failures or intermittent communication, and determines a pseudo-connection state; the monitoring results are synchronized to the resource release and scheduling module in real time.
[0050] It should be noted that this application embodiment also sets up a port resource release mechanism. When the system detects that the original connected device has been disconnected or is in an abnormal unresponsive state, the port resource release process is automatically triggered. This process includes verifying the port connection status, reclaiming driver layer resources, and cleaning up middleware resources to ensure that the port is restored from an occupied state to a usable state. This mechanism avoids new device connection failures due to residual port resources and reduces the need for users to repeatedly unplug and plug in USB cables or restart the vehicle system due to malfunctions. The specific process is as follows: when abnormal port occupation is detected, the resource release module automatically executes: calling the USB driver interface to disconnect the current connection and release system resources; clearing the middleware layer cache and status flags to ensure that the port returns to idle; and notifying the scheduling module to update the port status and allow new device connections.
[0051] Therefore, the embodiments of this application can promptly identify and handle abnormal situations where there is a physical connection but a logical disconnection, preventing the port from being occupied for a long time due to invalid connections, thus affecting the access of new devices and improving the robustness of the system and the reliability of multi-device switching.
[0052] Additionally, in some embodiments, such as Figure 6As shown, when multiple devices simultaneously request USB connections, this embodiment comprehensively determines connection priorities based on factors such as device type (e.g., driver's phone, passenger's phone), historical connection priority, interconnection protocol, and user configuration policies. For high-priority devices, the system supports initiating connection preemption, that is, forcibly releasing port resources occupied by low-priority devices when necessary, enabling flexible switching between devices and reasonable resource allocation, thus improving the overall interconnection experience. The specific process is as follows: the priority scheduling module comprehensively judges the access requests of multiple devices: assigning priorities based on device identity (e.g., driver's phone priority), connection history, protocol type, and other factors; supporting high-priority devices to initiate preemption requests and forcibly releasing connections from low-priority devices; queuing devices can connect sequentially according to priority, ensuring fairness and efficiency.
[0053] Therefore, the embodiments of this application avoid resource waste or user confusion caused by low-priority devices waiting indefinitely. By clearing timeouts and providing abnormal alerts, the predictability of system response and user experience are improved, while maintaining the effectiveness of the waiting queue and system stability.
[0054] According to the vehicle-mounted unit port management method proposed in this application, it is determined whether a port connection request from a target device has been received; if a port connection request from a target device is received, it is determined whether there is an already connected device on the vehicle-mounted unit port; if there is an already connected device on the vehicle-mounted unit port, it is determined whether the priority of the target device is higher than the priority of the already connected device; if the priority of the target device is higher than the priority of the already connected device, the vehicle-mounted unit port is released, and a connection relationship between the vehicle-mounted unit port and the target device is established. This solves the problem that when multiple users frequently switch between USB interconnected devices, new devices cannot connect normally due to port resources not being released in a timely manner or completely. It can accurately identify scenarios such as physical disconnection and abnormal loss of connection, actively reclaim hardware and software resources, ensure that the USB port quickly returns to an available state, and improve the connection success rate under multiple device switching.
[0055] Next, the vehicle-mounted port management device proposed according to the embodiments of this application is described with reference to the accompanying drawings.
[0056] Figure 7 This is a block diagram of the vehicle infotainment port management device according to an embodiment of this application.
[0057] like Figure 7 As shown, the vehicle terminal management device 10 includes: a first judgment module 100, a second judgment module 200, a third judgment module 300, and a management module 400.
[0058] The first judgment module 100 is used to determine whether a port connection request from the target device has been received.
[0059] The second judgment module 200 is used to determine whether there is a connected device on the vehicle's port when a port connection request from the target device is received.
[0060] The third judgment module 300 is used to determine whether the priority of the target device is higher than the priority of the connected device if there is a connected device on the vehicle terminal.
[0061] The management module 400 is used to release the vehicle port and establish a connection between the vehicle port and the target device when the priority of the target device is higher than that of the connected device.
[0062] Optionally, in some embodiments, after determining whether a connected device exists at the vehicle terminal port, the second determination module 200 further includes a first determination unit and an establishment unit.
[0063] The first judgment unit is used to determine whether there is abnormal occupation of the vehicle port when there is no connected device on the vehicle port.
[0064] The establishment unit is used to establish a connection between the vehicle-mounted port and the target device when there is no abnormal occupation of the vehicle-mounted port; otherwise, it releases the vehicle-mounted port and establishes a connection between the vehicle-mounted port and the target device.
[0065] Optionally, in some embodiments, after determining whether the priority of the target device is higher than the priority of the connected device, the third determination module 300 includes a queuing unit.
[0066] The queuing unit is used to add the target device to the waiting queue according to a preset queue scheduling rule, provided that the priority of the target device is not higher than that of the connected devices.
[0067] Optionally, in some embodiments, after the target device is added to the waiting queue, the queuing unit includes: a reminder subunit.
[0068] The reminder subunit is used to determine the waiting time of the target device. When the waiting time exceeds a preset time threshold, the target device is removed from the waiting queue, and a connection error reminder instruction is generated. The connection error reminder instruction is then used to issue a connection error reminder.
[0069] Optionally, in some embodiments, after establishing the connection between the vehicle terminal and the target device, the management module 400 includes: an acquisition unit, a second judgment unit, and a disconnection unit.
[0070] The acquisition unit is used to acquire the connection status, response status, and heartbeat data of the target device.
[0071] The second judgment unit is used to determine whether the target device is in an abnormal connection state based on the connection status, response status and heartbeat data.
[0072] The disconnect unit is used to disconnect the vehicle's infotainment port from the target device and release the vehicle's infotainment port when the target device is in an abnormal connection state.
[0073] It should be noted that the explanation of the above-mentioned method for managing the vehicle terminal port also applies to the vehicle terminal port management device of this embodiment, and will not be repeated here.
[0074] According to the vehicle-mounted unit port management method and apparatus proposed in this application, the method determines whether a port connection request from a target device has been received. If a port connection request from a target device is received, the method determines whether a connected device already exists on the vehicle-mounted unit port. If a connected device already exists on the vehicle-mounted unit port, the method determines whether the priority of the target device is higher than the priority of the connected device. If the priority of the target device is higher than the priority of the connected device, the vehicle-mounted unit port is released, and a connection relationship between the vehicle-mounted unit port and the target device is established. This solves the problem that new devices cannot connect normally when multiple users frequently switch between USB interconnected devices due to port resources not being released in a timely or complete manner. It can accurately identify scenarios such as physical disconnection and abnormal loss of connection, actively reclaim hardware and software resources, ensure that the USB port quickly returns to an available state, and improve the connection success rate under multiple device switching.
[0075] Figure 8 A schematic diagram of the structure of a vehicle provided in an embodiment of this application. The vehicle may include: The memory 801, the processor 802, and the computer program stored on the memory 801 and capable of running on the processor 802.
[0076] When the processor 802 executes the program, it implements the vehicle port management method provided in the above embodiments.
[0077] Furthermore, the vehicle also includes: Communication interface 803 is used for communication between memory 801 and processor 802.
[0078] The memory 801 is used to store computer programs that can run on the processor 802.
[0079] The memory 801 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage.
[0080] If the memory 801, processor 802, and communication interface 803 are implemented independently, then the communication interface 803, memory 801, and processor 802 can be interconnected via a bus to complete communication between them. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0081] Optionally, in a specific implementation, if the memory 801, processor 802, and communication interface 803 are integrated on a single chip, then the memory 801, processor 802, and communication interface 803 can communicate with each other through an internal interface.
[0082] The processor 802 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of this application.
[0083] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described vehicle-mounted port management method.
[0084] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0085] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0086] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0087] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (FPGAs), field-programmable gate arrays (FPGAs), etc.
[0088] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0089] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A method for managing a vehicle infotainment system port, characterized in that, Includes the following steps: Determine whether a port connection request from the target device has been received; If a port connection request from the target device is received, determine whether there is an already connected device on the vehicle's port; If the connected device exists at the vehicle's infotainment port, then determine whether the priority of the target device is higher than the priority of the connected device. If the priority of the target device is higher than that of the connected device, the vehicle port is released and a connection is established between the vehicle port and the target device.
2. The method according to claim 1, characterized in that, After determining whether a device is connected to the vehicle's infotainment system port, the process also includes: If the connected device is not present at the vehicle infotainment port, then determine whether the vehicle infotainment port is abnormally occupied; If the vehicle-mounted port is not abnormally occupied, then a connection between the vehicle-mounted port and the target device is established; otherwise, the vehicle-mounted port is released, and a connection between the vehicle-mounted port and the target device is established.
3. The method according to claim 1, characterized in that, After determining whether the priority of the target device is higher than the priority of the connected device, the process includes: If the priority of the target device is not higher than that of the connected device, the target device will be added to the waiting queue according to the preset queue scheduling rules.
4. The method according to claim 1, characterized in that, include: After adding the target device to the waiting queue, the process includes: The waiting time of the target device is determined. When the waiting time exceeds a preset time threshold, the target device is removed from the waiting queue, and a connection error reminder instruction is generated. A connection error reminder is then issued based on the connection error reminder instruction.
5. The method according to claim 1, characterized in that, After establishing the connection between the vehicle's infotainment port and the target device, the following steps are included: Obtain the connection status, response status, and heartbeat data of the target device; Based on the connection status, the response status, and the heartbeat data, it is determined that the target device is in an abnormal connection state; If the target device is in the abnormal connection state, disconnect the vehicle port from the target device and release the vehicle port.
6. A management device for a vehicle infotainment system port, characterized in that, include: The first judgment module is used to determine whether a port connection request from the target device has been received. The second judgment module is used to determine whether there is a connected device on the vehicle port when a port connection request is received from the target device. The third judgment module is used to determine whether the priority of the target device is higher than the priority of the connected device if the connected device exists on the vehicle terminal. The management module is used to release the vehicle port and establish a connection between the vehicle port and the target device when the priority of the target device is higher than that of the connected device.
7. The apparatus according to claim 6, characterized in that, After determining whether a device is connected to the vehicle's infotainment system port, the second determination module further includes: The first judgment unit is used to determine whether the vehicle port is abnormally occupied when the connected device is not present at the vehicle port. The establishment unit is used to establish a connection between the vehicle-mounted port and the target device when there is no abnormal occupation of the vehicle-mounted port; otherwise, it releases the vehicle-mounted port and establishes a connection between the vehicle-mounted port and the target device.
8. The apparatus according to claim 6, characterized in that, After determining whether the priority of the target device is higher than the priority of the connected device, the third determination module includes: A queuing unit is used to add the target device to a waiting queue according to a preset queue scheduling rule when the priority of the target device is not higher than that of the connected device.
9. A vehicle, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the vehicle infotainment port management method as described in any one of claims 1-5.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the vehicle infotainment port management method as described in any one of claims 1-5.