Clustering method, apparatus, device, and storage medium

CN117113116BActive Publication Date: 2026-08-07BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING YOUZHUJU NETWORK TECH CO LTD
Filing Date
2023-09-08
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

现有的根据聚类ID进行聚类的方式复杂度及维护成本均较高

Benefits of technology

[0022]本公开实施例公开了一种聚类方法、装置、设备及存储介质,按照颗粒度大小的顺序依次确定目标对象在各颗粒度的聚类标识:对于当前颗粒度,获取目标对象的特征信息;其中,特征信息为目标对象的原始特征或者上一颗粒度的残差特征;从当前颗粒度的召回库中确定与特征信息相匹配的聚类中心特征,作为目标聚类中心特征;其中,召回库中存储有聚类中心特征及其对应的聚类标识;将目标聚类中心特征对应的聚类标识作为目标对象在当前颗粒度的聚类标识;确定特征信息与目标聚类中心特征间的残差特征,作为下一个颗粒度的特征信息。本公开实施例提供的聚类方法,基于目标对象的原始特征及残差特征实现对目标对象的多颗粒度聚类,可以降低聚类的复杂度及成本。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117113116B_ABST
    Figure CN117113116B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a clustering method, device, equipment and storage medium. In order of granularity size, the clustering identifier of a target object in each granularity is determined: for a current granularity, feature information of the target object is obtained; wherein the feature information is original feature of the target object or residual feature of a previous granularity; a clustering center feature matched with the feature information is determined from a recall library of the current granularity as a target clustering center feature; a clustering identifier corresponding to the target clustering center feature is taken as the clustering identifier of the target object in the current granularity; and a residual feature between the feature information and the target clustering center feature is determined as feature information of a next granularity. The clustering method provided by the embodiments of the present disclosure can realize multi-granularity clustering of a target object based on original feature and residual feature of the target object, and can reduce the complexity and cost of clustering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of clustering technology, and more particularly to a clustering method, apparatus, device, and storage medium. Background Technology

[0002] Currently, clustering technology is a fundamental technology in many business scenarios, such as clustering short videos and users to obtain cluster identifiers (Identity Documents, IDs). These IDs are then used as features in recommendation and content delivery systems. Compared to the dense features before clustering, cluster IDs often achieve better results and save more storage space. However, existing methods of clustering based on cluster IDs are complex and have high maintenance costs. Summary of the Invention

[0003] This disclosure provides a clustering method, apparatus, device, and storage medium that enables multi-granularity clustering of target objects, thereby reducing the complexity and cost of clustering.

[0004] In a first aspect, embodiments of this disclosure provide a clustering method, including:

[0005] The cluster identifiers of the target objects at each granularity are determined sequentially according to their granularity:

[0006] For the current granularity, obtain the feature information of the target object; wherein, the feature information is the original feature of the target object or the residual feature of the previous granularity;

[0007] Cluster center features that match the feature information are determined from the recall library at the current granularity and used as target cluster center features; wherein, the recall library stores cluster center features and their corresponding cluster identifiers;

[0008] The cluster identifier corresponding to the target cluster center feature is used as the cluster identifier of the target object at the current granularity;

[0009] The residual features between the feature information and the target cluster center features are determined and used as the feature information for the next granularity.

[0010] Secondly, embodiments of this disclosure also provide a clustering apparatus, comprising:

[0011] The cluster identifier determination module is used to determine the cluster identifier of the target object at each granularity in order of granularity.

[0012] The clustering identifier determination module includes:

[0013] The feature information acquisition unit is used to acquire feature information of the target object for the current granularity; wherein the feature information is the original feature of the target object or the residual feature of the previous granularity;

[0014] The target cluster center feature determination unit is used to determine cluster center features that match the feature information from the recall library at the current granularity, and use them as target cluster center features; wherein, the recall library stores cluster center features and their corresponding cluster identifiers;

[0015] A cluster identifier determination unit is used to use the cluster identifier corresponding to the target cluster center feature as the cluster identifier of the target object at the current granularity;

[0016] The residual feature determination unit is used to determine the residual features between the feature information and the target cluster center features, and use them as the feature information of the next granularity.

[0017] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:

[0018] One or more processors;

[0019] Storage device for storing one or more programs.

[0020] When the one or more programs are executed by the one or more processors, the one or more processors implement the clustering method as described in the embodiments of this disclosure.

[0021] Fourthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the clustering method described in embodiments of this disclosure.

