Collection operation method and device, equipment and storage medium

By receiving collection operation instructions in the album system and performing corresponding operations, the inconvenience of users when managing frequently viewed media files is solved, and efficient collection and management of media files is achieved.

CN120179620APending Publication Date: 2025-06-20CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510155813.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

The existing album system lacks efficient collection operation methods when displaying media files, which makes it inconvenient for users to find and manage frequently viewed media files.

Method used

Provide a collection operation method, by receiving collection operation instructions, determining the data table to be operated, and performing corresponding collection operations according to the instructions, including collection, canceling, deleting and querying operations.

Benefits of technology

It realizes efficient collection and management of media files, and improves the convenience of users to find and browse in the album system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120179620A_ABST
    Figure CN120179620A_ABST
Patent Text Reader

Abstract

The invention relates to a collection operation method and device, equipment and a storage medium, and the method comprises the steps: receiving a collection operation instruction of a media database, and the collection operation instruction at least comprises a file identifier and a data table identifier; according to the data table identifier, a to-be-operated data table is determined in a media database, and the media database comprises a media data table and a collection data table; and executing an operation corresponding to the collection operation instruction in the to-be-operated data table according to the file identifier. Visibly, according to the method, when the collection operation instruction is received, the operation corresponding to the instruction can be executed for the to-be-operated data table, and then collection operation is achieved on the media file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and particularly to a collection operation method, apparatus, device, and storage medium. Background Art

[0002] With the development of technology, photo albums are used more and more frequently. A media database is set in the photo album, which is used to manage and store media files, and record and index relevant information of the media files stored on the device, such as file name, path, size, date, etc.

[0003] During the display process of the photo album, relevant information of the media files needs to be called from the media database and presented. To improve the convenience of users to search for data, the photo album can be added with a collection function. In this way, users can quickly browse the media files they often view through this function. Therefore, there is an urgent need to design an effective collection operation method for the photo album. Summary of the Invention

[0004] This application provides a collection operation method, apparatus, device, and storage medium. When receiving a collection operation instruction, this method can perform an operation corresponding to the instruction on the data table to be operated, and then implement the collection operation on the media file.

[0005] In a first aspect, this application provides a collection operation method, and the method includes:

[0006] Receiving a collection operation instruction from a media database, where the collection operation instruction includes at least a file identifier and a data table identifier;

[0007] Determining a data table to be operated in the media database according to the data table identifier, where the media database includes a media data table and a collection data table;

[0008] Performing an operation corresponding to the collection operation instruction in the data table to be operated according to the file identifier.

[0009] Optionally, when the collection operation instruction is a collection deletion instruction, the data table identifier is the identifier of the media data table. The determining a data table to be operated in the media database according to the data table identifier includes:

[0010] Searching the collection data table according to the file identifier to obtain a search result;

[0011] When the search result is a preset result, determining the media data table and the collection data table as the data tables to be operated, where the preset result is that the file identifier exists in the collection data table;

[0012] In the case where the search result is not the preset result, determine the media data table as the data table to be operated on.

[0013] Optionally, in the case where the collection operation instruction is a collection cancellation instruction, the performing the operation corresponding to the collection operation instruction in the data table to be operated on according to the file identifier includes:

[0014] In the case where the data table identifier is the identifier of the media data table, according to the file identifier, search for the corresponding collection identifier in the media data table, and perform a deletion operation on the collection identifier;

[0015] In the case where the data table identifier is the identifier of the collection data table, according to the file identifier, search for the corresponding collection data in the collection data table, and perform a deletion operation on the collection data.

[0016] Optionally, in the case where the collection operation instruction is a collection addition instruction, the performing the operation corresponding to the collection operation instruction in the data table to be operated on according to the file identifier includes:

[0017] In the case where the data table identifier is the identifier of the media data table, according to the file identifier, determine the addition position of the collection identifier in the media data table, and add the collection identifier to the collection identifier addition position;

[0018] In the case where the data table identifier is the identifier of the collection data table, according to the file identifier, determine the associated data corresponding to the file identifier in the media data table, and according to the associated data, determine the collection data, and add the collection data to the collection data table.

[0019] Optionally, in the case where the collection operation instruction is a collection query instruction, the performing the operation corresponding to the collection operation instruction in the data table to be operated on according to the file identifier includes:

[0020] In the case where the data table identifier is the identifier of the media data table, query in the media data table whether there is a collection identifier corresponding to the file identifier to obtain a query result;

[0021] In the case where the data table identifier is the identifier of the collection data table, query in the collection data table whether there is a collection data corresponding to the file identifier to obtain a query result;

[0022] According to the query result, display the corresponding operation interface.

[0023] Optionally, the collection operation instruction further includes a user ID. The step of searching for corresponding collection data in the collection data table according to the file identifier includes:

[0024] Determining corresponding collection data in the collection data table according to the file identifier and the user ID.

[0025] Optionally, the step of performing the operation corresponding to the collection operation instruction in the to-be-operated data table according to the file identifier includes:

[0026] Determining a sub-data table corresponding to the type in the to-be-operated data table according to the type of the file identifier;

[0027] Performing the operation corresponding to the collection operation instruction in the sub-data table according to the file identifier.

[0028] In a second aspect, the present application provides a collection operation device, which includes:

[0029] A receiving unit, configured to receive a collection operation instruction of a media database, where the collection operation instruction at least includes a file identifier and a data table identifier;

[0030] A determining unit, configured to determine a to-be-operated data table in the media database according to the data table identifier, where the media database includes a media data table and a collection data table;

[0031] An operation unit, configured to perform the operation corresponding to the collection operation instruction in the to-be-operated data table according to the file identifier.

[0032] Optionally, when the collection operation instruction is a collection deletion instruction, the data table identifier is the identifier of the media data table, and the determining unit is configured to:

[0033] Search the collection data table according to the file identifier to obtain a search result;

[0034] When the search result is a preset result, determining the media data table and the collection data table as the to-be-operated data tables, where the preset result is that the file identifier exists in the collection data table;

[0035] When the search result is not the preset result, determining the media data table as the to-be-operated data table.

