Data storage method, device, equipment and computer readable storage medium

By storing content data in a first database and the mapping between tags and content data lists in a second database, and updating them asynchronously, the problem of decreased database query performance was solved, thus improving user experience and system performance.

CN112182093BActive Publication Date: 2025-12-16TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011148091.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-23
Publication Date
2025-12-16
Estimated Expiration
2040-10-23

AI Technical Summary

Technical Problem

In existing technologies, database queries consume a lot of resources, which leads to decreased database query performance and affects user experience.

Method used

The content data is stored in the first database, the correspondence between tags and the content data list is stored in the second database, and the correspondence between tags and the content data list stored in the second database is updated asynchronously.

Benefits of technology

By isolating and decoupling the tag query function through asynchronous processing, the system performance is improved, the user experience is enhanced, tag viewing requests are responded to quickly, and fast page-turning queries are achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112182093B_ABST
    Figure CN112182093B_ABST
Patent Text Reader

Abstract

The application provides a data storage method, device and equipment and a computer readable storage medium; the method comprises the following steps: obtaining content data published by a first user and a label operation for the content data; storing the content data into a first database; generating a label update message based on the content data and the label operation; adding the label update message into a message processing queue; acquiring a label update message to be processed from the message processing queue by using an asynchronous processing mode; updating a second database based on the label update message to be processed; the second database stores a corresponding relationship between a label and a content data list. Through the application, the system performance during content data search based on a label can be improved, so that the search result can be returned to the user faster, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to computer storage technology, and in particular, to a data storage method, device, equipment and computer readable storage medium. BACKGROUND

[0002] With the development of information technology, more and more user generated content (UGC) is generated in forums, communities and other systems. In order to facilitate users to search for interested data from massive UGC data, appropriate keywords, attributes and other tags can be added to UGC data (such as microblog, post, push message, etc.), and users can search based on interested tags to obtain UGC data related to the tags. In addition, multiple tags can be aggregated according to specific conditions for searching, so as to obtain more accurate UGC data. For aggregation of multiple tags that are more popular or commonly used, the aggregation can be used as a new aggregation tag to tag UGC data, and users can directly obtain corresponding UGC data based on the aggregation tag.

[0003] In related technologies, MySQL database is usually used to store UGC data, and when searching, a query statement is used to conditionally filter tags corresponding to each UGC data to obtain a search result. However, when the search request volume is large or the search is based on complex aggregation tags, the database query consumes more computing resources, the load is higher, and the time consumption is also increased, which further affects the overall performance of the UGC system, thereby affecting the user experience. SUMMARY

[0004] The embodiments of the present application provide a data storage method, device and computer readable storage medium, which can improve the system performance when searching content data based on tags, so as to return search results to users more quickly and improve user experience.

[0005] The technical solutions of the embodiments of the present application are implemented as follows:

[0006] The embodiments of the present application provide a data storage method, comprising:

[0007] obtaining content data published by a first user and a tag operation for the content data;

[0008] storing the content data to a first database;

[0009] generating a tag update message based on the content data and the tag operation;

[0010] adding the tag update message to a message processing queue;

[0011] acquire a label update message to be processed from the message processing queue in an asynchronous processing mode;

[0012] update a second database based on the label update message to be processed, wherein the second database stores a corresponding relationship between a label and a content data list.

[0013] In some embodiments, the label includes at least one first label and at least one second label, the second label being aggregated from at least two first labels; the second database stores a corresponding relationship between a first label and a content data list and a corresponding relationship between a second label and a content data list; and updating the second database based on the label update message to be processed includes: updating a first corresponding relationship between a first label and a content data list stored in the second database based on the label update message to be processed; and updating a second corresponding relationship between a second label and a content data list stored in the second database based on the first corresponding relationship and the label update message to be processed.

[0014] In some embodiments, updating the first corresponding relationship between a first label and a content data list stored in the second database based on the label update message to be processed includes: parsing the label update message to be processed to obtain a content data identifier to be processed and a label operation; obtaining a first operation type and a first label list based on the label operation; and updating, for each first label in the first label list, the first label and a content data list corresponding to the first label in the second database based on the first operation type and the content data identifier.

[0015] In some embodiments, updating the second corresponding relationship between a second label and a content data list stored in the second database based on the first corresponding relationship and the label update message to be processed includes: parsing the label update message to be processed to obtain a content data identifier to be processed and a label operation; obtaining a first operation type and a first label list based on the label operation; querying a third corresponding relationship in a third database based on the first label list to obtain a second label list corresponding to the first label list, wherein the third corresponding relationship represents an association relationship between a second label and aggregation configuration information, and the aggregation configuration information includes at least two first labels and an aggregation manner of the at least two first labels; and updating, for each second label in the second label list, the second label and a content data list corresponding to the second label in the second database based on the first operation type and the content data identifier.

[0016] In some embodiments, the method further comprises: obtaining an editing operation of a second user for a second label; obtaining the aggregation configuration information of the second label corresponding to the editing operation; obtaining a second operation type corresponding to the editing operation; updating a third correspondence relationship between the second label and the aggregation configuration information in a third database based on the second operation type, the second label, and the aggregation configuration information of the second label; and updating the second correspondence relationship between the second label and the content data list stored in the second database based on the updated third correspondence relationship.

[0017] In some embodiments, the first database comprises at least one content data and a label corresponding to each content data; and the method further comprises: periodically determining a full label list and a content data list corresponding to each label in the full label list based on each content data and a label corresponding to each content data in the first database according to a specific update period; and updating the second database in a full amount based on the full label list and the content data list corresponding to each label in a batch processing manner.

[0018] In some embodiments, the method further comprises: for each label stored in the second database, deleting the label and the content data list corresponding to the label in the second database if the content data list corresponding to the label is empty for a specific duration; or deleting the label and the content data list corresponding to the label in the second database if no access operation or editing operation for the label is received for a specific duration.

[0019] In some embodiments, the method further comprises: in response to a query operation for the label in a content data viewing interface, querying the content data list corresponding to the label in the second database based on the label; wherein the content data list comprises an identifier of each content data; displaying a content data identifier list comprising the identifier of each content data in the content data list in the content data viewing interface; in response to a selection operation for a content data identifier in the content data identifier list, querying the content data corresponding to the content data identifier in the first database based on the content data identifier; and displaying the content data in the content data viewing interface.

[0020] Embodiments of the present application provide a data storage device, comprising:

[0021] The first obtaining module is configured to obtain content data published by a first user and a label operation for the content data.

[0022] The first storage module is used to store the content data in the first database;

[0023] The first generation module is used to generate a tag update message based on the content data and the tag operation;

[0024] The first addition module is used to add the tag update message to the message processing queue;

[0025] The second acquisition module is used to acquire the tag update message to be processed from the message processing queue in an asynchronous manner;

[0026] The first update module is used to update the second database based on the tag update message to be processed; the second database stores the correspondence between tags and content data lists.

[0027] In some embodiments, the tag includes at least one first tag and at least one second tag, the second tag being obtained by aggregating at least two first tags; the second database stores a correspondence between the first tags and the content data list and a correspondence between the second tags and the content data list; the first update module is further configured to: update the first correspondence between the first tags and the content data list stored in the second database based on the tag update message to be processed; and update the second correspondence between the second tags and the content data list stored in the second database based on the first correspondence and the tag update message to be processed.

[0028] In some embodiments, the first update module is further configured to: parse the tag update message to be processed to obtain the content data identifier and tag operation to be processed; obtain a first operation type and a first tag list according to the tag operation; and for each first tag in the first tag list, update the first tag and the content data list corresponding to the first tag in the second database according to the first operation type and the content data identifier.

[0029] In some embodiments, the first updating module is further configured to: parse the to-be-processed label updating message to obtain a to-be-processed content data identifier and a label operation; obtain a first operation type and a first label list according to the label operation; query a third correspondence relationship corresponding to the first label list in a third database based on the first label list to obtain a second label list corresponding to the first label list; wherein the third correspondence relationship is used to represent an association relationship between a second label and aggregation configuration information, and the aggregation configuration information includes at least two first labels and an aggregation manner of the at least two first labels; and for each second label in the second label list, update the second label and a content data list corresponding to the second label in the second database according to the first operation type and the content data identifier.

[0030] In some embodiments, the data storage device further includes: a third obtaining module configured to obtain an editing operation of a second user for a second label; a fourth obtaining module configured to obtain aggregation configuration information of the second label corresponding to the editing operation; a fifth obtaining module configured to obtain a second operation type corresponding to the editing operation; a second updating module configured to update a third correspondence relationship between a second label and aggregation configuration information in a third database based on the second operation type, the second label, and the aggregation configuration information of the second label; and a third updating module configured to update a second correspondence relationship between a second label and a content data list stored in the second database based on the updated third correspondence relationship.

[0031] In some embodiments, the first database includes at least one content data and a label corresponding to each of the content data; and the data storage device further includes: a determining module configured to determine a full label list and a content data list corresponding to each of the labels in the full label list based on each of the content data and the label corresponding to each of the content data in the first database at a specific updating period; and a fourth updating module configured to update the second database in a batch processing manner based on the full label list and the content data list corresponding to each of the labels.

