Method and device for intelligently controlling media file, electronic equipment and system

By setting query parameters and business layer grouping in the Android system, and combining the hash mapping algorithm for media file querying and display, the problems of excessive database load and unintelligent grouping in existing technologies are solved, achieving efficient and accurate media file querying and display.

CN121561122APending Publication Date: 2026-02-24SHENZHEN GREEN CONNECTION TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202511448701.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-10
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Existing media file query and display technologies in Android systems suffer from problems such as excessive database I/O load, wasted network bandwidth, excessive CPU resource consumption, and a lack of intelligent grouping display.

Method used

Precise data access is achieved by setting query parameters, identification extraction and information filling operations are performed by using business layer grouping, fast grouping is performed by combining hash mapping algorithm, and an intelligent display mechanism is set up in the presentation layer.

Benefits of technology

It improves the efficiency of media file retrieval, reduces CPU load, enables precise grouping and flexible display of target media data, and enhances the user's ease of access and experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121561122A_ABST
    Figure CN121561122A_ABST
Patent Text Reader

Abstract

The invention discloses a method, a device, an electronic device and a system for intelligently controlling a media file. When a user interaction event is responded, accurate and targeted access of data is realized by setting query parameters, and the amount of data required to be accessed by data query is reduced, so that the media query efficiency is improved; and then, performing identification extraction operation, information filling operation based on media file instances, first instance adding operation based on a created list, or second instance adding operation based on a newly created list on the queried target media data in a business layer grouping manner. The CPU load can be reduced and the execution efficiency of service grouping can be improved while accurate and intelligent grouping of the target media data is realized; and finally, an intelligent display mechanism aiming at the grouping processing result is also set, the display result can be flexibly adjusted according to the user demand, and the consulting convenience and consulting experience of the user aiming at the target display list are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, electronic device, and system for intelligent management and control of media files. Background Technology

[0002] Current media file query and display technology in the Android system is primarily based on the MediaStore content provider framework. MediaStore is a standard media database provided by the Android system, used to store metadata information for all audio, video, and image files on the user's device. Applications on the user's device can access this media file data and implement related retrieval and management functions through the ContentResolver interface. However, existing technologies have the following technical shortcomings when accessing media file data to implement retrieval functions: Firstly, existing technologies employ a full-field query strategy, using the ContentResolver component to perform a full field retrieval of the MediaStore database. During the query process, all attribute information of the media file is retrieved, including file path, size, description, geographic location, metadata, and all available fields. This full-field query approach leads to excessive database I / O load, and the transmission of a large amount of unnecessary data during the query process wastes network bandwidth.

[0003] Secondly, traditional solutions rely on database-level GROUP BY operations to group media files. The database engine is responsible for performing complex grouping calculations, aggregating query results through the GROUP BY clause in the SQL statement. This method of grouping media files requires significant CPU resources for complex calculations, which can easily lead to performance bottlenecks when processing massive amounts of media files.

[0004] Third, existing technologies, after completing media file searches, typically employ a simple time-series sorting method, such as linearly sorting by file creation or modification time. This lacks an intelligent grouping and display mechanism, thus reducing the user's file retrieval experience and the experience of viewing the search results. Summary of the Invention

[0005] This invention provides a method, apparatus, electronic device, and system for intelligent management of media files, which can improve the efficiency of media file query; at the same time, it can realize intelligent grouping of query results, improve grouping efficiency, and improve the flexibility and intelligence of list display.

[0006] The first aspect of this invention discloses a method for intelligently managing media files. The method is applied to an electronic device with an application installed, and the electronic device is communicatively connected to a network attached storage device (NETS). The electronic device accesses the NETS via the application. The method includes: When a user interaction event triggered by the application is detected, a media query request and query parameters for the query requirements of the user interaction event are generated based on the user interaction event. Based on the media query request and the query parameters, a media query operation is performed on the media database to obtain the required target media data; Create a grouping container for the target media data, and perform an identifier extraction operation and an information filling operation for a preset media file instance on the target media data according to the grouping container. Based on the identifier extraction result obtained by performing the identifier extraction operation, perform a first instance addition operation based on an existing list or a second instance addition operation based on a newly created list on the information-filled media file instance to obtain the grouping processing result for the target media data. According to the preset media display process, a target display list for the grouping processing results is generated and displayed on the application's program interface.

[0007] As an optional implementation, in a first aspect of the present invention, the query parameters include sorting parameters and / or filtering parameters; the sorting parameters are used to indicate the sorting requirements for the data to be queried; the filtering parameters are used to indicate the filtering requirements for the data to be queried. The step of performing a media query operation on the media database based on the media query request and the query parameters to obtain the required target media data includes: Based on the media query request, the media database associated with the application is invoked; After determining access to the media database, a preset projection array is used as the query basis. A data query operation is performed on the media database according to the media query request and the query parameters to obtain the target query data in response to the media query request. The projection array includes at least three query fields, and the target query data includes at least sub-query data corresponding to each query field. According to the preset data encapsulation requirements, the target query data is encapsulated to obtain the encapsulation result for the target query data, which is used as the required target media data. Wherein, when the query parameters include the sorting parameters, the data adjustment operation includes a sorting operation corresponding to the sorting parameters; when the query parameters include the filtering parameters, the data adjustment operation includes a data filtering operation corresponding to the filtering parameters.

[0008] As an optional implementation, in the first aspect of the present invention, after performing a media query operation on the media database according to the media query request and in conjunction with the query parameters to obtain the required target media data, the method further includes: A validity check operation is performed on the target media data to obtain a validity check result for the target media data; the validity check operation is used to check whether the target media data is empty data. When the validity check result indicates that the target media data is empty data, a query failure message is generated for the query parameters, and the query failure message is fed back to the user; When the validity check result indicates that the target media data is not empty data, an integrity check operation is performed on the target media data to obtain the integrity check result for the target media data. When the integrity check result indicates that the target media data is incomplete or abnormal, the integrity check result is recorded and the operation corresponding to the target media data is executed according to the media query request and the query parameters. This process continues until it is determined that the target media data does not contain the incomplete or abnormal data. At this point, the target media data is determined to have passed both the validity check operation and the integrity check operation.

[0009] As an optional implementation, in the first aspect of the present invention, the step of performing an identifier extraction operation and an information filling operation for a preset media file instance on the target media data according to the grouping container includes: Traverse the target media data and extract the folder identifier corresponding to the target media data; A media file instance is obtained from a preset object pool, and information population operation is performed on the basic attribute information of the media file instance according to the target media data to update the media file instance; The step of performing a first instance addition operation based on an existing list, or a second instance addition operation based on a newly created list, on the media file instance after information filling, based on the identifier extraction result obtained from the identifier extraction operation, to obtain the grouping processing result for the target media data, includes: Determine whether the recorded identifiers included in the group container include the folder identifier. If it is determined that the recorded identifiers included in the group container include the folder identifier, add the media file instance to the container group corresponding to the recorded identifier as the grouping processing result for the target media data. When it is determined that the recorded identifiers included in the grouping container do not include the folder identifier, a new file list is created in the grouping container, and the media file instance is added to the new file list. At the same time, a mapping relationship is established between the new file list and the folder identifier as the grouping processing result for the target media data.