[0036] Optionally, when the collection operation instruction is a collection cancellation instruction, the operation unit is configured to:

[0037] In the case where the data table is identified as the media data table, according to the file identifier, in the media data table, find the corresponding collection identifier and perform a deletion operation on the collection identifier;

[0038] In the case where the data table is identified as the collection data table, according to the file identifier, in the collection data table, find the corresponding collection data and perform a deletion operation on the collection data.

[0039] Optionally, in the case where the collection operation instruction is a collection addition instruction, the operation unit is configured to:

[0040] In the case where the data table is identified as the media data table, according to the file identifier, in the media data table, determine the addition position of the collection identifier corresponding to the file identifier and add the collection identifier to the collection identifier addition position;

[0041] In the case where the data table is identified as the collection data table, according to the file identifier, in the media data table, determine the associated data corresponding to the file identifier, and according to the associated data, determine the collection data and add the collection data to the collection data table.

[0042] Optionally, in the case where the collection operation instruction is a collection query instruction, the operation unit is configured to:

[0043] In the case where the data table is identified as the media data table, in the media data table, query whether there is a collection identifier corresponding to the file identifier to obtain a query result;

[0044] In the case where the data table is identified as the collection data table, in the collection data table, query whether there is collection data corresponding to the file identifier to obtain a query result;

[0045] According to the query result, display the corresponding operation interface.

[0046] Optionally, the collection operation instruction further includes a user ID; the operation unit is configured to:

[0047] According to the file identifier and the user ID, in the collection data table, determine the corresponding collection data.

[0048] Optionally, the operation unit is configured to:

[0049] According to the type of the file identifier, in the data table to be operated, determine the sub-data table corresponding to the type;

[0050] According to the file identifier, perform the corresponding operation of the collection operation instruction in the sub-data table.

[0051] In a third aspect, the present application provides a collection operation device, including: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; at least one memory connected to the at least one bus, wherein the processor is configured to:

[0052] Receive a collection operation instruction of a media database, where the collection operation instruction at least includes a file identifier and a data table identifier;

[0053] According to the data table identifier, determine a data table to be operated in the media database, where the media database includes a media data table and a collection data table;

[0054] According to the file identifier, perform the corresponding operation of the collection operation instruction in the data table to be operated.

[0055] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned collection operation method is implemented.

[0056] The above technical solutions provided by the embodiments of the present application have the following advantages compared with the prior art: In the embodiments of the present application, a collection operation instruction of a media database is received, where the collection operation instruction at least includes a file identifier and a data table identifier; according to the data table identifier, a data table to be operated is determined in the media database, where the media database includes a media data table and a collection data table; according to the file identifier, the corresponding operation of the collection operation instruction is performed in the data table to be operated. It can be seen that in the embodiments of the present application, when a collection operation instruction is received, the corresponding operation of the instruction can be performed on the data table to be operated, and then the collection operation of the media file can be realized. Description of the Drawings

[0057] The drawings here are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present invention, and are used together with the specification to explain the principles of the present invention.

[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0059] One or more embodiments are exemplarily illustrated by the pictures in the corresponding drawings. These exemplary illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements, unless otherwise stated, the drawings in the figures do not constitute a scale limitation.

[0060] Figure 1 It is a schematic diagram of a type of relationship provided by an embodiment of the present application;

[0061] Figure 2 It is another schematic diagram of a type of relationship provided by an embodiment of the present application;

[0062] Figure 3 It is a schematic flowchart of a favorite operation method provided by an embodiment of the present application

[0063] Figure 4 It is a schematic flowchart of a deletion method based on a data table provided by an embodiment of the present application;

[0064] Figure 5 It is a schematic flowchart of a method for executing a favorite cancellation instruction provided by an embodiment of the present application;

[0065] Figure 6 It is a schematic flowchart of a method for executing a favorite addition instruction provided by an embodiment of the present application;

[0066] Figure 7 It is a schematic flowchart of a method for executing a favorite query instruction provided by an embodiment of the present application;

[0067] Figure 8 It is a schematic flowchart of another data operation method provided by an embodiment of the present application;

[0068] Figure 9 It is a schematic flowchart of still another data operation method provided by an embodiment of the present application;

[0069] Figure 10 It is a request timing diagram of still another APP provided by an embodiment of the present application;

[0070] Figure 11 It is a schematic flowchart of a favorite operation device provided by an embodiment of the present application;

[0071] Figure 12 It is a schematic diagram of a favorite operation device provided by an embodiment of the present application. Detailed implementation manners

[0072] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are some, but not all, of the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts shall fall within the scope of protection of this application.

[0073] The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. To simplify the disclosure of the present invention, the components and settings of specific examples are described below. Of course, they are merely examples and are not intended to limit the present invention. In addition, the present invention may repeat reference numerals and / or letters in different examples. This repetition is for the purpose of simplification and clarity and does not in itself indicate the relationship between the various embodiments and / or settings discussed.

[0074] First, the terms involved in this application are explained: The Android MediaProvider is an important component in the Android system for managing media files and related information. The Android DataBaseHelper is a class used to assist in managing databases in Android development. It is usually responsible for creating databases, performing initialization operations such as creating tables, and providing basic operation methods for adding, deleting, modifying, and querying databases. By using the DataBaseHelper, database-related development and maintenance work can be carried out more conveniently. The MediaStore of Android is a class for interacting with the media database, providing a series of methods to obtain information about media files, perform operations on media files (such as insertion, deletion, etc.), and can be synchronized with the Media Provider.

[0075] Secondly, before implementing the embodiments of this application, since there is already a media data table in the media database, therefore, only a favorite data table needs to be created in the media database. The key fields in the favorite data table are shown in Table 1, and some fields in the media data table are shown in Table 2.

[0076] Table 1

[0077] Field Name Data Type Description id Auto - incrementing Integer Unique identifier for the collection record user_id String User ID _data String Storage path for images or videos mime_type String Image or video type date_added Date and Time Time added to the database

[0078] Table 2

[0079]

[0080]

