Video playing method and device based on vehicle USB player, vehicle and medium

By using the video playback method of the tree database and the car USB player in the vehicle multimedia system, the problems of low file search efficiency and poor management in the traditional system are solved, and more efficient video playback and file management are achieved.

CN119364073APending Publication Date: 2025-01-24CHERY INTELLIGENT VEHICLE TECH (HEFEI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411593517.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

Traditional vehicle multimedia systems are less efficient when reading files in external storage devices, resulting in long wait times for users and lack effective file management mechanisms.

Method used

Using a video playback method based on the car USB player, by identifying the user's video playback instructions, using the pre-built tree database to read the video file corresponding to the target video in the external storage device, and playing it on the car USB player target video.

Benefits of technology

The file search efficiency and response speed have been improved. The tree -shaped database is convenient for file management to solve the problem of low file search efficiency and lack of effective management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119364073A_ABST
    Figure CN119364073A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of vehicles, in particular to a video playing method and device based on a vehicle USB player, a vehicle and a medium, and the method comprises the steps: recognizing a video playing instruction of a user; determining a target video based on the video playing instruction, and reading a video file corresponding to the target video in an external storage device by using a pre-constructed tree database; and after the video file is read, playing the target video on the vehicle USB player. Therefore, the problems of low file searching efficiency, lack of effective management and the like in related technologies are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle technology, and in particular to a video playback method, device, vehicle and medium based on a vehicle USB player. Background Art

[0002] With the development of automobile technology, in-vehicle multimedia systems have become one of the standard configurations of modern cars. In-vehicle multimedia systems not only provide basic audio playback functions, but also support multiple functions such as video playback, navigation, and Bluetooth connection. Among them, connecting an external storage device through a USB interface to play video files is one of the common applications.

[0003] Traditional in-vehicle multimedia systems usually use linear scanning to search files one by one when reading files from external storage devices. This method is inefficient when there are a large number of files, resulting in a long waiting time for users, and lacks an effective file management mechanism for files. Summary of the invention

[0004] The present application provides a video playback method, device, vehicle and medium based on a vehicle USB player to solve the problems of low file search efficiency and lack of effective management in the related art.

[0005] The first aspect of the present application provides a video playback method based on a car USB player, comprising the following steps: identifying a user's video playback instruction; determining a target video based on the video playback instruction, and using a pre-built tree database to read a video file corresponding to the target video in an external storage device; after reading the video file, playing the target video on the car USB player.

[0006] Optionally, in one embodiment of the present application, before using a pre-constructed tree-like database to search for the corresponding file of the target video in the external storage device, it also includes: detecting whether there is an external storage device access signal at the USB interface of the vehicle computer; if there is an external storage device access signal at the USB interface, reading all information in the external storage device, wherein the information includes folders, video files, and paths of folders and video files; and constructing a tree-like database based on all the information.

[0007] Optionally, in one embodiment of the present application, a tree-like database is constructed based on all information, including: splitting the paths of all folders and video files into multiple parts, wherein each part represents a folder or video file; taking the first part of the path as the root node, traversing each part in the path step by step, and taking each part as a node until the path traversal of all folders and video files is completed, wherein the root node is a node of the folder type; identifying the parent-child relationship between nodes of the folder type and nodes of the folder type, and between nodes of the folder type and nodes of the video file type, and constructing a tree-like database based on the parent-child relationship.

[0008] Optionally, in one embodiment of the present application, a pre-built tree-like database is used to read the video file corresponding to the target video in an external storage device, including: obtaining the path information or name of the video file corresponding to the target video; traversing the nodes in the tree-like database step by step based on the path information or name until the video file node of the video file corresponding to the target video is found; and reading the video file corresponding to the target video in the external storage device according to the path information of the video file node.

[0009] Optionally, in one embodiment of the present application, after playing the target video on the vehicle USB player, it also includes: detecting the vehicle speed and / or the gear switching signal; if the vehicle speed is greater than the preset speed, and / or the gear switching signal is switched to R gear, pausing the playback of the target video.

[0010] Optionally, in an embodiment of the present application, the method further includes: identifying a video switching instruction of a user; and switching a current video to a target video based on the video switching instruction.

[0011] The second aspect of the present application provides a video playback device based on a car USB player, including: an identification module for identifying a user's video playback instruction; a reading module for determining a target video based on the video playback instruction, and using a pre-built tree database to read a video file corresponding to the target video in an external storage device; a playback module for playing the target video on the car USB player after reading the video file.

[0012] Optionally, in one embodiment of the present application, it also includes: a construction module, which is used to detect whether there is an external storage device access signal at the USB interface of the vehicle computer before using a pre-constructed tree database to search for the corresponding file of the target video in the external storage device; if there is an external storage device access signal at the USB interface, read all information in the external storage device, wherein the information includes folders, video files and paths of folders and video files; and build a tree database based on all the information.

[0013] Optionally, in one embodiment of the present application, the construction module is further used to: split the paths of all folders and video files into multiple parts, wherein each part represents a folder or video file; take the first part of the path as the root node, traverse each part in the path step by step, and take each part as a node until the path traversal of all folders and video files is completed, wherein the root node is a node of the folder type; identify the parent-child relationship between nodes of the folder type and nodes of the folder type, and between nodes of the folder type and nodes of the video file type, and construct a tree-like database based on the parent-child relationship.

[0014] Optionally, in one embodiment of the present application, the reading module is further used to: obtain the path information or name of the video file corresponding to the target video; traverse the nodes in the tree database level by level based on the path information or name until the video file node of the video file corresponding to the target video is found; and read the video file corresponding to the target video in an external storage device according to the path information of the video file node.

[0015] Optionally, in one embodiment of the present application, it also includes: a detection module, used to detect the vehicle speed and / or gear switching signal of the vehicle after playing the target video on the vehicle USB player; if the vehicle speed is greater than the preset speed, and / or the gear switching signal is switched to R gear, the playback of the target video is paused.

[0016] Optionally, in an embodiment of the present application, it further includes: a switching module, used to identify a user's video switching instruction; and switch the current video to a target video based on the video switching instruction.

[0017] The third aspect of the present 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 execute a video playback method based on a vehicle USB player as described in the above embodiment.

[0018] The fourth aspect of the present application provides a computer-readable storage medium on which a computer program or instruction is stored. The computer program or instruction is executed by a processor to perform a video playback method based on a vehicle USB player as in the above embodiment.

[0019] The fifth aspect of the present application provides a computer program product, including a computer program or instructions. When the computer program or instructions are executed, the video playback method based on the vehicle USB player as in the above embodiment is implemented.

[0020] Therefore, this application has at least the following beneficial effects:

[0021] The embodiment of the present application can identify the user's video playback instruction, determine the target video based on the video playback instruction, and use the pre-built tree database to read the video file corresponding to the target video in the external storage device to play the target video on the vehicle USB player. The pre-built tree database is used to search for the corresponding video file, which can improve the search efficiency and response speed, and the tree method is convenient for file management. Therefore, the technical problems of low file search efficiency and lack of effective management in the related art are solved.

[0022] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0024] Figure 1 A flowchart of a video playback method based on a vehicle USB player provided according to an embodiment of the present application;

