A browsing list generating device and implementation method
Through the combination of media database generation module, database operation module, statement assembly module and list management module, query command statements are split and merged, which solves the problem of low browsing list generation efficiency and high resource occupation, and achieves rapid generation and low latency. The browsing list improves the user experience.
Patent Information
- Application Number
- CN202011188599.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-30
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2040-10-30
AI Technical Summary
The existing browsing list generation efficiency is low and consumes a lot of resources, resulting in poor user experience, especially when multiple types of queries are delayed and memory overhead is increased.
Through the combination of the media database generation module, database operation module, statement assembly module and list management module, the browsing list view is generated, the query command statement is split, the views are matched and merged, the database query frequency is reduced, and the generation efficiency is improved.
It achieves rapid generation of browsing lists, reduces latency, reduces memory overhead, and improves user experience.
Smart Images

Figure CN112434005B
Abstract
Description
Technical Field
[0001] This invention relates to the field of multimedia technology, and in particular to a browse list generation device and its implementation method. Background Technology
[0002] Music player lists, functionally speaking, can be divided into browse lists and playlists. Browse lists are primarily for users to view and select songs, while playlists are used for playback. Current browse list types mainly include folder lists (lists created by enumerating all folders containing music files), song lists (lists created by searching all music files on the media device), and album lists (lists created by retrieving the albums to which all songs belong). These browse list types are mainly determined by user-input keywords; for example, a browse list of songs under an artist and its corresponding album is determined by the keywords: artist, album, and song.
[0003] The main problems with generating the current browsing list are:
[0004] 1. Low efficiency in list generation. Due to the variety of list types and the unpredictable nature of user actions, new list types need to be constantly generated. However, current technologies all use direct database queries, which introduces delays in different programs each time a list is retrieved. This is especially noticeable when the list data involves multiple types and queries are performed simultaneously, resulting in a poor user experience.
[0005] 2. High resource consumption. To address the above issue, multiple browse list types are pre-stored in memory to store the data of each retrieved browse list. This method can reduce the latency caused by queries to a certain extent, but the memory overhead also increases accordingly.
[0006] Therefore, there is an urgent need for a method to generate browse lists that balances memory usage and latency control. Summary of the Invention
[0007] This invention provides a browsing list generation device and implementation method, aiming to overcome the deficiencies in the prior art and achieve rapid generation of browsing lists.
[0008] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0009] In one aspect, the present invention provides a browsing list generation device, comprising:
[0010] Media database generation module, media database module, database operation module, statement assembly module, list management module, UI module;
[0011] The list management module is connected to the UI module, the media database generation module, and the database operation module. The media database generation module and the database operation module are also connected to the database operation module, and the database operation module is also connected to the statement assembly module.
[0012] The media database generation module is used to scan media files in peripheral devices and generate a media database file;
[0013] The media database module is used to store media database files;
[0014] The database operation module is used to receive command statements sent by the statement assembly module, perform operations on the media database file, and obtain the data after execution.
[0015] The statement assembly module is used to combine the feature fields contained in the browse list type to generate the corresponding query command statement.
[0016] The list management module is used to create and manage storage queues and database view names, and to retrieve list data from the corresponding views;
[0017] The UI module is used to receive creation or query requests for the browse list type and display the browse list data obtained by the synchronized list management module.
[0018] Specifically, the data operation module includes: a logical hierarchy acquisition unit, a logical hierarchy splitting unit, a view matching unit, a matching judgment unit, and a view generation unit connected in sequence, wherein the matching judgment unit is also connected to the logical hierarchy splitting unit;
[0019] The logical level acquisition unit is used to acquire the logical level number of each keyword in the query command statement;
[0020] The logical hierarchy splitting unit is used to split the query command statement into two sub-query command statements corresponding to the first logical level and the second logical level.
[0021] The view matching unit is used to match the views corresponding to the first logical layer number and the second logical layer number sub-query command statements;
[0022] The matching judgment unit is used to determine whether the view corresponding to the first logical layer number and the second logical layer number sub-query command statement exists. If it does, the view generation unit is notified to generate the corresponding view; otherwise, the logical layer splitting unit is notified to adjust the splitting logical layer number.
[0023] The view generation unit is used to generate a view according to the logical level of each keyword in the query command statement.
[0024] Specifically, the data assembly module is an SQL data assembly module.
[0025] Specifically, the media database module is a QDB database.
[0026] Another aspect of the present invention provides a method for generating a browse list, comprising:
[0027] Step 1: Create a media file database;
[0028] Step 2: Create a browsing list type. Determine if the browsing list type already exists. If yes, proceed to step 6; otherwise, proceed to the next step.
[0029] Step 3: Create an empty browse list and a corresponding empty store queue list, and establish a communication link between the empty browse list and the empty store queue list to achieve synchronous refresh;
[0030] Step 4: Generate a browse list query command statement based on the browse list type;
[0031] Step 5: Create a browse list view;
[0032] Step 6: Obtain the data within the browse list view;
[0033] Step 7: Refresh the display of the data in the browse list view.
[0034] Specifically, step 4 includes:
[0035] Step 401: Receive and extract the keywords contained in the browse list type;
[0036] Step 402: Determine whether the keyword exists in a subset; if yes, proceed to the next step.
[0037] Step 403: Call the aggregation function to get the values of all subsets;
[0038] Step 404: Assemble the values of the keywords and their subsets to generate a query command statement.
[0039] Specifically, step 5 includes:
[0040] Step 501: Obtain the logical level of each keyword in the query command statement;
[0041] Step 502: Split the query command statement into two sub-query command statements corresponding to the first logical level and the second logical level;
[0042] Step 503: Match and determine whether the views corresponding to the first logical layer number and the second logical layer number subquery command statements exist. If they do, merge the views corresponding to the first logical layer number and the second logical layer number subquery command statements according to the preset logical relationship to obtain the final view. Otherwise, decrease the first logical layer number according to the preset step size and return to the previous step until the entire loop is completed and proceed to the next step.
[0043] Step 504: Generate a view according to the logical level of each keyword in the query command statement.
[0044] Specifically, the query command statement is an SQL statement.
[0045] The beneficial effects of this invention are as follows: This invention creates a browsing list type, creates an empty browsing list and a corresponding empty storage queue list, generates a browsing list query command statement according to the browsing list type, then creates a browsing list view, obtains the data in the browsing list view, and refreshes and displays the data in the browsing list view, thereby realizing the rapid generation of browsing lists. Attached Figure Description
[0046] Figure 1 This is a schematic diagram of the structure of the browsing list generation device of the present invention;
[0047] Figure 2 This is a schematic diagram of the data operation module of the present invention;
[0048] Figure 3 This is a flowchart illustrating the browsing list generation method of the present invention. Detailed Implementation
[0049] The embodiments of the present invention are described in detail below with reference to the accompanying drawings. The drawings are for reference and illustration only and do not constitute a limitation on the scope of protection of the present invention.
[0050] Example 1
[0051] like Figure 1 As shown, this embodiment provides a browsing list generation device, including: a media database generation module, a media database module, a database operation module, a statement assembly module, a list management module, and a UI module;
[0052] The list management module is connected to the UI module, the media database generation module, and the database operation module. The media database generation module and the database operation module are also connected to the database operation module, and the database operation module is also connected to the statement assembly module.
[0053] The media database generation module is used to scan media files in peripheral devices and generate a media database file;
[0054] The media database module is used to store media database files;
[0055] The database operation module is used to receive command statements sent by the statement assembly module, perform operations on the media database file, and obtain the data after execution.
[0056] The statement assembly module is used to combine the feature fields contained in the browse list type to generate the corresponding query command statement.
[0057] The list management module is used to create and manage storage queues and database view names, and to retrieve list data from the corresponding views;
[0058] The UI module is used to receive creation or query requests for the browse list type and display the browse list data obtained by the synchronized list management module.
[0059] In this embodiment, the data assembly module is an SQL data assembly module.
[0060] In this embodiment, the media database module is a QDB database.
[0061] Example 2
[0062] like Figure 2 As shown, the data operation module of this embodiment includes: a logical hierarchy acquisition unit, a logical hierarchy splitting unit, a view matching unit, a matching judgment unit, and a view generation unit connected in sequence. The matching judgment unit is also connected to the logical hierarchy splitting unit.
[0063] The logical level acquisition unit is used to acquire the logical level number of each keyword in the query command statement;
[0064] The logical hierarchy splitting unit is used to split the query command statement into two sub-query command statements corresponding to the first logical level and the second logical level.
[0065] The view matching unit is used to match the views corresponding to the first logical layer number and the second logical layer number sub-query command statements;
[0066] The matching judgment unit is used to determine whether the view corresponding to the first logical layer number and the second logical layer number sub-query command statement exists. If it does, the view generation unit is notified to generate the corresponding view; otherwise, the logical layer splitting unit is notified to adjust the splitting logical layer number.
[0067] The view generation unit is used to generate a view according to the logical level of each keyword in the query command statement.
[0068] Example 3
[0069] like Figure 3 As shown, this embodiment provides a method for generating a browsing list, including:
[0070] Step 1: Create a media file database.
[0071] The media database generation module scans system peripherals, generates a media file database (e.g., QNXDataBase, i.e., QDB database), and notifies the list management module and UI module that preparations for creating the browsing list are complete.
[0072] In this proposal, the media file database only needs to be created once.
[0073] For example, the media database generation module scans the USB flash drive or SD card inserted into the vehicle's infotainment system and saves its directory structure information and the attributes of media files in each directory (including song name, artist, genre, album, etc.) into the media database file.
[0074] Step 2: Create a browsing list type. Determine if the browsing list type already exists. If yes, proceed to step 6; otherwise, proceed to the next step.
[0075] For example, a user requests through a UI module to create a browsing list of all rock songs under album B by artist A.
[0076] Step 3: Create an empty browse list and a corresponding empty store queue list, and establish a communication link between the empty browse list and the empty store queue list to achieve synchronous refresh.
[0077] In this embodiment, the empty browsing list is created by the UI module, and the empty storage queue list is generated by the list generation module.
[0078] In this embodiment, the empty browsing list and the empty storage queue list are synchronized by establishing a communication link through callback messages.
[0079] Step 4: Generate a browse list query command statement based on the browse list type.
[0080] In practice, the query command statements for database operations can be pre-set in the data assembly module, and then passed to the list type of the data assembly module through the list management module. The keywords contained in the list type are then assembled to generate the corresponding query command statements, which are then sent to the database operation module.
[0081] In this embodiment, step 4 includes:
[0082] Step 401: Receive and extract the keywords contained in the browse list type;
[0083] Step 402: Determine whether the keyword exists in a subset; if yes, proceed to the next step.
[0084] Step 403: Call the aggregation function to get the values of all subsets;
[0085] Step 404: Assemble the values of the keywords and their subsets to generate a query command statement.
[0086] In this embodiment, the query command statement is an SQL statement.
[0087] Step 5: Create a browse list view.
[0088] The database operation module uses the obtained query command statement to create the required browse list view in the media database file through the database operation service process (such as the QDB component of the QNX system).
[0089] In this embodiment, the view can update the virtual table with data composed of certain fields from the query data table, thus eliminating the need to create a large number of lists in memory to store the content queried from the database. When a query operation is frequently used, the view can simplify the code by directly querying the content in the virtual table instead of repeatedly querying the database, effectively reducing the time spent on frequent database queries.
[0090] Step 6: Obtain the data within the browse list view.
[0091] The database operation module uses the obtained query command statement to read the list data in the browse list view through the database operation service process (such as the QDB component of the QNX system).
[0092] Step 7: Refresh the display of the data in the browse list view.
[0093] The list management module notifies the UI module that the browse list has been updated and refreshes the data in the UI list.
[0094] Example 4
[0095] Unlike Embodiment 3, in this embodiment, step 5 includes:
[0096] Step 501: Obtain the logical level n of each keyword in the query command statement;
[0097] Step 502: Split the query command statement into two sub-query command statements corresponding to the first logical level number i (i = n-1, n-2, browse list generation 1) and the second logical level number (ni);
[0098] Step 503: Match and determine whether the views corresponding to the first logical layer number and the second logical layer number subquery command statements exist. If they do, merge the views corresponding to the first logical layer number and the second logical layer number subquery command statements according to the preset logical relationship to obtain the final view. Otherwise, decrease the first logical layer number according to the preset step size and return to the previous step until the entire loop is completed (i=1) and proceed to the next step.
[0099] Step 504: Generate a view according to the logical level of each keyword in the query command statement.
[0100] For example, if the logical level of each keyword in the query command statement is 5, then the query command statement is split into two sub-query command statements corresponding to the first logical level 4 and the second logical level 1. If the view corresponding to the first logical level 4 exists, then it is merged with the view of the second logical level 1 according to a preset logical relationship (e.g., AND) to obtain the final view. If the view corresponding to the first logical level 4 does not exist, then the query command statement is split into two sub-query command statements corresponding to the first logical level 3 and the second logical level 2, and so on, until the first logical level is 1.
[0101] By using the above logical layer splitting method, we can make full use of existing views and speed up view generation.
[0102] The above-disclosed embodiments are merely preferred embodiments of the present invention and should not be construed as limiting the scope of protection of the present invention. Therefore, any equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.
Claims
1. A browsing list generating device, It is characterized in that include: Media database generation module, media database module, database operation module, statement assembly module, list management module, UI module; The list management module is connected to the UI module, the media database generation module, and the database operation module. The media database generation module and the database operation module are also connected to the media database module. The database operation module is also connected to the statement assembly module. The media database generation module is used to scan the media files in the peripheral device and generate a media database file; The media database module is used to store media database files; The database operation module is used to receive the command statement sent by the statement assembly module, execute the operation on the media database file, and obtain the data after the execution; The statement assembly module is used to combine the characteristic fields included in the browse list type to generate a corresponding query command statement; The list management module is used to create and manage storage queues and database view names, and obtain list data in corresponding views; The UI module is used to receive a browse list type creation or query request, and synchronize the browse list data acquired by the list management module for display; The database operation module includes: a logical level acquisition unit, a logical level splitting unit, a view matching unit, a matching judgment unit, and a view generating unit, which are connected in sequence, and the matching judgment unit is also connected to the logical level splitting unit; The logical level acquisition unit is used to acquire the logical level number of each keyword in the query command statement; The logical level splitting unit is used to split the query command statement into two sub-query command statements corresponding to a first logical level and a second logical level; The view matching unit is used to match the views corresponding to the sub-query command statements of the first logical level and the second logical level; The matching judgment unit is used to judge whether the view corresponding to the sub-query command statement of the first logical level and the second logical level exists, and if so, notify the view generation unit to generate the corresponding view; otherwise, notify the logical level splitting unit to adjust the splitting logical level; The view generating unit is used to generate a view according to the number of logical layers of each keyword in the query command statement.
2. The browsing list generating device according to claim 1, It is characterized in that The statement assembly module is a SQL data assembly module.
3. The browsing list generating device according to claim 1, It is characterized in that The media database module is a QDB database.
4. A method for generating a browse list, It is characterized in that include: Step 1, create a media file database; Step 2: Create a browse list type and determine whether the browse list type already exists. If yes, proceed to step 6; otherwise, proceed to the next step. Step 3: Create an empty browse list and a corresponding empty storage queue list, and establish communication between the empty browse list and the empty storage queue list to achieve synchronous refresh; Step 4: Generate a browse list query command statement according to the browse list type; Step 5. Create a browse list view; Step 6: Obtain the data in the browse list view; Step 7: Refresh and display the data in the browse list view; The step 4 comprises: Step 401, receiving and extracting keywords contained in the browse list type; Step 402: determine whether the keyword has a subset, if yes, proceed to the next step; Step 403: Call the aggregation function to obtain the values of all subsets; Step 404: Assemble the keyword and its subset values to generate a query command statement; The step 5 comprises: Step 501: Obtain the logical level number of each keyword in the query command statement; Step 502: split the query command statement into two sub-query command statements corresponding to the first logical level and the second logical level; Step 503: match and determine whether the view corresponding to the sub-query command statement of the first logical level and the second logical level exists. If yes, merge the view corresponding to the sub-query command statement of the first logical level and the second logical level according to the preset logical relationship to obtain the final view. Otherwise, decrease the first logical level according to the preset step length and return to the previous step until the whole cycle is completed and enter the next step. Step 504: Generate a view according to the number of logical layers of each keyword in the query command statement.
5. The method for generating a browsing list according to claim 4, It is characterized in that The query command statement is a SQL statement.