[0022] This disclosure provides a clustering method, apparatus, device, and storage medium. The method sequentially determines the cluster identifiers of a target object at each granularity according to their size: For the current granularity, it acquires the feature information of the target object; wherein the feature information is the original feature of the target object or the residual feature of the previous granularity; it determines the cluster center feature that matches the feature information from the recall library of the current granularity, and uses it as the target cluster center feature; wherein the recall library stores the cluster center features and their corresponding cluster identifiers; it uses the cluster identifier corresponding to the target cluster center feature as the cluster identifier of the target object at the current granularity; and it determines the residual feature between the feature information and the target cluster center feature, using it as the feature information for the next granularity. The clustering method provided by this disclosure achieves multi-granularity clustering of the target object based on its original and residual features, which can reduce the complexity and cost of clustering. Attached Figure Description

[0023] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0024] Figure 1 This is a flowchart illustrating a clustering method provided in an embodiment of this disclosure;

[0025] Figure 2 This is a schematic diagram of the structure of a clustering device provided in an embodiment of this disclosure;

[0026] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0027] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0028] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0029] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0030] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0031] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0032] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0033] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0034] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0035] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0036] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0037] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0038] The process of clustering dense features of a target object into IDs can be called quantization. Quantization inevitably leads to information loss. Existing methods often try to preserve the diversity of the original features by increasing the cluster ID space. To maintain generalization, multiple granularity cluster ID systems are used: coarse granularity models generalization, while fine granularity maintains diversity. However, existing methods are relatively weak in modeling the inheritance relationship between different granularities. For example, suppose there are two cluster granularities, A and B, from coarse to fine. Two objects belonging to class B cannot be guaranteed to belong to class A because each granularity is clustered separately during the modeling process. To ensure inheritance, some methods first cluster objects at a coarse granularity, then extract objects belonging to the same coarse granularity and perform fine-grained clustering separately. While this method ensures inheritance, its drawback is that as the granularity increases, the complexity and maintenance cost also increase.

[0039] Figure 1 This is a flowchart illustrating a clustering method provided in an embodiment of the present disclosure. This embodiment is applicable to the situation of determining the clustering identifier of a target object. The method can be executed by a clustering device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, such as a mobile terminal, a PC, or a server.

[0040] The method is implemented as follows: the cluster identifiers of the target objects at each granularity are determined sequentially according to the order of granularity.

[0041] The granularity can be pre-set and can include multiple values, each distinct from the others. Larger granularity indicates lower clustering accuracy, while smaller granularity indicates higher clustering accuracy. The target object can be any type of information to be clustered, such as images, audio, or video.

[0042] In this embodiment, determining the cluster identifier of the target object at each granularity in descending order of granularity can be understood as determining the cluster identifier of the target object at each granularity in descending order of granularity. The process can be as follows: first, determine the cluster identifier of the target object at the largest granularity, then determine the cluster identifier of the target object at the next smaller granularity, and so on, until finally determining the cluster identifier of the target object at the smallest granularity.

[0043] like Figure 1 As shown, the above method includes the following steps:

[0044] S110, for the current granularity, obtain the feature information of the target object.

[0045] The feature information refers to either the original features of the target object or the residual features of the previous granularity. The original features are understood as the features corresponding to the original information of the target object, while the residual features of the previous granularity can be understood as the residual between the cluster center features of the target object at the previous granularity and the feature information of the previous granularity. The current granularity can be the maximum granularity, intermediate granularity, or minimum granularity.

[0046] Specifically, the method for obtaining the feature information of the target object can be as follows: if the current granularity is the largest granularity, then obtain the original features of the target object and use the original features as feature information; if the current granularity is the intermediate granularity or the smallest granularity, then obtain the residual features of the target object at the previous granularity and use the residual features as feature information.

[0047] The maximum granularity can be understood as the granularity with the smallest clustering accuracy, and the minimum granularity can be understood as the granularity with the largest clustering accuracy. In this embodiment, the original features of the target object can be obtained by inputting the target object into a pre-trained feature extraction model and outputting the original features.

[0048] The feature extraction model can be a convolutional neural network. Both the original features and the residual features can be represented by vectors.

[0049] S120: Determine cluster center features that match the feature information from the recall library at the current granularity, and use them as target cluster center features.