[0032] In some embodiments, the data storage device further includes: a deleting module configured to: delete, in the second database, each label and a content data list corresponding to the label if the content data list corresponding to the label is empty for a specific time length; or delete, in the second database, each label and a content data list corresponding to the label if no access operation or editing operation for the label is received for a specific time length.

[0033] In some embodiments, the data storage apparatus further comprises: a first query module configured to, in response to a query operation for the tag in a content data viewing interface, query a content data list corresponding to the tag in the second database based on the tag; wherein the content data list comprises an identifier of each content data; a first display module configured to display a content data identifier list comprising an identifier of each content data in the content data list in the content data viewing interface; a second query module configured to, in response to a selection operation for a content data identifier in the content data identifier list, query content data corresponding to the content data identifier in the first database based on the content data identifier; and a second display module configured to display the content data in the content data viewing interface.

[0034] The embodiment of the present application provides a data storage device, comprising: a memory configured to store executable instructions; and a processor configured to execute the executable instructions stored in the memory to implement the method provided by the embodiment of the present application.

[0035] The embodiment of the present application provides a computer readable storage medium storing executable instructions, which are configured to cause a processor to execute the method provided by the embodiment of the present application.

[0036] The embodiment of the present application has the following beneficial effects:

[0037] By storing the content data into the first database, storing the correspondence between the tag and the content data list into the second database, and using an asynchronous processing method to asynchronously update the correspondence between the tag and the content data list stored in the second database, the function of querying the content data list based on the tag can be isolated and decoupled from other functions in the storage layer, so that the system performance when a user views the content data list based on the tag can be effectively improved, the business processing speed is accelerated, and the user experience is improved. Even if there are a large number of requests for viewing the content data list based on the tag, the user experience of other functions of the system will not be affected. In addition, when viewing the post list based on the tag, since the correspondence between the tag and the content data list has been stored in the second database, a simple query is required to obtain the content data list corresponding to the tag to be viewed, so that the viewing request of the user can be quickly responded, and fast page turning query can be implemented. BRIEF DESCRIPTION OF DRAWINGS

[0038] Figure 1A is a schematic diagram of the composition structure of a UGC system in the related art;

[0039] Figure 1B is a schematic diagram of an optional architecture of a data storage system provided by the embodiment of the present application;

[0040] Figure 2 is an optional structural schematic diagram of a data storage device provided by an embodiment of the present application;

[0041] Figure 3 is an optional flow schematic diagram of a data storage method provided by an embodiment of the present application;

[0042] Figure 4 is an optional flow schematic diagram of a data storage method provided by an embodiment of the present application;

[0043] Figure 5 is an optional flow schematic diagram of a data storage method provided by an embodiment of the present application;

[0044] Figure 6 is an optional flow schematic diagram of a data storage method provided by an embodiment of the present application;

[0045] Figure 7 is an optional flow schematic diagram of a data storage method provided by an embodiment of the present application;

[0046] Figure 8 is an optional flow schematic diagram of a data storage method provided by an embodiment of the present application;

[0047] Figure 9A is an optional flow schematic diagram of a data storage method provided by an embodiment of the present application;

[0048] Figure 9B is an optional flow schematic diagram of a data storage method provided by an embodiment of the present application;

[0049] Figure 10 is an optional flow schematic diagram of a data storage method provided by an embodiment of the present application;

[0050] Figure 11A is a component structure schematic diagram of a UGC system provided by an embodiment of the present application;

[0051] Figure 11B is an operation permission schematic diagram of different users in a UGC system provided by an embodiment of the present application;

[0052] Figure 11C is an implementation flow schematic diagram of a post method provided by an embodiment of the present application;

[0053] Figure 11D is an implementation flow schematic diagram of a method for configuring tag aggregation provided by an embodiment of the present application;

[0054] Figure 11E is an implementation flow schematic diagram of a tag aggregation data incremental updating method provided by an embodiment of the present application;

[0055] Figure 11F is a schematic diagram of an implementation process of a label aggregation data full quantity updating method provided by an embodiment of the present application;

[0056] Figure 11G is a schematic diagram of an implementation process of a label aggregation data full quantity updating method provided by an embodiment of the present application;

[0057] Figure 12 is a schematic diagram of an implementation process of a label data incremental updating method provided by an embodiment of the present application;

[0058] Figure 13 is a schematic diagram of an implementation process of a small label post list full quantity updating method provided by an embodiment of the present application;

[0059] Figure 14 is a schematic diagram of an implementation process of a large label data full quantity updating method provided by an embodiment of the present application. DETAILED DESCRIPTION

[0060] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings, and the described embodiments should not be regarded as limiting the present application, and all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0061] In the following description, "some embodiments" are described, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.

[0062] If similar descriptions of "first / second" appear in the application file, the following description is added, in the following description, the terms "first\second\third" involved only distinguish similar objects, and do not represent a specific order of the objects, and it can be understood that "first\second\third" can be interchanged with a specific order or sequence as allowed, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

[0063] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.

[0064] The related data collection and processing in the embodiments of the present application should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of authorization of laws and regulations and the personal information subject.

[0065] Before the embodiments of the present application are further described in detail, the terms and phrases involved in the embodiments of the present application are explained, which are applicable to the following explanations.

[0066] 1) User generated content (UGC), typical applications such as posts, friend circles, micro blogs and the like published by users in forum, community and the like systems.

[0067] 2) Aggregation, which refers to aggregating user generated content (such as posts, micro blogs and the like) according to certain conditions to obtain a content list (such as a post list or a micro blog list), for example, posts by the same author can be aggregated.

[0068] 3) Tag aggregation, which refers to aggregating user generated content according to a specific tag condition (for example, post f1 and post f2 have the same tag t1) to obtain a content list. Generally, the tag condition can include & (and) and | (or).

[0069] 4) Small tag, which is an original tag added by a user when publishing content data. For example, the association between a post and a small tag can be as shown in Table 1-1, in which Table 1-1, the posts include f1, f2, f3, the small tags include t1 to t6, the post f1 has the small tags t1, t2, t3, the post f2 has the small tags t4, t5, t6, and the post f3 has the small tags t1, t3, t5.

[0070] Table 1-1: Example of association between post and small tag

[0071]

[0072] 5) Large tag, which is a tag aggregated by at least two small tags configured by product operation personnel. For example, assuming that there is a corresponding relationship between the small tags and the post list as shown in Table 1-2:

[0073] Table 1-2: Example of corresponding relationship between small tag and post list

[0074]

[0075] The product operator can configure the macro label T1=t1&t4 and T2=t1|t4, and the correspondence between the macro label and the post list can be as shown in Table 1-3. The post list corresponding to the macro label T1 is an empty list, and the post list corresponding to the macro label T2 includes f1, f2 and f3.

[0076] Table 1-3: Correspondence between macro label and post list

[0077]

[0078] 6) Information flow refers to a content flow that is continuously updated and presented to a user, for example, a feed flow. From the structure, the information flow is an information outlet. To understand more related content in the information flow, only one refresh action is needed, and a large amount of required information can be obtained and continuously updated.

[0079] In order to better understand the data storage method provided by the embodiments of the present application, the technical solution of querying content data by label in the related art will be described first.

[0080] Taking post search as an example, referring to Figure 1A , Figure 1A is a schematic diagram of the composition structure of the UGC system in the related art. As shown in Figure 1A , in the related art, the author 111 publishes a post through the UGC system 120, and the UGC system 120 stores the post published by the author 111 and the small label added to the post by the author 111 in the MySQL database 131. The product operator 112 can add a small label to the post stored in the MySQL database 131 in the management end of the UGC system 120, and can also configure a macro label based on the small label. The management end of the UGC system 120 can store the macro label edited by the product operator 112 to the aggregation configuration database 132. The user 113 can view the post list under the macro label or the small label through the UGC system 120. The UGC system 120 can query the post including the small label selected by the user 113 from the MySQL database 131, and can also read the aggregation configuration information of the macro label selected by the user 113 from the aggregation configuration database 132, and query the post satisfying the aggregation configuration information from the MySQL database 131 according to the read aggregation configuration information. In the related art, when the UGC system 120 queries the post from the MySQL database 131, the label aggregation calculation is performed on the data (post f, small label t) in the MySQL database through the MySQL query statement, for example, when the post list corresponding to the small label t1 is queried, the following query statement can be used:

[0081] Select * from (posts f, tag t) where t = "t1" limit 10, 10;

[0082] To query the list of posts corresponding to the tag t4, you can use the following query statement:

[0083] Select * from (posts f, tag t) where t = "t4" limit 10, 10;

[0084] To query the list of posts corresponding to the major tag T1=t1&t4, you can use the following query statement:

[0085] Select table1.*, table2, * from (posts f, tags t) table1, (posts f, tags t) table2 where table1.t="t1" and table2.t="t4" limit 10, 10;

[0086] To query the list of posts corresponding to the major tag T2=t1|t4, you can use the following query statement:

[0087] Select * from (postsf, tagtst) where t in ("t1", "t4") limit 10,10.

[0088] When the number of query requests is large or the configured large tag aggregation conditions are complex, the solutions in the above-mentioned related technologies will consume more computing resources, have a higher load, and take longer to query the stored data of MySQL posts. This will affect the user experience of other functional modules of the UGC system, such as the user experience of author posting and product operation tagging of posts.