[0081] The specific steps to create Table 1 are as follows: Define a createFavoritesTable method in the MediaProvider class. This method can create a favorite data table through SQL statements, and the field names in this favorite data table are the same as those included in Table 1. At the same time, the definition of new fields in the favorite data table can be added in the system MediaStore class. Specifically, a new interface FavoritesColumns is added in the source code of the system MediaStore class. This interface can implement the MediaColumns interface. Define the fields in the favorite data table in this interface, that is, the fields in Table 1.

[0082] The field definitions in the above FavoritesColumns interface are as follows, referring to the table field definitions in the current native system.

[0083] For example:

[0084] @Column(value = Cursor.FIELD_TYPE_INTEGER, readOnly =

[0085] true);

[0086] public static final String BUCKET_ID = "bucket_id";

[0087] @Column(value = Cursor.FIELD_TYPE_STRING)

[0088] public static final String USER_ID = "user_id";

[0089] Since the other fields in Table 1, such as id, data, mime_type, and data_added, are fields that have already been defined in the existing system, they are already included in the MediaColumns interface, so there is no need to redefine them in the FavoritesColumns interface.

[0090] Add a Favorites class in the MediaStore class to implement

[0091] The FavoritesColumns interface defines a constant EXTERNAL_CONTENT_URI = " / / media / external / favorites" in the Favorites class. This constant URI will be used in MediaProvider methods to represent the identifier of the newly created favorites data table. This Uri is a flag for the favorites data table to be exposed externally. When this URI is used, the data table to be operated on is the favorites data table. At the same time, an Int constant type FAVORITE is defined. The role of this constant is that when the Uri passed in from the outside in the MediaProvider class matches the Uri of the favorites data table, this constant is returned, and then corresponding operations are performed on the favorites data table.

[0092] In the updateDatabase interface method in the DataBaseHelper class, it can be determined whether the database version number of the current system is less than the latest version number. If it is less, it means that the data of the current system needs to be updated. When updating, the

[0093] createFavoritesTable method is called to create the favorites data table.

[0094] Specifically, the embodiment of the present application provides a schematic diagram of the relationship between related classes, as shown in Figure 1As described above, the figure includes the MediaStore class (media storage class), the MediaColumns class (media column class) and the FavoritesColumns class (favorite column class) in the MediaStore class, the BaseColumns class (basic column class), and the Favorites class (favorite class). Among them, the MediaStore class is a class in the system framework and is the core class for media database-related operations. It provides an interface for accessing and operating on media file information and is closely related to the underlying data interaction of functions such as album display and favorites. The MediaStore class includes three fields, namely the AUTHORITY_URI field (authorization uniform resource identifier field) used as identification information, the ACTION_VIEW field (view action field) used to define the action string for viewing media files, and the VOLUME_INTERNAL field (internal volume field) used to represent information related to the content storage volume. The MediaStore class also includes two methods, namely the getVersion method (get version method) for obtaining media database version information and the getMediaUri method (get authorization uniform resource identifier method) for obtaining a uniform resource identifier. The MediaColumns class inherits from the BaseColumns class and is used to define general column information related to media files. The MediaColumns class includes three fields, namely the DATA field (data field) for storing the actual path of the media file, the MIME_TYPE field (Multipurpose Internet Mail Extensions type field) for identifying the file format, and the DATE_ADDED field (added date field) for representing time information. The FavoritesColumns class inherits from MediaColumns and is used to handle data storage related to the favorites function. It includes the USER_ID field (user number field) for recording the user ID of the user who favorites the media file. The BaseColumns class, as a basic class, provides basic field definitions for other classes related to data columns, including two fields, namely the ID field (number field) of the media file record in the database and the COUNT field (count field) for representing the number of records. The Favorites class inherits from

[0095] FavoritesColumns and is used to represent an entity class related to favorites. It includes the EXTERNAL_CONTENT_URI field (external content uniform resource identifier field) for storing the external content URI corresponding to the favorited media file.

[0096] Meanwhile, the embodiment of the present application provides a schematic diagram of the relationship between related classes, and this diagram is as Figure 2As described above, the figure includes the MediaProvider class (media provider class), the ContentProvider class (content provider class), the DataBaseHelper class (database helper class), and the SQLiteOpenHelper class (database helper class). Among them, the MediaProvider class inherits from the ContentProvider class and is responsible for handling the add, delete, modify, and query requests of external applications for media data. It includes two fields, namely the string constant FAVORITE field (favorite field) used to identify operations or data types related to favorites, and the mUriMatcher field (URI matcher field) used to match different URI requests. The MediaProvider class also includes four methods, namely the onUpgrade method (upgrade method) for updating the database structure, the onCreateInternal method (internal creation method) for initialization operations, the queryInternal method (internal query method) for querying data related to media files, and the createFavoritesTable method (query file method) for creating a favorites table. The ContentProvider class defines a set of standard interfaces for other applications to access and operate the data it manages through these interfaces. It includes the mContext field (context field) that holds the application context. It also includes multiple methods, namely the onCreate method (creation method) for initializing resources, the onDowngrade method (downgrade method) for execution during database upgrade, the onUpgrade method (upgrade method) for execution during database upgrade, the insert method (insert method) for inserting data records, the query method (query method) for querying data records, the delete method (delete method) for deleting data records, and the update method (update method) for updating data records. The DataBaseHelper class, as an inner class of MediaProvider, inherits from SQLiteOpenHelper and is responsible for managing the creation, opening, and version management of the SQLite database. It encapsulates the operation details related to the database and provides a simple interface for MediaProvider to operate the database. It includes the mName field (name field) for storing the name of the database. It also includes multiple methods, specifically the onCreate method (creation method) called when the database is first created, the onUpgrade method (upgrade method) called during database upgrade, and the onDowngrade method (downgrade method) called when the database version is lowered.The SQLiteOpenHelper class is an abstract class in the Android framework, which is used to manage the creation and version management of SQLite databases. This class includes the mDataBase field (database field), through which specific SQL statements can be executed. This class also includes various methods, specifically including the query method (query method) for polling data records, the insert method (insert method) for inserting data records, the delete method (delete method) for deleting data records, and the update method (update method) for updating data records.