[0050] The recall database stores cluster center features and their corresponding cluster identifiers. In this embodiment, each granularity corresponds to a recall database, which stores multiple cluster center features and their corresponding cluster identifiers. A cluster center feature that matches the feature information can be understood as one whose similarity to the feature information exceeds the similarity threshold corresponding to the current granularity.

[0051] Specifically, the method for determining cluster center features that match the feature information from the recall library at the current granularity can be as follows: determine the similarity between each cluster center feature and the feature information in the recall library at the current granularity; if the maximum similarity is greater than or equal to the similarity threshold corresponding to the current granularity, then the cluster center feature corresponding to the maximum similarity matches the feature information.

[0052] The similarity threshold is related to the granularity; the larger the granularity, the smaller the similarity threshold. That is, the similarity threshold and granularity are inversely correlated, and the similarity threshold for each granularity can be preset by the user. The method for determining the similarity between the cluster center features and feature information in the recall library at the current granularity can be: determining the distance between the vector corresponding to each cluster center feature in the recall library at the current granularity and the vector corresponding to the feature information, and using this distance as the similarity. In this embodiment, after obtaining the similarity between the feature information at the current granularity and the cluster center features in its recall library, the maximum similarity is extracted. If the maximum similarity is greater than or equal to the similarity threshold corresponding to the current granularity, then the cluster center feature corresponding to the maximum similarity matches the feature information, and the cluster center feature matching the feature information is determined as the target cluster center feature.

[0053] S130, use the cluster identifier corresponding to the target cluster center feature as the cluster identifier of the target object at the current granularity.

[0054] Specifically, after determining the target cluster center features of the target object at the current granularity, the cluster identifier corresponding to the target cluster center features is used as the cluster identifier of the target object at the current granularity.

[0055] S140, determine the residual features between the feature information and the target cluster center features, and use them as the feature information for the next granularity.

[0056] One method for determining the residual features between the feature information and the target cluster center features is to subtract the feature information from the target cluster center features to obtain the residual features. The determined residual features are then used as the feature information for the next granularity. Based on these residual features, the cluster identifier of the target object at the next granularity is determined. The determination process is described in the above embodiment and will not be repeated here. In this embodiment, for intermediate and minimum granularities, the cluster identifier of the target object at the current granularity is determined based on the residual features of the previous granularity. This ensures the inheritance relationship between granularities and determines the cluster identifier of the target object across multiple granularities, improving the diversity and generalization of clustering.

[0057] Optionally, after determining the similarity between each cluster center feature and feature information in the recall library at the current granularity, the following steps are also included: if the maximum similarity is less than the similarity threshold corresponding to the current granularity, the feature information is stored in the recall library as a new cluster center feature; a new cluster identifier is created corresponding to the new cluster center feature, and the cluster identifier of the target object at the subsequent granularity is set to a set value.

[0058] The subsequent granularity is smaller than the current granularity. The setting value can be a preset value, such as 0.

[0059] If the maximum similarity is less than the similarity threshold corresponding to the current granularity, it indicates that no cluster center feature matching the feature information was obtained in the recall library at the current granularity. That is, the target object does not belong to any category in the recall library at the current granularity. In this case, the feature information of the target object at the current granularity is stored as a new cluster center feature in the recall library at the current granularity, and a new cluster identifier corresponding to the new cluster center feature is created. Finally, the cluster identifier of the target object at subsequent granularities is set to a predetermined value.

[0060] Optionally, after determining the cluster identifiers of the target object at each granularity, the following steps are also included: storing the cluster identifiers of the target object at each granularity.

[0061] One method for storing the cluster identifiers of the target object at each granularity is as follows: First, the cluster identifiers of the target object at each granularity are concatenated according to a predetermined method. Then, the concatenated cluster identifiers are associated with the target object and stored. The predetermined method can be to add a separator between cluster identifiers of adjacent granularities. The separator can be a semicolon, interpolation mark, forward slash, etc., and is not limited here. For example, assuming there are three granularities: high, medium, and low, and the cluster identifiers of the target object at the three granularities are 11, 23, and 55 respectively, then the cluster identifiers of the target object can be stored as: Target object: 11-23-55.