[0089] This application provides a data storage method, apparatus, device, and computer-readable storage medium, which can improve system performance when searching content data based on tags, thereby returning search results to users faster and enhancing the user experience. The following describes exemplary applications of the data storage device provided in this application. The data storage device provided in this application can be implemented as various types of user terminals such as laptops, tablets, desktop computers, set-top boxes, and mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), or as a server. The following describes exemplary applications when the device is implemented as a server.

[0090] See Figure 1B , Figure 1Bis an optional architecture schematic diagram of the data storage system 100 provided by the embodiment of the present application, for realizing an application of supporting content data publishing and querying, a terminal (exemplarily showing a terminal 400-1 and a terminal 400-2) connects a server 200 through a network 300, the network 300 can be a wide area network or a local area network, or a combination of the two.

[0091] The terminal is configured to display an interactive interface of user publishing content data on a graphical interface (exemplarily showing a graphical interface 410-1 and a graphical interface 410-2), receive a label operation of the user for the content data, and send the content data published by the user and the label operation for the content data to the server 200.

[0092] The server 200 is configured to acquire content data published by a first user and a label operation for the content data; store the content data to a first database 510; generate a label update message based on the content data and the label operation; add the label update message to a message processing queue; acquire a label update message to be processed from the message processing queue in an asynchronous processing mode; update a second database 520 based on the label update message to be processed; and the second database 520 stores a corresponding relationship between a label and a content data list.

[0093] In some embodiments, the server 200 can be a stand-alone physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms. The terminal 400 can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server can be connected directly or indirectly through wired or wireless communication, which is not limited in the embodiment of the present application.

[0094] Referring to Figure 2 , Figure 2 is a structure schematic diagram of the data storage device 200 provided by the embodiment of the present application, Figure 2 The data storage device 200 shown in the figure includes at least one processor 210, a memory 250, at least one network interface 220, and a user interface 230. Various components in the data storage device 200 are coupled together through a bus system 240. It can be understood that the bus system 240 is used to realize the connection communication between the components. In addition to the data bus, the bus system 240 also includes a power bus, a control bus, and a status signal bus. However, for the purpose of clear illustration, all kinds of buses are marked as the bus system 240 in the figure. Figure 2 The data storage device 200 is configured to acquire content data published by a first user and a label operation for the content data; store the content data to a first database 510; generate a label update message based on the content data and the label operation; add the label update message to a message processing queue; acquire a label update message to be processed from the message processing queue in an asynchronous processing mode; update a second database 520 based on the label update message to be processed; and the second database 520 stores a corresponding relationship between a label and a content data list.

[0095] The processor 210 can be an integrated circuit chip that has a processing capability of signals, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc., wherein the general-purpose processor can be a microprocessor or any conventional processor.

[0096] The user interface 230 includes one or more output devices 231 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 230 also includes one or more input devices 232 that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0097] The memory 250 can be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 250 optionally includes one or more storage devices physically located in proximity to the processor 210.

[0098] The memory 250 includes volatile memory or non-volatile memory, and can also include both volatile and non-volatile memory. Non-volatile memory can be read only memory (ROM), and volatile memory can be random access memory (RAM). The memory 250 described in embodiments of the present application is intended to include any suitable type of memory.

[0099] In some embodiments, the memory 250 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or a subset or superset thereof, which are exemplarily illustrated below.

[0100] The operating system 251 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0101] The network communication module 252 is used to reach other computing devices via one or more (wired or wireless) network interfaces 220, exemplary network interfaces 220 including Bluetooth, wireless compatibility authentication (WiFi), and universal serial bus (USB), etc.

[0102] Presentation module 253 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 231 associated with user interface 230 (e.g., a display screen, a speaker, etc.).

[0103] The input processing module 254 is used to detect and translate one or more user inputs or interactions from one or more input devices 232.

[0104] In some embodiments, the data storage device provided in this application can be implemented in software. Figure 2 A data storage device 255 stored in memory 250 is shown. It may be software in the form of programs and plug-ins, including the following software modules: a first acquisition module 2551, a first storage module 2552, a first generation module 2553, a first addition module 2554, a second acquisition module 2555, and a first update module 2556. These modules are logically related and can therefore be arbitrarily combined or further split according to the functions they implement.

[0105] The functions of each module will be explained below.

[0106] In other embodiments, the data storage device provided in this application can be implemented in hardware. As an example, the data storage device provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the data storage method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0107] The data storage method provided in this application will be described below with reference to exemplary applications and implementations of the terminal or server provided in the embodiments of this application.

[0108] See Figure 3 , Figure 3 This is an optional flowchart illustrating a data storage method provided in an embodiment of this application. The following will be combined with... Figure 3 The steps shown are explained below. The entity performing these steps can be the terminal or server mentioned above.

[0109] In step S101, content data published by a first user and a tag operation on the content data are acquired.

[0110] Here, the content data can be user-generated content such as a post, a microblog, a feed stream, etc., and the first user is the author of the content data.

[0111] The user can perform a tag operation on the published content data when publishing the content data, or can perform a tag operation on the published content data after publishing the content data, which is not limited herein. The tag operation can include, but is not limited to, one or more of adding a tag to the content data, deleting a tag, modifying a tag, etc. The tag can be a large tag or a small tag, which is not limited herein.

[0112] In step S102, the content data is stored in a first database.

[0113] Here, the first database can be a relational database (such as MySQL, Oracle, SQL Server, etc.), or a non-relational database (such as Remote Dictionary Server (Redis), MongoDB, etc.). In implementation, those skilled in the art can use a suitable database as the first database according to actual conditions, and the embodiments of the present application are not limited.

[0114] The content stored in the first database can include, but is not limited to, one or more of the title, the body, the tag list, the picture, the publishing time, the author, etc. of the content data.

[0115] In step S103, a tag update message is generated based on the content data and the tag operation.

[0116] Here, the tag update message can be used to update the tag data corresponding to the content data. In implementation, the tag update message can be any suitable message queue (Message Queue, MQ) that can transmit a message, and those skilled in the art can determine the format of the generated tag update message according to the actual message queue, which is not limited herein.

[0117] In step S104, the tag update message is added to a message processing queue.

[0118] Here, the message processing queue can be any suitable message queue, such as Kafka, RabbitMQ, RocketMQ, ActiveMQ, etc., and those skilled in the art can use a suitable message queue according to actual conditions, which is not limited herein.

[0119] In step S105, the label update message to be processed is obtained from the message processing queue in an asynchronous processing manner.

[0120] Here, the label update message can be obtained from the message processing queue in any suitable asynchronous processing manner as the label update message to be processed. For example, a thread can be newly created to consume the MQ message from the message processing queue to obtain the label update message to be processed, or a specific message processing service module can be used to consume the message in the message processing queue to obtain the label update message to be processed. The message consumption strategy for obtaining the label update message to be processed from the message processing queue can be default or set by a user or product operator, for example, the label update messages in the message processing queue can be consumed one by one or in batches, which is not limited herein.

[0121] In step S106, the second database is updated based on the label update message to be processed; the second database stores the correspondence between the label and the content data list.

[0122] Here, the second database can be a relational database (such as MySQL, Oracle, SQLServer, etc.) or a non-relational database (such as Redis, MongoDB, etc.). In implementation, those skilled in the art can use a suitable database as the second database according to actual conditions, and the embodiments of the present application are not limited. The second database can store part or all of the labels related to the content data in the first database and the content data list corresponding to each label in the part or all of the labels. The content data list corresponding to each label can include the identification of each content data in part or all of the content data having the label, such as the index number stored in the first database, the title, the abstract, etc. The user can identify the content data having the label according to the content data list corresponding to the label.

[0123] Based on the to-be-processed label update message, content data corresponding to the label update message and a label operation corresponding to the content data and a label to be updated can be determined. Based on a correspondence between the content data and the label to be updated, a correspondence between labels and content data lists stored in the second database can be updated. For example, the to-be-processed label update message can include content data f1 and a label t1 to be added to the content data. When the second database does not include the label t1, the second database can be updated to include the label t1 and a content data list corresponding to the label t1, and the content data f1 can be added to the content data list. When the second database includes the label t1, the content data f1 can be added to a content data list corresponding to the label t1. For another example, the to-be-processed label update message can include content data f1 and a label t2 to be deleted from the content data. The content data f1 can be removed from a content data list corresponding to the label t2.

[0124] In the embodiments of the present application, the content data is stored in the first database, the correspondence between the labels and the content data lists is stored in the second database, and the asynchronous processing method is used to asynchronously update the correspondence between the labels and the content data lists stored in the second database. In this way, the function of querying the content data list based on the label can be isolated and decoupled from other functions in the storage layer, so that the system performance when a user views the content data list based on the label can be effectively improved, the business processing speed can be accelerated, and the user experience can be improved. Even if there are a large number of requests for viewing the content data list based on the label, the user experience of other functions of the system will not be affected. In addition, when viewing the post list based on the label, the correspondence between the labels and the content data lists has been stored in the second database, so that the content data list corresponding to the label to be viewed can be obtained by simple query, so that the viewing request of the user can be quickly responded, and fast page query can be implemented.