[0097] Based on the original media data table and the newly created favorite data table in the database, the embodiments of the present application provide a favorite operation method, which only needs to manage one database, reducing the difficulty of managing the database and thus reducing the time for managing the database. As Figure 3 shown, the specific steps include:

[0098] Step 301, receive a favorite operation instruction for the media database.

[0099] Among them, the favorite operation instruction is an operation instruction associated with favorites, specifically including a favorite query instruction, a favorite cancellation instruction, a favorite deletion instruction, and a favorite addition instruction. The favorite query instruction is used to query whether a media file is favorited, the favorite cancellation instruction is used to cancel the favorite of a media file, the favorite deletion instruction is used to delete a favorite file, and the favorite addition instruction is used to favorite a media file. The favorite operation instruction carries at least the file identifier of the media file and the data table identifier. The media file can be a picture or a video, which is not limited here. The data table identifier is a unique identifier indicating the data table, which can be a URI or other data, which is not limited here. The media database includes a media data table and a favorite data table.

[0100] Specifically, the present application provides an application scenario. When the user turns on the media client, a media file list can be displayed based on the media files in the media database. The media client can display the media files stored locally and can also perform operations related to favorites on these media files. When the user clicks on a certain media file in the media file list, the media client receives a file display instruction for the media file, and the file display instruction carries the file identifier of the media file. Then, according to the file identifier in the file display instruction, the corresponding media file is found among the stored media files and the media file is displayed.

[0101] Meanwhile, the user can also trigger a collection query instruction by long pressing a certain media file. Furthermore, according to the query result of the collection query instruction, a corresponding collection operation list is displayed. Specifically, when the media client receives a collection query instruction for a certain media file, it obtains the data table identifier and file identifier in the collection query instruction. According to the file identifier, it queries in the data table indicated by the data table identifier whether the media file corresponding to the file identifier is collected. If it is collected, the displayed collection operation list includes a collection cancellation button and a collection deletion button. If it is not collected, the displayed collection operation list includes a collection addition button.

[0102] When the user clicks the collection cancellation button, the media client receives the collection cancellation instruction corresponding to the button. Furthermore, according to the collection cancellation instruction, the collection of the media file is cancelled. When the user clicks the collection deletion button, the media client receives the collection deletion instruction corresponding to the button. Furthermore, according to the collection deletion instruction, the media file is deleted. When the user clicks the collection addition button, the media client receives the collection addition instruction corresponding to the button. Furthermore, according to the collection addition instruction, the media file is added.

[0103] It should be noted that before obtaining the data table identifier, it is also necessary to detect whether the user ID is obtained. When the user ID is not obtained, it means that an operation needs to be performed on the media data table. Therefore, the identifier of the media data table and the file identifier of the media file are obtained to generate a collection operation instruction. When the user ID is obtained, it means that an operation needs to be performed on the collection data table. Therefore, the identifier of the collection data table and the file identifier of the media file are obtained to generate a collection operation instruction.

[0104] Step 302: Determine the data table to be operated on in the media database according to the data table identifier.

[0105] Among them, the data table to be operated on can be a media data table or a collection data table. The media data table is used to store the associated data of media files, such as the file identifier, collection identifier, operation date, and other associated data of media files. The collection data table is used to store the collection data of each account. The collection data at least includes the user ID and the file identifier. The file identifier can uniquely indicate the identifier of the media file, such as the storage path of the media file. The collection identifier is used to indicate that the corresponding media file is collected and is a unique identifier for indicating collection. The identifier of the collection data table is the above-mentioned externally exposed URI, and the identifier of the media data table can be a URI or other unique identifier that uniquely indicates the media data table.

[0106] In this step, the identifier in the collection operation instruction is compared with the identifier of each data table to find the data table to be operated on. When the comparison is successful, the data table that is successfully compared is determined as the data table to be operated on.

[0107] In practice, when the collection operation instruction is a collection cancellation instruction, a collection addition instruction, or a collection query instruction, since these instructions only require changes to the collection data and do not need to delete all associated data, only the data table to be operated needs to be determined according to the data table identifier, and then the relevant operations can be performed on this data table to be operated. Specifically, when the media client is not logged in, the data table identifier in the collection operation instruction is the identifier of the media data table, so only the relevant operations need to be performed on the media data table. When the media client is logged in, the data table identifier in the collection operation instruction is the identifier of the collection data table, so only the relevant operations need to be performed on the collection data table.

[0108] When the collection operation instruction is a collection deletion instruction, regardless of whether the media client is logged in, the data table identifier in the collection deletion instruction is the identifier of the media data table. This is because the collection deletion instruction is to delete the collection file. Therefore, when deleting the collection file, all associated data of the collection file also need to be deleted. In practice, the media data table will definitely store the associated data of the collection file. Therefore, it is necessary to obtain the media data table in the media database, and then according to the file identifier in the collection deletion instruction, obtain the associated data of the collection file in the media data table and delete this associated data. Of course, the collection data table may store the collection data of the collection file or may not store the collection data of the collection file. Therefore, it is also necessary to obtain the collection data table in the media database, detect the collection data table according to this file identifier, and when the collection data corresponding to this file identifier is detected, delete this collection data.

[0109] Based on the above, in the case where the collection operation instruction is a collection deletion instruction, it is necessary to use the file identifier to detect the collection data table to determine whether it is necessary to perform a deletion operation on the collection data table. When it is necessary to perform a deletion operation on the collection data table, the collection data table and the media data table are determined as the data tables to be operated. When it is not necessary to perform a deletion operation on the collection data table, only the media data table needs to be determined as the data table to be operated.

[0110] Or, in the case where the collection operation instruction is a collection deletion instruction, if the media client is logged in, the collection operation instruction may also include a user ID, which is used to indicate to perform a deletion operation on the collection data table.

[0111] Step 303: According to the file identifier, perform the operation corresponding to the collection operation instruction on the data table to be operated.

[0112] In this step, when the data table to be operated is the media data table, perform the corresponding operation on the media data table according to the file identifier. When the data table to be operated is the collection data table, perform the corresponding operation on the collection data table according to the file identifier.