[0062] In one application scenario, taking short video clustering as an example, the target short video is first input into a feature extraction model, which outputs the original features of the target short video. Then, the similarity between the cluster center features in the largest granularity recall library and the original features is calculated, and the maximum similarity is extracted. If the maximum similarity is greater than or equal to the similarity threshold corresponding to the largest granularity, the cluster center feature corresponding to the maximum similarity is used as the target cluster center feature, and the cluster identifier corresponding to the target cluster center feature is used to determine the cluster identifier of the target short video at the largest granularity. The residual feature between the target cluster center feature and the original features is calculated, and the residual feature is used as the feature information of the next granularity. The cluster identifier of the target short video at the next granularity is determined in the same way, and so on, until the cluster identifier of the target short video at the smallest granularity is determined, thereby obtaining the cluster identifier of the target short video at all granularities. If no matching cluster center feature is found in the recall library at a certain granularity for the target short video, the feature information of the target short video at that granularity is stored as a new cluster center feature in the recall library at that granularity, a new cluster identifier corresponding to the new cluster center feature is created, and the cluster identifier of the target short video at subsequent granularities is set to 0.

[0063] The technical solution of this disclosure determines the cluster identifier of the target object at each granularity in order of granularity: For the current granularity, the feature information of the target object is obtained; wherein, the feature information is the original feature of the target object or the residual feature of the previous granularity; the cluster center feature matching the feature information is determined from the recall library of the current granularity and used as the target cluster center feature; wherein, the recall library stores the cluster center features and their corresponding cluster identifiers; the cluster identifier corresponding to the target cluster center feature is used as the cluster identifier of the target object at the current granularity; the residual feature between the feature information and the target cluster center feature is determined and used as the feature information of the next granularity. The clustering method provided by this disclosure realizes multi-granularity clustering of the target object based on the original feature and residual feature of the target object, which can reduce the complexity and cost of clustering.

[0064] Figure 2 This is a schematic diagram of a clustering device structure provided in an embodiment of the present disclosure, as shown below. Figure 2 As shown, the device includes: a cluster identifier determination module, used to sequentially determine the cluster identifiers of the target object at each granularity according to the order of granularity size;

[0065] The clustering identifier determination module includes:

[0066] The feature information acquisition unit 210 is used to acquire feature information of the target object for the current granularity; wherein the feature information is the original feature of the target object or the residual feature of the previous granularity;

[0067] The target cluster center feature determination unit 220 is used to determine cluster center features that match the feature information from the recall library at the current granularity, and use them as target cluster center features; wherein, the recall library stores cluster center features and their corresponding cluster identifiers;

[0068] Cluster identifier determination unit 230 is used to use the cluster identifier corresponding to the target cluster center feature as the cluster identifier of the target object at the current granularity;

[0069] The residual feature determination unit 240 is used to determine the residual features between the feature information and the target cluster center features, and use them as the feature information of the next granularity.

[0070] Optionally, the feature information acquisition unit 210 is also used for:

[0071] If the current granularity is the maximum granularity, then the original features of the target object are obtained and used as feature information.

[0072] If the current granularity is an intermediate granularity or the smallest granularity, then the residual features of the target object at the previous granularity are obtained, and the residual features are used as feature information.

[0073] Optionally, the feature information acquisition unit 210 is also used for:

[0074] The target object is input into a pre-trained feature extraction model, which outputs the raw features.

[0075] Optionally, the target cluster center feature determination unit 220 is also used for:

[0076] Determine the similarity between the features of each cluster center in the recall library at the current granularity and the feature information;

[0077] If the maximum similarity is greater than or equal to the similarity threshold corresponding to the current granularity, then the cluster center feature corresponding to the maximum similarity matches the feature information.

[0078] Optionally, it also includes: a cluster identifier creation unit, used for:

[0079] If the maximum similarity is less than the similarity threshold corresponding to the current granularity, the feature information is stored as a new cluster center feature in the recall database.

[0080] Create a new cluster identifier corresponding to the new cluster center feature, and set the cluster identifier of the target object at a subsequent granularity to a set value; wherein the subsequent granularity is smaller than the current granularity.

[0081] Optionally, the residual feature determination unit 240 is also used for:

[0082] The residual features are obtained by subtracting the feature information from the target cluster center features.

[0083] Optionally, it also includes: a storage module for:

[0084] The clustering identifiers of the target object at each granularity are stored.

[0085] The clustering apparatus provided in this disclosure can execute the clustering method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0086] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.

[0087] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Reference is made below. Figure 3 It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 3 The diagram below shows the structure of the terminal device or server 500. The terminal device in this embodiment may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and vehicle terminals (e.g., vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0088] like Figure 3As shown, electronic device 500 may include a processing unit (e.g., central processing unit, graphics processor, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from storage device 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. An edit / output (I / O) interface 505 is also connected to bus 504.

[0089] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 3 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0090] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.