[0125] In some embodiments, referring to Figure 4 , Figure 4 is an optional flow diagram of a data storage method provided by the embodiments of the present application, based on Figure 3 , the label includes at least one first label and at least one second label, the second label is obtained by aggregating at least two first labels, and the second database stores a correspondence between the first label and the content data list and a correspondence between the second label and the content data list. Figure 3 The step S106 shown can be implemented by steps S401 to S402, which will be described below. The execution subject of the following steps can be the terminal or the server described above.

[0126] In step S401, based on the to-be-processed label update message, a first correspondence between the first labels and the content data list stored in the second database is updated.

[0127] Here, the first label can be a large label or a small label, and the second label can be a label aggregated from at least two first labels, which is not limited herein. In some examples, the first label can be a small label, and the second label can be a large label.

[0128] In step S402, based on the first correspondence and the to-be-processed label update message, a second correspondence between the second labels and the content data list stored in the second database is updated.

[0129] Here, since the second label is aggregated from at least two first labels, after the first correspondence between the first labels and the content data list is updated, the second correspondence between the second labels and the content data list also needs to be updated, so as to ensure the synchronous update of the first correspondence and the second correspondence.

[0130] In the embodiment of the present application, after the first correspondence between the first labels and the content data list is updated, the second correspondence between the second labels and the content data list is also updated, which can effectively ensure the synchronous update of the first correspondence and the second correspondence, and further ensure the consistency of the data in the first correspondence and the second correspondence after the user performs a label operation.

[0131] In some embodiments, referring to Figure 5 , Figure 5 is an optional flow diagram of a data storage method provided by the embodiment of the present application, Figure 4 The step S401 shown can be implemented by steps S501 to S503, which will be described below. The execution subject of the following steps can be the terminal or the server described above.

[0132] In step S501, the to-be-processed label update message is parsed to obtain a to-be-processed content data identifier and a label operation.

[0133] Here, the label update message can carry the to-be-processed content data identifier and the label operation. The content data identifier can be character, number, string, etc. information used to identify the content data, for example, the content data identifier can be an index number of the content data stored in the first database, a title of the content data, an abstract, etc. In implementation, those skilled in the art can select appropriate information as the identifier of the content data according to actual conditions, which is not limited in the embodiment of the present application.

[0134] In step S502, according to the tag operation, a first operation type and a first tag list are obtained.

[0135] Here, the first operation type is a type of the tag operation performed on the content data, and can include one or more of, but not limited to, an adding type, a deleting type, a modifying type, and the like. The first tag list is a list of first tags operated on by the tag operation. For example, the tag operation can be adding first tags t1 and t2 to the content data, the first operation type can be the adding type, and the first tag list can include the first tags t1 and t2. The tag operation can also be deleting an existing first tag t3 of the content data, the first operation type can be the deleting type, and the first tag list can include the first tag t3.

[0136] In step S503, for each first tag in the first tag list, according to the first operation type and the content data identifier, the first tag and a content data list corresponding to the first tag are updated in the second database.

[0137] Here, the first tag in the first tag list can be already stored in the second database or not yet stored in the second database.

[0138] For the first tag already stored in the second database, the content data list corresponding to the first tag in the second database can be updated according to the first operation type and the content data identifier, without updating the first tag in the second database. In practice, a person skilled in the art can determine the way of updating the first tag and the content data list corresponding to the first tag according to actual conditions, and the embodiments of the present application are not limited thereto. For example, in the case of the adding type, the content data identifier can be added to the content data list corresponding to the first tag; in the case of the deleting type, the content data identifier can be deleted from the content data list corresponding to the first tag.

[0139] For the first tag not yet stored in the second database, the first tag needs to be added to the second database, and then the content data list corresponding to the first tag in the second database is updated.

[0140] In the embodiments of the present application, the content data identifier to be processed and the tag operation are obtained by parsing the tag update message to be processed, the first operation type and the first tag list are obtained according to the tag operation, and then the first tag in the first tag list and the content data list corresponding to each first tag are updated in the second database according to the first operation type and the content data identifier. In this way, the first correspondence between the first tag stored in the second database and the content data list can be simply and quickly updated, so that the updating efficiency of the first correspondence can be improved.

[0141] In some embodiments, referring to Figure 6 , Figure 6 is an optional flow diagram of the data storage method provided by the embodiments of the present application, Figure 4 The step S402 shown can be implemented by steps S601 to S604, which will be described in combination with the steps below. The execution subject of the following steps can be the terminal or server described above.

[0142] In step S601, the label update message to be processed is parsed to obtain content data identifier to be processed and label operation.

[0143] In step S602, the first operation type and the first label list are obtained according to the label operation.

[0144] Here, steps S601 and S602 correspond to steps S501 and S502 respectively, and in implementation, the specific embodiments of steps S501 and S502 can be referred to, which will not be repeated here.

[0145] In step S603, the third corresponding relationship in the third database is queried based on the first label list to obtain the second label list corresponding to the first label list; wherein the third corresponding relationship is used to represent the association relationship between the second label and the aggregation configuration information, and the aggregation configuration information includes at least two first labels and the aggregation mode of the at least two first labels.

[0146] Here, the third database can be a relational database (such as MySQL, Oracle, SQLServer, etc.), or a non-relational database (such as Redis, MongoDB, etc.). In implementation, those skilled in the art can adopt a suitable database as the third database according to actual conditions, which is not limited by the embodiments of the present application.

[0147] The aggregation mode of the at least two first labels can include one or more of and operations. The aggregation configuration information can include at least two first labels used to aggregate the second label corresponding to the aggregation configuration information, and the aggregation mode of the at least two first labels. In implementation, the aggregation configuration information can be configured by the user or automatically generated by the system. For example, the product operator can configure the second label and the aggregation configuration information corresponding to the second label according to actual needs; the system can also obtain a plurality of groups of first labels with search popularity higher than a certain threshold according to historical user search records, and automatically aggregate each group of first labels to obtain a plurality of second labels and the aggregation configuration information corresponding to each second label.

[0148] The third database can store an association relationship (i.e., a third correspondence relationship) between the second label and the aggregation configuration information. For each first label in the first label list, the second label whose aggregation configuration information includes the first label in the third correspondence relationship can be queried based on the first label, so that a second label list corresponding to the first label can be obtained. A union set of the second label list corresponding to each first label can obtain a second label list corresponding to the first label list.

[0149] In step S604, for each second label in the second label list, the second label and the content data list corresponding to the second label in the second database are updated according to the first operation type and the content data identifier.

[0150] Here, the second label in the second label list can be already stored in the second database, or can not be stored in the second database.

[0151] For the second label already stored in the second database, the content data list corresponding to the second label in the second database can be updated according to the first operation type and the content data identifier, without the need to update the second label in the second database. In implementation, a person skilled in the art can determine the way to update the second label and the content data list corresponding to the second label according to actual conditions, and the embodiments of the present application are not limited thereto. For example, in the case where the first operation type is an addition type, the content data identifier can be added to the content data list corresponding to the second label; in the case where the first operation type is a deletion type, the content data identifier can be deleted from the content data list corresponding to the second label.

[0152] For the second label not stored in the second database, the second label needs to be added in the second database, and then the content data list corresponding to the second label in the second database is updated.

[0153] In the embodiments of the present application, the second label list corresponding to the first label list is obtained by querying the third correspondence relationship in the third database, and for each second label in the second label list, the second label list and the content data list corresponding to each second label in the second database are updated according to the first operation type and the content data identifier corresponding to the label update message. In this way, the second correspondence relationship between the second label stored in the second database and the content data list can be simply and quickly updated, so that the updating efficiency of the second correspondence relationship can be improved.

[0154] In some embodiments, referring to Figure 7 , Figure 7 is an optional flowchart of a data storage method provided by the embodiments of the present application, based onFigure 4 The method can further perform steps S701 to S705, which will be described below in combination with each step. The subject performing the following steps can be the terminal or the server described above.

[0155] In step S701, an editing operation of a second user on a second label is obtained.

[0156] Here, the second user can be any user with a second label editing permission. The editing operation on the second label can include, but is not limited to, one or more of adding a second label, deleting a second label, and modifying a second label.

[0157] In step S702, the aggregation configuration information of the second label corresponding to the editing operation is obtained.

[0158] Here, the aggregation configuration information of the edited second label can be carried in the editing operation.

[0159] In step S703, a second operation type corresponding to the editing operation is obtained.

[0160] Here, the second operation type is the type of the editing operation on the second label, and can include, but is not limited to, one or more of an adding type, a deleting type, and a modifying type.

[0161] In step S704, a third correspondence relationship between a second label and aggregation configuration information in a third database is updated based on the second operation type, the second label, and the aggregation configuration information of the second label.

[0162] Here, the second label edited by the user can be already stored in the third database or not yet stored in the third database, which is not limited herein.

[0163] For the second label edited by the user, the aggregation configuration information corresponding to the second label in the second database can be updated according to the second operation type and the aggregation configuration information of the second label. In practice, a person skilled in the art can determine the manner of updating the third correspondence relationship according to actual conditions, and the embodiments of the present application are not limited thereto. For example, in the case where the second operation type is an adding type, the correspondence relationship between the second label and the aggregation configuration information can be added to the third database; in the case where the first operation type is a deleting type, the correspondence relationship between the second label and the aggregation configuration information can be deleted from the third database.