[0113] In an embodiment of the present application, a collection operation instruction of a media database is received. The collection operation instruction at least includes a file identifier and a data table identifier. According to the data table identifier, a data table to be operated is determined in the media database, where the media database includes a media data table and a collection data table. According to the file identifier, the corresponding operation of the collection operation instruction is executed in the data table to be operated. It can be seen that in the embodiment of the present application, when a collection operation instruction is received, the corresponding operation of the instruction can be executed for the data table to be operated, so as to implement the collection operation on the media file.

[0114] At the same time, in the related art, since the above media database does not have an account collection function, the general method is to create a new database in the album and create a collection data table in the database. The collection data table is used to store user accounts and the collected media files. However, based on the above method, two databases need to be managed, and various problems such as the architecture difference, permission difference, compatibility problem, and data synchronization of the two databases will increase the management difficulty of the database, which is time-consuming and laborious. In the present application, both the collection data table and the media data table are set in the media database, so that only one database needs to be managed, reducing the management difficulty of the database and thus reducing the time for managing the database.

[0115] In an embodiment of the present application, when the collection operation instruction is a collection deletion instruction, according to the file identifier, it is detected whether a deletion operation is performed on the collection data table. When a deletion operation is performed on the collection data table, according to the file identifier, a deletion operation is performed on the media data table and the collection data table. When a deletion operation is not performed on the collection data table, according to the file identifier, a deletion operation is performed on the collection data table. Therefore, the embodiment of the present application provides a deletion method based on a data table, and the method is as Figure 4 shown, which is a further limitation on step 302. The specific steps include:

[0116] Step 401, according to the file identifier, search the collection data table to obtain a search result.

[0117] Among them, the file identifier can be an identifier used to uniquely indicate a media file. For example, when a media file is deleted, the file path of the media file needs to be obtained, and then the media file is searched based on the file path. Therefore, the file path can be used as the file identifier.

[0118] In this step, the file identifier in the collection deletion instruction is compared one by one with all the file identifiers in the collection data table. When the comparison is successful, it is determined that the file identifier exists in the collection data table. When the comparison fails, it is determined that the file identifier does not exist in the collection data table.

[0119] Step 402, in the case where the search result is a preset result, determine the media data table and the favorite data table as the data tables to be operated on.

[0120] Among them, the preset result is that the favorite data table has a file identifier.

[0121] In this step, in the case where the search result is a preset result, it indicates that the file identifier in the favorite deletion instruction exists in the favorite data table and the favorite data table needs to be operated on. Therefore, the media data table and the favorite data table are determined as the data tables to be operated on.

[0122] Step 403, in the case where the search result is not a preset result, determine the media data table as the data table to be operated on.

[0123] In this step, in the case where the search result is not a preset result, it indicates that the file identifier in the favorite deletion instruction does not exist in the favorite data table and the favorite data table does not need to be operated on. Therefore, the media data table is determined as the data table to be operated on.

[0124] Step 404, according to the file identifier, perform a deletion operation on the data table to be operated on.

[0125] In this step, when the data table to be operated on is the favorite data table and the media data table, according to the file identifier, in the media data table, search for the associated data corresponding to the file identifier and perform a deletion operation on the associated data. According to the file identifier, in the favorite data table, search for the favorite data corresponding to the file identifier and perform a deletion operation on the favorite data. When the data table to be operated on is only the media data table, according to the file identifier, in the media data table, search for the associated data corresponding to the file identifier and perform a deletion operation on the associated data.

[0126] In addition, it is also possible to directly instruct to perform a deletion operation on the favorite data table. To instruct to perform a deletion operation on the favorite data table, it is also possible to obtain the user ID to instruct to perform a deletion operation on the favorite data table through the user ID. For example, when obtaining the data table identifier, user ID, and file identifier, that is, obtaining the URI, user_id, and file path, these parameters are passed into the public final int delete(@RequiresPermission.Write@NonNull Uri url, @Nullable String where, @Nullable String[] selectionArgs) method of ContentResolver, and then through this method, the public int delete(Uri uri, String selection, String[] selectionArgs) in MediaProvider is called. The private int deleteInternal(Uri uri, String userWhere, String[] userWhereArgs) in this delete method can distinguish the type of table for deletion. Specifically, when deleting a media file, the URI of the media data table is passed in, such as

[0127] MediaStore.Video.Media.EXTERNAL_CONTENT_UR, and at the same time, the user_id needs to be passed in. At this time, it will enter the deleteInternal method, and then call the private int deleteRecursive(SQLiteQueryBuilder qb, SQLiteDatabase db, String userWhere, String[] userWhereArgs) method to perform a deletion operation on the media data table according to the file path. At the same time, according to the user_id and file path, the corresponding favorite data in the favorite data table is directly deleted.

[0128] In the case where the favorite operation instruction is a favorite cancellation instruction, according to the data table identifier, the data table to be operated on is obtained in the media database, and then the corresponding operation is performed on the data table to be operated on according to the favorite cancellation instruction. Therefore, the embodiment of the present application provides a method for executing a favorite cancellation instruction, and this method is as follows Figure 5 shown, and the specific steps include:

[0129] Step 501, in the case where the data table identifier is the identifier of the media data table, according to the file identifier, find the corresponding favorite identifier in the media data table and perform a deletion operation on the favorite identifier.

[0130] In this step, when a certain media file is favorited, the media data table stores the favorite identifier of the media file. When the media file is unfavorited, the favorite identifier of the media file needs to be deleted. Therefore, in the case where the data table identifier is the identifier of the media data table, according to the file identifier, the corresponding favorite identifier is found in the media data table, and the delete operation is performed on the favorite identifier.

[0131] Step 502, in the case where the data table identifier is the identifier of the favorite data table, according to the file identifier, the corresponding favorite data is found in the favorite data table, and the delete operation is performed on the favorite data.

[0132] In this step, when a certain media file is favorited, the favorite data table stores the favorite data of the media file. When the media file is unfavorited, the favorite data of the media file needs to be deleted. In the case where the data table identifier is the identifier of the favorite data table, according to the file identifier, the corresponding favorite data is found in the favorite data table, and the delete operation is performed on the favorite data.