[0025] Figure 2 A schematic diagram of constructing a tree database according to an embodiment of the present application;

[0026] Figure 3 A structural diagram of the application logic of a USB player provided according to an embodiment of the present application;

[0027] Figure 4 This is an example diagram of a video playback device based on a vehicle USB player provided according to an embodiment of the present application;

[0028] Figure 5 It is a schematic diagram of the structure of a vehicle provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0030] The following describes the video playback method, device, vehicle and medium based on the vehicle USB player of the embodiment of the present application with reference to the accompanying drawings. In view of the traditional vehicle multimedia system mentioned in the above background technology, when reading files in the external storage device, a linear scanning method is usually used to search for files one by one. This method is inefficient when there are a large number of files, resulting in a long waiting time for users, and there is a lack of an effective file management mechanism for files. The present application provides a vehicle video playback method based on a USB interface, in which the user's video playback instruction can be identified, the target video can be determined based on the video playback instruction, and the video file corresponding to the target video can be read from the external storage device using a pre-constructed tree database to play the target video on the vehicle USB player. By searching for the corresponding video file through the pre-constructed tree database, the search efficiency can be improved, the response speed can be improved, and the tree method is convenient for managing files. As a result, the problems of low search efficiency and lack of effective management for files in the related technology are solved.

[0031] Specifically, Figure 1 A flowchart of a video playback method based on a vehicle USB player provided in an embodiment of the present application.

[0032] It should be noted that the solution of the present application is applicable to vehicles that can support USB external devices to play videos.

[0033] like Figure 1 As shown, the video playing method based on the vehicle USB player includes the following steps:

[0034] In step S101, a user's video play instruction is identified.