[0164] In step S705, a second correspondence relationship between a second label and a content data list stored in the second database is updated based on the updated third correspondence relationship.

[0165] Here, the updated third corresponding relationship stored in the third database can be queried according to the second label edited by the user to obtain the updated aggregation configuration information corresponding to the second label. According to at least two first labels in the aggregation configuration information, the content data list corresponding to each first label is queried in the second database, and the content data list corresponding to each first label is aggregated according to the aggregation mode of each first label in the aggregation configuration information, so that the content data list corresponding to the second label is obtained. Based on the second label and the content data list corresponding to the second label, the second corresponding relationship in the second database can be updated.

[0166] In the embodiments of the present application, the third corresponding relationship between the second label and the aggregation configuration information stored in the third database and the second corresponding relationship between the second label and the content data list stored in the second database can be updated according to the editing operation of the second label by the user. In this way, the user can customize the second label and the aggregation configuration information corresponding to the second label, and can quickly search for content data according to the customized second label, thereby accelerating the business processing speed and improving the user experience.

[0167] In some embodiments, referring to Figure 8 , Figure 8 is an optional flowchart of a data storage method provided by the embodiments of the present application, based on Figure 3 , the first database includes at least one content data and a label corresponding to each content data, and the method can further perform steps S801 to S802, which will be described below. The execution subject of the following steps can be the terminal or server described above.

[0168] In step S801, the full label list and the content data list corresponding to each label in the full label list are determined based on each content data and the label corresponding to each content data in the first database according to a specific update period.

[0169] Here, the specific update period can be set by the user or be a system default value, for example, once a day or once a week. The full label list can include a set of labels corresponding to each content data stored in the first database, and can include but not limited to one or more of large labels, small labels, etc. The content data list corresponding to each label includes the identifier of the content data having the label in the first database. In implementation, the identifier of the content data having the label in the first database can be added to the content data list corresponding to the label by traversing each label in the full label list.

[0170] In step S802, based on the full label list and the content data list corresponding to each label, the second database is updated in batch.

[0171] Here, the corresponding relationship between the labels and the content list in the second database can be updated in batch in any suitable manner, including but not limited to executing a batch script, multi-thread concurrent execution, etc., and the embodiments of the present application are not limited thereto.

[0172] It should be noted that the above step S801 and step S802 can be an offline process, which can be executed by a specific thread or a specific service module in the system, and the present application is not limited thereto.

[0173] In the embodiments of the present application, the corresponding relationship between the labels and the content list in the second database is updated in batch at regular intervals, which can effectively avoid the problem of inconsistency between the first database and the second database caused by the loss or failure of the label update message, and ensure the eventual consistency of the data in the first database and the second database, thereby improving the accuracy of the user when viewing the content data list and further improving the user experience.

[0174] In some embodiments, referring to Figure 9A , Figure 9A is an optional flowchart of a data storage method provided by the embodiments of the present application, based on Figure 3 The method can further perform the following step S901, and the execution subject of the following steps can be the terminal or the server as described above.

[0175] In step S901, for each label stored in the second database, if the content data list corresponding to the label is empty for a specific time period, the label and the content data list corresponding to the label are deleted in the second database.

[0176] Here, the specific time period can be set by the user or be a system default value, and the present application is not limited thereto. In practice, a suitable time period can be determined according to the actual situation, for example, 1 week, 1 month, half a year, etc.

[0177] In the embodiments of the present application, by deleting the labels whose corresponding content data list is empty for a specific time period, the labels can be regularly cleaned, thereby reducing the maintenance and storage cost of the invalid labels.

[0178] In some embodiments, referring to Figure 9B , Figure 9Bis an optional flowchart of the data storage method provided by the embodiment of the present application, based on Figure 3 The method can further perform the following step S902, which will be described in combination with each step. The execution subject of the following steps can be the terminal or the server described above.

[0179] In step S902, for each label stored in the second database, if no access operation or editing operation for the label is received within a specific time length, the label and the content data list corresponding to the label are deleted from the second database.

[0180] Here, the access operation for a label can include but is not limited to the operation of viewing the related information of the label, the operation of viewing the content data list based on the label. In some examples, when the label is a large label, the access operation for the large label can further include the operation of viewing the aggregated configuration information of the label or the operation of viewing at least two small labels corresponding to the large label, etc.

[0181] The specific time length can be set by the user or be a system default value, which is not limited herein. In implementation, a suitable time length can be determined according to the actual situation, for example, 1 week, 1 month, half a year, etc.

[0182] In the embodiment of the present application, by deleting the label for which no access operation or editing operation is received within a specific time length, the periodic cleaning of the label can be realized, thereby reducing the maintenance and storage cost of the invalid label.

[0183] In some embodiments, referring to Figure 10 , Figure 10 is an optional flowchart of the data storage method provided by the embodiment of the present application, based on Figure 3 The method can further perform the following steps S1001 to S1004, which will be described in combination with each step. The execution subject of the following steps can be the terminal or the server described above.

[0184] In step S1001, in response to the query operation for the label in the content data viewing interface, the content data list corresponding to the label is queried in the second database based on the label; wherein the content data list includes the identifier of each content data.

[0185] Here, the content data viewing interface can be an interface for the user to view content data, and the user performs a query operation on the tag in the content data viewing interface. In implementation, the query operation can be triggered by clicking or touching the tag in the content data viewing interface, or by clicking or touching the query button after inputting the tag in the search box. The person skilled in the art can determine the manner of triggering the query operation according to the actual situation, which is not limited here.

[0186] In step S1002, the content data viewing interface displays a content data identifier list, and the content data identifier list includes an identifier of each content data in the content data list.

[0187] Here, the identifier of the content data can be character, number, string, or other information used to identify the content data, for example, the content data identifier can be an index number of the content data stored in the first database, a title of the content data, an abstract, or the like. In implementation, the person skilled in the art can select appropriate information as the identifier of the content data according to the actual situation, which is not limited in the embodiments of the present application.

[0188] In step S1003, in response to a selection operation on the content data identifier in the content data identifier list, the first database is queried for content data corresponding to the content data identifier based on the content data identifier.

[0189] Here, the selection operation can include, but is not limited to, a click or touch operation on the content data identifier in the content data identifier list, and the like. In implementation, the person skilled in the art can determine appropriate selection operation according to the actual situation, which is not limited in the embodiments of the present application.

[0190] In step S1004, the content data is displayed in the content data viewing interface.

[0191] Here, the displayed content data can include, but is not limited to, one or more of a title, a text, a picture, a video, and the like of the content data.

[0192] In the embodiments of the present application, the content data list can be queried based on the tag in the content data viewing interface, and the selected content data is displayed in response to the selection operation on the content data identifier in the content data list. Since the content data list corresponding to the tag can be directly queried in the second database without complex tag aggregation calculation, the system calculation complexity when viewing the content data list based on the tag can be effectively reduced, thereby improving the system performance, accelerating the business processing speed, and further improving the user experience. Further, fast page turning query can be implemented, thereby further improving the user experience.

[0193] Below, an exemplary application of the embodiments of the present application in an actual application scenario will be described. The method provided by the embodiments of the present application can be applied to scenarios such as post storage of a forum, microblog storage of a community platform, feed stream data storage of an information pushing platform, and the like.

[0194] Taking the post (i.e., work) storage scenario of a forum as an example, refer to Figure 11A , Figure 11A is a schematic diagram of a component structure of a UGC system provided by the embodiments of the present application. As shown in Figure 11A , the system includes an access layer 1110, a message queue (MQ) module 1120, a storage layer 1130, and a batch processing module 1140, wherein the access layer 1110 includes a work detail Common Gateway Interface (CGI) 1111, a work operation CGI 1112, a publisher CGI 1113, and a tag aggregation CGI 1114, the storage layer 1130 includes a work storage module 1131 stored by using a MySQL database, a work operation storage module 1132 stored by using a string data structure of Redis, and a tag aggregation storage module 1133 stored by using a zset data structure of Redis.

[0195] Here, the work storage module can be used to store all works published by all users, i.e., full data. The work operation storage module can be used to store data related to reading, liking, commenting, and the like of works by users. The tag aggregation storage module can be used to store work lists corresponding to respective tags.

[0196] Different operation permissions can be provided for different user roles in the above UGC system, refer to Figure 11B , Figure 11B is a schematic diagram of operation permissions of different users in a UGC system provided by the embodiments of the present application, as shown in Figure 11B , an author 1101 publishing a post can perform management operations 1103 (such as publishing, deleting, and the like) and normal operations 1104 (such as reading, liking, commenting, and the like) of the post / article / feed, and other users 1102 can perform normal operations 1104 (such as reading, liking, commenting, and the like) of the post / article / feed. The system can specifically implement the following businesses:

[0197] 1) A user publishes a work such as a post or feed data; here, the post or feed data published by the user can be saved to a MySQL database through the work storage module of the storage layer by using the publisher CGI of the access layer.