[0133] Furthermore, the user ID of the current account can be obtained, and then according to the user ID and the file identifier, the corresponding favorite data is found in the favorite data table.

[0134] Specifically, the corresponding user_id, the constant EXTERNAL_CONTENT_URI in the Favorite class defined in the system MediaStrore class, and the path of the unfavorited file need to be passed into the public final int delete(@RequiresPermission.Write@NonNull Uri url, @Nullable String where, @Nullable String[] selectionArgs) method in the ContentResolver class. This method will call the delete method in the MediaProvider to perform the delete operation on the data table to be operated on.

[0135] In the case where the favorite operation instruction is a favorite addition instruction, according to the data table identifier, the data table to be operated on is obtained in the media database, and then the corresponding operation is performed on the data table to be operated on according to the favorite cancellation instruction. Therefore, the embodiment of the present application provides a method for executing a favorite addition instruction, and the method is as Figure 6 shown, and the specific steps include:

[0136] Step 601, in the case where the data table is identified as the media data table, according to the file identifier, in the media data table, determine the position for adding the collection identifier corresponding to the file identifier, and add the collection identifier to the position for adding the collection identifier.

[0137] In this step, the media data table also includes a collection field name. According to the file identifier and the collection field name, in the media data table, find the position for adding the collection identifier. Add the collection identifier to the position for adding the collection identifier to indicate the collection of the media file corresponding to the file identifier.

[0138] Step 602, in the case where the data table is identified as the collection data table, according to the file identifier, in the media data table, determine the associated data corresponding to the file identifier, and according to the associated data, determine the collection data, and add the collection data to the collection data table.

[0139] Among them, there is overlapping data between the collection data and the associated data. The overlapping data can be data such as file identifiers. The collection data generally consists of the overlapping data and the user ID.

[0140] In this step, obtain the field names in the collection data table. According to these field names and the associated data, find the data corresponding to these field names, and form the collection data by combining these data and the user ID, and insert the collection data into the collection data table. Or, when the collection data only includes the user ID and the file identifier, only need to obtain the file identifier in the collection addition instruction, and then use the file identifier and the user ID as the collection data and insert it into the collection data table.

[0141] In actual use, when the media client performs a collection operation, the user ID, file identifier, and the identifier of the collection data table are passed through the public final @Nullable Uri in the ContentResolver class

[0142] insert(@RequiresPermission.Write @NonNull Uri url, @Nullable ContentValues values) method, and then pass it into the insert method in the MediaProvider class, and then insert the user's collection data into the collection data table.

[0143] Specifically, a MediaProvider class is provided in the media application, and this class is used to manage media files and related data for the media application. A public Uriinsert(Uri uri,ContentValues ​​values) interface method is provided in the MediaProvider class, and this method is used to compare the uri passed in from the outside with the uri of the data table, determine the data table to be operated, and then insert the data into the data table. The private Uri insertInternal(Uriuri,ContentValues ​​initialValues) method is a submethod that inherits this method, and this submethod can receive the uri passed in from the outside, compare the uri with the uri of the favorite data table, and when the comparison is successful, return the constant FAVORITE, and insert the favorite data into the favorite data table indicated by FAVORITE.

[0144] Among them, URI is used to represent the data table identifier.

[0145] In the case where the collection operation instruction is a collection query instruction, the data table to be operated is obtained in the media database according to the data table identifier, and then the corresponding operation is performed on the data table to be operated according to the collection cancellation instruction. Therefore, the embodiment of the present application provides a collection query instruction execution method, the method is as follows Figure 7 As shown, the specific steps include:

[0146] Step 701: When the data table identifier is an identifier of a media data table, query whether there is a collection identifier corresponding to the file identifier in the media data table to obtain a query result.

[0147] In this step, when the data table identifier is an identifier of a media data table, the collection identifier corresponding to the file identifier is searched in the media data table. When the collection identifier is found, it means that the media file identified by the file has been collected, so the query result is that the media file has been collected. When the collection identifier is not found, it means that the media file identified by the file has not been collected, so the query result is that the media file has not been collected.

[0148] Step 702: When the data table identifier is an identifier of a favorite data table, query whether there is favorite data corresponding to the file identifier in the favorite data table to obtain a query result.

[0149] In this step, in the case where the data table is identified as the favorite data table, in the favorite data table, search for the favorite data corresponding to the file identifier. When the favorite data is found, it indicates that the media file with this file identifier has been favorited. Therefore, the query result is that the media file has been favorited. When the favorite data is not found, it indicates that the media file with this file identifier has not been favorited. Therefore, the query result is that the media file has not been favorited.

[0150] Furthermore, the public Cursor query(Uri uri, String[] projection, Bundle queryArgs, CancellationSignal signal) interface method in the MediaProvider class represents querying data. The private Cursor

[0151] queryInternal(Uri uri, String[] projection, Bundle

[0152] queryArgs, CancellationSignal signal) method is for querying by type (there are many tables in the media library, and when inserting data, it is necessary to determine which database table the current execution logic is to operate on based on the externally passed Uri). This method can compare the externally passed Uri with the Uri of the favorite data table. When they match, it returns FAVORITE. When the return value is FAVORITE, according to the user_id and the file identifier, query the corresponding favorite data in the favorite data table. Or query the favorite data in the favorite data table by calling the query method in the DataBaseHelper.

[0153] In the method that calls the query method, the media client can pass the user_id and the file identifier as parameters into the public final @Nullable Cursor query(@RequiresPermission.Read @NonNull Uri uri, @Nullable String[] projection, @Nullable String selection, @Nullable String[] selectionArgs, @Nullable String sortOrder) method of the ContentResolver. This method corresponds to the query method in the MediaProvider. Then, through the pre-defined uri, it matches the favorite data table, and then queries the favorite data table.

[0154] Step 703: Display the corresponding operation interface according to the query result.

[0155] In this step, when the query result indicates that the media file is not collected, the operation interface displayed includes a collection addition button. When the query result indicates that the media file is collected, the operation interface displayed includes a collection cancellation button and a collection deletion button.