[0091] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0092] The electronic device provided in this embodiment and the clustering method provided in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0093] This disclosure provides a computer storage medium storing a computer program that, when executed by a processor, implements the clustering method provided in the above embodiments.

[0094] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0095] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0096] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0097] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to:

[0098] The aforementioned computer-readable medium carries one or more programs. When the aforementioned one or more programs are executed by the electronic device, the electronic device causes the following actions: First, it sequentially determines the cluster identifiers of the target object at each granularity in order of granularity. Second, for the current granularity, it acquires the feature information of the target object, wherein the feature information is the original feature of the target object or the residual feature of the previous granularity. Third, it determines a cluster center feature that matches the feature information from the recall library of the current granularity, and uses it as the target cluster center feature. Third, it stores cluster center features and their corresponding cluster identifiers in the recall library. Fourth, it uses the cluster identifier corresponding to the target cluster center feature as the cluster identifier of the target object at the current granularity. Fifth, it determines the residual feature between the feature information and the target cluster center feature, and uses it as the feature information for the next granularity.

[0099] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0100] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0101] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".

[0102] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0103] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0104] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0105] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0106] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A clustering method characterized by, include: The cluster identifiers of the target objects at each granularity are determined sequentially according to their granularity: For the current granularity, obtain the feature information of the target object, wherein the feature information is the original feature of the target object or the residual feature of the previous granularity, and wherein the target object is an image, audio or video; The cluster center features that match the feature information are determined from the recall library at the current granularity and used as target cluster center features, wherein the recall library stores cluster center features and their corresponding cluster identifiers; The cluster identifier corresponding to the target cluster center feature is used as the cluster identifier of the target object at the current granularity; The residual features between the feature information and the target cluster center features are determined and used as the feature information for the next granularity.

2. The method of claim 1, wherein, Obtaining the feature information of the target object includes: If the current granularity is the maximum granularity, then the original features of the target object are obtained and used as feature information. If the current granularity is an intermediate granularity or the smallest granularity, then the residual features of the target object at the previous granularity are obtained, and the residual features are used as feature information.

3. The method according to claim 2, characterized in that, Obtain the original features of the target object, including: The target object is input into a pre-trained feature extraction model, which outputs the raw features.

4. The method according to claim 1, characterized in that, Determining cluster center features that match the feature information from the recall library at the current granularity includes: Determine the similarity between the features of each cluster center in the recall library at the current granularity and the feature information; If the maximum similarity is greater than or equal to the similarity threshold corresponding to the current granularity, then the cluster center feature corresponding to the maximum similarity matches the feature information.

5. The method according to claim 4, characterized in that, After determining the similarity between the features of each cluster center in the recall library at the current granularity and the feature information, the method further includes: If the maximum similarity is less than the similarity threshold corresponding to the current granularity, the feature information is stored as a new cluster center feature in the recall database. Create a new cluster identifier corresponding to the new cluster center feature, and set the cluster identifier of the target object at a subsequent granularity to a set value, wherein the subsequent granularity is smaller than the current granularity.

6. The method according to claim 1, characterized in that, Determining the residual features between the feature information and the target cluster center features includes: The residual features are obtained by subtracting the feature information from the target cluster center features.

7. The method according to claim 1, characterized in that, After determining the cluster identifiers of the target objects at each granularity, the following is also included: The clustering identifiers of the target object at each granularity are stored.

8. A clustering device, characterized in that, include: The cluster identifier determination module is used to determine the cluster identifier of the target object at each granularity in order of granularity. The clustering identifier determination module includes: The feature information acquisition unit is used to acquire feature information of the target object for the current granularity, wherein the feature information is the original feature of the target object or the residual feature of the previous granularity, and wherein the target object is an image, audio or video. The target cluster center feature determination unit is used to determine cluster center features that match the feature information from the recall library at the current granularity, as target cluster center features, wherein the recall library stores cluster center features and their corresponding cluster identifiers; A cluster identifier determination unit is used to use the cluster identifier corresponding to the target cluster center feature as the cluster identifier of the target object at the current granularity; The residual feature determination unit is used to determine the residual features between the feature information and the target cluster center features, and use them as the feature information of the next granularity.

9. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the clustering method as described in any one of claims 1-7.

10. A storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to perform the clustering method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Data query method, storage medium and computer program product

    CN113536020A