[0198] 2) the author (i.e. the user who posts the post) or other users read, like or comment on the post; here, the post operation CGI of the access layer can be requested, and the data related to the reading, liking, commenting, etc. of the post by the user is stored into Redis by the post operation storage module of the storage layer.

[0199] 3) the author or other users view the post list under the small tag or the large tag; here, the tag aggregation CGI of the access layer can be requested, and the post list under the small tag or the large tag viewed by the author or other users is read from Redis by the tag aggregation storage module of the storage layer.

[0200] Referring to Figure 11C , Figure 11C is an implementation flow diagram of a post posting method provided by an embodiment of the present application, and the method comprises the following steps:

[0201] Step S1151: the author performs a post posting operation on the UGC system 120;

[0202] Step S1152: the UGC system 120 writes the post information posted by the user into the MySQL database 131;

[0203] Step S1153: the UGC system 120 produces an MQ message and notifies the batch processing module 121 to perform the update of the tag aggregation data. Here, the author can add a small tag to the post or feed data when posting, and the content of the MQ message can comprise the operation content of the post and the tag.

[0204] Referring to Figure 11D , Figure 11D is an implementation flow diagram of a method for configuring tag aggregation provided by an embodiment of the present application, and the method comprises the following steps:

[0205] Step S1161: the product operation personnel performs an editing operation on the small tag of the post through the management end 122 of the UGC system; here, the editing operation performed on the small tag can comprise the operations of adding, deleting and modifying the small tag.

[0206] Step S1162: the product operation personnel performs an editing operation on the large tag through the management end 122 of the UGC system; here, the editing operation performed on the large tag can comprise the operations of adding, deleting and modifying the large tag.

[0207] Referring to Figure 11E , Figure 11E is an implementation flow diagram of a tag aggregation data incremental update method provided by an embodiment of the present application, and the method comprises the following steps:

[0208] Step S1171, the batch processing module 121 of the UGC system 120 consumes the MQ message, and updates the post list under the corresponding small label and large label in the Redis database 133 for the post specified in the MQ message.

[0209] Referring to Figure 11F , Figure 11F is an implementation flowchart of a label aggregation data full quantity updating method provided by an embodiment of the present application, and the method comprises the following steps:

[0210] Step S1181, the post list of all small labels is updated at a fixed time.

[0211] Step S1182, the post list of all large labels is updated at a fixed time.

[0212] Referring to Figure 11G , Figure 11G is an implementation flowchart of a label aggregation data full quantity updating method provided by an embodiment of the present application, and the method comprises the following steps:

[0213] Step S1191, a user requests to view the post list of a label on the UGC system 120.

[0214] Here, the label can be a large label or a small label.

[0215] Step S1192, the UGC system 120 reads the aggregation configuration information of the label.

[0216] Here, the aggregation configuration information can comprise the aggregation correspondence relationship between the large label and the small label.

[0217] Step S1193, the UGC system 120 reads the post list of the label in the Redis database 133.

[0218] In some embodiments, the step S1171 shown in the above Figure 11E may be implemented by the method shown in Figure 12 , referring to Figure 12 , Figure 12 is an implementation flowchart of a label data incremental updating method provided by an embodiment of the present application, and the method can be executed by the batch processing module of the UGC system, comprising the following steps:

[0219] Step S1201, a consumed MQ message is obtained from a message queue, and the MQ message comprises a post f and label operation content;

[0220] Step S1202, the label operation content is parsed to obtain an added small label list add ts and a deleted small label list del ts, and each small label in the add ts and the del ts is normalized.

[0221] Here, the normalization processing of the small tag can include, but is not limited to, converting the capital letters of English letters to lowercase, removing spaces, replacing & and | with other specific characters, etc.

[0222] Step S1203, in Redis, update the post list corresponding to each small tag in del_ts, update the post list corresponding to each small tag in add_ts;

[0223] Here, assuming that there is a small tag t1 in del_ts, when updating the post list corresponding to the small tag t1, the Redis command zrem key f can be used, where key=t1.

[0224] Assuming that there is a small tag t2 in add_ts, when updating the post list corresponding to the small tag t2, the Redis command zadd key f f can be used, where key=t2.

[0225] Step S1204, obtain all the large tag configuration information;

[0226] Step S1205, determine the large tag list add_TS corresponding to add_ts, and determine the large tag list del_TS corresponding to del_ts;

[0227] Here, add_TS includes the set of large tags corresponding to each small tag in add_ts after deduplication, which can be obtained by traversing each t in add_ts. del_TS includes the set of large tags corresponding to each small tag in del_ts after deduplication, which can be obtained by traversing each t in del_ts.

[0228] Step S1206, in Redis, update the post list corresponding to each large tag in del_TS, update the post list corresponding to each large tag in add_TS, and set the valid time for each large tag in del_TS and add_TS;

[0229] Here, for each large tag T1 in del_TS, the normalization processing and sorting processing can be performed on T1 to obtain the key corresponding to T1, and the Redis command zrem key f can be used to update the post list corresponding to the large tag T1, where key=T1.

[0230] For each large tag T2 in add TS, normalization and sorting can be performed on T2 to obtain the key corresponding to T2, and Redis command: zadd key f f can be used to update the post list corresponding to the large tag T2, where let key=T2.

[0231] The normalization performed on the large tags in del TS and add TS can include but is not limited to capitalization of English letters, space removal, uniform transformation of aggregation condition expressions, etc. The sorting can include but is not limited to one or more of sorting according to the order of letters, sorting according to the order of numbers, etc.

[0232] When setting the effective duration for the large tag, Redis command: expire key time can be used, where key is the key of the large tag for which the effective duration needs to be set, and time is the effective duration configured for the large tag.

[0233] When there is no post under the large tag or no user updates the large tag or no user views the post list under the large tag by clicking the tag within the configured effective duration, Redis will automatically clean up the large tag and the post list corresponding to the large tag.

[0234] In some embodiments, the small tag can also be configured with an effective duration, and when there is no post under the small tag or no user updates the small tag or no user views the post list under the small tag by clicking the small tag within the configured effective duration, Redis will automatically clean up the small tag and the post list corresponding to the small tag.

[0235] In some embodiments, the steps S1181 shown in the method for updating the post list of the small tag shown in the above Figure 11F may be implemented by the method shown in Figure 13 , see Figure 13 , Figure 13 An implementation flow diagram of a method for updating the post list of the small tag provided by the embodiments of the present application is provided, which can be executed by the batch processing module of the UGC system, including the following steps:

[0236] Step S1301, triggering a small tag update task at a regular time;

[0237] Here, the small tag update task can be triggered according to a specific update period, such as once a week or once a day.

[0238] Step S1302, obtaining a set ts of all small tags in the post stored in the MySQL database, and performing normalization on each small tag in ts;

[0239] Step S1303: Loop through and obtain each small label t in ts;

[0240] Step S1304: For the currently obtained small tag, obtain a full list of posts with that small tag in MySQL and store the full list of posts in Redis;

[0241] Here, the timed update task is an offline process. To avoid data inconsistencies during the update process, a separate updated full post list can be stored, distinct from the sub-tags used in the online process, as the post list corresponding to each sub-tag in the online process. In implementation, assuming a sub-tag t exists in MySQL, and the full post list corresponding to sub-tag t is fs (f1, f2, f3, ...), the Redis command can be used: `zadd key_calculate f1f1 f2 f2 f3 f3 ...`, where `key_calculate` is the key of the full post list corresponding to sub-tag t.

[0242] Step S1305: In Redis, replace the original post list corresponding to the sub-tag with the full post list corresponding to the sub-tag.

[0243] Here, when replacing the list of posts corresponding to a sub-tag with the full list of posts corresponding to that sub-tag, you can use the Redis command: rename key_calculate key, where key_calculate is the key of the full list of posts and key is the key of the original list of posts.

[0244] In some embodiments, the above Figure 11F The step S1182 shown can be adopted as follows: Figure 14 For the implementation of the method shown, see [link / reference]. Figure 14 , Figure 14 The following is a schematic diagram illustrating the implementation process of a method for fully updating large tag data, provided in an embodiment of this application. This method can be executed by the batch processing module of a UGC system and includes the following steps:

[0245] Step S1401: Trigger the large tag update task at regular intervals;

[0246] Here, the small tag update task can be triggered according to a specific update cycle, such as once a week, once a day, etc.

[0247] Step S1402: Obtain all large tag configuration information TS;

[0248] Step S1403: Loop through and retrieve the configuration information of each major tag in TS;

[0249] In step S1404, for the obtained large tag configuration information, a large tag T in the large tag configuration information is obtained, normalization processing and sorting processing are performed on the large tag T, and semantic analysis is performed on the large tag to obtain op1, op1_ts, op2, op2_ts, op, and key_T.

[0250] Here, key_T is a unique identifier of the large tag T, and the parameters op1, op1_ts, op2, op2_ts, and op in the large tag configuration information can be obtained through semantic analysis. Based on the parameters op1, op1_ts, op2, op2_ts, and op, key_T can be determined.

