Label Management Method, Label Management Device, Server, and Computer Storage Medium
By configuring unique tag identification for multiple application products and establishing mapping relationships, the problem of the inability to reuse the tag system of information flow content products is solved, and the unified label management and efficient utilization of resources are achieved.
Patent Information
- Application Number
- CN202010158336.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-09
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2040-03-09
AI Technical Summary
The labeling system of existing information flow content products is strongly related to product business, which leads to inability to reuse when derivative or launching new information flow content products, resulting in waste of resources.
Provides a tag management method, collects tags from multiple applications, configures unique tags, and establishes a mapping relationship between tags and tags, and manages them uniformly through a collection of mapping relationships, supporting the addition, query, update and delete tag operations.
It realizes unified label management of multiple application products, avoids resource waste, and improves the universality and efficiency of label management.
Smart Images

Figure CN113378035B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of management tools, and in particular, to a tag management method, a tag management device, a server, and a computer storage medium. Background Art
[0002] The content production process of Internet content-based application products starts from warehousing and enters the security review link. The content that passes the security processing is clean. Next, through the processing of content features, the content is characterized, and then the content is screened for low quality, and content such as non-nutritious and repetitive content is screened out. Finally, the content enters the recommendation pool. The most important link in the content characterization process is to label the content. The labels are usually keywords, topic words, etc. involved in the content, reflecting the individuality of the content.
[0003] Currently, the information flow content products on the market often use a set of independent tag management systems. The tag system is strongly related to the business of the product itself. Although this facilitates the realization of personalized customization of the product, it has deficiencies in generality. When it is necessary to derive or launch a new information flow content-based product, the tag system cannot be reused, resulting in waste of resources. Summary of the Invention
[0004] Embodiments of the present invention provide a tag management method, a tag management device, a server, and a computer storage medium, which can manage the tags of multiple application products and avoid waste of resources.
[0005] Embodiments of the present invention provide a tag management method, including:
[0006] Collecting tags of content in at least two applications to obtain a tag set; determining a current tag that needs to be configured with an identifier from the tag set;
[0007] When the current tag is not configured with a tag identifier, configuring a tag identifier for the current tag and establishing a mapping relationship between the current tag and the tag identifier to obtain a mapping relationship set;
[0008] Receiving a tag management operation request, where the tag management operation request indicates a tag management operation type that requires tag management;
[0009] Performing a management operation on the mapping relationship set according to the tag operation type.
[0010] Correspondingly, embodiments of the present invention further provide a tag management device, including:
[0011] A collection unit, configured to collect tags of content in at least two applications to obtain a tag set; determine a current tag that needs to be configured with an identifier from the tag set;
[0012] A creation unit, configured to configure a label identifier for the current label when the current label is not configured with a label identifier, and establish a mapping relationship between the current label and the label identifier, so as to obtain a mapping relationship set;
[0013] A receiving unit, configured to receive a label management operation request, where the label management operation request indicates a label management operation type that requires label management;
[0014] An execution unit, configured to perform a management operation on the mapping relationship set according to the label operation type.
[0015] Optionally, in some embodiments of the present invention, it further includes:
[0016] A determination unit, configured to determine the mapping relationship corresponding to the hash value
[0017] A distribution unit, configured to evenly store the mapping relationship set into a database according to the hash value;
[0018] A storage unit, configured to store the mapping relationship set into a memory storage in a distributed storage manner;
[0019] An upload unit, configured to upload the mapping relationship set in the database to an offline file library and a cloud storage according to a preset upload time interval
[0020] Optionally, in some embodiments of the present invention, it further includes a first reconciliation unit, and the first reconciliation unit is specifically configured to:
[0021] Generate a first reconciliation instruction according to a preset first regular reconciliation time;
[0022] Determine whether each group of mapping relationships in the memory storage is consistent with the corresponding mapping relationships in the database according to the first reconciliation instruction;
[0023] If the mapping relationships in the memory storage and the database are inconsistent;
[0024] Update the mapping relationships in the memory storage that are inconsistent with those in the database to be consistent with the mapping relationships in the database.
[0025] Optionally, in some embodiments of the present invention,
[0026] The receiving unit is specifically configured to: when the management operation request is a query request, the label management operation type that requires label management indicated by the query request is a query operation.
[0027] The execution unit is specifically configured to: obtain a target label or a target label identifier associated in the query request;
[0028] Query for the tag corresponding to the target tag identifier in the offline file library and the cloud memory according to the target tag identifier;
[0029] Query for the tag corresponding to the target tag in the offline file library and the cloud memory based on the mapping relationship set according to the target tag.
[0030] Optionally, in some embodiments of the present invention, the execution unit is specifically configured to:
[0031] If no tag corresponding to the target tag identifier or the target tag is found in the offline file library and the cloud memory, query for the tag corresponding to the target tag identifier or the target tag in the memory storage.
[0032] Optionally, in some embodiments of the present invention, it further includes a cleaning unit, and the cleaning unit is specifically configured to:
[0033] If no tag corresponding to the target tag identifier or the target tag is found in the memory storage, store the null value as the query result of the target tag identifier or the target tag in the cache folder;
[0034] Clean the cache folder according to the preset cleaning time.
[0035] Optionally, in some embodiments of the present invention, it further includes a deletion unit, and the deletion unit is specifically configured to:
[0036] Obtain the usage times of tags in the database within a preset time;
[0037] Identify the tags with the usage times of tags in the database less than the first preset threshold as low-quality tags;
[0038] Delete the low-quality tags in the memory storage and the database.
[0039] Optionally, in some embodiments of the present invention, it further includes a fuzzy search unit, and the fuzzy search unit is specifically configured to:
[0040] Obtain the content input by the client;
[0041] Perform word segmentation on the input content to obtain target keywords;
[0042] Match the target keywords with the tags in the memory storage. If the target keywords match the tags in the memory storage, obtain the first matching result;
[0043] Match the target keyword with the tags in the high-quality tag index library. If the target keyword matches the tags in the high-quality index library, obtain a second matching result, where the high-quality index library is the tags that have been used more than a second preset threshold in the database within a second preset time;
[0044] Match the target keyword with the tags in the offline index library. If the target keyword matches the tags in the offline index library, obtain a third matching result, where the offline index library is a set of offline stored tags, and the offline index library includes at least two;
[0045] Sort the first matching result, the second matching result, and the third matching result in order of priority in sequence, and remove duplicate matching results to obtain a search result;
[0046] Display the search result.
[0047] Optionally, in some embodiments of the present invention, the fuzzy search unit is specifically used for:
[0048] Establish an inverted index of tags in the offline index library;
[0049] Match the target keyword with the inverted index. If the target keyword matches the inverted index, obtain a third matching result.
[0050] Optionally, in some embodiments of the present invention, it further includes an offline index update unit, and the offline index update unit is specifically used for:
[0051] Obtain an offline index update request;
[0052] Upload the set of mapping relationships in the database to the offline index library according to the offline index update request.
[0053] Optionally, in some embodiments of the present invention, it further includes a second reconciliation unit, and the second reconciliation unit is specifically used for:
[0054] Generate a second reconciliation instruction according to a second preset regular reconciliation time;
[0055] Determine whether each set of mapping relationships in the offline index library is consistent with the corresponding mapping relationships in the database according to the second reconciliation instruction;
[0056] If the mapping relationships in the offline index library and the database are inconsistent;
[0057] Update the mapping relationships in the offline index library that are inconsistent with those in the database to be consistent with the mapping relationships in the database.
[0058] Optionally, in some embodiments of the present invention,
[0059] The receiving unit is specifically configured to: when the label management operation request is a label addition operation request, and according to the label addition operation request, the label management operation type that requires label management is a label addition operation;
[0060] The execution unit is specifically configured to: trigger a label addition operation in the message queue according to the label addition operation request;
[0061] Obtain the target label associated in the label addition request;
[0062] Add the target label and the target label identifier corresponding to the target label to the mapping relationship set according to the label addition operation.
[0063] Correspondingly, an embodiment of the present invention further provides a server, including a processor and a storage device. The storage device stores a computer program, and when the processor calls and executes the computer program, the steps in any method provided by the embodiments of the present invention are implemented.
[0064] Correspondingly, an embodiment of the present invention further provides a computer storage medium. The computer storage medium stores multiple computer instructions, and the instructions are suitable for being loaded by a processor. When the instructions are executed by the processor, the steps in any method provided by the embodiments of the present invention are implemented.
[0065] Embodiments of the present invention can collect labels of content in at least two applications to obtain a label set; determine a current label that needs to be configured with an identifier from the label set. When the current label is not configured with a label identifier, configure a label identifier for the current label, and establish a mapping relationship between the current label and the label identifier to obtain a mapping relationship set. Receive a label management operation request, where the label management operation request indicates the label management operation type that requires label management, and perform a management operation on the mapping relationship set according to the label operation type. Embodiments of the present invention configure a unique label identifier for labels of content in multiple different applications, and perform unified management of the labels according to different received management operation requests, so as to realize the management of labels of multiple application products and avoid resource waste. Description of the Drawings
[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0067] Figure 1 It is a schematic diagram of the application scenario of the label management system provided by the embodiments of the present invention
[0068] Figure 2 It is a schematic flowchart of the label management method provided by an embodiment of the present invention.
[0069] Figure 3 It is a schematic diagram of the operation logic when the server performs reconciliation in an embodiment of the present invention.
[0070] Figure 4 It is a block diagram of the operation logic of the server query operation in an embodiment of the present invention.
[0071] Figure 5 It is a logic framework diagram of the server fuzzy search in an embodiment of the present invention.
[0072] Figure 6 It is a logic framework diagram of the update of the server offline index library in an embodiment of the present invention.
[0073] Figure 7 It is a logic framework diagram of the server label addition in an embodiment of the present invention.
[0074] Figure 8 It is another schematic diagram of the label management method provided by an embodiment of the present invention.
[0075] Figure 9 It is a schematic structural diagram of the label management device provided by an embodiment of the present invention.
[0076] Figure 10 It is a schematic structural diagram of the electronic device provided by an embodiment of the present invention. Detailed implementation manners
[0077] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present invention.
[0078] In the embodiments of the present invention, it should be understood that terms such as "including" or "having" are intended to indicate the existence of the features, numbers, steps, actions, components, parts, or combinations thereof disclosed in this specification, and are not intended to exclude the possibility of the existence or addition of one or more other features, numbers, steps, actions, components, parts, or combinations thereof.
[0079] The embodiments of the present invention relate to the cloud storage direction in the cloud technology field.
[0080] Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to achieve data computing, storage, processing, and sharing.
[0081] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, be used on demand, and is flexible and convenient. Cloud computing technology will become an important support. The back-end services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites, and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark and needs to be transmitted to the back-end system for logical processing. Data at different levels will be processed separately, and various industry data requires the support of a powerful system. This can only be achieved through cloud computing.
[0082] Cloud storage is a new concept extended and developed from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as the storage system) refers to a storage system that combines a large number of different types of storage devices (storage devices are also called storage nodes) in the network through cluster applications, grid technology, and distributed storage file systems, etc., and works together through application software or application interfaces to provide data storage and business access functions externally.
[0083] Currently, the storage method of the storage system is as follows: create a logical volume. When creating a logical volume, physical storage space is allocated for each logical volume. This physical storage space may be composed of the disks of a certain storage device or several storage devices. The client stores data on a certain logical volume, that is, stores the data on the file system. The file system divides the data into many parts, and each part is an object. The object not only contains data but also additional information such as data identification (ID, ID entity), etc. The file system writes each object into the physical storage space of the logical volume respectively, and the file system will record the storage location information of each object. Thus, when the client requests to access the data, the file system can enable the client to access the data according to the storage location information of each object.
[0084] The process of a storage system allocating physical storage space for a logical volume is specifically as follows: According to the capacity estimation of the objects stored in the logical volume (this estimation often has a large margin relative to the actual capacity of the objects to be stored) and the group of a redundant array of independent disks (RAID), the physical storage space is pre-divided into stripes, and a logical volume can be understood as a stripe, thereby allocating physical storage space for the logical volume.
[0085] Embodiments of the present invention provide a tag management method, a tag management device, a server, and a computer storage medium.
[0086] Please refer to Figure 1 , Figure 1 FIG. is a schematic diagram of an application scenario of a tag management system provided by an embodiment of the present invention. Embodiments of the present invention provide a tag management system, which includes an electronic device and a server. The electronic device provided by the embodiments of the present invention can send application content to the server. The electronic device can be a device such as a mobile phone, a tablet computer, or a notebook computer. The server receives the application content transmitted by the electronic device, and the server can extract the tags in the application content and manage the tags. Of course, the server can also directly receive the tags transmitted by the electronic device. Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal 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 directly or indirectly connected through wired or wireless communication methods, and the present invention does not make any restrictions here.
[0087] In practical applications, a label management system is used to perform management operations and read / write operations on labels. Among them, the server includes a label management service module, a memory storage, a message queue, a database, and a label update module. The label management service module can receive labels from electronic devices. For each label received by the label management service module, the memory storage generates a label identifier that uniquely corresponds to the label. The label and its corresponding label identifier form a mapping relationship, and multiple mapping relationships can form a mapping relationship set. The label management service module can store the mapping relationship set in the memory storage and the database respectively. The message queue caches various message requests, such as an add label message request, a delete label message request, a modify label message request, etc. The label management service module can receive operation requests from users. When the label management service module receives an operation request from a user, it notifies the operation request to the message queue, and the label update module consumes the message corresponding to the operation instruction in the message queue. Through the message queue, the memory storage executes the operation instruction corresponding to the operation request. Among them, the operation request includes adding a label, deleting a label, modifying a label, etc. Since the labels and label identifiers in the label management system according to the embodiments of the present invention are uniquely corresponding, therefore, after the labels of multiple product applications enter the label management system of the present invention, the labels can be uniformly managed, such as adding, deleting, and modifying. The versatility of the management system is increased, and resource waste is avoided. At the same time, the messages are cached in the message queue, which can ensure the consistency of the data in the memory storage and the database. Further improve the performance of the label management system.
[0088] It should be noted that a database, in short, can be regarded as an electronic filing cabinet - a place for storing electronic files. Users can perform operations such as adding, querying, updating, and deleting data in the files. The so-called "database" is a data set stored together in a certain way, shared by multiple users, having the smallest possible redundancy, and independent of application programs.
[0089] The following will be described in detail respectively. It should be noted that the order of the following embodiments does not limit the preferred order of the embodiments.
[0090] In some embodiments, a label management method will be described from the perspective of the label management method, and the label management method can be specifically integrated in the server.
[0091] Please refer to Figure 2 As shown, a label management method is provided. The label management method can be executed by the server, and the specific process can be as follows:
[0092] 101. Collect labels of the content in at least two applications to obtain a label set; determine a current label that needs to be configured with an identifier from the label set.
[0093] Among them, an application refers to a computer program that completes one or more tasks. For example, Toutiao Express, QQ News, Today's Headlines, etc. In the present invention, the content in at least two applications is collected. That is to say, two, three, ten, etc. can be collected. The applications collected in the present invention are different. For example, the tags of the content in Toutiao Express and Today's Headlines are collected.
[0094] Among them, a tag is an important piece of data that reflects the content and the user's interests. A tag is the link between the user and the content. For example, different tags are added to a piece of content. These tags are usually the keywords, main idea words, or hot words involved in the content. And the tags of a user are often the content focus points of this user.
[0095] For example, Country X launched an attack on Country XX, resulting in the death of General X of Country XX. In this piece of content, the tags can be "attack" and "General X". Another example is that User X watches basketball, then the tags of this user may be "basketball".
[0096] Among them, a tag set is a set formed by multiple collected tags. This tag set includes multiple pieces of content.
[0097] The current tag can be determined according to the order of the collected tags. For example, the tag collected first is determined as the current tag.
[0098] 102. When the current tag is not configured with a tag identifier, configure a tag identifier for the current tag, and establish a mapping relationship between the current tag and the tag identifier to obtain a mapping relationship set.
[0099] Among them, when the current tag is not configured with a tag identifier, before configuring a unique tag identifier for the current tag, if there is already a configured identifier tag that is the same as the current tag, then a unique tag identifier will not be configured for the current tag.
[0100] Among them, a tag identifier refers to the character corresponding to the tag. For example, the tag identifier corresponding to "sports" is 1, and the tag identifier corresponding to "music" is 2. Or other similar methods are used to correspond to the tags.
[0101] Among them, a one-to-one mapping relationship is established between the tag and the tag identifier, and a whole formed by multiple mapping relationships can form a mapping relationship set.
[0102] For example, when the tag "sports" has already been configured with the tag identifier "1", when the tag "sports" appears again as the current tag, a tag identifier will not be configured for "sports" again. Only when a tag that has not been configured with a tag identifier appears, a tag identifier will be configured for the tag. This is to ensure that each tag corresponds to a unique tag identifier, thus facilitating the unified management of tags.
[0103] Among them, in some embodiments, "after obtaining the mapping relationship set" specifically includes the steps of:
[0104] (1) Determine the mapping relationship corresponding to the hash value.
[0105] It should be noted that in some embodiments, each tag in the mapping relationship set can be mapped to a hash value through a hash function. The hash value is a string of a fixed length, and the hash value corresponds to the mapping relationship set.
[0106] For example, the hash value is 010, and the corresponding mapping relationship set is the mapping relationship of "sports" = "1". For example, the hash value is 011, and the corresponding mapping relationship set is the mapping relationship of "music" = "1".
[0107] (2) Store the mapping relationship set evenly in the database according to the hash value.
[0108] It should be noted that the database includes multiple sub-databases, and each sub-database includes multiple lists. According to the mapping relationship corresponding to the hash value, each group of mapping relationships in the mapping relationship set is stored in each list of the database.
[0109] For example, the hash value of "sports" = "1" is 010, and the hash value of "music" = "2" is 011. 010 and 011 are evenly distributed to different lists in the database.
[0110] It can be understood that storing the mapping relationship set evenly in the database according to the hash value can reduce the transmission time of the mapping relationship set and avoid transmitting duplicate mapping relationship sets to the database at the same time.
[0111] (3) Store the mapping relationship set in the memory storage in a distributed storage manner.
[0112] It should be noted that distributed storage means that the mapping relationship set is dispersed and stored in the memory of multiple independent computer devices.
[0113] For example, there are four independent computers, and the mapping relationship set is stored in the internal storage of the four independent computers respectively.
[0114] It can be understood that adopting the distributed storage method can reduce the pressure on the entire server and improve the security of storage at the same time.
[0115] (4) According to the preset upload time interval, upload the mapping relationship set in the database to the offline file library and the cloud storage.
[0116] It should be noted that the preset upload time interval can be set. For example, the preset upload time interval is 1 minute, that is, it is uploaded once every 1 minute. The preset upload time interval can also be 1 hour, or the preset upload time interval is 24 hours. In the implementation of the present invention, the specific value of the preset upload time interval is not specifically limited. It can be understood that if the preset upload time interval is short, the timeliness of the mapping relationship set in the offline file library and the cloud storage can be ensured. And if the preset upload time interval is long, resources can be saved.
[0117] Among them, the offline file library is the local network. And the cloud storage refers to a storage device that combines a large number of different types of storage devices (storage devices are also called storage nodes) in the network through cluster applications, grid technologies, and distributed storage file systems, etc., through application software or application interfaces, and works together to provide data storage and business access functions externally.
[0118] For example, the mapping relationship set in the database is uploaded to the offline file library and the cloud storage every 1 minute.
[0119] Among them, in some embodiments, the "tag management method" specifically includes the following steps:
[0120] (1) Generate a first reconciliation instruction according to the preset first regular reconciliation time.
[0121] It should be noted that the preset first regular reconciliation time can be set. For example, the preset first regular reconciliation time is 1 minute, the preset first regular reconciliation time is 1 hour, or the preset first regular reconciliation time is 24 hours. In the implementation of the present invention, the specific duration of the preset first regular reconciliation is not limited.
[0122] Among them, the first reconciliation instruction is a trigger signal, and the first reconciliation instruction can trigger the reconciliation between the memory storage and the database.
[0123] For example, a first reconciliation instruction is generated every 1 minute, and the first reconciliation instruction triggers the reconciliation between the memory storage and the database.
[0124] (2) Determine whether each group of mapping relationships in the memory storage is consistent with the corresponding mapping relationships in the database according to the first reconciliation instruction.
[0125] For example, the mapping relationships in the memory storage include "Sports" = "1", "Music" = "2", "Entertainment" = "3". The mapping relationships in the database include "Sports" = "1", "Music" = "2", "Entertainment" = "3".
[0126] Then, compare "Sports" = "1" in the memory storage with "Sports" = "1" in the database, compare "Music" = "2" in the memory storage with "Music" = "2" in the database, and compare "Entertainment" = "3" in the memory storage with "Entertainment" = "3" in the database. Through comparison, the result of whether each set of mapping relationships stored in the memory is consistent with the corresponding mapping relationship in the database is obtained.
[0127] (3) If the mapping relationship between the memory storage and the database is inconsistent.
[0128] For example, compare "Sports" = "1" in the memory storage with "Sports" = "1" in the database, compare "Music" = "2" in the memory storage with "Music" = "2" in the database, and compare "Entertainment" = "4" in the memory storage with "Entertainment" = "3" in the database. After comparison, it is found that the mapping relationship between "Entertainment" = "4" in the memory storage and "Entertainment" = "3" in the database is inconsistent, then an update message request will be triggered, and the update message request can modify the mapping relationship in the memory storage.
[0129] (4) Updating the mapping relationship in the memory storage that is inconsistent with the mapping relationship in the database to be consistent with the mapping relationship in the database.
[0130] For example, the mapping relationship between "Entertainment" = "4" in the memory storage and "Entertainment" = "3" in the database is inconsistent. Then, "Entertainment" = "4" in the memory storage is modified to "Entertainment" = "3" so that the corresponding mapping relationship in the memory storage and the database is consistent.
[0131] See also Figure 3 , Figure 3 It is a schematic diagram of the operation logic when the server in the embodiment of the present invention performs reconciliation. The server in the embodiment of the present invention includes a reconciliation module, a database, a memory storage, an unmatched database, a message queue and a label update module. The reconciliation module can generate a first reconciliation instruction according to a preset first scheduled reconciliation time, and the first reconciliation instruction instructs the database and the memory storage to reconcile. First, traverse the mapping relationship set in the database, and then query the mapping relationship set in the memory storage. If the mapping relationship set in the database does not match the corresponding mapping relationship in the memory storage, the unmatched mapping relationship is stored in the unmatched database, and the message queue is notified to update the message request at the same time. After the label update module consumes the update message request, it updates the mapping relationship in the memory storage to be consistent with the mapping relationship in the database.
[0132] The present invention realizes a tag management method with a reconciliation function, which ensures the data consistency between storages at all levels after a large number of addition, deletion, modification and query operations on tag mapping relationships.
[0133] 103. Receive a tag management operation request, where the tag management operation request indicates the type of tag management operation that requires tag management.
[0134] It should be noted that the tag management operation request may include operation requests such as adding, querying, updating, and deleting tags. The tag management operation request may come from the client or be an automatically generated tag management operation request by the processor. For example, automatic reconciliation, automatic update, etc. Through the tag management operation request, corresponding type of management operations on the tags can be determined.
[0135] 104. Perform a management operation on the set of mapping relationships according to the tag operation type.
[0136] It should be noted that corresponding management operations are performed on the set of mapping relationships according to the tag management operation type.
[0137] For example, when a tag addition management operation request is received, a tag and its corresponding tag identifier are added to the set of mapping relationships. Also, for example, when a tag deletion management operation request is received, the tag and its corresponding tag identifier are deleted from the set of mapping relationships.
[0138] Among them, in some embodiments, "receiving a tag management operation request, where the tag management operation request indicates the type of tag management operation that requires tag management" specifically includes the steps:
[0139] (1) The management operation request is a query request, and according to the query request, the type of tag management operation that requires tag management is a query operation.
[0140] It should be noted that the query operation can be to perform a query operation by inputting a tag or by inputting a tag identifier.
[0141] It can be understood that through the query operation, a query result can be obtained, and content analysis can be performed on the tags according to the query result.
[0142] For example, the user can analyze the content corresponding to the tag through the query result. It should be noted that in the embodiments of the present invention, the user can be a content analysis team or a machine. The user in the embodiments of the present invention can be understood in a broad sense.
[0143] (2) The performing a management operation on the set of mapping relationships according to the tag operation type includes:
[0144] 2.1 Obtain the target tag or target tag identifier associated in the query request.
[0145] It should be noted that the target tag or target identifier is the content input by the user, and a query request is made through the input content.
[0146] For example, if the content input by the user is "Sports", then the target label is "Sports". If the content input by the user is "1", then the target label is identified as "1".
[0147] 2.2 Query the tags corresponding to the target label identifier in the offline file library and the cloud storage according to the target label identifier.
[0148] It should be noted that when the user inputs the target label identifier, compare the target label identifier with the label identifiers in the mapping relationship set in the offline file library and the cloud storage. If they match, output the tag corresponding to the target label identifier.
[0149] For example, if the user inputs "1", and if "1" exists in the offline file library and the cloud storage, then according to the mapping relationship, output "Sports" as the output result. If the user inputs "Sports", and if "Sports" exists in the offline file library and the cloud storage, then output "Sports" as the output result.
[0150] 2.3 Query the tags corresponding to the target label in the offline file library and the cloud storage based on the mapping relationship set according to the target label.
[0151] It should be noted that compare the target label with the labels in the mapping relationship set in the offline file library and the cloud storage. If they match, output the tag corresponding to the target label identifier.
[0152] Of course, if the user inputs "Sports", and if "Sports" exists in the offline file library and the cloud storage, "1" can also be output as the output result.
[0153] Among them, in some embodiments, after "querying the tags corresponding to the target label in the offline file library and the cloud storage based on the mapping relationship set according to the target label", it specifically includes the steps:
[0154] 2.4 If no tag corresponding to the target label identifier or the target label is found in the offline file library and the cloud storage, query the tag corresponding to the target label identifier or the target label in the memory storage.
[0155] It should be noted that when the user inputs the target label identifier or the target label, compare the target label identifier with the label identifiers in the mapping relationship set in the memory storage. If they match, output the tag corresponding to the target label identifier. Or, compare the target label with the labels in the mapping relationship set of the memory storage. If they match, output the tag corresponding to the target label identifier.
[0156] For example, if the user inputs "1" and "1" exists in the memory storage, then according to the mapping relationship, "Sports" is output as the output result. If the user inputs "Sports" and "Sports" exists in the memory storage, then "Sports" is output as the output result.
[0157] Of course, if the user inputs "Sports" and "Sports" exists in the memory storage, "1" can also be output as the output result.
[0158] Please refer to Figure 4 , Figure 4 which is the operation logic block diagram of the server query operation in the embodiments of the present invention. Among them, the server in the embodiments of the present invention further includes a query interface, an offline file library, a cloud storage, an upload module, a memory storage, a database, and a cache memory. The mapping relationship set in the database is regularly uploaded to the offline file library and the cloud storage through the upload module. The user inputs a target tag or a target tag identifier at the query interface. According to the target tag identifier or the target tag, the corresponding tag to the target tag identifier or the target tag is queried in the offline file library and the cloud storage. If no corresponding tag to the target tag identifier or the target tag is found in the offline file library and the cloud storage, then the corresponding tag to the target tag identifier or the target tag is queried in the memory storage and the cache memory.
[0159] It can be understood that the embodiments of the present invention provide multiple query methods and multiple query paths. In this way, a large amount of mapping relationship sets can be stored. At the same time, it can also support the ability of high-concurrency query of tag mapping relationships.
[0160] Among them, in some embodiments, after "querying the corresponding tag to the target tag identifier or the target tag in the memory storage", it specifically includes the steps:
[0161] (1) If no corresponding tag to the target tag identifier or the target tag is found in the memory storage, then a null value is stored as the query result of the target tag identifier or the target tag in the cache folder.
[0162] It should be noted that when no corresponding tag to the target tag identifier or the target tag is found in the memory storage, a null value is cached as the result of the target tag identifier or the target tag. In this way, when querying the same target tag identifier or target tag, a null value is returned, which will not cause penetration pressure on the backend distributed memory storage.
[0163] (2) The cache folder is cleared according to the preset cleaning time.
[0164] It should be noted that the preset cleaning time can be set. For example, the preset cleaning time can be 1 minute, 1 hour, or 24 hours. In the implementation of the present invention, the specific duration of the preset cleaning time is not limited.
[0165] It can be understood that cleaning the cache folder regularly can ensure the data consistency in the cache folder and the memory storage in real time, and avoid incorrect results.
[0166] Among them, in some embodiments, the "tag management method" specifically further includes the steps:
[0167] (1) Obtain the number of times the tags in the database are used within the preset time.
[0168] It should be noted that the preset time can be set. For example, the preset time can be 1 minute, 1 hour, or 24 hours. In the implementation of the present invention, the specific duration of the preset time is not limited.
[0169] For example, obtain the number of times the tags in the database are read within 24 hours.
[0170] (2) Identify the tags with the number of times the tags in the database are used less than the first preset threshold as low-quality tags.
[0171] It should be noted that the first preset threshold can be set. For example, the first preset threshold can be set to 1 time, 2 times, 3 times, etc. If the number of times the tags in the database are used is less than the first preset threshold within the preset time, it is identified as a low-quality tag.
[0172] For example, within 24 hours, if the number of times the tags in the database are used is less than three times, they are determined as low-quality tags.
[0173] (3) Delete the low-quality tags in the memory storage and the database.
[0174] It should be noted that the low-quality tags in the database and the memory storage are deleted simultaneously.
[0175] It can be understood that as the storage space occupied by the mapping relationship set increases, especially when the content of multiple applications is collected, it is easy to cause the storage expansion of the tag mapping relationship. Regularly cleaning out the tags to be eliminated can reduce the data expansion.
[0176] Among them, in some embodiments, before "receiving the tag management operation request", it specifically includes the steps:
[0177] (1) Obtain the input content of the client.
[0178] It should be noted that the content input by the client is related to tags.
[0179] For example, the input is "Sports include" or "Music is", etc.
[0180] (2) Perform word segmentation on the input content to obtain target keywords.
[0181] It should be noted that the input content is segmented to obtain target keywords.
[0182] For example, when the input is "Sports include", after word segmentation, the target keyword "Sports" is obtained.
[0183] (3) Match the target keyword with the tags in the memory storage. If the target keyword matches the tags in the memory storage, a first matching result is obtained.
[0184] It should be noted that the target keyword is matched with the tags in the memory storage. If there is a tag in the memory storage that matches "Sports" as "Sports", then "Sports" is output as the first matching result.
[0185] (4) Match the target keyword with the tags in the high-quality tag index library. If the target keyword matches the tags in the high-quality index library, a second matching result is obtained, where the high-quality index library is the tags that have been used more than a second preset threshold in the database within a second preset time.
[0186] It should be noted that the high-quality index library is the tags that have been used more than a second preset threshold in the database within a second preset time. The second preset time can be set, and the second preset threshold can also be set. Here, it will not be elaborated too much.
[0187] For example, within 24 hours, all the tags that have been used more than five times in the database are stored in the high-quality index library.
[0188] Another example is to match the target keyword with the tags in the high-quality index library. If there are tags in the high-quality index library that match "Sports" as "Sports", "Sports lottery", and "Adult sports", then "Sports", "Sports lottery", and "Adult sports" are output as the second matching result.
[0189] (5) Match the target keyword with the tags in multiple offline index libraries. If the target keyword matches the tags in the offline index library, a third matching result is obtained, where the offline index library is a set of offline stored tags, and the offline index library includes at least two.
[0190] It should be noted that the offline index library is a set of tags stored offline by splitting the database into multiple local databases.
[0191] Since the target keyword is matched with multiple offline index libraries, multiple third matching results may be obtained.
[0192] For example, match the target keyword with the tags in the offline index library. If there are tags in the offline index library that match "sports" such as "sports skills" and "passionate sports", then "sports skills" and "passionate sports" are output as the third matching results.
[0193] (6) Sort the first matching result, the second matching result, and the third matching result in order of priority to obtain the search result.
[0194] For example, the first matching result is "sports", the second matching results are "sports", "sports lottery", "adult sports", and the third matching results are "sports skills", "passionate sports", etc. Arrange the first matching result, the second matching result, and the third matching result in order, and then remove the duplicate matching results among the first matching result, the second matching result, and the third matching result to obtain the search results of "sports", "sports lottery", "adult sports", "sports skills", and "passionate sports".
[0195] (7) Display the search result.
[0196] It should be noted that the search result is displayed in the input interface for the user to confirm.
[0197] For example, display the search results of "sports", "sports lottery", "adult sports", "sports skills", and "passionate sports" below the input content in the input interface.
[0198] Please refer to Figure 5 , Figure 5 which is the logic framework diagram of the server fuzzy search in the embodiment of the present invention. Among them, the server includes a query interface, an offline index library, a high-quality index library, and in-memory storage. Enter the tag content in the query interface, and after word segmentation processing, obtain the target keyword. Match the target keyword with the in-memory storage respectively to obtain the first matching result, match the target keyword with the high-quality index library to obtain the second matching result, and match the target keyword with the offline index library to obtain the third matching result. After sorting the first matching result, the second matching result, and the third matching result, remove the same matching results to obtain the search result. Display the search result in the query interface.
[0199] It can be understood that it provides the fuzzy search ability for query tags and the function of associating with the query results of tags, which is convenient for users to query.
[0200] Among them, in some embodiments, before receiving the tag management operation request, it specifically includes the steps:
[0201] (1) Establish an inverted index of tags in the offline index library.
[0202] It should be noted that the inverted index originates from the need to find records according to the values of attributes in actual applications. Each item in this index table includes an attribute value and the addresses of each record with this attribute value. The position of the record is determined by the attribute value.
[0203] (2) Match the target keyword with the inverted index. If the target keyword matches the inverted index, a third matching result is obtained.
[0204] It should be noted that matching the target keyword with the inverted index can quickly obtain the matching result and improve the matching efficiency.
[0205] Among them, in some embodiments, before receiving the tag management operation request, it specifically includes the steps:
[0206] (1) Obtain an offline index update request.
[0207] It should be noted that the offline index update request can trigger the database to upload the mapping relationship set to the offline index library.
[0208] (2) Upload the mapping relationship set in the database to the offline index library according to the offline index update request, where the offline index library includes at least one.
[0209] It can be understood that the mapping relationship set in the database is uploaded to multiple offline index libraries. This can relieve the storage pressure of each offline index library.
[0210] Among them, in some embodiments, the "tag management method" specifically includes the steps:
[0211] (1) Generate a second reconciliation instruction according to the second preset timing reconciliation time.
[0212] It should be noted that the preset second reconciliation time can be set. For example, the preset second reconciliation time is 1 minute, the preset second reconciliation time is 1 hour, or the preset second reconciliation time is 24 hours. In the implementation of the present invention, the preset second reconciliation time is not specifically limited.
[0213] Among them, the second reconciliation instruction is two trigger signals, and the second reconciliation instruction can trigger the offline index library and the database to reconcile.
[0214] For example, generate a second reconciliation instruction every 1 minute, and the second reconciliation instruction triggers the off-line index library and the database to perform reconciliation.
[0215] (2) Determine whether each set of mapping relationships in the off-line index library is consistent with the corresponding mapping relationships in the database according to the second reconciliation instruction.
[0216] For example, the set of mapping relationships included in the off-line index library is "Sports" = "1", "Music" = "2", "Entertainment" = "3". The set of mapping relationships included in the database is "Sports" = "1", "Music" = "2", "Entertainment" = "3".
[0217] Then, compare "Sports" = "1" in the off-line index library with "Sports" = "1" in the database, "Music" = "2" in the off-line index library with "Music" = "2" in the database, and "Entertainment" = "3" in the off-line index library with "Entertainment" = "3" in the database. Through comparison, obtain the result of whether each set of mapping relationships in the off-line index library is consistent with the corresponding mapping relationships in the database.
[0218] (3) If the mapping relationships in the off-line index library and the database are inconsistent, update the mapping relationships in the off-line index library that are inconsistent with those in the database to be consistent with the mapping relationships in the database.
[0219] For example, compare "Sports" = "1" in the off-line index library with "Sports" = "1" in the database, "Music" = "2" in the off-line index library with "Music" = "2" in the database, and "Entertainment" = "4" in the off-line index with "Entertainment" = "3" in the database. After comparison, it is concluded that the mapping relationship of "Entertainment" = "4" in the off-line index and "Entertainment" = "3" in the database is inconsistent. Then, a message request for update will be triggered, and the message request for update can update the mapping relationships of the off-line index library.
[0220] For example, the mapping relationship of "Entertainment" = "4" in the off-line index library and "Entertainment" = "3" in the database is inconsistent. Then, modify "Entertainment" = "4" in the off-line index library to "Entertainment" = "3", so that the corresponding mapping relationships in the off-line index library and the database are consistent.
[0221] Please refer to Figure 6 , Figure 6It is a logic framework diagram for updating the offline index library of the server in an embodiment of the present invention. Among them, the server includes a label management service module, a message queue, an offline index update, and an offline index library. The label management module issues an offline index update request. The label management module notifies the message queue. The offline index update consumes the message of the offline update request in the message queue, so that the connection index library is updated. At the same time, if the mapping relationship in the offline index library is inconsistent with the corresponding mapping relationship in the database, the mapping relationship in the offline index library is updated.
[0222] Among them, in some embodiments, the "receiving a label management operation request, and according to the add label operation request, indicating that the label management operation type that needs label management is the label management operation type" specifically includes the steps of:
[0223] (1) The label management operation request is an add label operation request, and according to the add label operation request, the label management operation type that needs label management is the label addition operation.
[0224] It should be noted that the label addition operation is to add a new label and the label identifier corresponding to the label in the mapping relationship set.
[0225] (2) The managing operation on the mapping relationship set according to the label operation type includes:
[0226] 2.1 Trigger the label addition operation in the message queue according to the add label operation request.
[0227] It should be noted that multiple operation type requests are cached in the message queue, such as label addition operation, label deletion operation, etc. The add label operation request triggers the operation type request cached in the message queue. In this way, concurrent operations can be carried out simultaneously.
[0228] 2.2 Obtain the target label associated with the label addition request.
[0229] It should be noted that the target label is the label received together with the label addition request.
[0230] For example, if the label associated with the label addition request received is "sports", then "sports" is the target label.
[0231] 2.3 Add the target label and the target identifier corresponding to the target label to the mapping relationship set.
[0232] It should be noted that after the target label is configured with the target label identifier, the target label and the target identifier corresponding to the target label are added to the mapping relationship set.
[0233] For example, if the identifier of the "Sports" configuration is "5", then add "Sports" = "5" to the mapping relationship set.
[0234] Please refer to Figure 7 , Figure 7 which is the logical framework diagram for label addition in an embodiment of the present invention. Among them, the server includes a label management service module, a memory storage, a message queue, a database, and label update. After the label management service module receives the label from the client, the memory storage configures a unique label identifier for the label. The label management service module stores the label and the label identifier together in the database. The label management service module notifies the message queue of the label addition request. The label update module consumes the label addition request in the message queue, and the label update module causes the memory storage to add the label and the label identifier.
[0235] Embodiments of the present invention can collect labels of content in at least two applications to obtain a label set; determine a current label that needs to be configured with an identifier from the label set. When there is no configured identifier label that is the same as the current label, configure a unique label identifier for the current label, and establish a mapping relationship between the current label and the label identifier to obtain a mapping relationship set. Receive a label management operation request, and the label management operation request determines the label management operation type, and perform a management operation on the mapping relationship set according to the label operation type. Embodiments of the present invention configure a unique label identifier for labels of content in multiple different applications, and perform unified management of the labels according to different received management operation requests, so as to realize the management of labels of multiple application products and avoid resource waste.
[0236] As Figure 8 shown, another label management method is provided. This label management method can be executed in a server, and the specific process can be as follows:
[0237] 201. The server collects labels of content in at least two applications to obtain a label set; determine a current label that needs to be configured with an identifier from the label set.
[0238] It should be noted that the server can collect the tags of the content in the two applications of Tian Tian Kuai Bao and Jin Ri Tou Tiao. Determine the current tags that need to be configured with identification from the two applications of Tian Tian Kuai Bao and Jin Ri Tou Tiao. For example, the content in Tian Tian Kuai Bao is that Country X launched an attack on Country XX, resulting in the death of General X of Country XX. In this content, the tags can be "Country X", "Country XX", "attack", "General X", etc. In Jin Ri Tou Tiao, Country X and Country XX enter the Basketball World Cup. In this content, the tags can be "basketball", "World Cup", "Country XXX", "Country XXXX". Then, "Country X", "Country XX", "attack", "General X", "basketball", "World Cup", "Country XXX", "Country XXXX" can form a tag set. Determine the current tags that need to be configured with tags from this tag set. The current tags can be determined in the order of the tags collected. For example, if the first collected tag is "attack", then determine "attack" as the current tag.
[0239] 202. The server determines that the current tag is not configured with a tag identification, configures a tag identification for the current tag, and establishes a mapping relationship between the current tag and the tag identification to obtain a mapping relationship set.
[0240] It should be noted that among them, when the server determines that there is a tag that has been configured with an identification tag in the current tag box, the current tag will not be configured with a unique tag identification. Among them, the tag identification refers to the character corresponding to the tag. A one-to-one mapping relationship is established between the tag and the tag identification, and multiple mapping relationship sets can form a mapping relationship set.
[0241] For example, when "Country X" has been configured with the tag identification "1", when "Country X" appears again as the current tag, "Country X" will not be configured with a tag identification again. When "attack" is not configured with a tag identification, then a unique tag identification "2" is configured for "Country XX". "Country XX" and "2" form a one-to-one mapping relationship. At the same time, when multiple tags are configured with tag identifications and multiple pairs of mapping relationships are established, a mapping relationship set can be formed. This method is used to ensure that each tag corresponds to a unique tag identification, so as to facilitate the unified management of tags.
[0242] 203. The server determines the mapping relationship corresponding to the hash value.
[0243] It should be noted that the server can map each tag in the mapping relationship set to a hash value through a hash function. The hash value is a string of a fixed length. It can be understood that the hash function has been clearly recorded in relevant materials, and the hash function is not elaborated too much in the embodiments of the present invention.
[0244] 204. The server evenly stores the mapping relationship set into the database according to the hash value.
[0245] It should be noted that the database includes multiple sub-databases, and each sub-database includes multiple lists. Each set of mapping relationships in the mapping relationship set is stored in each list of the database according to the corresponding mapping relationship of the hash value.
[0246] For example, the hash value of "Country X" is 01, the hash value of "attack" is 010, and the hash value of "General X" is 001. 01, 101, and 001 are evenly distributed into different lists of the database.
[0247] 205. The server stores the mapping relationship set in the memory storage in a distributed storage manner.
[0248] It should be noted that distributed storage means that the mapping relationship set is dispersed and stored in the memory of multiple independent computer devices.
[0249] For example, the mapping relationship set includes "Country X" = "1", "Country XX" = "2", "attack" = "3", "General X" = "4", "basketball" = "5", "World Cup" = "6", "Country XXX" = "7", "Country XXXX" = "8". Four independent computers are set up. The first computer stores "Country X" = "1" and "Country XX" = "2". The second computer stores "attack" = "3" and "General X" = "4". The third computer stores "basketball" = "5" and "World Cup" = "6". The fourth computer stores "Country XXX" = "7" and "Country XXXX" = "8". The mapping relationship set is respectively stored in the internal storage of the four independent computers. This can increase the storage space and support expansion.
[0250] 206. The server uploads the mapping relationship set in the database to the offline file library and the cloud storage according to the preset upload time interval.
[0251] It should be noted that the preset upload time can be set. For example, the preset upload time is 1 minute, the preset upload time is 1 hour, or the preset upload time is 24 hours.
[0252] For example, every 1 minute, the mapping relationship set of "Country X" = "1", "Country XX" = "2", "attack" = "3", "General X" = "4", "basketball" = "5", "World Cup" = "6", "Country XXX" = "7", "Country XXXX" = "8" in the database is uploaded to the offline file library and the cloud storage.
[0253] 207. The server obtains the target tag or target tag identifier associated in the query request.
[0254] It should be noted that the target label or target identifier is the content input by the user, and a query request is made based on the input content.
[0255] For example, if the content input by the user is "Country X", then the target label is "Sports". If the content input by the user is "Country XX", then the target label identifier is "2".
[0256] 208. The server queries the labels corresponding to the target label identifier in the offline file library and the cloud storage.
[0257] It should be noted that when the user inputs the target label identifier or target label, the target label identifier is compared with the label identifiers in the mapping relationship set in the offline file library and the cloud storage. If they match, the label corresponding to the target label identifier is output.
[0258] For example, if the user inputs "1", and if "1" exists in the offline file library and the cloud storage, then according to the mapping relationship, "Country X" is output as the output result.
[0259] 209. The server queries the labels corresponding to the target label in the offline file library and the cloud storage based on the mapping relationship set.
[0260] It should be noted that the target label is compared with the labels in the mapping relationship set in the offline file library and the cloud storage. If they match, the label corresponding to the target label identifier is output.
[0261] If the user inputs "Basketball", and if "Basketball" exists in the offline file library and the cloud storage, then "Basketball" is output as the output result.
[0262] 210. The server determines that if no label corresponding to the target label identifier or target label is found in the offline file library and the cloud storage, it queries the label corresponding to the target label identifier or target label in the memory storage.
[0263] It should be noted that when the user inputs the target label identifier or target label, and no label corresponding to the target label identifier or target label is found in the offline file library and the cloud storage, the target label identifier is compared with the label identifiers in the mapping relationship set in the memory storage. If they match, the label corresponding to the target label identifier is output. Or the target label is compared with the labels in the mapping relationship set of the memory storage. If they match, the label corresponding to the target label identifier is output.
[0264] For example, if the user inputs "1" and no tag corresponding to the target tag identifier or target tag is found in the offline file library and the cloud storage, then a match is made in the memory storage. If "1" exists in the memory storage, then according to the mapping relationship, "Country X" is output as the output result. If the user inputs "basketball" and "basketball" exists in the memory storage, then "basketball" is output as the output result.
[0265] It can be understood that after the output result, content analysis can be performed based on the output tag. For example, content analysis is performed on "Country X" output by Tian Tian Express and content analysis is performed on "basketball" output by Toutiao. Also, since the applications that can be collected are not limited to two, therefore, the method of the embodiment of the present invention can actually collect tags of content in multiple different applications, perform a unified query on the tags of content in multiple different applications, thereby saving resources.
[0266] The embodiment of the present invention can collect tags of content in at least two applications to obtain a tag set; determine a current tag that needs to be configured with an identifier from the tag set. When the current tag is not configured with a tag identifier, configure a tag identifier for the current tag and establish a mapping relationship between the current tag and the tag identifier to obtain a mapping relationship set. Receive a tag query operation request, and the server queries for a tag corresponding to the target tag identifier in the offline file library and the cloud storage according to the target tag identifier or target tag. If the server does not find a tag corresponding to the target tag identifier or target tag in the offline file library and the cloud storage, then it queries for a tag corresponding to the target tag identifier or target tag in the memory storage. The embodiment of the present invention configures a tag identifier for tags of content in multiple different applications and performs a unified query on the tags according to the received query request, thereby realizing the query of tags of multiple application products in one server, which improves the query efficiency.
[0267] To facilitate better implementation of the tag management method provided by the embodiment of the present invention, the embodiment of the present invention also provides a device (referred to as a management device) based on the above tag management method. The meanings of the nouns are the same as those in the above tag management method, and the specific implementation details can refer to the description in the method embodiment.
[0268] Please refer to Figure 9 , Figure 9 which is a structural schematic diagram of the tag management device provided by the embodiment of the present invention. The tag management device may include a collection unit 401, a creation unit 402, a reception unit 403, and an execution unit 404, specifically as follows:
[0269] The acquisition unit 401 is configured to acquire tags of content in at least two applications to obtain a tag set; and determine a current tag that needs to be configured with an identifier from the tag set.
[0270] The establishment unit 402 is configured to, when the current tag is not configured with a tag identifier, configure a tag identifier for the current tag, and establish a mapping relationship between the current tag and the tag identifier to obtain a mapping relationship set.
[0271] The receiving unit 403 is configured to receive a tag management operation request, where the tag management operation request indicates a tag management operation type that requires tag management.
[0272] The execution unit 404 is configured to perform a management operation on the mapping relationship set according to the tag operation type.
[0273] Optionally, in some embodiments of the present invention, it further includes:
[0274] The determination unit is configured to determine the mapping relationship corresponding to the hash value
[0275] The distribution unit is configured to evenly store the mapping relationship set into a database according to the hash value;
[0276] The storage unit is configured to store the mapping relationship set into a memory storage in a distributed storage manner;
[0277] The upload unit is configured to upload the mapping relationship set in the database to an offline file library and a cloud storage according to a preset upload time interval
[0278] Optionally, in some embodiments of the present invention, it further includes a reconciliation unit, and the reconciliation unit is specifically configured to:
[0279] Generate a first reconciliation instruction according to a preset first timed reconciliation time;
[0280] Determine whether each set of mapping relationships in the memory storage is consistent with the corresponding mapping relationships in the database according to the first reconciliation instruction;
[0281] If the mapping relationships in the memory storage and the database are inconsistent;
[0282] Update the mapping relationships in the memory storage that are inconsistent with those in the database to be consistent with the mapping relationships in the database.
[0283] Optionally, in some embodiments of the present invention,
[0284] The receiving unit 403 is specifically configured to: when the management operation request is a query request, the tag management operation type that requires tag management indicated by the query request is a query operation.
[0285] The execution unit 404 is specifically configured to: obtain the target tag or target tag identifier associated in the query request;
[0286] Query for the tag corresponding to the target tag identifier in the offline file library and the cloud memory according to the target tag identifier;
[0287] Query for the tag corresponding to the target tag in the offline file library and the cloud memory based on the mapping relationship set according to the target tag.
[0288] Optionally, in some embodiments of the present invention, the execution unit is specifically configured to:
[0289] If no tag corresponding to the target tag identifier or target tag is found in the offline file library and the cloud memory, query for the tag corresponding to the target tag identifier or target tag in the memory storage.
[0290] Optionally, in some embodiments of the present invention, it further includes a cleaning unit, and the cleaning unit is specifically configured to:
[0291] If no tag corresponding to the target tag identifier or target tag is found in the memory storage, store the null value as the query result of the target tag identifier or target tag in the cache folder;
[0292] Clean the cache folder according to the preset cleaning time.
[0293] Optionally, in some embodiments of the present invention, it further includes a deletion unit, and the deletion unit is specifically configured to:
[0294] Obtain the usage times of the tags in the database within a preset time;
[0295] Identify the tags with the usage times of the tags in the database less than the first preset threshold as low-quality tags;
[0296] Delete the low-quality tags in the memory storage and the database.
[0297] Optionally, in some embodiments of the present invention, it further includes a fuzzy search unit, and the fuzzy search unit is specifically configured to:
[0298] Obtain the content input by the client;
[0299] Perform word segmentation processing on the input content to obtain target keywords;
[0300] Match the target keywords with the tags in the memory storage. If the target keywords match the tags in the memory storage, obtain the first matching result;
[0301] Match the target keyword with the tags in the high-quality tag index library. If the target keyword matches the tags in the high-quality index library, a second matching result is obtained. Among them, the high-quality index library is the tags that have been used more than a second preset threshold in the database within a second preset time;
[0302] Match the target keyword with the tags in the offline index library. If the target keyword matches the tags in the offline index library, a third matching result is obtained. Among them, the offline index library is a set of tags obtained by dividing the database into multiple local databases and storing them offline;
[0303] Sort the first matching result, the second matching result, and the third matching result in order of priority in sequence, and remove duplicate matching results to obtain a search query result;
[0304] Display the query result.
[0305] Optionally, in some embodiments of the present invention, it further includes a fuzzy search unit, and the fuzzy search unit is specifically used for:
[0306] Establish an inverted index of tags in the offline index library;
[0307] Match the target keyword with the inverted index. If the target keyword matches the inverted index, a third matching result is obtained.
[0308] Optionally, in some embodiments of the present invention, it further includes an offline index update unit, and the offline index update unit is specifically used for:
[0309] Obtain an offline index update request;
[0310] Upload the set of mapping relationships in the database to the offline index library according to the offline index update request, where the offline index library includes at least one.
[0311] Optionally, in some embodiments of the present invention, it further includes a second reconciliation unit, and the second reconciliation unit is specifically used for:
[0312] Generate a second reconciliation instruction according to a second preset regular reconciliation time;
[0313] Determine whether each set of mapping relationships in the offline index library is consistent with the corresponding mapping relationships in the database according to the second reconciliation instruction;
[0314] If the mapping relationships in the offline index library and the database are inconsistent;
[0315] Update the mapping relationships in the offline index library that are inconsistent with those in the database to be consistent with the mapping relationships in the database.
[0316] Optionally, in some embodiments of the present invention,
[0317] The receiving unit is specifically configured to: when the label management operation request is an add label operation request, the label management operation type that needs label management according to the add label operation request is a label addition operation;
[0318] The execution unit is specifically configured to: trigger a label addition operation in the message queue according to the add label operation request;
[0319] Obtain the target label associated in the label addition request;
[0320] Add the target label and the target identifier corresponding to the target label to the mapping relationship set.
[0321] The label management device of the present invention may include an acquisition unit 401, a creation unit 402, a receiving unit 403, and an execution unit 404. The acquisition unit 401 can acquire the labels of the content in at least two applications to obtain a label set, and determine the current label that needs to be configured with an identifier from the label set. When the current label is not configured with a label identifier, the creation unit 402 configures a label identifier for the current label and establishes a mapping relationship between the current label and the label identifier to obtain a mapping relationship set. The receiving unit 403 receives a label management operation request, and the label management operation request indicates the label management operation type that needs label management. The execution unit 404 performs a management operation on the mapping relationship set according to the label operation type. In the embodiments of the present invention, a label identifier is configured for the labels of the content in multiple different applications, and according to the received different management operation requests, the labels are uniformly managed, so as to realize the management of the labels of multiple application products and avoid resource waste.
[0322] Correspondingly, an embodiment of the present invention further provides a server, as Figure 10 shown. The server may include a radio frequency (RF) circuit 601, a memory 602 including one or more computer-readable storage media, an input unit 603, a display unit 604, a sensor 605, an audio circuit 606, a wireless fidelity (WiFi) module 607, a processor 608 including one or more processing cores, and a power supply 609 and other components. Those skilled in the art can understand that Figure 10 the structure of the electronic device shown in does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine some components, or different component arrangements. Among them:
[0323] The RF circuit 601 can be used for receiving and transmitting information or signals during a call. Specifically, after receiving the downlink information from the base station, it is handed over to one or more processors 608 for processing. Additionally, the data related to the uplink is sent to the base station. Generally, the RF circuit 601 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, etc. In addition, the RF circuit 601 can also communicate with the network and other devices via wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
[0324] The memory 602 can be used to store software programs and modules. The processor 608 executes various functional applications and data processing by running the software programs and modules stored in the memory 602. The memory 602 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, applications required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the electronic device (such as audio data, a phone book, etc.). In addition, the memory 602 can include high-speed random access memory and can also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. Correspondingly, the memory 602 can also include a memory controller to provide access to the memory 602 by the processor 608 and the input unit 603.
[0325] The input unit 603 can be used to receive input numerical or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. Specifically, in a specific embodiment, the input unit 603 may include a touch-sensitive surface and other input devices. The touch-sensitive surface, also known as a touch display screen or a touchpad, can collect touch operations of a user thereon or nearby (such as operations of the user using a finger, a stylus or any suitable object or accessory on or near the touch-sensitive surface), and drive corresponding connection devices according to a preset program. Optionally, the touch-sensitive surface may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch orientation of the user, detects signals brought by the touch operation, and transmits the signals to the touch controller; the touch controller receives touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 608, and can receive commands sent by the processor 608 and execute them. In addition, various types such as resistive, capacitive, infrared, and surface acoustic wave can be used to implement the touch-sensitive surface. In addition to the touch-sensitive surface, the input unit 603 may further include other input devices. Specifically, the other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc.
[0326] The display unit 604 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, videos, and any combination thereof. The display unit 604 may include a display panel. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch-sensitive surface may cover the display panel. After the touch-sensitive surface detects a touch operation thereon or nearby, it is transmitted to the processor 608 to determine the type of touch event. Subsequently, the processor 608 provides corresponding visual output on the display panel according to the type of touch event. Although in Figure 10 the touch-sensitive surface and the display panel are implemented as two independent components to achieve input and input functions, in some embodiments, the touch-sensitive surface and the display panel can be integrated to achieve input and output functions.
[0327] The server may also include at least one sensor 605, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. Among them, the ambient light sensor can adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor can turn off the display panel and / or the backlight when the electronic device is moved to the ear. As a kind of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in all directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity, and can be used in applications for identifying the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. As for other sensors that the electronic device can also be configured with, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be elaborated here.
[0328] The audio circuit 606, the speaker, and the microphone can provide an audio interface between the user and the electronic device. The audio circuit 606 can transmit the electrical signal converted from the received audio data to the speaker, and the speaker converts it into a sound signal for output. On the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 606 and then converted into audio data. After the audio data is output to the processor 608 for processing, it is sent to another electronic device, for example, via the RF circuit 601, or the audio data is output to the memory 602 for further processing. The audio circuit 606 may also include an earphone jack to provide communication between the peripheral earphone and the electronic device.
[0329] WiFi belongs to short - range wireless transmission technology. The electronic device can help users send and receive emails, browse the web, and access streaming media through the WiFi module 607. It provides users with wireless broadband Internet access. Although Figure 10 the WiFi module 607 is shown, it can be understood that it does not belong to the essential components of the electronic device and can be omitted completely within the scope of not changing the essence of the invention according to needs.
[0330] The processor 608 is the control center of the server. It connects various parts of the entire mobile phone using various interfaces and lines. By running or executing the software programs and / or modules stored in the memory 602, and by calling the data stored in the memory 602, it executes various functions of the electronic device and processes data, thereby performing an overall detection of the mobile phone. Optionally, the processor 608 may include one or more processing cores. Preferably, the processor 608 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above - mentioned modem processor may not be integrated into the processor 608 either.
[0331] The server further includes a power supply 609 (such as a battery) for powering each component. Preferably, the power supply can be logically connected to the processor 608 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 609 may further include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, a power status indicator, etc.
[0332] Although not shown, the server may further include a camera, a Bluetooth module, etc., which will not be elaborated here. Specifically, in this embodiment, the processor 608 in the server will load the executable files corresponding to the processes of one or more application programs into the memory 602 according to the following instructions, and the processor 608 will run the application programs stored in the memory 602 to implement various functions:
[0333] Collect tags of content in at least two applications to obtain a tag set; determine a current tag that needs to be configured with an identifier from the tag set, when the current tag is not configured with a tag identifier, configure a tag identifier for the current tag, and establish a mapping relationship between the current tag and the tag identifier to obtain a mapping relationship set, receive a tag management operation request, the tag management operation request indicates the type of tag management operation that needs to be performed on the tags, and perform a management operation on the mapping relationship set according to the tag operation type.
[0334] In an embodiment of the present invention, tags of content in at least two applications can be collected to obtain a tag set; determine a current tag that needs to be configured with an identifier from the tag set, when the current tag is not configured with a tag identifier, configure a tag identifier for the current tag, and establish a mapping relationship between the current tag and the tag identifier to obtain a mapping relationship set, receive a tag management operation request, the tag management operation request indicates the type of tag management operation that needs to be performed on the tags, and perform a management operation on the mapping relationship set according to the tag operation type. In the embodiment of the present invention, a unique tag identifier is configured for the tags of content in multiple different applications, and unified management of the tags is performed according to the received different management operation requests, so as to realize the management of tags of multiple application products and avoid waste of resources.
[0335] Those of ordinary skill in the art can understand that all or part of the steps in the above various methods can be completed by instructions, or by controlling relevant hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0336] To this end, an embodiment of the present invention provides a computer storage medium, which stores multiple instructions that can be loaded by a processor to execute the steps in any of the tag management methods provided by the embodiments of the present invention. For example, the instructions can execute the following steps:
[0337] Collect tags of content in at least two applications to obtain a tag set; determine a current tag that needs to be configured with an identifier from the tag set. When the current tag is not configured with a tag identifier, configure a tag identifier for the current tag and establish a mapping relationship between the current tag and the tag identifier to obtain a mapping relationship set. Receive a tag management operation request, where the tag management operation request indicates the type of tag management operation that requires tag management, and perform a management operation on the mapping relationship set according to the tag operation type.
[0338] For the specific implementation of each of the above operations, reference can be made to the previous embodiments, which will not be elaborated here.
[0339] Among them, the storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), a magnetic disk, an optical disc, etc.
[0340] Since the instructions stored in the storage medium can execute the steps in any of the tag management methods provided by the embodiments of the present invention, the beneficial effects that can be achieved by any of the tag management methods provided by the embodiments of the present invention can be realized. For details, refer to the previous embodiments, which will not be elaborated here.
[0341] The above has introduced in detail the tag management method, tag management device, server, and computer storage medium provided by the embodiments of the present invention. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A label management method, characterized in that, Including: Collecting tags of content in at least two applications to obtain a tag set; Determining a current tag that needs to be configured with an identifier from the tag set, where the at least two applications are different applications; When the current tag is not configured with a tag identifier, configuring a tag identifier for the current tag and establishing a mapping relationship between the current tag and the tag identifier to obtain a mapping relationship set, where the tag identifier is unique; Obtaining client input content; Performing word segmentation on the input content to obtain target keywords; Matching the target keywords with tags stored in memory. If the target keywords match the tags in memory, obtaining a first matching result; the first matching result is the target keywords themselves; Matching the target keywords with tags in a high-quality tag index library. If the target keywords match the tags in the high-quality index library, obtaining a second matching result, where the high-quality index library is a tag that has been used more than a second preset threshold in the database within a second preset time; the second matching result is a tag containing the target keywords, and the usage times of the second matching result exceed the second preset threshold; Matching the target keywords with tags in an offline index library. If the target keywords match the tags in the offline index library, obtaining a third matching result, where the offline index library is a set of offline stored tags, and the offline index library includes at least two; the third matching result is a tag containing the target keywords, and the usage times of the third matching result are lower than the usage times of the second matching result; Sorting in sequence according to the priorities of the first matching result, the second matching result, and the third matching result, and removing duplicate matching results to obtain a search result; Displaying the search result; Receiving a tag management operation request, where the tag management operation request indicates the type of tag management operation that needs to be performed on the tag; Performing a management operation on the mapping relationship set according to the type of tag management operation.
2. The label management method according to claim 1, characterized in that, After obtaining the mapping relationship set, including: Determining the mapping relationship corresponding to the hash value, where the hash value is obtained by mapping each tag in the mapping relationship set through a hash function; Uniformly storing the mapping relationship set into the database according to the hash value; Storing the mapping relationship set into memory storage in a distributed storage manner; Uploading the mapping relationship set in the database to an offline file library and a cloud storage according to a preset upload time interval.
3. The label management method according to claim 2, characterized in that, The tag management method further includes: Generating a first reconciliation instruction according to a preset first regular reconciliation time; Determining whether each group of mapping relationships in the memory storage is consistent with the corresponding mapping relationships in the database according to the first reconciliation instruction; If the mapping relationships in the memory storage and the database are inconsistent, updating the mapping relationships in the memory storage that are inconsistent with the database to be consistent with the mapping relationships in the database.
4. The label management method according to claim 2, characterized in that, The receiving the tag management operation request, where the tag management operation request indicates the type of tag management operation that needs to be performed on the tag, includes: The management operation request is a query request, and according to the query request, the type of label management operation that requires label management is a query operation; The managing the mapping relationship set according to the type of label management operation includes: Obtaining the target label or target label identifier associated in the query request; Querying for the label corresponding to the target label identifier in the offline file library and the cloud storage according to the target label identifier; Querying for the label corresponding to the target label in the offline file library and the cloud storage based on the mapping relationship set according to the target label.
5. The label management method according to claim 4, characterized in that, After querying for the label corresponding to the target label in the offline file library and the cloud storage based on the mapping relationship set, it includes: If no label corresponding to the target label identifier or target label is found in the offline file library and the cloud storage, query for the label corresponding to the target label identifier or target label in the memory storage.
6. The label management method according to claim 5, characterized in that After querying for the label corresponding to the target label identifier or target label in the memory storage, it includes: If no label corresponding to the target label identifier or target label is found in the memory storage, store the null value as the query result of the target label identifier or target label in the cache folder; Clean the cache folder according to a preset cleaning time.
7. The label management method according to claim 2, wherein The label management method further includes: Obtaining the number of times a label in the database is used within a preset time; Identifying the labels in the database with the number of times of use less than a first preset threshold as low-quality labels; Deleting the low-quality labels in the memory storage and the database.
8. The label management method according to claim 2, wherein The matching the target keyword with the labels in the offline index library, if the target keyword matches the labels in the offline index library, obtaining a third matching result, includes: Establishing an inverted index of the labels in the offline index library; Matching the target keyword with the inverted index, if the target keyword matches the inverted index, obtaining a third matching result.
9. The label management method according to claim 8, wherein Before establishing the inverted index of the labels in the offline index library, it includes: Obtaining an offline index update request; Uploading the mapping relationship set in the database to the offline index library according to the offline index update request.
10. The label management method according to claim 9, characterized in that The label management method further includes: Generating a second reconciliation instruction according to a second preset timing reconciliation time; Determining whether each set of mapping relationships in the offline index library is consistent with the corresponding mapping relationships in the database according to the second reconciliation instruction; If the mapping relationships in the offline index library and the database are inconsistent, updating the mapping relationships in the offline index library that are inconsistent with those in the database to be consistent with the mapping relationships in the database.
11. The label management method according to claim 1, characterized in that The receiving the label management operation request, according to the add label operation request, indicating the type of label management operation that requires label management is, includes: The label management operation request is an add label operation request, and according to the add label operation request, the type of label management operation that requires label management is a label addition operation; Performing management operations on the set of mapping relationships according to the label management operation type includes: Triggering a label addition operation in the message queue according to the label addition operation request; Obtaining the target label associated in the label addition request; Adding the target label and the target label identifier corresponding to the target label to the set of mapping relationships according to the label addition operation.
12. A label management device, characterized in that, Including: An acquisition unit for acquiring labels of content in at least two applications to obtain a set of labels; Determining a current label that needs to be configured with an identifier from the set of labels, where the at least two applications are different applications; A creation unit for, when the current label is not configured with a label identifier, configuring a label identifier for the current label and establishing a mapping relationship between the current label and the label identifier to obtain a set of mapping relationships, where the label identifier is unique; A receiving unit for receiving a label management operation request, where the label management operation request indicates the label management operation type that requires label management; An execution unit for performing management operations on the set of mapping relationships according to the label management operation type; A fuzzy search unit for: obtaining the content input by the client; performing word segmentation processing on the input content to obtain target keywords; matching the target keywords with the labels in the memory storage, and if the target keywords match the labels in the memory storage, obtaining a first matching result; matching the target keywords with the labels in the high-quality label index library, and if the target keywords match the labels in the high-quality index library, obtaining a second matching result, where the high-quality index library is a label that has been used more than a second preset threshold in the database within a second preset time; matching the target keywords with the labels in the offline index library, and if the target keywords match the labels in the offline index library, obtaining a third matching result, where the offline index library is a set of offline stored labels and the offline index library includes at least two; sorting in sequence according to the priorities of the first matching result, the second matching result, and the third matching result, and removing duplicate matching results to obtain a search result; and displaying the search result.
13. The label management device according to claim 12, wherein Further including: A determination unit for determining the mapping relationship corresponding to the hash value, where the hash value is obtained by mapping each label in the set of mapping relationships through a hash function; A distribution unit for uniformly storing the set of mapping relationships into the database according to the hash value; A storage unit for storing the set of mapping relationships into the memory storage in a distributed storage manner; An upload unit for uploading the set of mapping relationships in the database to the offline file library and the cloud storage according to a preset upload time interval.
14. The label management device according to claim 13, characterized in that Further including a first reconciliation unit, and the first reconciliation unit is specifically used for: Generating a first reconciliation instruction according to a preset first timed reconciliation time; Determining whether each set of mapping relationships in the memory storage is consistent with the corresponding mapping relationships in the database according to the first reconciliation instruction; If the mapping relationships in the memory storage and the database are inconsistent; Update the mapping relationship in the memory storage that is inconsistent with the database to be consistent with the mapping relationship in the database.
15. The label management device according to claim 13, wherein: The receiving unit is specifically configured to: when the management operation request is a query request, the label management operation type that needs to be managed according to the query request is a query operation; The execution unit is specifically configured to: obtain the target label or target label identifier associated in the query request; Query the label corresponding to the target label identifier in the offline file library and the cloud storage according to the target label identifier; Query the label corresponding to the target label in the offline file library and the cloud storage based on the mapping relationship set according to the target label.
16. The label management device according to claim 15, wherein The execution unit is specifically configured to: If no label corresponding to the target label identifier or target label is found in the offline file library and the cloud storage, query the label corresponding to the target label identifier or target label in the memory storage.
17. The label management device according to claim 16, wherein It further includes a cleaning unit, and the cleaning unit is specifically configured to: If no label corresponding to the target label identifier or target label is found in the memory storage, store the null value as the query result of the target label identifier or target label in the cache folder; Clean the cache folder according to the preset cleaning time.
18. The label management device according to claim 13, characterized in that, It further includes a deletion unit, and the deletion unit is specifically configured to: Obtain the label usage times in the database within a preset time; Identify the labels with the label usage times in the database less than the first preset threshold as low-quality labels; Delete the low-quality labels in the memory storage and the database.
19. The label management device according to claim 13, wherein The fuzzy search unit is specifically configured to: Establish an inverted index of labels in the offline index library; Match the target keyword with the inverted index, and if the target keyword matches the inverted index, obtain a third matching result.
20. The label management device according to claim 13, wherein It further includes an offline index update unit, and the offline index update unit is specifically configured to: Obtain an offline index update request; Upload the mapping relationship set in the database to the offline index library according to the offline index update request.
21. The label management device according to claim 20, wherein It further includes a second reconciliation unit, and the second reconciliation unit is specifically configured to: Generate a second reconciliation instruction according to the second preset timing reconciliation time; Determine whether each set of mapping relationships in the offline index library is consistent with the corresponding mapping relationships in the database according to the second reconciliation instruction; If the mapping relationships in the offline index library and the database are inconsistent; Update the mapping relationship in the offline index library that is inconsistent with the database to be consistent with the mapping relationship in the database.
22. The label management device according to claim 12, characterized in that The receiving unit is specifically configured to: when the label management operation request is an add label operation request, the label management operation type that needs to be managed according to the add label operation request is a label addition operation; The execution unit is specifically configured to: trigger a label addition operation in the message queue according to the add label operation request; Obtain the target label associated in the label addition request; Add the target tag and the target tag identifier corresponding to the target tag to the mapping relationship set according to the tag addition operation.
23. A server, characterized in that, It includes a processor and a storage device. The storage device stores a computer program. When the processor calls and executes the computer program, the tag management method described in any one of claims 1-11 is implemented.
24. A computer storage medium, characterized in that, The computer storage medium stores multiple computer instructions, and the instructions are suitable for being loaded by the processor to execute the steps in any one of the tag management methods in claims 1 to 11.
Citation Information
Patent Citations
Resource querying method and device
CN108717432A