[0010] As an optional implementation, in the first aspect of the present invention, before generating the target display list for the grouping processing results according to a preset media display process, the method further includes: Based on the pre-set time zone compensation constant and the timestamps corresponding to all target media files in the grouping processing result, and combined with bitwise operation algorithms, calculate the date key value corresponding to each target media file; Add the date key value corresponding to each target media file to the target media file to update the target media file; A preset sorting operation is performed on all the target media files according to their timestamp order to obtain a sorting result for all the target media files, so as to update the grouping processing result; Based on the date key value corresponding to each target media file and the folder identifier, a group index is generated for all target media files; the group index includes at least one sub-group index, and each sub-group index is used to index all target media files corresponding to the date key value and / or the folder identifier of the sub-group index. The grouping index for all the target media files is added to the grouping result to update the grouping result.

[0011] As an optional implementation, in the first aspect of the present invention, generating a target display list for the grouping processing results according to a preset media display process includes: Create a standard date formatter and initialize the standard date formatter; Create a display list and set detection variables to detect date changes; Iterate through the grouping processing results and extract the file timestamp of each media file to be displayed from the grouping processing results; and perform format conversion on the file timestamp of each media file to be displayed according to the standard date formatter to update the file timestamp of each media file to be displayed, and update the grouping processing results at the same time. Determine whether the detected variable indicates the existence of a date change event. If it is determined that the detected variable indicates the absence of the date change event, reset the detected variable and add the grouping result to the display list to update the display list and obtain the target display list.

[0012] As an optional implementation, in the first aspect of the present invention, generating a target display list for the grouping processing results according to a preset media display process further includes: When it is determined that the detected variable indicates the existence of the date change event, a date header item is created for the detected variable, the date header item is added to the display list, the detected variable is reset, and the grouping processing result is added to the display list to update the display list and obtain the target display list.

[0013] A second aspect of the present invention discloses an apparatus for intelligently managing media files. The apparatus is installed in an electronic device with an application program installed, and the electronic device is communicatively connected to a network attached storage device (NETD). The electronic device accesses the NETD via the application program. The apparatus includes: The generation module is used to generate a media query request and query parameters for the query requirements of the user interaction event when a user interaction event triggered by the application is detected. The media query module is used to perform a media query operation on the media database according to the media query request and the query parameters to obtain the required target media data; A creation module is used to create grouped containers for the target media data; The grouping module is used to perform an identifier extraction operation and an information filling operation for a preset media file instance on the target media data according to the grouping container, and to perform a first instance addition operation based on an existing list or a second instance addition operation based on a newly created list on the media file instance after information filling, according to the identifier extraction result obtained by performing the identifier extraction operation, so as to obtain the grouping processing result for the target media data. The list generation module is used to generate a target display list for the grouping results according to a preset media display process. The display module is used to display the target display list on the application's program interface.

[0014] As an optional implementation, in a second aspect of the present invention, the query parameters include sorting parameters and / or filtering parameters; the sorting parameters are used to indicate the sorting requirements for the data to be queried; the filtering parameters are used to indicate the filtering requirements for the data to be queried. The media query module performs a media query operation on the media database based on the media query request and the query parameters to obtain the required target media data. Specifically, this includes the following methods: Based on the media query request, the media database associated with the application is invoked; After determining access to the media database, a preset projection array is used as the query basis. A data query operation is performed on the media database according to the media query request and the query parameters to obtain the target query data in response to the media query request. The projection array includes at least three query fields, and the target query data includes at least sub-query data corresponding to each query field. According to the preset data encapsulation requirements, the target query data is encapsulated to obtain the encapsulation result for the target query data, which is used as the required target media data. Wherein, when the query parameters include the sorting parameters, the data adjustment operation includes a sorting operation corresponding to the sorting parameters; when the query parameters include the filtering parameters, the data adjustment operation includes a data filtering operation corresponding to the filtering parameters.

[0015] As an optional implementation, in a second aspect of the invention, the apparatus further includes: The checking module is used to perform a validity check on the target media data after the media query module performs a media query operation on the media database according to the media query request and in combination with the query parameters to obtain the required target media data, and to obtain a validity check result for the target media data; the validity check operation is used to check whether the target media data is empty data. An exception handling module is used to generate query failure information for the query parameters and feed back the query failure information to the user when the validity check result indicates that the target media data is empty data; The inspection module is further configured to perform an integrity check operation on the target media data when the validity check result indicates that the target media data is not the empty data, and obtain an integrity check result for the target media data; The exception handling module is further configured to, when the integrity check result indicates that the target media data is incomplete or abnormal, record the integrity check result and return to execute the operation of performing a media query operation on the media database according to the media query request and in combination with the query parameters to obtain the required target media data, until it is determined that the target media data does not have the incomplete or abnormal data, and then determine that the target media data has passed the validity check operation and the integrity check operation.

[0016] As an optional implementation, in a second aspect of the present invention, the grouping module performs an identifier extraction operation and an information filling operation for preset media file instances on the target media data according to the grouping container, specifically including: Traverse the target media data and extract the folder identifier corresponding to the target media data; A media file instance is obtained from a preset object pool, and information population operation is performed on the basic attribute information of the media file instance according to the target media data to update the media file instance; The grouping module performs a first instance addition operation based on an existing list, or a second instance addition operation based on a newly created list, on the media file instance after information filling, according to the identifier extraction result obtained from the identifier extraction operation. The specific methods for obtaining the grouping processing result for the target media data include: Determine whether the recorded identifiers included in the group container include the folder identifier. If it is determined that the recorded identifiers included in the group container include the folder identifier, add the media file instance to the container group corresponding to the recorded identifier as the grouping processing result for the target media data. When it is determined that the recorded identifiers included in the grouping container do not include the folder identifier, a new file list is created in the grouping container, and the media file instance is added to the new file list. At the same time, a mapping relationship is established between the new file list and the folder identifier as the grouping processing result for the target media data.

[0017] As an optional implementation, in a second aspect of the invention, the apparatus further includes: The date calculation module is used to calculate the date key value corresponding to each target media file before the list generation module generates the target display list for the grouping processing result according to the preset media display process. This is done by using a bitwise operation algorithm based on a preset time zone compensation constant and the timestamps corresponding to all target media files in the grouping processing result. The update module is used to add the date key value corresponding to each target media file to the target media file to update the target media file; The sorting module is used to perform a preset sorting operation on all the target media files according to the timestamp order to obtain a sorting result for all the target media files, so as to update the grouping processing result; The generation module is further configured to generate a grouping index for all the target media files based on the date key value corresponding to each target media file and the folder identifier; the grouping index includes at least one sub-grouping index, and each sub-grouping index is used to index all the target media files corresponding to the date key value and / or the folder identifier of the sub-grouping index; The update module is further configured to add the grouping index for all the target media files to the grouping processing result, so as to update the grouping processing result.

[0018] As an optional implementation, in a second aspect of the present invention, the method by which the list generation module generates a target display list for the grouping processing results according to a preset media display process specifically includes: Create a standard date formatter and initialize the standard date formatter; Create a display list and set detection variables to detect date changes; Iterate through the grouping processing results and extract the file timestamp of each media file to be displayed from the grouping processing results; and perform format conversion on the file timestamp of each media file to be displayed according to the standard date formatter to update the file timestamp of each media file to be displayed, and update the grouping processing results at the same time. Determine whether the detected variable indicates the existence of a date change event. If it is determined that the detected variable indicates the absence of the date change event, reset the detected variable and add the grouping result to the display list to update the display list and obtain the target display list.