[0251] The specific process of performing semantic analysis on the tag can be as follows: for any normalized small tag t, key_t=t is a unique identifier of the small tag t; for any normalized large tag T=function(t1, t2, t3,...), function is & and |. The large tag T can be semantically analyzed as T=op1(op1_list) op op2(op2_list), the right value of the equation is calculated and used as the unique identifier key_T of T, where op1_list and op2_list are two tag lists respectively; op1 is a manner of aggregating tags in op1_list, which can be & or |; op2 is a manner of aggregating tags in op2_list, which can be & or |; op is a manner of aggregating tags in the result of op1 and op2 operations, which can be & or |.

[0252] For example, T=t4&t1, after performing semantic analysis on T, the following can be obtained: op1 is null, op1_list=t1, op2 is null, op2_list=t4, op is &, and key_T=key(t1)&key(t4)=t1&t4.

[0253] For example, T=(t2|t4)&t1=(t2|t1)&(t4|t1)=(t1|t2)&(t1|t4), after performing semantic analysis on T, the following can be obtained: op1 is or, op1_list=(t1,t2), op2 is |, op2_list=(t1,t4), op is &, and key_T=(t1|t2)&(t1|t4).

[0254] In step S1405, key_op1, key_op2, and key_op_all are all initialized as null.

[0255] Here, the key_op1 and the key_op2 are the keys corresponding to the calculation results of the op1 and the op2 in the Redis respectively, and the key_op_all is the key corresponding to the calculation result of the op in the Redis.

[0256] In step S1406, it is judged whether the number of labels in the op1_ts is greater than 1. If not, it is jumped to step S1407. If yes, it is jumped to step S1408.

[0257] In step S1407, in the case that the number of labels in the op1_ts is equal to 1, the key_op1 is determined as the first element of the op1_ts. In the case that the number of labels in the op1_ts is equal to 0, an error is alarmed. It is jumped to step S1409.

[0258] In step S1408, in the case that the op1 is &, the intersection of the post lists corresponding to the labels in the opt1_ts is determined as the post list corresponding to the key_op1. In the case that the op1 is |, the union of the post lists corresponding to the labels in the opt1_ts is determined as the post list corresponding to the key_op1.

[0259] Here, the zset data structure of the Redis can perform the & operation on the set of n keys (key1, key2, key3, …, keyn) keys (key1, key2, key3, …, keyn), and the command is: zinerstore dest n key1 key2 key3 … keyn AGGREGATE MAX, wherein n is a positive integer. The following is abbreviated as REDIS_ZSET_AND (dest, keys).

[0260] The zset data structure of the Redis can also perform the | operation on the set of n keys (key1, key2, key3, …, keyn) keys (key1, key2, key3, …, keyn), and the command is: zunionstore dest n key1 key2 key3 … keyn AGGREGATE MAX, wherein n is a positive integer. The following is abbreviated as REDIS_ZSET_OR (dest, keys).

[0261] In the implementation, when calculating the intersection of the post lists corresponding to the labels in the opt1_ts, the Redis command: REDIS_ZSET_AND (key_op1, op1_ts) can be used. When calculating the union of the post lists corresponding to the labels in the opt1_ts, the Redis command: REDIS_ZSET_OR (key_op1, op1_ts) can be used.

[0262] Step S1409, judge whether the number of labels in op2_ts is greater than 1; if not, jump to step S1410; if yes, jump to step S1411.

[0263] Step S1410, in the case that the number of labels in op2_ts is equal to 1, determine key_op2 as the first element of op2_ts; in the case that the number of labels in op2_ts is equal to 0, perform error alarm; jump to step S1412.

[0264] Step S1411, in the case that op2 is &, determine the intersection of post lists corresponding to each label in opt2_ts as the post list corresponding to key_op2; in the case that op2 is |, determine the union of post lists corresponding to each label in opt2_ts as the post list corresponding to key_op2.

[0265] Here, when calculating the intersection of post lists corresponding to each label in opt2_ts, Redis command: REDIS_ZSET_AND (key_op2, op2_ts) can be used. When calculating the union of post lists corresponding to each label in opt2_ts, Redis command: REDIS_ZSET_OR (key_op2, op2_ts) can be used.

[0266] Step S1412, judge whether op is &; if not, jump to step S1413; if yes, jump to step S1414.

[0267] Step S1413, in the case that op is |, determine the union of post lists corresponding to key_op1 and key_op2 as the post list corresponding to key_op_all.

[0268] Here, the union of post lists corresponding to key_op1 and key_op2 can be calculated by executing the following Redis command:

[0269] keys=(key_op1, key_op2); REDIS_ZSET_OR (key_op_all, keys).

[0270] Step S1414, determine the intersection of post lists corresponding to key_op1 and key_op2 as the post list corresponding to key_op_all.

[0271] Here, the intersection of post lists corresponding to key_op1 and key_op2 can be calculated by executing the following Redis command:

[0272] keys=(key_op1,key_op2);REDIS_ZSET_AND(key_op_all,keys).

[0273] In step S1415, the post list corresponding to key_T is replaced by the post list corresponding to key_op_all, and a valid time length is configured for key_T.

[0274] Here, when the post list corresponding to key_T is replaced by the post list corresponding to key_op_all, the Redis command: rename key_op_all key_T can be used. When a valid time length is configured for key_T, the Redis command: expire key_T time can be used, where time is the valid time length configured for key_T.

[0275] It should be noted that in implementation, the post published by the user can be used as the content data in the foregoing embodiments, the small tag can be used as the first tag in the foregoing embodiments, and the large tag can be used as the second tag in the foregoing embodiments.

[0276] The embodiments of the present application have the following beneficial effects:

[0277] 1) The aggregation of tags is implemented by message queue incremental update, timing full update asynchronous batch processing, the function of aggregating tags is isolated and decoupled from author posting and product configuration in the storage layer, and the corresponding relationship between tags and post lists is stored separately from post information and product configuration related data. In this way, the system performance when a user views a post list based on a tag can be effectively improved, and the business processing speed is accelerated. Even if there are a large number of requests for viewing a post list based on a tag or complex aggregation conditions, the user experience of other functions such as author posting and product configuration of the UGC system will not be affected.

[0278] 2) Since the tags are aggregated when the user publishes a post or updates the tag configuration information, and the aggregated tags and the post list corresponding to the tags are stored in Redis, when a post list is viewed based on a tag, a simple query from Redis can be performed to obtain the post list to be viewed, the calculation is simple, and fast page turning can be implemented. In addition, since the Redis query process is an access to memory, the query speed is faster than that of a database based on access to a disk, and the corresponding relationship between tags and post lists is stored in the zset data structure in Redis. Since the zset data structure itself has the characteristics of facilitating fast page turning query, the speed of page turning query can be further improved, and the user experience is improved.

[0279] (3) By setting an effective time length for the tag, the tag can be periodically cleaned, and the maintenance and storage costs of the invalid tag are reduced.

[0280] The following continues to illustrate an exemplary structure of the data storage device 255 provided by the embodiments of the present application, which is implemented as a software module, in some embodiments, as shown in the figure, the software module stored in the data storage device 255 of the memory 250 can include: Figure 2

[0281] The first obtaining module 2551 is configured to obtain content data published by a first user and a tag operation for the content data.

[0282] The first storage module 2552 is configured to store the content data to a first database.

[0283] The first generation module 2553 is configured to generate a tag update message based on the content data and the tag operation.

[0284] The first joining module 2554 is configured to join the tag update message to a message processing queue.

[0285] The second obtaining module 2555 is configured to obtain a to-be-processed tag update message from the message processing queue in an asynchronous processing manner.

[0286] The first updating module 2556 is configured to update a second database based on the to-be-processed tag update message; the second database stores a correspondence between a tag and a content data list.

[0287] In some embodiments, the tag includes at least one first tag and at least one second tag, the second tag is aggregated from at least two first tags; the second database stores a first correspondence between a first tag and a content data list and a second correspondence between a second tag and a content data list; the first updating module is further configured to update the first correspondence between the first tag and the content data list stored in the second database based on the to-be-processed tag update message; and update the second correspondence between the second tag and the content data list stored in the second database based on the first correspondence and the to-be-processed tag update message.

[0288] In some embodiments, the first updating module is further configured to parse the to-be-processed tag update message to obtain a to-be-processed content data identifier and a tag operation; obtain a first operation type and a first tag list according to the tag operation; and for each first tag in the first tag list, update the first tag and a content data list corresponding to the first tag in the second database according to the first operation type and the content data identifier.​

[0289] In some embodiments, the first updating module is further configured to: parse the to-be-processed label updating message to obtain a to-be-processed content data identifier and a label operation; obtain a first operation type and a first label list according to the label operation; query a third correspondence relationship corresponding to the first label list in a third database based on the first label list to obtain a second label list corresponding to the first label list; the third correspondence relationship is used to represent an association relationship between a second label and aggregation configuration information, and the aggregation configuration information includes at least two first labels and an aggregation manner of the at least two first labels; and for each second label in the second label list, update the second label and a content data list corresponding to the second label in the second database according to the first operation type and the content data identifier.

[0290] In some embodiments, the data storage device further includes: a third obtaining module configured to obtain an editing operation of a second user for a second label; a fourth obtaining module configured to obtain aggregation configuration information of the second label corresponding to the editing operation; a fifth obtaining module configured to obtain a second operation type corresponding to the editing operation; a second updating module configured to update a third correspondence relationship between a second label and aggregation configuration information in a third database based on the second operation type, the second label, and the aggregation configuration information of the second label; and a third updating module configured to update a second correspondence relationship between a second label and a content data list stored in the second database based on the updated third correspondence relationship.