[0035] It is understandable that the embodiments of the present application can recognize the user's video playback instructions. For example, the user can input the video playback instructions through the touch screen, physical buttons or voice commands of the vehicle video player (such as the display screen of the vehicle's central control), and the vehicle can capture the user's input instructions through the built-in input module (such as a touch screen controller, button controller, voice recognition module).

[0036] In step S102, a target video is determined based on the video play instruction, and a video file corresponding to the target video is read from an external storage device using a pre-built tree database.

[0037] The external storage device may be a USB flash drive, an SD card, or the like.

[0038] It is understandable that the embodiments of the present application can determine the target video based on the video playback instruction, and use the pre-built database to read the video file corresponding to the target video in the external storage device.

[0039] In an embodiment of the present application, before using a pre-constructed tree-like database to search for the corresponding file of the target video in the external storage device, it also includes: detecting whether there is an external storage device access signal at the USB interface of the vehicle computer; if there is an external storage device access signal at the USB interface, reading all information in the external storage device, wherein the information includes folders, video files, and paths of folders and video files; and constructing a tree-like database based on all the information.

[0040] It can be understood that the embodiment of the present application can detect whether there is an external storage device access signal on the USB interface of the vehicle computer. If there is an external storage device access signal, the information of all video files of the external storage device is read, including video files and folders, and a tree-like database is constructed based on the information of all video files. By constructing a tree-like database, the subsequent search and management of video files can be facilitated to improve the search efficiency.

[0041] In an embodiment of the present application, a tree-like database is constructed based on all information, including: splitting the paths of all folders and video files into multiple parts, wherein each part represents a folder or video file; taking the first part of the path as the root node, traversing each part in the path step by step, and taking each part as a node until the path traversal of all folders and video files is completed, wherein the root node is a node of the folder type; identifying the parent-child relationship between nodes of the folder type and nodes of the folder type, and between nodes of the folder type and nodes of the video file type, and constructing a tree-like database based on the parent-child relationship.

[0042] It can be understood that the embodiment of the present application can split the path of all folders and video files into multiple parts, each part represents a folder or video file, and take the first part of the path as the root node, which is the root node of the tree database. Each part in the path is traversed level by level, and a node is created for each part. It is added to the list of child nodes of the parent node. The parent-child relationship between the folder type node and the folder type node, and the parent-child relationship between the folder type node and the video file type node are identified through the path. The tree database is constructed based on the parent-child relationship to ensure the correct construction of the tree database.

[0043] In an embodiment of the present application, a pre-constructed tree-like database is used to read a video file corresponding to a target video in an external storage device, including: obtaining path information or a name of a video file corresponding to the target video; traversing the nodes in the tree-like database step by step based on the path information or the name until a video file node of the video file corresponding to the target video is found; and reading the video file corresponding to the target video in an external storage device according to the path information of the video file node.

[0044] It can be understood that the embodiment of the present application can obtain the path information or name of the video file corresponding to the target video, start from the root node of the tree database, traverse the nodes level by level according to the path information or name, find the node of the target video file, use the path information of the found video file node, read the video file corresponding to the target video from the external storage device, and the search efficiency is high.

[0045] Specifically, since the data in the external storage device is stored in a folder hierarchy structure, the Java File class was used in the past to obtain the complete folder structure with multiple recursive loops. This method has a disadvantage. Every time it recurses into a folder, it is necessary to loop again to determine the content in the folder and select the video file to extract. This is equivalent to a brute force loop, which has a high time complexity, and non-video files will also be judged once, which increases the number of CPU calculations and is relatively inefficient. In this application, the ContentResolver in Android is used to obtain a list of video file paths. Next, the video file paths are split and the corresponding VideoBean objects are created.

[0046] In order to save folder and video information, a VideoBean object is defined, which has two types: video type and folder type. The folder type saves the folder name, and the video type saves the path, name, video duration, last playback progress and other information. In addition, VideoBean maintains a HashMap for storing subfolders or video objects, and maintains a VideoBean object to store parent folders. In this way, a reference relationship is established between child objects and parent objects, thereby building a tree structure. This can accurately describe the direct structural relationship of the folder, and when the user enters or exits the folder, because the reference relationship has been established, the related object can be found directly through reference, avoiding logical operations such as circular judgment, saving CPU computing resources, and the constructed tree structure (i.e., the tree database of the embodiment of the present application) is as shown in the figure. Figure 2 shown.