[0019] As an optional implementation, in the second aspect of the present invention, the method by which the list generation module generates a target display list for the grouping processing results according to a preset media display process further includes: When it is determined that the detected variable indicates the existence of the date change event, a date header item is created for the detected variable, the date header item is added to the display list, the detected variable is reset, and the grouping processing result is added to the display list to update the display list and obtain the target display list.

[0020] A third aspect of the present invention discloses an electronic device, the electronic device having an application installed thereon; the electronic device is communicatively connected to a network attached storage device, and the electronic device accesses the network attached storage device through the application; Furthermore, the electronic device is used to execute the method for intelligently managing media files as described in any of the first aspects of the present invention.

[0021] The fourth aspect of the present invention discloses a system for intelligent management and control of media files, the system comprising an apparatus for intelligent management and control of media files as described in the second aspect of the present invention, and a network attached storage device communicatively connected to the apparatus for intelligent management and control of media files; wherein the apparatus for intelligent management and control of media files performs intelligent management and control and processing of media files stored in the network attached storage device according to the method for intelligent management and control of media files as described in the first aspect of the present invention. Alternatively, the system may include an electronic device as described in the third aspect of the present invention, and a network-attached storage device communicatively connected to the electronic device; wherein the electronic device performs intelligent management and processing of media files stored in the network-attached storage device in accordance with the intelligent management method for media files as described in the first aspect of the present invention.

[0022] Compared with the prior art, the present invention has the following beneficial effects: This invention provides a method for intelligently managing media files. By implementing this invention, in response to user-triggered user interaction events, precise and targeted data access is achieved through setting query parameters, reducing the amount of data required for data query and thus improving media query efficiency. Furthermore, by using business layer grouping, the method performs operations such as identifier extraction, information filling based on media file instances, adding a first instance based on an existing list, or adding a second instance based on a newly created list on the queried target media data. This achieves precise and intelligent grouping of target media data while reducing CPU load and improving the execution efficiency of business grouping. Finally, an intelligent display mechanism for the grouping processing results is also provided, which can flexibly adjust the display results according to user needs, improving the convenience and experience of users viewing the target display list. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1This is a flowchart illustrating a method for intelligently managing media files according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating another method for intelligently managing media files disclosed in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an intelligent media file management device disclosed in an embodiment of the present invention; Figure 4 This is a schematic diagram of another intelligent media file management device disclosed in an embodiment of the present invention; Figure 5 This is a flowchart illustrating another method for intelligently managing media files disclosed in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention; Figure 7 This is a schematic diagram of the grouping effect corresponding to the grouping processing result of the target media data disclosed in the embodiments of the present invention; Figure 8 This is a schematic diagram illustrating the grouping effect after adding a grouping index to the grouping results, as disclosed in an embodiment of the present invention. Figure 9 This is a schematic diagram illustrating the effect of performing batch processing on the group processing results disclosed in an embodiment of the present invention. Detailed Implementation

[0025] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or end that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or ends.

[0027] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0028] This invention discloses a method, apparatus, electronic device, and system for intelligent management of media files. By implementing this invention, in response to user-triggered user interaction events, precise and targeted data access is achieved through setting query parameters, reducing the amount of data required for data retrieval and thus improving media query efficiency. Furthermore, through business layer grouping, the system performs operations such as identifier extraction, information filling based on media file instances, adding a first instance based on an existing list, or adding a second instance based on a newly created list on the retrieved target media data. This achieves precise and intelligent grouping of target media data while reducing CPU load and improving the execution efficiency of business grouping. Finally, an intelligent display mechanism for the grouping processing results is established, which can flexibly adjust the display results according to user needs, improving the convenience and experience of users viewing the target display list. These are described in detail below.

[0029] Example 1 Please see Figure 1 , Figure 1 This is a flowchart illustrating a method for intelligently managing media files according to an embodiment of the present invention. Figure 1 The described method for intelligently managing media files can be applied to devices or systems for intelligently managing media files, or it can also be applied to electronic devices with applications installed, wherein the electronic device is communicatively connected to a network attached storage device, the electronic device accesses the network attached storage device through the application, and the electronic device can be an Android system device; however, this embodiment of the invention does not limit the scope. Figure 1 As shown, the method for intelligently managing media files may include the following operations: 101. When a user interaction event triggered by the application is detected, a media query request is generated based on the user interaction event, as well as query parameters for the query requirements of the user interaction event.

[0030] In this embodiment of the invention, the application can be a photo album software installed on an electronic device, and the user interaction event is an event generated after the user triggers the browsing function of the photo album software.

[0031] 102. Based on the media query request and the query parameters, perform a media query operation on the media database to obtain the required target media data.

[0032] In this embodiment of the invention, by accurately generating media query requests and query parameters closely related to user interaction events, the query operations on the media database are ensured to be highly targeted and accurate. Subsequent query operations based on these query parameters effectively avoid problems such as blind queries or irrelevant query results, enabling users to quickly obtain the target media data they truly need. This reduces data access and transmission volume while significantly shortening user waiting time, improving user smoothness and satisfaction within the application.

[0033] 103. Create a group container for the target media data, and perform an identifier extraction operation and an information filling operation for the preset media file instance according to the group container.

[0034] 104. Based on the identifier extraction result obtained from the identifier extraction operation, perform a first instance addition operation based on the created list on the media file instance after information filling, or perform a second instance addition operation based on the newly created list to obtain the grouping processing result for the target media data.

[0035] In this embodiment of the invention, the grouping container is set in a business layer independent of the media database, and the operations in steps 103-104 are performed in the business layer. This dedicated business layer eliminates the database layer's GROUP BY operation and uses a hash mapping algorithm to achieve fast grouping with O(1) time complexity, which helps reduce CPU load.

[0036] 105. Based on the preset media display process, generate a target display list for the grouped processing results and display the target display list on the application's interface.

[0037] It is evident that implementation Figure 1The described method for intelligently managing media files achieves precise and targeted data access by setting query parameters when responding to user-triggered user interaction events, reducing the amount of data required for data query and thus improving media query efficiency. Furthermore, it performs identifier extraction, information population based on media file instances, and addition operations based on the first instance of an existing list, or addition operations based on a newly created list, through business layer grouping. This achieves precise and intelligent grouping of target media data while reducing CPU load and improving the execution efficiency of business grouping. Finally, an intelligent display mechanism for the grouping processing results is set up, which can flexibly adjust the display results according to user needs, improving the convenience and experience of users viewing the target display list.

[0038] In an optional embodiment, the query parameters include sorting parameters and / or filtering parameters; the sorting parameters are used to indicate the sorting requirements for the data to be queried; the filtering parameters are used to indicate the filtering requirements for the data to be queried. The above step 102, which involves performing a media query operation on the media database based on the media query request and query parameters to obtain the required target media data, specifically includes the following methods: Based on the media query request, the media database associated with the application is invoked; After determining the media database to be accessed, a preset projection array is used as the query basis. Data query operations are performed on the media database according to the media query request and query parameters to obtain the target query data in response to the media query request. The projection array includes at least three query fields, and the target query data includes at least the subquery data corresponding to each query field. According to the preset data encapsulation requirements, the target query data is encapsulated to obtain the encapsulation result for the target query data, which is used as the required target media data. Specifically, when the query parameters include sorting parameters, the data adjustment operation includes the sorting operation corresponding to the sorting parameters; when the query parameters include filtering parameters, the data adjustment operation includes the data filtering operation corresponding to the filtering parameters.