[0156] In the embodiment of the present application, it is also possible to determine the sub-data table corresponding to the type in the data table to be operated according to the type of the file identifier, and then perform the corresponding operation on the sub-data table according to the file identifier. Therefore, the embodiment of the present application provides a data operation method, and this method is as Figure 8 shown, and the specific steps include:

[0157] Step 801: Determine the sub-data table corresponding to the type in the data table to be operated according to the type of the file identifier.

[0158] Among them, the type of the file identifier is used to indicate whether the corresponding media file is a picture or a video. For example, when the type of the file identifier is the first type, the corresponding media file is a picture, and when the type of the file identifier is the second type, the corresponding media file is a video.

[0159] In practice, the file identifiers are often sorted according to the type of the file identifier, and in this way, the column where the file identifier is located is also sorted, so that the relevant data of the file identifiers of the same type are in a certain area. Therefore, it is possible to determine the area corresponding to the type in the data table to be operated according to the type of the file identifier, and determine the data table corresponding to this area as the sub-data table.

[0160] Step 802: Perform the corresponding operation on the sub-data table according to the file identifier.

[0161] In this step, according to the file identifier, search for the data corresponding to the file identifier in the sub-data table, and then perform the relevant operation on this data.

[0162] Furthermore, when the data table to be operated is a collection data table, it is also possible to search for the corresponding data in the sub-data table according to the user ID and the file identifier, and then perform the relevant operation on this data.

[0163] Such as Figure 9As shown, when the media client detects a favorite trigger instruction, it will call the system interface to operate on the media database at this time. For example, when a favorite addition instruction is received, the system interface will be called to perform a favorite addition operation on the media database. When a favorite query instruction is received, the system interface will be called to perform a favorite query operation on the media database. When a favorite cancellation instruction is received, the system interface will be called to perform a favorite cancellation operation on the media database. Then, it is determined whether the data table to be operated on is the media data table or the favorite data table. When the data table to be operated on is the media data table, the corresponding operation is performed on the media data table. When the data table to be operated on is the favorite data table, the corresponding operation is performed on the favorite data table.

[0164] In the implementation of this application, it is possible to detect whether the account is logged in by detecting whether the favorite operation instruction includes the user ID. When the account is logged in, the data table to be operated on is determined as the favorite data table. When the account is not logged in, the data to be operated on is determined as the media data table. Since the favorite operation instruction in this application also carries a data table identifier, therefore, in the embodiments of this application, the data to be operated on can also be determined according to the data table identifier.

[0165] In the embodiments of this application, a request timing diagram of an APP is also provided. This diagram is as Figure 10 shown, and the specific steps are as follows:

[0166] Step 1001, when the media client detects a favorite trigger operation, the media client obtains the file identifier of the media file to be operated on.

[0167] In this step, when the media client detects a favorite operation, the media client obtains the file path of the media file to be operated on.

[0168] Step 1002, call Media Provider to obtain the data table identifier.

[0169] In this step, call the operation method in Media Provider to obtain the URI through the matchURI method in this method.

[0170] Step 1003, call DataBaseHelper to perform corresponding operations on the media database according to the file identifier and the data table identifier.

[0171] In this step, the file path and the URI are passed into the operation method in DataBaseHelper to call the system interface to perform corresponding operations on the media database.

[0172] Specifically, when the collection trigger operation is a collection addition operation, obtain the file path of the media file to be operated, call the insertion method in the Media Provider, and use the matchURI method in this method to obtain the URI. Then, pass the file path and the URI into the insertion method in the DataBaseHelper to call the system interface to perform the collection addition operation on the database. Additionally, the insertion method in the Media Provider can also be called to detect whether the user_id is obtained through the matchuser_id method in this method. Furthermore, when the user_id is obtained, pass the file path, the URI, and the user_id into the insertion method in the DataBaseHelper.

[0173] The collection trigger operation is similar to the collection addition operation. The difference is that the collection query operation also returns the query result to the media client.

[0174] Such as Figure 11 As shown, an embodiment of the present application provides a collection operation device, which corresponds to the method embodiment and specifically includes:

[0175] A receiving unit 1101, configured to receive a collection operation instruction of a media database, where the collection operation instruction at least includes a file identifier and a data table identifier;

[0176] A determining unit 1102, configured to determine a data table to be operated in the media database according to the data table identifier, where the media database includes a media data table and a collection data table;

[0177] An operating unit 1103, configured to execute an operation corresponding to the collection operation instruction in the data table to be operated according to the file identifier.

[0178] Optionally, when the collection operation instruction is a collection deletion instruction, the data table identifier is the identifier of the media data table, and the determining unit 1102 is configured to:

[0179] Search the collection data table according to the file identifier to obtain a search result;

[0180] When the search result is a preset result, determine the media data table and the collection data table as the data tables to be operated, where the preset result is that the file identifier exists in the collection data table;

[0181] When the search result is not the preset result, determine the media data table as the data table to be operated.

[0182] Optionally, when the collection operation instruction is a collection cancellation instruction, the operating unit 1103 is configured to:

[0183] When the identification of the data table is the identification of the media data table, according to the file identification, in the media data table, find the corresponding collection identification, and perform a deletion operation on the collection identification;

[0184] When the identification of the data table is the identification of the collection data table, according to the file identification, in the collection data table, find the corresponding collection data, and perform a deletion operation on the collection data.

[0185] Optionally, when the collection operation instruction is a collection addition instruction, the operation unit 1103 is configured to:

[0186] When the identification of the data table is the identification of the media data table, according to the file identification, in the media data table, determine the addition position of the collection identification corresponding to the file identification, and add the collection identification to the collection identification addition position;

[0187] When the identification of the data table is the identification of the collection data table, according to the file identification, in the media data table, determine the associated data corresponding to the file identification, and according to the associated data, determine the collection data, and add the collection data to the collection data table.

[0188] Optionally, when the collection operation instruction is a collection query instruction, the operation unit 1103 is configured to:

[0189] When the identification of the data table is the identification of the media data table, in the media data table, query whether there is a collection identification corresponding to the file identification, and obtain a query result;