[0047] In addition, since it involves the sorting of files. During the first initialization, the names of the folders and videos are extracted separately, and a separate class is used to maintain the name char array information, and the priority is set according to the type of letters, numbers, and symbols. This can greatly reduce the number of calculations when using the Java comparator for sorting. After actual testing, when the USB flash drive stores tens of thousands of data, the time required to build the tree structure and sort for the first time can be guaranteed to be within ten seconds. And after the initialization is completed, since references have been established between objects, the time required for subsequent entry and exit operations on the folder can be almost negligible, achieving rapid response and smooth operation of the application.

[0048] In step S103, after the video file is read, the target video is played on the vehicle USB player.

[0049] It can be understood that after reading the video file, the embodiment of the present application plays the target video on the vehicle USB player.

[0050] In an embodiment of the present application, after playing the target video on the vehicle USB player, it also includes: detecting the vehicle speed and / or the gear switching signal; if the vehicle speed is greater than the preset speed, and / or the gear switching signal is switched to R gear, pausing the playback of the target video.

[0051] Among them, the preset vehicle speed can be set according to the specific situation, and there is no specific limitation on this, for example, 20km / h.

[0052] It can be understood that the embodiments of the present application can also detect the vehicle speed and gear switching signal. If the vehicle speed is greater than the preset speed, it indicates that playing the video at this time may distract the driver, so the video is paused. After pausing, a prompt message can be displayed to remind the user to pay attention to driving safety. When the vehicle's gear is switched to R gear, the video is also paused and switched to the reversing image.

[0053] In an embodiment of the present application, it also includes: identifying a user's video switching instruction; and switching the current video to a target video based on the video switching instruction.

[0054] It is understandable that the embodiments of the present application can switch the current video to the target video based on the user's video switching instruction.

[0055] The following describes a video playback method based on a vehicle USB player in an embodiment of the present application through a specific embodiment. The specific logic is as follows: Figure 3 As shown, the USB player application on the car computer is taken as an example.

[0056] The application consists of two Activities (display interfaces in Android), which are responsible for file list display and video playback respectively. The main functions of these two modules are briefly described below.

[0057] The first layer of the application is the display layer for video files. When the application starts, the MainActivity interface is displayed. This layer registers the USB status broadcast receiver. When the user inserts the USB, it first responds to prompt that the USB is being parsed. When the Android device receives an external storage device, it will parse it first. When the external storage device is parsed, it will receive a broadcast of parsing completion. At this time, it starts to obtain the USB internal video file path list through ContentResolver and start to build file objects. When the construction is completed, the folder and video are displayed to the user. In this interface, you can choose the display method. The folder mode restores the real folder structure of the video in the USB, and the video mode directly displays all video files in a tiled manner without displaying the folder. These two modes are displayed using two different Fragments (windows that can be nested inside the Activity).

[0058] The second layer of structure is the video playback layer. When the user clicks on a video, the player enters PlayerActivity and displays the video in an adaptive size according to the size of the target video. The interface provides several basic video playback function buttons: play / pause, previous / next song, and double-speed playback. It also provides gesture swiping to adjust brightness and volume. In addition, entering PlayerActivity will open several related monitoring interfaces: vehicle status monitoring interface, voice control interface, steering wheel control interface, USB plug-in broadcast, etc. These interfaces implement functions such as speeding prompts, reverse gear pause playback, voice playback status control, steering wheel hard button control, and USB unplug prompts. When the user exits playback, PlayerActivity is closed to display the first layer of structure.

[0059] As an upper layer application, it is unable to obtain the data in the external storage device in the first place, so the system layer determines the scanning status of the USB through broadcast. After the application layer receives the ScannerFinish broadcast, it starts to obtain and organize the video files, wherein the file organization (i.e., building a tree database) has been described in the above embodiment and will not be repeated here.

[0060] The operation of building the data structure is completed, and the implementation of other functions is very simple. The list display is realized through RecycleView in Android, and different click events are set for two different types of VideoBean to realize the functions of entering and exiting folders and clicking video to play.

[0061] To enter the video playback layer, you need to build a playlist first to switch between the previous and next songs. Fortunately, the file structure has been built. After getting the parent folder of the current video and its subfolder list, you can accurately know the playlist. Use Android's native MediaPlayer to complete the playback of video files, ensuring the realization of play, pause and double-speed playback.

[0062] Register the vehicle attribute listener, and obtain the vehicle speed and gear change information in real time through the vehicle Can signal interface. When the vehicle speed is higher than 20km / h, the user will be reminded and the video will be paused in time, and the video will be played or exited according to the user's choice. By monitoring the gear change, when the owner shifts to R gear and reverses, the video can be paused in time and switched to the reversing image, so as not to affect the use of other key functions.