[0039] In this optional embodiment, a selective field queryer is pre-designed to perform the media query function in step 102; at the same time, a MediaStore connector can also be set up to manage the media database connection pool and to handle concurrent query requests, providing connection reuse functionality.

[0040] In this optional embodiment, by setting sorting parameters, the sorting requirements for the queried data can be clearly specified. This allows users to sort the query results according to their needs, such as by time sequence, file size, or alphabetical order of names, thereby quickly locating the data that best meets their current requirements. By setting filtering parameters, users can specify filtering conditions for the queried data, such as querying only media files of specific types, time periods, or sources. This effectively narrows the query scope, avoids interference from irrelevant data, and greatly improves the accuracy and efficiency of the query.

[0041] In this optional embodiment, the three query fields mentioned above can specifically be _ID (unique identifier for media files), BUCKET_ID (folder ownership identifier), and DATE_TAKEN (media file event stamp). Data query operations based on the projected array improve the targeting of the query operation. By querying multiple key fields simultaneously, core data related to the media query request can be quickly filtered from a massive media database, and the amount of sub-query data returned is reduced based on these three query fields, minimizing the retrieval of redundant data.

[0042] In this optional embodiment, it should be noted that the aforementioned data encapsulation requirement may be to encapsulate the data into a Cursor object. Subsequently, after completing the data query at the media database layer and obtaining the target media data, the corresponding target media data can be returned to the business layer. The business layer then performs subsequent grouping processing operations on the target media data, corresponding to step 103 described above.

[0043] As can be seen, in this optional embodiment, by setting query parameters including sorting parameters and filtering parameters, accurate and flexible query of target query data is achieved; then, by calling the associated database and using the projection array as a basis, efficient and targeted acquisition of target query data is achieved; finally, the data is encapsulated according to preset requirements to achieve intelligent data standardization. The overall process setting greatly improves the efficiency and accuracy of media file query.

[0044] In another optional embodiment, after step 102 above, which involves performing a media query operation on the media database based on the media query request and query parameters to obtain the required target media data, the method further includes: Perform a validity check on the target media data to obtain the validity check results; the validity check operation is used to check whether the target media data is empty. When the validity check result indicates that the target media data is empty, a query failure message is generated for the query parameters and the query failure message is returned to the user. When the validity check result indicates that the target media data is not empty, an integrity check operation is performed on the target media data to obtain the integrity check result for the target media data. When the integrity check result indicates that the target media data is incomplete or abnormal, the integrity check result is recorded and the above-mentioned media query operation is performed on the media database according to the media query request and query parameters to obtain the operation corresponding to the required target media data. This process continues until it is determined that the target media data being queried does not contain incomplete or abnormal data. At this point, the target media data is confirmed to have passed both the validity check operation and the integrity check operation.

[0045] In this optional embodiment, during the media query process, various reasons, such as database connection problems or overly strict query conditions, may result in the retrieved target media data being empty. Timely validity checks can quickly detect this situation and generate query failure information for the query parameters, providing feedback to the user. This allows users to understand the reason for the query failure promptly, avoiding situations where users wait for a long time without receiving valid results.

[0046] In this optional embodiment, during the storage and transmission of media files, data loss or corruption may occur due to network failures, storage device malfunctions, or other reasons, resulting in incomplete or abnormal data. Integrity checks can promptly identify these problems and record the results. This process helps ensure that the target media data entering subsequent processing is complete and normal, improving data quality.

[0047] In this optional embodiment, a corresponding retry mechanism is set up for cases of incomplete or abnormal data. This mechanism can automatically attempt to reacquire correct data when data problems are encountered, without requiring manual user intervention, thus reducing operational inconvenience caused by data issues. Simultaneously, by continuously retrying, the system ensures that qualified target media data is ultimately obtained, guaranteeing the smooth operation of the entire intelligent media file management process and improving the system's reliability and stability.

[0048] In this optional embodiment, the method further includes: After confirming that the target media data has passed the validity and integrity checks, the capacity information corresponding to the target media data is calculated; the capacity information includes at least the size of the capacity; the capacity information is used to indicate the memory resources subsequently allocated to the target media data.

[0049] As can be seen, in this optional embodiment, data problems can be detected and addressed at an early stage through validity and integrity checks, preventing invalid or incomplete data from being passed to subsequent processing stages. This helps reduce system errors and resource waste caused by data problems in subsequent processing, optimizing the utilization efficiency of system resources; and, by setting an automatic retry mechanism, data problems can be automatically resolved, which is beneficial to enhancing system stability.

[0050] Example 2 Please see Figure 2 , Figure 2 This is a flowchart illustrating another method for intelligently managing media files disclosed in an embodiment of the present invention. Figure 2 The described method for intelligently managing media files can be applied to devices or systems for intelligently managing media files, or it can also be applied to electronic devices with applications installed, wherein the electronic device is communicatively connected to a network attached storage device, and the electronic device accesses the network attached storage device through the application. This embodiment of the invention is not limited to any particular application. Figure 2 As shown, the method for intelligently managing media files may include the following operations: 201. When a user interaction event triggered by the application is detected, a media query request is generated based on the user interaction event, as well as query parameters for the query requirements of the user interaction event.

[0051] 202. Based on the media query request and the query parameters, perform a media query operation on the media database to obtain the required target media data.

[0052] 203. Create a group container for the target media data, and perform an identifier extraction operation and an information filling operation for the preset media file instance according to the group container.

[0053] In this embodiment of the invention, when creating a grouping container for the target media data in step 203, a hash-mapped grouping container with BUCKET_ID as the key can be created.