[0291] In some embodiments, the first database includes at least one content data and a label corresponding to each of the content data; and the data storage device further includes: a determining module configured to determine, based on each content data and a label corresponding to each of the content data in the first database, a full label list and a content data list corresponding to each of the labels in the full label list at a specific updating period; and a fourth updating module configured to update the second database in a batch processing manner based on the full label list and the content data list corresponding to each of the labels.

[0292] In some embodiments, the data storage device further includes: a deleting module configured to: for each label stored in the second database, delete the label and a content data list corresponding to the label in the second database if the content data list corresponding to the label is empty for a specific time length; or for each label stored in the second database, delete the label and a content data list corresponding to the label in the second database if no access operation or editing operation for the label is received for a specific time length.

[0293] In some embodiments, the data storage apparatus further comprises: a first query module configured to, in response to a query operation for the tag in a content data viewing interface, query a content data list corresponding to the tag in the second database based on the tag; wherein the content data list comprises an identifier of each content data; a first display module configured to display a content data identifier list comprising an identifier of each content data in the content data list in the content data viewing interface; a second query module configured to, in response to a selection operation for a content data identifier in the content data identifier list, query content data corresponding to the content data identifier in the first database based on the content data identifier; and a second display module configured to display the content data in the content data viewing interface.

[0294] The embodiment of the present application provides a computer program product or a computer program, which comprises computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the data storage method provided in the embodiment of the present application.

[0295] The embodiment of the present application provides a computer readable storage medium storing executable instructions, wherein the executable instructions are stored in the computer readable storage medium. When the executable instructions are executed by a processor, the processor executes the data storage method provided by the embodiment of the present application, for example, the method shown in the embodiment of the present application. Figure 3

[0296] In some embodiments, the computer readable storage medium can be FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disc, or CD-ROM, and the like. The computer readable storage medium can also be various devices comprising one or any combination of the above storage devices.

[0297] In some embodiments, the executable instructions can be in the form of programs, software, software modules, scripts or codes, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and can be deployed in any form, including being deployed as independent programs or being deployed as modules, components, subroutines or other units suitable for use in a computing environment.

[0298] ​By way of example, executable instructions can correspond to a file in a file system, but in many cases can not necessarily correspond to a file. A file can be stored in a single file dedicated to the program or data, in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in multiple coordinated files (e.g., files that store one or more modules, subprograms, or portions of code), and so on.

[0299] By way of example, executable instructions can be deployed across one computer system or across multiple computer systems that are located at one site or distributed across multiple sites and interconnected by a communication network.

[0300] To sum up, through the embodiments of the present application, the system performance can be improved when searching content data based on a tag, so that the search result can be returned to the user faster, and the user experience is improved. In addition, the tag can be periodically cleaned up, and the maintenance and storage costs of the invalid tag are reduced.

[0301] The above merely illustrates the embodiments of the present application, but is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, and improvement within the spirit and scope of the present application shall be included in the protection scope of the present application.

Claims

1. A data storage method, characterized by, The method comprises: obtaining content data published by a first user and a tag operation on the content data; storing the content data into a first database; generating a tag update message based on the content data and the tag operation; adding the tag update message to a message processing queue; obtaining a to-be-processed tag update message from the message processing queue in an asynchronous processing manner; updating a first correspondence between a first tag and a content data list stored in a second database based on the to-be-processed tag update message; parsing the to-be-processed tag update message to obtain a to-be-processed content data identifier and a tag operation, and obtaining a first operation type and a first tag list according to the tag operation; querying a third correspondence in a third database based on the first tag list to obtain a second tag list corresponding to the first tag list, wherein the third correspondence represents an association relationship between the second tag and aggregation configuration information, and the aggregation configuration information comprises at least two first tags and an aggregation manner of the at least two first tags; for each second tag in the second tag list, updating the second tag and a content data list corresponding to the second tag in the second database according to the first operation type and the content data identifier.

2. The method of claim 1, wherein, The second tag is obtained by aggregating at least two first tags, and the second database stores a correspondence between a first tag and a content data list and a correspondence between a second tag and a content data list.

3. The method of claim 1, wherein, The updating of the first correspondence between the first tag and the content data list stored in the second database based on the to-be-processed tag update message comprises: parsing the to-be-processed tag update message to obtain a to-be-processed content data identifier and a tag operation; obtaining a first operation type and a first tag list according to the tag operation; for each first tag in the first tag list, updating the first tag and a content data list corresponding to the first tag in the second database according to the first operation type and the content data identifier.

4. The method of claim 1, wherein, The method further comprises: obtaining an editing operation of a second user on a second tag; obtaining aggregation configuration information of the second tag corresponding to the editing operation; obtaining a second operation type corresponding to the editing operation; updating a third correspondence between a second tag and aggregation configuration information in a third database based on the second operation type, the second tag, and the aggregation configuration information of the second tag; updating a second correspondence between a second tag and a content data list stored in the second database based on the updated third correspondence.

5. The method of claim 1, wherein, The first database comprises at least one content data and a tag corresponding to each content data, and the method further comprises: determining a full tag list and a content data list corresponding to each tag in the full tag list based on each content data and a tag corresponding to each content data in the first database at a specific update period. Based on the full label list and the content data list corresponding to each label, the second database is updated in a batch mode.

6. The method of claim 1, wherein, The method further includes: For each label stored in the second database, if the content data list corresponding to the label is empty for a specific time length, the label and the content data list corresponding to the label are deleted from the second database. Alternatively, for each label stored in the second database, if no access operation or editing operation for the label is received for a specific time length, the label and the content data list corresponding to the label are deleted from the second database.

7. A data storage device, characterized by The method includes: The first obtaining module is configured to obtain content data published by a first user and a label operation for the content data. The first storage module is configured to store the content data to a first database. The first generation module is configured to generate a label update message based on the content data and the label operation. The first joining module is configured to add the label update message to a message processing queue. The second obtaining module is configured to obtain a to-be-processed label update message from the message processing queue in an asynchronous processing mode. The first updating module is configured to update a first corresponding relationship between a first label and a content data list stored in a second database based on the to-be-processed label update message, wherein the second database stores a corresponding relationship between the first label and the content data list and a corresponding relationship between a second label and the content data list; the second label is aggregated from at least two first labels; the to-be-processed label update message is parsed to obtain a to-be-processed content data identifier and a label operation; a first operation type and a first label list are obtained according to the label operation; a second label list corresponding to the first label list is obtained by querying a third database based on the first label list, wherein the third corresponding relationship represents an association relationship between the second label and aggregation configuration information, and the aggregation configuration information includes at least two first labels and an aggregation manner of the at least two first labels; for each second label in the second label list, the second label and a content data list corresponding to the second label are updated in the second database according to the first operation type and the content data identifier.

8. The apparatus of claim 7, wherein The first updating module is further configured to parse the to-be-processed label update message to obtain a to-be-processed content data identifier and a label operation; a first operation type and a first label list are obtained according to the label operation; for each first label in the first label list, the first label and a content data list corresponding to the first label are updated in the second database according to the first operation type and the content data identifier.

9. The apparatus of claim 7, wherein, The data storage apparatus further includes: The third obtaining module is configured to obtain an editing operation of a second user on a second label; the fourth obtaining module is configured to obtain aggregate configuration information of the second label corresponding to the editing operation; the fifth obtaining module is configured to obtain a second operation type corresponding to the editing operation; the second updating module is configured to update a third correspondence relationship between the second label and the aggregate configuration information in a third database based on the second operation type, the second label, and the aggregate configuration information of the second label; and the third updating module is configured to update a second correspondence relationship between the second label and a content data list stored in the second database based on the updated third correspondence relationship.

10. The apparatus of claim 7, wherein, The data storage apparatus further includes: The determining module is configured to determine a full label list and a content data list corresponding to each label in the full label list based on each content data in the first database and the label corresponding to each content data at a specific update period; and the fourth updating module is configured to update the second database in a batch processing manner based on the full label list and the content data list corresponding to each label.

11. The apparatus of claim 7, wherein, The data storage apparatus further includes: The deleting module is configured to delete, for each label stored in the second database, the label and the content data list corresponding to the label in the second database in a case where the content data list corresponding to the label is empty for a specific time length; or delete, for each label stored in the second database, the label and the content data list corresponding to the label in the second database in a case where no access operation or editing operation on the label is received for a specific time length.

12. A data storage device, characterized by The apparatus includes: a memory configured to store executable instructions; a processor configured to execute the executable instructions stored in the memory to implement the method in any one of claims 1 to 6.

13. A computer-readable storage medium, characterized in that, The computer instructions are executed by the processor to implement the method in any one of claims 1 to 6.

14. A computer program product comprising computer instructions, characterized in that, The computer instructions are executed by the processor to implement the method in any one of claims 1 to 6. The computer instructions are executed by the processor to implement the method in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Face and subject tagging with relationship indexing in files to enhance organization and usability

    US20090119608A1