[0063] Since it runs on the car computer, the steering wheel control interface can be used to bind the steering wheel buttons, so that users can control the playback, pause, previous song, and next song through the buttons. Through the voice broadcast receiver, when the car computer receives the user's voice information, it will send a voice broadcast with json data. When the application layer receives the broadcast, it parses the json data and performs different playback operations.

[0064] When the user exits playback, the video path and current playback timestamp will be recorded in the vehicle database. The next time the user clicks on an unplayed video, it will automatically start playing from the last viewing time.

[0065] Through the above method, by using ContentResolver to avoid recursive operations to reduce the number of loops, and by building a tree structure to accurately display and switch between upper and lower levels of folders, this method greatly reduces the number of loop traversals in the program, significantly improves code efficiency, and responds quickly after the U disk is inserted. After the car system completes the scan of the U disk, it quickly obtains the video file in the U disk, completes the folder hierarchy construction, displays the file list, and can realize voice control, steering wheel hard button control, vehicle status monitoring, including speed monitoring, gear monitoring, etc.

[0066] According to the video playback method based on the vehicle USB player proposed in the embodiment of the present application, the user's video playback command can be identified, the target video can be determined based on the video playback command, and the video file corresponding to the target video can be read in the external storage device using a pre-built tree database to play the target video on the vehicle USB player. By searching for the corresponding video file through the pre-built tree database, the search efficiency and response speed can be improved, and the tree method is convenient for managing files.

[0067] Next, a video playback device based on a USB player according to an embodiment of the present application will be described with reference to the accompanying drawings.

[0068] Figure 4 It is a block diagram of a video playback device based on a vehicle USB player according to an embodiment of the present application.

[0069] like Figure 4 As shown, the video playback device 10 based on the vehicle USB player includes: an identification module 100 , a reading module 200 and a playback module 300 .

[0070] Among them, the identification module 100 is used to identify the user's video playback instructions; the reading module 200 is used to determine the target video based on the video playback instructions, and use the pre-built tree database to read the video file corresponding to the target video in the external storage device; the playback module 300 is used to play the target video on the car USB player after reading the video file.

[0071] In the embodiment of the present application, the device 10 of the embodiment of the present application further includes: a construction module.

[0072] Among them, the construction module is used to detect whether there is an external storage device access signal at the USB interface of the vehicle computer before using the pre-constructed tree database to search for the corresponding file of the target video in the external storage device; if there is an external storage device access signal at the USB interface, read all the information in the external storage device, wherein the information includes folders, video files and the paths of the folders and video files; and construct a tree database based on all the information.

[0073] In an embodiment of the present application, the construction module is further used to: split the paths of all folders and video files into multiple parts, wherein each part represents a folder or video file; take the first part of the path as the root node, traverse each part in the path step by step, and take each part as a node until the path traversal of all folders and video files is completed, wherein the root node is a node of the folder type; identify the parent-child relationship between nodes of the folder type and nodes of the folder type, and between nodes of the folder type and nodes of the video file type, and construct a tree-like database based on the parent-child relationship.

[0074] In an embodiment of the present application, the reading module 200 is further used to: obtain the path information or name of the video file corresponding to the target video; traverse the nodes in the tree database level by level based on the path information or name until the video file node of the video file corresponding to the target video is found; and read the video file corresponding to the target video in an external storage device according to the path information of the video file node.

[0075] In the embodiment of the present application, the device 10 of the embodiment of the present application further includes: a detection module.

[0076] Among them, the detection module is used to detect the vehicle speed and / or gear switching signal after playing the target video on the vehicle USB player; if the vehicle speed is greater than the preset speed, and / or the gear switching signal is switched to R gear, the target video is paused.

[0077] In the embodiment of the present application, the device 10 of the embodiment of the present application further includes: a switching module.

[0078] The switching module is used to identify the user's video switching instruction; and switch the current video to the target video based on the video switching instruction.

[0079] It should be noted that the above explanation of the embodiment of the video playback method based on the vehicle USB player is also applicable to the video playback device based on the vehicle USB player of this embodiment, which will not be repeated here.

[0080] According to the video playback device based on the vehicle USB player proposed in the embodiment of the present application, it is possible to identify the user's video playback instructions, determine the target video based on the video playback instructions, and use a pre-constructed tree-like database to read the video file corresponding to the target video in an external storage device to play the target video on the vehicle USB player. By searching for the corresponding video file through the pre-constructed tree-like database, the search efficiency and response speed can be improved, and the tree-like method is convenient for managing files.