[0054] In the embodiments of this invention, please refer to Figure 7 , Figure 7 This is a schematic diagram illustrating the grouping effect corresponding to the grouping processing results of target media data disclosed in an embodiment of the present invention. For example... Figure 7 As shown, the display interface successfully shows multiple album groups, including: the main album ( Figure 7 Data album grouping: 50,000+ photos; Backup album ( Figure 7 (kkk album grouping): 10,000+ photos; screenshot album ( Figure 7Screenshots album grouping): Dozens of photos, and several other album groupings.

[0055] 204. Based on the identification extraction result corresponding to the operation according to the execution identification, perform a first instance addition operation on the media file instance after information filling based on the created list, or perform a second instance addition operation on the newly created list, to obtain a grouping processing result for the target media data.

[0056] 205. Create a standard date formatter and initialize the standard date formatter.

[0057] In the embodiments of the present invention, the standard date formatter can process dates according to a preset unified format, ensuring that the date information of all media files to be displayed is presented in the same standard form. For example, whether the media files are recorded from different devices, different regions or different times, their dates can be displayed in the clear and understandable format of "yyyy year MM month dd day", improving the readability and consistency of the date information.

[0058] 206. Create a display list and set a detection variable for detecting date changes.

[0059] In the embodiments of the present invention, when traversing the media files to be displayed in the grouping processing result, the detection variable can track the changes in date information in real time. By reasonably setting and updating the detection variable, it can accurately determine whether the date of the currently processed media file is different from the previous one, so as to decide whether special display processing is required, such as adding a date title item. This precise date change detection mechanism ensures that the display list can be reasonably adjusted dynamically according to the changes in date information, improving the display timeliness and accuracy of its content.

[0060] 207. Traverse the grouping processing result and extract the file timestamp of each media file to be displayed in the grouping processing result.

[0061] 208. According to the standard date formatter, perform format conversion on the file timestamp of each media file to be displayed to update the file timestamp of each media file to be displayed, and at the same time update the grouping processing result.

[0062] In the embodiments of the present invention, the file timestamp is an important attribute of the media file, recording key time information such as the creation and modification of the file. By accurately extracting the file timestamp and converting it according to the standard format, the accuracy of the date information in the display process can be ensured.

[0063] 209. Determine whether the detection variable indicates the existence of a date change event. If it is determined that the detection variable indicates that there is no date change event, reset the detection variable and add the grouping results to the display list to update the display list and obtain the target display list.

[0064] In this embodiment of the invention, step 209 ensures that media files can be displayed continuously and compactly in the list when the dates are the same, which conforms to the user's browsing habits.

[0065] In this embodiment of the invention, the method further includes: When it is determined that the detected variable indicates a date change event, a date header item is created for the detected variable, the date header item is added to the display list, the detected variable is reset, and the grouping processing results are added to the display list to update the display list and obtain the target display list.

[0066] In this embodiment of the invention, when a date change event is detected, the date separator can be clearly displayed in the display list, enabling users to quickly distinguish media files from different dates. This optimizes the structure of the display list and improves the efficiency of users in finding and browsing media files.

[0067] In this embodiment of the invention, the method further includes: After completing step 209 or obtaining the target display list, iterate through all file objects corresponding to the media files to be displayed in the target display list, and recycle all file objects corresponding to the media files to be displayed to the preset object pool.

[0068] As can be seen, an object management mechanism is set up to respond to the file object corresponding to the media file to be displayed. This mechanism can recycle the object in a timely manner after it is determined that the file object has been used, thereby avoiding memory leaks.

[0069] 210. Display a list of targets on the application's interface.

[0070] For further descriptions of steps 201-204 and 210 in this embodiment of the invention, please refer to the other specific descriptions of steps 101-104 and 105 in Embodiment 1. These descriptions will not be repeated in this embodiment of the invention.

[0071] In this embodiment of the invention, steps 209-210 and the operations performed when the detection variable indicates a date change event can be performed in the display control layer. Based on this, the display control layer can include an adaptive title generator, a list rendering controller, and a user interaction processor. The adaptive title generator is used to execute step 208 and the subsequent operations corresponding to the determination that the detection variable indicates a date change event. The list rendering controller manages the RecyclerView's ViewHolder pool, thereby optimizing view recycling and reuse. The user interaction processor handles scroll events and click events, implementing lazy loading and preloading mechanisms.

[0072] It is evident that implementation Figure 2 The described method for intelligently managing media files ensures consistent date display by creating a standard date formatter; it improves the timeliness of detecting media file changes and enables timely updates by setting detection variables to precisely control date changes; and it achieves precise optimization of the target display list by flexibly handling date change events, thereby greatly improving the accuracy and reliability of the final generated target display list.

[0073] In an optional embodiment, step 203, which involves performing identifier extraction and information filling operations for preset media file instances on the target media data according to the grouping container, specifically includes: Traverse the target media data and extract the folder identifier corresponding to the target media data; Retrieve media file instances from a preset object pool, and perform information population operations on the basic attribute information of the media file instances based on the target media data to update the media file instances; The above step 204, based on the identifier extraction result obtained from the identifier extraction operation, performs either a first instance addition operation based on the already created list, or a second instance addition operation based on the newly created list, on the media file instance after information filling, to obtain the grouping processing result for the target media data. Specifically, this includes: Determine whether the recorded identifiers included in the group container include folder identifiers. If it is determined that the recorded identifiers included in the group container include folder identifiers, add the media file instance to the container group corresponding to the recorded identifier as the grouping processing result for the target media data. When it is determined that the recorded identifiers included in the grouping container do not include folder identifiers, a new file list is created in the grouping container, and media file instances are added to the new file list. At the same time, a mapping relationship between the new file list and folder identifiers is established as the grouping processing result for the target media data.

[0074] In this optional embodiment, the business processing layer may include a hash grouping processor, a time calculation engine, and a smart sorter. The hash grouping processor executes the operation corresponding to step 203 above; the time calculation engine executes the operations corresponding to steps 207-208 above. The smart sorter executes the sorting operation corresponding to the sorting parameters in the query parameters, and can also be used to execute subsequent operations such as date sorting and timestamp sorting of grouping results.

[0075] In this optional embodiment, by traversing the target media data and extracting the corresponding folder identifier, the folder information to which each media file belongs can be accurately determined.

[0076] In this optional embodiment, a corresponding memory management mechanism can be pre-built before detecting a user interaction event. Specifically, this involves performing an initialization operation on the media file object pool to obtain the object pool to be accessed. This initialization operation includes: creating a stack-based object pool container, setting a maximum capacity limit for the object pool container to prevent memory overflow, and establishing standard interfaces for object acquisition and recycling. An object pool manager can also be set up for this constructed object pool container to maintain the constructed object pool instances, such as a MediaFile pool, a DateHeader pool, and a ViewHolder pool. After completing the object pool initialization operation, an object lifecycle management mechanism is set up to control the priority of retrieving existing instances from the object pool, and a memory monitoring mechanism is established to monitor the object pool usage in real time. When the object pool is empty, new objects are automatically created; and objects that have been used are recycled back to the object pool after their state is reset.

[0077] In this optional embodiment, the operation of obtaining media file instances from a preset object pool achieves efficient reuse of objects, reduces the overhead of frequent object creation and destruction, and helps improve system performance.

[0078] In this optional embodiment, when the recorded identifier includes a folder identifier, the media file instance is added to the corresponding container group, avoiding duplicate group creation; when the recorded identifier does not include a folder identifier, a new file list is created in the group container, and the media file instance is added to the new list, while establishing a mapping relationship between the new list and the folder identifier. This intelligent judgment and processing mechanism can dynamically adjust the grouping structure according to the actual situation, ensuring that all media files are grouped appropriately.

[0079] As can be seen, in this optional embodiment, precise extraction of folder identifiers provides key basis for grouping; flexible object management and information filling of media file instances enhance the flexibility and adaptability of grouping; and intelligent judgment of grouping status and dynamic adjustment of grouping structure improve grouping efficiency and accuracy.

[0080] In another optional embodiment, before generating the target display list for the grouping processing results according to a preset media display process, the method further includes: Based on the pre-set time zone compensation constant and the timestamps corresponding to all target media files in the group processing results, combined with bitwise operation algorithms, the date key value corresponding to each target media file is calculated. Add the date key value corresponding to each target media file to the target media file to update the target media file; Perform a preset sorting operation on all target media files according to their timestamps to obtain the sorting results for all target media files, and update the grouping processing results; Based on the date key value corresponding to each target media file and the folder identifier, a group index is generated for all target media files; the group index includes at least one sub-group index, and each sub-group index is used to index all target media files with the date key value and / or folder identifier corresponding to that sub-group index; Add the grouping index for all target media files to the grouping results to update the grouping results.

[0081] In this optional embodiment, please refer to Figure 8 , Figure 8 This is a schematic diagram illustrating the grouping effect after adding a grouping index to the grouping results, as disclosed in an embodiment of the present invention. Figure 8 As shown above, in the above Figure 7 After grouping the photos into the main album, the main album details page successfully displays tens of thousands of photos intelligently grouped by date, which is reflected in... Figure 8 The date selected in the middle box: Today, July 29th. This interface verifies the excellent performance of the adaptive title insertion technology of this invention when processing massive amounts of data.

[0082] For further details, please refer to Figure 9 , Figure 9 This is a schematic diagram illustrating the effect of performing batch processing on the grouping results disclosed in an embodiment of the present invention. Figure 9 As shown, in Figure 8 Building upon the interface, a batch selection interface is then accessed, demonstrating the system's stability and responsiveness when selecting a large number of photos. This scenario validates the technical advantages of the object pool management technology of this invention under extreme usage conditions.

[0083] In this optional embodiment, the introduction of a time zone compensation constant fully considers the impact of time differences in different regions on the time information of media files, ensuring the accuracy of date key value calculation. The use of bitwise operation algorithms improves computational efficiency, enabling the rapid and accurate generation of date key values ​​based on timestamps and time zone compensation constants. This accurate date key value calculation provides a reliable time reference for subsequent time-based media file management and operations, allowing media files to be arranged and indexed in the correct chronological order, avoiding problems such as file sorting chaos caused by inaccurate time processing.

[0084] In this optional embodiment, by adding accurate date key values ​​to the target media file, the attributes of the media file are enriched, which facilitates subsequent time-based queries, filtering, and statistical operations.

[0085] In this optional embodiment, the timestamp is a precise identifier that records the creation or modification time of a media file. Sorting by timestamp ensures that media files are arranged in chronological order. This sorting method aligns with users' cognitive habits regarding the chronological order of media files, allowing them to quickly understand the temporal relationship of files when viewing them. This facilitates users in finding and managing media files according to a timeline, improving the user experience and management efficiency.

[0086] In this optional embodiment, by combining date key values ​​and folder identifiers, users can quickly locate the desired media files according to different needs, such as by time range, by folder category, or a combination of both. The grouped index setting greatly improves the efficiency of media file retrieval and reduces the time users spend searching for files, making it particularly suitable for scenarios with a large number of media files and complex structures.

[0087] As can be seen, in this optional embodiment, accurate date key value calculation provides a reliable time reference for subsequent time-based media file management and operation, enabling media files to be arranged and indexed in the correct time order, avoiding problems such as file sorting disorder caused by inaccurate time processing; efficient time sorting optimizes the display order; and intelligent generation of grouped indexes enhances the overall system's retrieval capabilities. In other words, through the above process, the method and process of intelligent management of media files are greatly optimized, improving the management efficiency of media files and the user experience.

[0088] In yet another alternative embodiment, please refer to Figure 5 , Figure 5 This is a flowchart illustrating another method for intelligently managing media files disclosed in an embodiment of the present invention. Figure 5This describes a sequence diagram showing the user interaction event generated after a user triggers an application on an electronic device (specifically, the photo album browsing function), and the application's response to this event. Specifically, when a user clicks the photo album browsing function, the background automatically generates a corresponding user interaction event, which in turn automatically executes operations such as initializing query parameters and generating a media query request at the display interface layer. Then, based on the query parameters and the media query request, and using specific selective fields, the display interface layer performs a query operation on the database / media database, which returns a simplified Cursor object. Next, the display layer verifies the validity and completeness of the returned data and calculates its estimated capacity. After confirming the validity and completeness of the returned data, it is passed to the business layer, where it performs grouping operations, preset date processing operations, and display data optimization and generation operations (corresponding to steps 103 or 203-208 above). Finally, the display layer renders and displays the resulting target list.

[0089] Example 3 Please see Figure 3 , Figure 3 This is a schematic diagram of a device for intelligently managing media files, as disclosed in an embodiment of the present invention. The device can be integrated as a built-in component or module within an electronic device that has an application installed. This electronic device can be an Android device running the Android system. Furthermore, the electronic device has the application installed and is communicatively connected to a network attached storage device (NETS), accessing the NETS through the application. Figure 3 As shown, the device may include a generation module 301, a media query module 302, a creation module 303, a grouping module 304, a list generation module 305, and a display module 306, wherein: The generation module 301 is used to generate a media query request and query parameters for the query requirements of the user interaction event when a user interaction event triggered by the application is detected.

[0090] The media query module 302 is used to perform media query operations on the media database based on the media query request and query parameters to obtain the required target media data.

[0091] Create module 303 to create grouped containers for target media data.

[0092] The grouping module 304 is used to perform an identifier extraction operation and an information filling operation for preset media file instances on the target media data according to the grouping container. Based on the identifier extraction result obtained from the identifier extraction operation, it performs a first instance addition operation based on an existing list or a second instance addition operation based on a newly created list on the information-filled media file instances to obtain the grouping processing result for the target media data.

[0093] The list generation module 305 is used to generate a target display list based on the grouping results according to the preset media display process.

[0094] Display module 306 is used to display the target display list on the application's program interface.

[0095] It is evident that implementation Figure 3 The described electronic device, in response to user-triggered user interaction events, achieves precise and targeted data access by setting query parameters, reducing the amount of data required for data query and thus improving media query efficiency. Furthermore, through business layer grouping, it performs operations such as identifier extraction, information population based on media file instances, and adding first instances from an existing list, or adding second instances from a newly created list, on the queried target media data. This achieves precise and intelligent grouping of target media data while reducing CPU load and improving the execution efficiency of business grouping. Finally, an intelligent display mechanism for the grouping processing results is set up, which can flexibly adjust the display results according to user needs, improving the convenience and experience of users viewing the target display list.

[0096] In an optional embodiment, the query parameters include sorting parameters and / or filtering parameters; the sorting parameters are used to indicate the sorting requirements for the data to be queried; the filtering parameters are used to indicate the filtering requirements for the data to be queried. The media query module 302 performs a media query operation on the media database based on the media query request and query parameters to obtain the required target media data. Specific methods include: Based on the media query request, the media database associated with the application is invoked; After determining the media database to be accessed, a preset projection array is used as the query basis. Data query operations are performed on the media database according to the media query request and query parameters to obtain the target query data in response to the media query request. The projection array includes at least three query fields, and the target query data includes at least the subquery data corresponding to each query field. According to the preset data encapsulation requirements, the target query data is encapsulated to obtain the encapsulation result for the target query data, which is used as the required target media data. Specifically, when the query parameters include sorting parameters, the data adjustment operation includes the sorting operation corresponding to the sorting parameters; when the query parameters include filtering parameters, the data adjustment operation includes the data filtering operation corresponding to the filtering parameters.

[0097] As can be seen, in this optional embodiment, by setting query parameters including sorting parameters and filtering parameters, accurate and flexible query of target query data is achieved; then, by calling the associated database and using the projection array as a basis, efficient and targeted acquisition of target query data is achieved; finally, the data is encapsulated according to preset requirements to achieve intelligent data standardization. The overall process setting greatly improves the efficiency and accuracy of media file query.

[0098] In another alternative embodiment, please refer to Figure 4 , Figure 4 This is a schematic diagram of another intelligent media file management device disclosed in an embodiment of the present invention. Figure 4 As shown, the device also includes: The checking module 307 is used to perform a validity check on the target media data after the media query module 302 performs a media query operation on the media database according to the media query request and in combination with the query parameters to obtain the required target media data, and obtain the validity check result for the target media data; the validity check operation is used to check whether the target media data is empty data. The exception handling module 308 is used to generate query failure information for the query parameters and return the query failure information to the user when the validity check result indicates that the target media data is empty. The inspection module 307 is also used to perform an integrity check operation on the target media data when the validity check result indicates that the target media data is not empty data, and obtain the integrity check result for the target media data; The exception handling module 308 is also used to record the integrity check result and return the execution of the media query operation based on the media query request and query parameters to the media database to obtain the operation corresponding to the required target media data, until it is determined that the target media data does not have incomplete or abnormal data, and then determines that the target media data has passed the validity check operation and the integrity check operation.

[0099] As can be seen, in this optional embodiment, data problems can be detected and addressed at an early stage through validity and integrity checks, preventing invalid or incomplete data from being passed to subsequent processing stages. This helps reduce system errors and resource waste caused by data problems in subsequent processing, optimizing the utilization efficiency of system resources; and, by setting an automatic retry mechanism, data problems can be automatically resolved, which is beneficial to enhancing system stability.

[0100] In another optional embodiment, the grouping module 304 performs identifier extraction operations and information filling operations for preset media file instances on the target media data according to the grouping container, specifically including: Traverse the target media data and extract the folder identifier corresponding to the target media data; Retrieve media file instances from a preset object pool, and perform information population operations on the basic attribute information of the media file instances based on the target media data to update the media file instances; The grouping module 304 performs a first instance addition operation based on an existing list, or a second instance addition operation based on a newly created list, on the media file instances after information filling, according to the identifier extraction result obtained from the identifier extraction operation. The specific methods for obtaining the grouping processing result for the target media data include: Determine whether the recorded identifiers included in the group container include folder identifiers. If it is determined that the recorded identifiers included in the group container include folder identifiers, add the media file instance to the container group corresponding to the recorded identifier as the grouping processing result for the target media data. When it is determined that the recorded identifiers included in the grouping container do not include folder identifiers, a new file list is created in the grouping container, and media file instances are added to the new file list. At the same time, a mapping relationship between the new file list and folder identifiers is established as the grouping processing result for the target media data.

[0101] As can be seen, in this optional embodiment, precise extraction of folder identifiers provides key basis for grouping; flexible object management and information filling of media file instances enhance the flexibility and adaptability of grouping; and intelligent judgment of grouping status and dynamic adjustment of grouping structure improve grouping efficiency and accuracy.

[0102] In another alternative embodiment, such as Figure 4 As shown, the device also includes: The date calculation module 309 is used by the list generation module 305 to calculate the date key value corresponding to each target media file based on the preset time zone compensation constant and the timestamps corresponding to all target media files in the group processing results, combined with the bit operation algorithm, before the list generation module 305 generates the target display list for the group processing results according to the preset media display process. The update module 310 is used to add the date key value corresponding to each target media file to the target media file in order to update the target media file; The sorting module 311 is used to perform a preset sorting operation on all target media files according to the timestamp order to obtain the sorting result for all target media files, so as to update the grouping processing result; The generation module 301 is further configured to generate a grouping index for all target media files based on the date key value corresponding to each target media file and the folder identifier; the grouping index includes at least one sub-grouping index, and each sub-grouping index is used to index all target media files with the date key value and / or folder identifier corresponding to the sub-grouping index; The update module 310 is also used to add the grouping index for all target media files to the grouping results to update the grouping results.

[0103] As can be seen, in this optional embodiment, accurate date key value calculation provides a reliable time reference for subsequent time-based media file management and operation, enabling media files to be arranged and indexed in the correct time order, avoiding problems such as file sorting disorder caused by inaccurate time processing; efficient time sorting optimizes the display order; and intelligent generation of grouped indexes enhances the overall system's retrieval capabilities. In other words, through the above process, the method and process of intelligent management of media files are greatly optimized, improving the management efficiency of media files and the user experience.

[0104] In another optional embodiment, the list generation module 305 generates a target display list for the grouping processing results according to a preset media display process, specifically including: Create a standard date formatter and initialize it; Create a display list and set detection variables to detect date changes; Iterate through the grouping processing results, extract the file timestamp of each media file to be displayed from the grouping processing results; and, according to the standard date formatter, perform format conversion on the file timestamp of each media file to be displayed to update the file timestamp of each media file to be displayed, and update the grouping processing results at the same time. Determine whether the detection variable indicates the existence of a date change event. If it is determined that the detection variable indicates that no date change event exists, reset the detection variable and add the grouping results to the display list to update the display list and obtain the target display list.

[0105] In this optional embodiment, the method by which the list generation module 305 generates a target display list for the grouping processing results according to a preset media display process further includes: When it is determined that the detected variable indicates a date change event, a date header item is created for the detected variable, the date header item is added to the display list, the detected variable is reset, and the grouping processing results are added to the display list to update the display list and obtain the target display list.

[0106] As can be seen, in this optional embodiment, the creation of a standard date formatter ensures consistent date display; by setting detection variables to accurately control date changes, the timeliness of detecting media file changes and the timely updating of media files are improved; by flexibly handling date change events, the precise optimization of the target display list is achieved; thereby, the accuracy and reliability of the final generated target display list are greatly improved.

[0107] Example 4 Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention. For example... Figure 6 As shown, the electronic device has an application installed; the electronic device is communicatively connected to a network attached storage device, and the electronic device accesses the network attached storage device through the application; and the electronic device is used to perform some or all of the steps in any of the intelligent media file management methods described in Embodiment 1 or Embodiment 2 of the present invention.

[0108] Example 5 This invention discloses a system for intelligently managing media files. The system includes an apparatus for intelligently managing media files as described in Embodiment 3 of this invention, and a network attached storage device communicatively connected to the apparatus. The apparatus for intelligently managing media files performs intelligent management and processing on media files stored in the network attached storage device according to any of the methods for intelligently managing media files described in Embodiment 1 or Embodiment 2 of this invention. Alternatively, the system may include the electronic device described in Embodiment 4 of the present invention, and a network attached storage device communicatively connected to the electronic device; wherein the electronic device performs intelligent management and processing of media files stored in the network attached storage device in accordance with any of the intelligent management media file methods described in Embodiment 1 or Embodiment 2 of the present invention.

[0109] The apparatus and system embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

Claims

1. A method for intelligently managing media files, characterized in that, The method is applied to an electronic device with an application installed, and the electronic device is communicatively connected to a network-attached storage device (NAT), the electronic device accessing the NAT through the application; the method includes: When a user interaction event triggered by the application is detected, a media query request and query parameters for the query requirements of the user interaction event are generated based on the user interaction event. Based on the media query request and the query parameters, a media query operation is performed on the media database to obtain the required target media data; Create a grouping container for the target media data, and perform an identifier extraction operation and an information filling operation for a preset media file instance on the target media data according to the grouping container. Based on the identifier extraction result obtained by performing the identifier extraction operation, perform a first instance addition operation based on an existing list or a second instance addition operation based on a newly created list on the information-filled media file instance to obtain the grouping processing result for the target media data. According to the preset media display process, a target display list for the grouping processing results is generated and displayed on the application's program interface.

2. The method for intelligent management and control of media files according to claim 1, characterized in that, The query parameters include sorting parameters and / or filtering parameters; the sorting parameters are used to indicate the sorting requirements for the data to be queried; the filtering parameters are used to indicate the filtering requirements for the data to be queried. The step of performing a media query operation on the media database based on the media query request and the query parameters to obtain the required target media data includes: Based on the media query request, the media database associated with the application is invoked; After determining access to the media database, a preset projection array is used as the query basis. A data query operation is performed on the media database according to the media query request and the query parameters to obtain the target query data in response to the media query request. The projection array includes at least three query fields, and the target query data includes at least sub-query data corresponding to each query field. According to the preset data encapsulation requirements, the target query data is encapsulated to obtain the encapsulation result for the target query data, which is used as the required target media data. Wherein, when the query parameters include the sorting parameters, the data adjustment operation includes a sorting operation corresponding to the sorting parameters; when the query parameters include the filtering parameters, the data adjustment operation includes a data filtering operation corresponding to the filtering parameters.

3. The method for intelligent management and control of media files according to claim 1 or 2, characterized in that, After performing a media query operation on the media database based on the media query request and the query parameters to obtain the required target media data, the method further includes: A validity check operation is performed on the target media data to obtain a validity check result for the target media data; the validity check operation is used to check whether the target media data is empty data. When the validity check result indicates that the target media data is empty data, a query failure message is generated for the query parameters, and the query failure message is fed back to the user; When the validity check result indicates that the target media data is not empty data, an integrity check operation is performed on the target media data to obtain the integrity check result for the target media data. When the integrity check result indicates that the target media data is incomplete or abnormal, the integrity check result is recorded and the operation corresponding to the target media data is executed according to the media query request and the query parameters. This process continues until it is determined that the target media data does not contain the incomplete or abnormal data. At this point, the target media data is determined to have passed both the validity check operation and the integrity check operation.

4. The method for intelligent management and control of media files according to claim 1 or 2, characterized in that, The step of performing identifier extraction and information filling operations for preset media file instances on the target media data according to the grouping container includes: Traverse the target media data and extract the folder identifier corresponding to the target media data; A media file instance is obtained from a preset object pool, and information population operation is performed on the basic attribute information of the media file instance according to the target media data to update the media file instance; The step of performing a first instance addition operation based on an existing list, or a second instance addition operation based on a newly created list, on the media file instance after information filling, based on the identifier extraction result obtained from the identifier extraction operation, to obtain the grouping processing result for the target media data, includes: Determine whether the recorded identifiers included in the group container include the folder identifier. If it is determined that the recorded identifiers included in the group container include the folder identifier, add the media file instance to the container group corresponding to the recorded identifier as the grouping processing result for the target media data. When it is determined that the recorded identifiers included in the grouping container do not include the folder identifier, a new file list is created in the grouping container, and the media file instance is added to the new file list. At the same time, a mapping relationship is established between the new file list and the folder identifier as the grouping processing result for the target media data.

5. The method for intelligent management and control of media files according to claim 4, characterized in that, Before generating the target display list for the grouping results according to the preset media display process, the method further includes: Based on the pre-set time zone compensation constant and the timestamps corresponding to all target media files in the grouping processing result, and combined with bitwise operation algorithms, calculate the date key value corresponding to each target media file; Add the date key value corresponding to each target media file to the target media file to update the target media file; A preset sorting operation is performed on all the target media files according to their timestamp order to obtain a sorting result for all the target media files, so as to update the grouping processing result; Based on the date key value corresponding to each target media file and the folder identifier, a group index is generated for all target media files; the group index includes at least one sub-group index, and each sub-group index is used to index all target media files corresponding to the date key value and / or the folder identifier of the sub-group index. The grouping index for all the target media files is added to the grouping result to update the grouping result.

6. The method for intelligently managing media files according to claim 1, 2, or 5, characterized in that, The step of generating a target display list based on the grouping results according to a preset media display process includes: Create a standard date formatter and initialize the standard date formatter; Create a display list and set detection variables to detect date changes; Iterate through the grouping processing results and extract the file timestamp of each media file to be displayed from the grouping processing results; and perform format conversion on the file timestamp of each media file to be displayed according to the standard date formatter to update the file timestamp of each media file to be displayed, and update the grouping processing results at the same time. Determine whether the detected variable indicates the existence of a date change event. If it is determined that the detected variable indicates the absence of the date change event, reset the detected variable and add the grouping result to the display list to update the display list and obtain the target display list.

7. The method for intelligent management and control of media files according to claim 6, characterized in that, The step of generating a target display list for the grouping results according to a preset media display process further includes: When it is determined that the detected variable indicates the existence of the date change event, a date header item is created for the detected variable, the date header item is added to the display list, the detected variable is reset, and the grouping processing result is added to the display list to update the display list and obtain the target display list.

8. A device for intelligent management and control of media files, characterized in that, The device is disposed in an electronic device with an application installed, and the electronic device is communicatively connected to a network-attached storage device, the electronic device accessing the network-attached storage device through the application; the device includes: The generation module is used to generate a media query request and query parameters for the query requirements of the user interaction event when a user interaction event triggered by the application is detected. The media query module is used to perform a media query operation on the media database according to the media query request and the query parameters to obtain the required target media data; A creation module is used to create grouped containers for the target media data; The grouping module is used to perform an identifier extraction operation and an information filling operation for a preset media file instance on the target media data according to the grouping container, and to perform a first instance addition operation based on an existing list or a second instance addition operation based on a newly created list on the media file instance after information filling, according to the identifier extraction result obtained by performing the identifier extraction operation, so as to obtain the grouping processing result for the target media data. The list generation module is used to generate a target display list for the grouping processing results according to a preset media display process; The display module is used to display the target display list on the application's program interface.

9. An electronic device, characterized in that, The electronic device has an application installed; the electronic device is communicatively connected to a network attached storage device, and the electronic device accesses the network attached storage device through the application. Furthermore, the electronic device is used to perform the method for intelligently managing media files as described in any one of claims 1-7.

10. A system for intelligently managing media files, characterized in that, The system includes the device for intelligent management and control of media files as described in claim 8, and a network attached storage device communicatively connected to the device for intelligent management and control of media files; wherein the device for intelligent management and control of media files performs intelligent management and processing of media files stored in the network attached storage device according to the method for intelligent management and control of media files as described in any one of claims 1-7; or, The system includes the electronic device as described in claim 9, and a network attached storage device communicatively connected to the electronic device; wherein the electronic device performs intelligent management and processing of media files stored in the network attached storage device according to the method for intelligent management of media files as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Method and terminal apparatus for accomplishing on-line network multimedia application

    CN101236567A

  • Media file play method, player and server for playing medial file

    CN102194504A

  • Electronic device and multimedia file sorting method

    CN103714111A

  • Media file browsing method and information processing equipment

    CN106599170A

  • Multimedia file searching method and device

    CN113641839A