[0190] When the identification of the data table is the identification of the collection data table, in the collection data table, query whether there is a collection data corresponding to the file identification, and obtain a query result;

[0191] According to the query result, display the corresponding operation interface.

[0192] Optionally, the collection operation instruction further includes a user ID; the operation unit 1103 is configured to:

[0193] According to the file identification and the user ID, in the collection data table, determine the corresponding collection data.

[0194] Optionally, the operation unit 1103 is configured to:

[0195] According to the type of the file identification, in the data table to be operated, determine the sub-data table corresponding to the type;

[0196] According to the file identifier, in the sub-data table, perform the operation corresponding to the collection operation instruction.

[0197] As Figure 12 As shown, an embodiment of the present application provides a collection operation device, including a processor 1201, a communication interface 1202, a memory 1203, and a communication bus 1204. Among them, the processor 1201, the communication interface 1202, and the memory 1203 complete mutual communication through the communication bus 1204.

[0198] The memory 1203 is used to store computer programs.

[0199] In an embodiment of the present application, when the processor 1201 executes the program stored on the memory 1203, it implements the collection operation method provided by any of the foregoing method embodiments, including:

[0200] Receive a collection operation instruction from the media database, where the collection operation instruction at least includes a file identifier and a data table identifier;

[0201] According to the data table identifier, determine the data table to be operated in the media database, where the media database includes a media data table and a collection data table;

[0202] According to the file identifier, in the data table to be operated, perform the operation corresponding to the collection operation instruction.

[0203] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps performed by the collection operation method provided by any of the foregoing method embodiments.

[0204] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0205] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0206] It should be understood that the terms used herein are for the purpose of describing specific example embodiments only and are not intended to be limiting. Unless the context clearly indicates otherwise, as used herein, the singular forms "a", "an", and "the" may also include the plural forms. The terms "comprising", "including", "containing", and "having" are inclusive and thus specify the presence of the stated features, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or their combinations. The method steps, processes, and operations described herein are not to be construed as necessarily requiring them to be performed in the particular order described or illustrated, unless the order of performance is explicitly stated. It should also be understood that additional or alternative steps may be used.

[0207] The above are only specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather will be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A collection operation method, characterized in that: The method comprises: Receiving a collection operation instruction from a media database, wherein the collection operation instruction at least includes a file identifier and a data table identifier; According to the data table identifier, determining a data table to be operated in a media database, wherein the media database includes a media data table and a collection data table; According to the file identifier, in the table of data to be operated, an operation corresponding to the collection operation instruction is executed.

2. The method according to claim 1, characterized in that: In the case where the collection operation instruction is a collection deletion instruction, the data table identifier is an identifier of a media data table, and determining the data table to be operated in the media database according to the data table identifier includes: Search the collection data table according to the file identifier to obtain a search result; In the case where the search result is a preset result, the media data table and the favorite data table are determined as data tables to be operated, and the preset result is that the file identifier exists in the favorite data table; When the search result is not a preset result, the media data table is determined as a data table to be operated.

3. The method according to claim 1, characterized in that: In the case where the collection operation instruction is a collection cancellation instruction, performing an operation corresponding to the collection operation instruction in the to-be-operated data table according to the file identifier includes: In a case where the data table identifier is the identifier of the media data table, searching for a corresponding collection identifier in the media data table according to the file identifier, and performing a deletion operation on the collection identifier; In the case where the data table identifier is the identifier of the favorite data table, the corresponding favorite data is searched in the favorite data table according to the file identifier, and a deletion operation is performed on the favorite data.

4. The method according to claim 1, characterized in that: In the case where the collection operation instruction is a collection adding instruction, performing the operation corresponding to the collection operation instruction in the to-be-operated data table according to the file identifier includes: In a case where the data table identifier is the identifier of the media data table, determining, in the media data table, a collection identifier adding position corresponding to the file identifier according to the file identifier, and adding the collection identifier to the collection identifier adding position; In the case where the data table identifier is the identifier of the favorite data table, the associated data corresponding to the file identifier is determined in the media data table according to the file identifier, the favorite data is determined according to the associated data, and the favorite data is added to the favorite data table.

5. The method according to claim 3, characterized in that: In the case where the collection operation instruction is a collection query instruction, performing the operation corresponding to the collection operation instruction in the to-be-operated data table according to the file identifier includes: In a case where the data table identifier is the identifier of the media data table, querying in the media data table whether there is a collection identifier corresponding to the file identifier to obtain a query result; In the case where the data table identifier is the identifier of the favorite data table, querying in the favorite data table whether there is favorite data corresponding to the file identifier to obtain a query result; According to the query result, a corresponding operation interface is displayed.

6. The method according to claim 3, characterized in that: The collection operation instruction also includes a user ID, and searching the collection data table for corresponding collection data according to the file identifier includes: According to the file identifier and the user ID, the corresponding favorite data is determined in the favorite data table.

7. The method according to claim 1, characterized in that: The performing, according to the file identifier, in the to-be-operated data table, an operation corresponding to the collection operation instruction comprises: According to the type of the file identifier, in the data table to be operated, determining a sub-data table corresponding to the type; According to the file identifier, in the sub-data table, an operation corresponding to the collection operation instruction is executed.

8. A storage operation device, characterized in that: The device comprises: A receiving unit, configured to receive a collection operation instruction from a media database, wherein the collection operation instruction at least includes a file identifier and a data table identifier; A determination unit, configured to determine a data table to be operated in a media database according to the data table identifier, wherein the media database includes a media data table and a collection data table; An operating unit is used to execute an operation corresponding to the collection operation instruction in the to-be-operated data table according to the file identifier.

9. A collection operation device, characterized in that: include: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; at least one memory connected to the at least one bus, wherein the processor is configured to: Receiving a collection operation instruction from a media database, wherein the collection operation instruction at least includes a file identifier and a data table identifier; According to the data table identifier, determining a data table to be operated in a media database, wherein the media database includes a media data table and a collection data table; According to the file identifier, in the table of data to be operated, an operation corresponding to the collection operation instruction is executed.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the collection operation method according to any one of claims 1 to 7 is implemented.