[0081] Figure 5 A schematic diagram of the structure of a vehicle provided in an embodiment of the present application. The vehicle may include:

[0082] A memory 501 , a processor 502 , and a computer program stored in the memory 501 and executable on the processor 502 .

[0083] When the processor 502 executes the program, the video playing method based on the vehicle USB player provided in the above embodiment is implemented.

[0084] Furthermore, the vehicle also includes:

[0085] The communication interface 503 is used for communication between the memory 501 and the processor 502 .

[0086] The memory 501 is used to store computer programs that can be executed on the processor 502 .

[0087] The memory 501 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0088] If the memory 501, the processor 502 and the communication interface 503 are implemented independently, the communication interface 503, the memory 501 and the processor 502 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0089] Optionally, in a specific implementation, if the memory 501, the processor 502 and the communication interface 503 are integrated on a chip, the memory 501, the processor 502 and the communication interface 503 can communicate with each other through an internal interface.

[0090] The processor 502 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0091] An embodiment of the present application also provides a computer-readable storage medium on which a computer program or instruction is stored. When the computer program or instruction is executed by a processor, the above-mentioned video playback method based on the vehicle USB player is implemented.

[0092] The embodiment of the present application also provides a computer program product, including a computer program or instructions, which, when executed, implements the above-mentioned video playback method based on the vehicle USB player.

[0093] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0094] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0095] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0096] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one or a combination of multiple of the following technologies known in the art: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0097] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

Claims

1. A video playing method based on a vehicle USB player, characterized in that: The following steps are involved: Identify the user's video playback instructions; Determine a target video based on the video playback instruction, and read a video file corresponding to the target video in an external storage device using a pre-built tree database; After reading the video file, the target video is played on the vehicle USB player.

2. The video playing method based on the vehicle USB player according to claim 1 is characterized in that: Before searching the corresponding file of the target video in the external storage device using the pre-built tree database, the method further includes: Detect whether there is an external storage device access signal on the USB interface of the vehicle computer; If there is an external storage device access signal of the USB interface, all information in the external storage device is read, wherein the information includes folders, video files and paths of the folders and video files; The tree-like database is constructed based on all the information.

3. The video playing method based on the vehicle USB player according to claim 2 is characterized in that: The step of constructing the tree-like database based on all the information includes: Split the paths of all folders and video files into multiple parts, where each part represents a folder or video file; Taking the first part of the path as a root node, traversing each part of the path step by step, taking each part as a node, until the path traversal of all the folders and video files is completed, wherein the root node is a node of the folder type; The parent-child relationship between the nodes of the folder type and the nodes of the folder type, and between the nodes of the folder type and the nodes of the video file type are identified, and the tree-like database is constructed based on the parent-child relationship.

4. The video playing method based on the vehicle USB player according to claim 3 is characterized in that: The method of using a pre-built tree-like database to read a video file corresponding to the target video in an external storage device includes: Obtain the path information or name of the video file corresponding to the target video; Traversing the nodes in the tree database level by level based on the path information or the name until a video file node of the video file corresponding to the target video is found; The video file corresponding to the target video is read from the external storage device according to the path information of the video file node.

5. The video playing method based on the vehicle USB player according to claim 1 is characterized in that: After playing the target video on the vehicle USB player, the method further includes: Detecting a vehicle speed and / or a gear shift signal; If the vehicle speed is greater than a preset vehicle speed, and / or the gear switching signal is to switch to the R gear, the target video is paused.

6. The video playing method based on the vehicle USB player according to claim 1 is characterized in that: Also includes: Identifying a video switching instruction of the user; Switch the current video to the target video based on the video switching instruction.

7. A video playback device based on a vehicle USB player, characterized in that: include: An identification module, used to identify a user's video playback instruction; A reading module, used to determine a target video based on the video playback instruction, and read a video file corresponding to the target video in an external storage device using a pre-built tree database; The playing module is used to play the target video on the vehicle USB player after reading the video file.

8. A vehicle, characterized in that: include: 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 video playback method based on the vehicle USB player as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: The computer program or instruction is executed by a processor to implement the video playback method based on a vehicle USB player as described in any one of claims 1 to 6.

10. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed, the video playing method based on the vehicle USB player as described in any one of claims 1 to 6 is implemented.