A method and system for improving element matching efficiency based on a social network model
By using feature-based and hierarchical association management based on social network models, the problem of low efficiency in image similarity matching is solved, achieving efficient element matching and system stability, and making it suitable for rapid matching and change management in large-scale systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-24
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies are inefficient in establishing and maintaining image similarity matching relationships, especially when system data changes, requiring a large number of recalculations and making it impossible to maintain matching relationships efficiently.
A social network-based approach is adopted, which obtains element feature values through feature-based algorithms and performs data normalization to construct a hierarchical social network. Forward and backward lists are established to realize the association management between elements. When adding or deleting elements, matching calculations are performed only within a specific range.
It significantly improves element matching efficiency, reduces the number of matching operations when the system changes, and lowers the system load, especially in large-scale systems. It also expands the scope of application and can solve problems that are difficult to solve with traditional methods.
Smart Images

Figure CN117036757B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of document management technology, and in particular relates to a method and system for improving element matching efficiency based on a social network model. Background Technology
[0002] Similarity comparison between elements is increasingly being applied in daily life, such as with images and text. Regarding images, a single system contains a wide variety and a large number of images. Current image similarity comparison methods, in establishing and maintaining all matching relationships within the current system, generally involve the following processes:
[0003] 1. Image decoding, and then using various algorithms to obtain the feature values of the image. The similarity between images is determined by the matching results of these feature values.
[0004] 2. Since the similarity conclusions between images cannot be propagated, a large number of matching processes are required to fully establish the matching relationship of the entire system. Assuming that the number of images to be matched in the current system is M, the number of combinations of a complete match is M, i.e., M*(M-1) / 2 times.
[0005] 3. Since a single image can only appear once in the entire matching system, the complete matching results are achieved by indirectly placing two images that do not match directly into a matching group through similarity propagation. In this case, if an image is added or deleted from the system, the entire similarity result basically needs to be reconstructed to maintain the correct matching result. Summary of the Invention
[0006] In view of this, the present invention provides a method and system for improving element matching efficiency based on a social network model. By establishing a network model, the problem of fast element matching is solved, thereby improving the efficiency of similarity matching between elements.
[0007] To solve the above technical problems, the technical solution of the present invention is a method for improving element matching efficiency based on a social network model, comprising:
[0008] The element to be matched is used to obtain feature values through a featureization algorithm, and the feature values are normalized. The normalized numerical values are used to express the features included in the element.
[0009] A social network is constructed using normalized data values; the social network is layered according to the number of features possessed by the elements, with a total of n+1 layers, where n is the total number of feature categories of the elements.
[0010] The elements in each network layer are associated with elements in other layers. If two elements have features that have an inclusion or contained relationship, the two elements are considered to be associated.
[0011] For each element in the social network, a forward list and / or a backward list are created, wherein the forward list records elements that are directly or indirectly associated with the element in the forward direction, and the backward list records elements that are directly or indirectly associated with the element in the backward direction.
[0012] As an improvement, methods for adding elements to the social network include:
[0013] Construct a list of leaf nodes to store element nodes;
[0014] Determine the number of features contained in the element to be added, and add the element to the corresponding level of the social network according to the number of features;
[0015] Check if the leaf node list is empty; if so, add the element to the leaf node list as an element node.
[0016] If the leaf node list is not empty, then iterate through the element nodes in the leaf node list:
[0017] If the element to be added is not associated with any element node, then the element to be added is added to the leaf node list and becomes an element node.
[0018] If the current element node has an inclusion relationship with the element to be added, then traverse the forward associated element nodes in the forward list of the current element node; if the element to be added has no association with the forward associated element nodes, then add it to the forward list of the current element node, and at the same time determine whether the current element node is a full node; if it is a full node, then remove the current element node from the leaf node list, and add the non-full nodes in the backward list of the current element node to the leaf node list; the full node is a leaf node with a connection number equal to n with the adjacent layers;
[0019] If the current element node has an inclusion relationship with the element to be added, then traverse the backward element nodes in the backward list of the current element node; if the element to be added is not related to the backward element node, then add it to the backward list of the current element node, and at the same time determine whether the current element node is a full node; if it is a full node, then remove the current element node from the leaf node list, and add the non-full nodes in the forward list of the current element node to the leaf node list.
[0020] As a further improvement, when an element to be added is added to the backward list of an element node, it is determined whether the element to be added has an inclusion or being included relationship with the backward element node in the backward list of the element node. If so, the element to be added is added to the backward list or forward list of the backward element node.
[0021] When an element to be added is added to the forward list of an element node, it is determined whether the element to be added has an inclusion relationship or is included with the forward associated element node in the forward list of the element node. If so, the element to be added is added to the backward list or forward list of the forward associated element.
[0022] As another further improvement, methods for removing elements from the social network include:
[0023] Remove the elements to be removed from the corresponding levels of the social network;
[0024] Remove the node with the removal option from the leaf node list, and then update the forward and backward lists of the remaining element nodes.
[0025] As an improvement, the normalized feature value of the data is an n-bit binary number, where each bit represents a feature, and 1 and 0 on each bit represent the presence or absence of the feature.
[0026] This invention also provides a system for improving element matching efficiency based on a social network model, comprising:
[0027] The feature value normalization module is used to obtain feature values of the elements to be matched through featureization algorithms, and to perform data normalization processing on the feature values. The normalized numerical values represent the features included in the elements.
[0028] The social network construction module is used to construct a social network using normalized data. The social network is layered according to the number of features possessed by the elements, with a total of n+1 layers, where n is the total number of feature categories of the elements. Elements in each network layer are associated with elements in other layers. If the features possessed by two elements have an inclusion or being included relationship, the two elements are considered to be associated.
[0029] The forward and backward list creation module is used to create a forward list and / or a backward list for each element in the social network. The forward list records the elements that are directly or indirectly associated with the element in the forward direction, and the backward list records the elements that are directly or indirectly associated with the element in the backward direction.
[0030] As an improvement, the social network building module includes an element adding module for adding elements to the social network and an element removing module for removing elements from the social network.
[0031] As an improvement, the element adding module includes:
[0032] The leaf node list building module is used to construct a leaf node list for storing element nodes;
[0033] The social network addition module is used to determine the number of features contained in the element to be added, and to add the element to be added to the corresponding level of the social network according to the number of features.
[0034] The element node addition module is used to determine whether the leaf node list is empty. If it is, the element is added to the leaf node list as an element node.
[0035] If the leaf node list is not empty, then iterate through the element nodes in the leaf node list:
[0036] If the element to be added is not associated with any element node, then the element to be added is added to the leaf node list and becomes an element node.
[0037] If the current element node has an inclusion relationship with the element to be added, then traverse the forward associated element nodes in the forward list of the current element node; if the element to be added has no association with the forward associated element nodes, then add it to the forward list of the current element node, and at the same time determine whether the current element node is a full node; if it is a full node, then remove the current element node from the leaf node list, and add the non-full nodes in the backward list of the current element node to the leaf node list; the full node is a leaf node with a connection number equal to n with the adjacent layers;
[0038] If the current element node has an inclusion relationship with the element to be added, then traverse the backward element nodes in the backward list of the current element node; if the element to be added is not related to the backward element node, then add it to the backward list of the current element node, and at the same time determine whether the current element node is a full node; if it is a full node, then remove the current element node from the leaf node list, and add the non-full nodes in the forward list of the current element node to the leaf node list.
[0039] As an improvement, the element adding module further includes:
[0040] The forward and backward list sorting module is used to determine whether the element to be added has an inclusion or being included relationship with the backward element node in the backward list of the element node when the element to be added is added to the backward list or forward list of the element node. If so, the element to be added is added to the backward list or forward list of the backward element node.
[0041] When an element to be added is added to the forward list of an element node, it is determined whether the element to be added has an inclusion relationship or is included with the forward associated element node in the forward list of the element node. If so, the element to be added is added to the backward list or forward list of the forward associated element.
[0042] As an improvement, the element removal module includes:
[0043] The social network removal module is used to remove elements from the corresponding levels of the social network.
[0044] The Leaf Node Removal module is used to remove the element node to be removed from the leaf node list, and after removal, update the forward list and backward list of the remaining element nodes.
[0045] The advantages of this invention are:
[0046] In existing technologies, if data changes occur in a large system, it is necessary to redetermine the matching status of data within the system, which requires the following process:
[0047] 1. If it is new data, all existing data in the system and the new data need to be matched using all matching methods, and then a new matching relationship needs to be determined.
[0048] 2. If data is being deleted, all data in the matching group containing the deleted data needs to be rematched using all matching methods to determine a new matching relationship.
[0049] The process in this invention is as follows:
[0050] 1. If it is new data, the data is processed by the feature algorithm to obtain feature data, which is then normalized to a single value and added to the network structure. The new matching relationship will only be generated in the layers above and below the corresponding element of the data (the specific number of layers depends on the Hamming distance threshold set in advance by the system, i.e., similarity is considered within a specific Hamming distance). After performing other non-feature matching algorithms within these data ranges, the new matching relationship can be determined. The number of objects that need to be matched is greatly reduced, which can significantly improve efficiency.
[0051] 2. If it is deleting data, you only need to remove it from the social network. The calculation method for new matching relationships is the same as above. Obviously, the number of objects that need to be matched will be greatly reduced.
[0052] Obviously, the matching method provided by this invention can greatly reduce the number of matching operations required to maintain the matching degree of the system when the system changes, thereby increasing efficiency and reducing the load when the system changes, especially when the system is large in scale.
[0053] Furthermore, introducing the social network model offers another advantage: it allows us to use concepts from social networks to solve previously unsolvable problems, thus expanding the scope of applications. For example, suppose the current system has generated 100 similar groups through its network structure. If there's a functional requirement to input specific images into the system so that existing similar groups merge into a single similar group through iterative similarity analysis, the concept of key nodes in social networks can be used to find a solution. This involves identifying which empty nodes in the current network structure are key nodes (this is a basic computational process in social networks and will not be elaborated upon here). Then, inputting images with the corresponding feature values of these key nodes into the system has a high probability of achieving the functional requirement. Conversely, using traditional matching processes lacks a mathematical model to solve the above problem, making it seem impossible to begin. Attached Figure Description
[0054] Figure 1 This is a diagram of a social network.
[0055] Figure 2 This is a flowchart of the present invention.
[0056] Figure 3 This is a schematic diagram of the structural principle of the present invention. Detailed Implementation
[0057] To enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to specific embodiments.
[0058] Terminology Explanation
[0059] Social network model: refers to the network distribution of elements in a system after processing. The connection between nodes is interpreted as the similarity between elements. Through this network structure, other elements similar to a specified element in a specified dimension can be quickly obtained.
[0060] Algorithm featureization: In actual image comparison, multiple algorithms are usually used in collaboration. If the output of a certain algorithm is clearly described within a fixed range, these algorithms can be defined as feature algorithms. If necessary modifications are needed to achieve the same result, it is called algorithm featureization.
[0061] Eigenvalue: refers to the output of a specific featureization algorithm. It can be determined through the featureization description of the algorithm. The eigenvalue will only be within a fixed range (the difference in its eigenvalue is the Hamming distance between the two images).
[0062] Data normalization: refers to the process of expressing feature values numerically under a matching algorithm that can form features, since the feature values are within a fixed range.
[0063] Total network depth: Different features have a number of elements placed in different layers of the network structure, so the total number of features constitutes the total depth of the network structure.
[0064] Elements: refers to images, text, etc. to be matched.
[0065] like Figure 2 As shown, this invention provides a method for improving element matching efficiency based on a social network model. In this embodiment, images are used as the elements to be matched to illustrate the invention; the same principle applies to other types of elements such as text, except that different algorithms can be used to calculate feature values based on their different characteristics in the feature value calculation step.
[0066] S1 obtains feature values for the elements to be matched through a featureization algorithm, performs data normalization on the feature values, and expresses the features included in the elements by the normalized numerical values.
[0067] In practical image comparison, multiple algorithms are usually used in conjunction. If the output of a particular algorithm is clearly described within a fixed range, these algorithms can be defined as feature algorithms. If necessary modifications are needed to achieve the same fixed-range output, this is called algorithm featureization. The output of these features is defined as the feature value, and the difference in feature values between two images is the Hamming distance between them. The similarity between two images can be determined using the Hamming distance. The Hamming distance refers to the number of characters that differ at the same position in two strings of equal length; it can also be understood as the minimum number of substitutions required to transform one string into another. For example, the Hamming distance between string A = "1011101" and string B = "1001001" is 2 because their characters differ at the 2nd and 4th positions.
[0068] In this invention, the feature values of elements, i.e., images, are also expressed using multi-digit binary numbers. For example, an image may have 16 features. The normalized feature value is an n-bit binary number, where each bit represents a feature, and 1 and 0 in each bit represent the presence or absence of the feature. If the normalized feature value of an image is 0000000000000101, it means that it has the first and third features, and so on.
[0069] S2 constructs a social network using normalized data values; the social network is layered according to the number of features possessed by the elements, with a total of n+1 layers, where n is the total number of feature categories of the elements.
[0070] Taking an image with 16 features as an example, such as Figure 1 As shown, the characteristics of this social network structure are as follows:
[0071] Since the total number of features n = 16, the features in this social network can be represented using 16-bit binary numbers. Each element is described by a 16-bit binary number, where a 1 indicates the presence of a feature with a specified index in the system, and a 0 indicates otherwise. Therefore, the total capacity of the current social network to accommodate different elements is 2^n. n -1.
[0072] The total depth of the social network, i.e. the total number of layers, is L = n + 1 = 17. Each layer records the number of features that each element possesses. That is, layer L0 represents elements that do not possess any features, layer L1 represents elements that possess one feature, and so on. Obviously, the number of elements in each layer is different (elements with the same feature value are treated as the same element, so all elements in the social network are different).
[0073] For example, layer L0 aggregates elements with 0 features, and therefore can only contain 1 element, namely L0(0); while layer L1 aggregates elements with 1 feature, and can contain 16 elements, namely L1(1), L1(2), L1(3)...L1(16), where the parentheses indicate the type of feature; layer L2 aggregates elements with 2 features, and can contain C(16,2) = 120 elements, namely L2(1,2), L2(1,3)...L2(15,16); layer L3 aggregates elements with 3 features, and can contain C(16,3) = 560 elements, and so on. The entire social network is diamond-shaped, with a thick middle (capable of containing many elements) and sharp ends (capable of containing fewer elements).
[0074] S3 establishes associations between elements in each network layer and elements in other layers. If two elements have features that have an inclusion or being included relationship, then the two elements are considered to be related.
[0075] There are no horizontal connections between elements within the same layer; connections can only be established vertically (between adjacent layers). The connection between each element and its adjacent layers (front and back layers; in this invention, network layers are arranged from smallest to largest, with smallest to largest being backward and largest to smallest being forward) is denoted as N. N can be up to n, and the current social network has max(N) = 16. These connections are maintained through forward and backward lists for each element.
[0076] The reason why the current social network has a maximum of 16 connections (max(N)) is as follows: For an element L2(1,2) in layer L2, there are only two elements in layer L1 that can be associated with it: L1(1) and L1(2); while there are 14 elements in layer L3 that can be associated with it: L3(1,2,3), L3(1,2,4), L3(1,2,5)...L3(1,2,16). Therefore, L2(1,2) can establish a total of 2 + 14 = 16 connections. Similarly, it can be deduced that the maximum number of connections that any element in any layer of the social network can establish is 16.
[0077] In addition, the so-called relationship between two elements in this invention refers to whether the number of features possessed by the two elements has an inclusive or contained relationship. That is, whether the elements of the later layer and the elements of the earlier layer are related depends on whether the elements of the later layer contain the features of the elements of the earlier layer.
[0078] For example, element L2(1,2) in layer L2 has both the first and second characteristics. It contains elements L1(1) and L1(2) in layer L1. Therefore, element L2(1,2) is associated with L1(1) and L1(2), but not with other elements in layer L1 such as L1(4) and L1(15).
[0079] Similarly, for the element L2(1,2) in the L2 layer, the features it contains are contained in the elements L3(1,2,3) or L3(1,2,16) in the L3 layer, and it is also related to L3(1,2,3) or L3(1,2,16).
[0080] Clearly, L16 is associated with all elements of L15, so L16 only has a forward list, while L0 is a special case, being associated with all elements of L1, so L0 only has a backward list.
[0081] Once a social network is formed, the number of layers through which the connections between each element pass through becomes the key to its application. If two elements are associated with elements at the same level, then the two elements are considered similar.
[0082] S4 establishes a forward list and / or a backward list for each element in the social network. The forward list records elements that are directly or indirectly associated with the element in the forward direction, and the backward list records elements that are directly or indirectly associated with the element in the backward direction.
[0083] Each element in a social network has its own forward list and / or backward list for easy maintenance. These forward and backward lists record elements that are directly or indirectly related to that element. For example, if an L3 element is related to an L2 element, and that L2 element is related to an L1 element, then the L3 and L1 elements are indirectly related. Elements in an element's forward list are called its forward-related elements; similarly, elements in its backward list are called its backward-related elements.
[0084] After a social network is constructed, it may be necessary to add or delete elements into it. The method for adding elements to the social network in this invention includes the following steps:
[0085] S100 constructs a list of leaf nodes to store element nodes.
[0086] The leaf node list is a separate list from the social network, used to record element nodes that can be associated. In this invention, the difference between an element and an element node is that an element node can be an empty slot. The purpose of the leaf node list is to quickly find the position for an element to be added, thereby quickly forming its forward and backward lists.
[0087] S101 determines the number of features contained in the element to be added, and adds the element to be added to the corresponding level of the social network according to the number of features.
[0088] If the normalized feature value of a certain element is calculated to be 0000000000000101, it means that it contains two features, the first feature and the third feature. Therefore, it needs to be added to the L2 level of the social network, denoted as L2(1,3).
[0089] S102 determines whether the leaf node list is empty; if so, it adds the element to the leaf node list as an element node.
[0090] S103 If the leaf node list is not empty, then traverse the element nodes in the leaf node list:
[0091] S1031 If the element to be added is not associated with any element node, then the element to be added is added to the leaf node list and becomes an element node.
[0092] If elements are unrelated, it could be that they are at the same level or that they do not have an inclusive or contained relationship. In either case, the element to be added should be added as a new element node to the leaf node list.
[0093] S1032 If the current element node has an inclusion relationship with the element to be added, then traverse the forward associated element nodes in the forward list of the current element node; if the element to be added has no association with the forward associated element nodes, then add it to the forward list of the current element node, and at the same time determine whether the current element node is a full node; if it is a full node, then remove the current element node from the leaf node list, and add the non-full nodes in the backward list of the current element node to the leaf node list; the full node is a leaf node with a connection number equal to n with the adjacent layer.
[0094] When traversing to a certain element node, it is found that the current element node has an inclusion relationship with the element to be added. For example, if the traversed element node is L3(1,2,3), its features obviously contain all the features of the element to be added, L2(1,3), therefore L3(1,2,3) contains L2(1,3). At this time, it is necessary to determine whether the current element node L3(1,2,3) is a full node. A full node is a leaf node with a connection number of n with its adjacent layers. The principle of full nodes has been explained above and will not be repeated here. If the current element node L3(1,2,3) is a full node, then the current element node is removed from the leaf node list, and the non-full nodes in the current element node's subsequent list are added to the leaf node list.
[0095] It is also necessary to traverse all forward-related element nodes in the forward list of element node L3(1,2,3) until the node to be added is no longer related to the forward-related element node traversed. Then, the element to be added is added to the forward list of element node L3(1,2,3).
[0096] Additionally, when an element to be added is added to the forward list of an element node, it is determined whether the element to be added has an inclusion relationship or is contained within a forward-related element node in the forward list of that element node. If so, the element to be added is added to the backward or forward list of the forward-related element. The purpose of the above operation is to handle elements with cross-level relationships. For example, if the forward-related element of an L5 element is an L3 element, and the element to be added is an L4 element, then a suitable position needs to be found for that element.
[0097] S1033 If the current element node has an inclusion relationship with the element to be added, then traverse the backward element nodes in the backward list of the current element node; if the element to be added is not related to the backward element node, then add it to the backward list of the current element node, and at the same time determine whether the current element node is a full node; if it is a full node, then remove the current element node from the leaf node list, and add the non-full nodes in the forward list of the current element node to the leaf node list.
[0098] This step is similar to the inclusion relationship. Of course, when adding an element to the back list of an element node, it is also necessary to determine whether the element to be added has an inclusion or being included relationship with the back element node in the back list of that element node. If so, the element to be added is added to the back list or front list of the back element node.
[0099] Furthermore, the method for removing elements from the social network specifically includes the following steps:
[0100] S200 removes the element to be removed from the corresponding level of the social network.
[0101] S201 removes the element node to be removed from the leaf node list, and then updates the forward or backward lists of the remaining element nodes. That is, when an element is removed, all elements associated with that element must update their forward or backward lists.
[0102] like Figure 3 As shown, the present invention also provides a system for improving element matching efficiency based on a social network model, comprising:
[0103] The feature value normalization module is used to obtain feature values of the elements to be matched through featureization algorithms, and to perform data normalization processing on the feature values. The normalized numerical values represent the features included in the elements.
[0104] The social network construction module is used to construct a social network using normalized data. The social network is layered according to the number of features possessed by the elements, with a total of n+1 layers, where n is the total number of feature categories of the elements. Elements in each network layer are associated with elements in other layers. If the features possessed by two elements have an inclusion or being included relationship, the two elements are considered to be associated.
[0105] The forward and backward list creation module is used to create a forward list and / or a backward list for each element in the social network. The forward list records the elements that are directly or indirectly associated with the element in the forward direction, and the backward list records the elements that are directly or indirectly associated with the element in the backward direction.
[0106] The social network building module includes an element adding module for adding elements to the social network and an element removing module for removing elements from the social network.
[0107] Specifically, the element adding module includes:
[0108] The leaf node list building module is used to construct a leaf node list for storing element nodes;
[0109] The social network addition module is used to determine the number of features contained in the element to be added, and to add the element to be added to the corresponding level of the social network according to the number of features.
[0110] The element node addition module is used to determine whether the leaf node list is empty. If it is, the element is added to the leaf node list as an element node.
[0111] If the leaf node list is not empty, then iterate through the element nodes in the leaf node list:
[0112] If the element to be added is not associated with any element node, then the element to be added is added to the leaf node list and becomes an element node.
[0113] If the current element node has an inclusion relationship with the element to be added, then traverse the forward associated element nodes in the forward list of the current element node; if the element to be added has no association with the forward associated element nodes, then add it to the forward list of the current element node, and at the same time determine whether the current element node is a full node; if it is a full node, then remove the current element node from the leaf node list, and add the non-full nodes in the backward list of the current element node to the leaf node list; the full node is a leaf node with a connection number equal to n with the adjacent layers;
[0114] If the current element node has an inclusion relationship with the element to be added, then traverse the backward element nodes in the backward list of the current element node; if the element to be added is not related to the backward element node, then add it to the backward list of the current element node, and at the same time determine whether the current element node is a full node; if it is a full node, then remove the current element node from the leaf node list, and add the non-full nodes in the forward list of the current element node to the leaf node list.
[0115] The forward and backward list sorting module is used to determine whether the element to be added has an inclusion or being included relationship with the backward element node in the backward list of the element node when the element to be added is added to the backward list or forward list of the element node. If so, the element to be added is added to the backward list or forward list of the backward element node.
[0116] When an element to be added is added to the forward list of an element node, it is determined whether the element to be added has an inclusion relationship or is included with the forward associated element node in the forward list of the element node. If so, the element to be added is added to the backward list or forward list of the forward associated element.
[0117] The element removal module includes:
[0118] The social network removal module is used to remove elements from the corresponding levels of the social network.
[0119] The Leaf Node Removal module is used to remove the element node to be removed from the leaf node list, and after removal, update the forward list and backward list of the remaining element nodes.
[0120] The above are merely preferred embodiments of the present invention. It should be noted that the above preferred embodiments should not be considered as limitations on the present invention, and the scope of protection of the present invention should be determined by the scope defined in the claims. For those skilled in the art, several improvements and modifications can be made without departing from the spirit and scope of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for improving the efficiency of element matching based on a social network model, characterized in that The application relates to a method for constructing a social network of pictures. The method comprises the following steps: obtaining characteristic values of pictures to be matched through a characteristic algorithm, and performing data normalization on the characteristic values to express the features included in the pictures by the data normalized values; constructing a social network by using the data normalized values; the social network is divided into n+1 layers according to the number of features possessed by the pictures, and n is the total number of feature categories of the pictures; establishing a correlation between pictures in each network layer and pictures in other layers, and considering that two pictures are correlated if the features possessed by the two pictures have a containing or contained relationship; establishing a forward list or / and a backward list for each picture in the social network, and recording pictures directly or indirectly forward correlated to the picture in the forward list and recording pictures directly or indirectly backward correlated to the picture in the backward list; a method for adding pictures to the social network comprises the following steps: constructing a leaf node list for storing picture nodes; determining the number of features contained in a picture to be added, and adding the picture to be added to a corresponding layer of the social network according to the number of features; judging whether the leaf node list is empty, and if yes, adding the picture to the leaf node list as a picture node; if the leaf node list is not empty, traversing the picture nodes in the leaf node list: if the picture to be added has no correlation with all the picture nodes, adding the picture to be added to the leaf node list as a picture node; if the current picture node has a containing relationship with the picture to be added, traversing the forward correlation picture nodes in the forward list of the current picture node; if the picture to be added has no correlation with the forward correlation picture nodes, adding the picture to be added to the forward list of the current picture node, and judging whether the current picture node is a full node; if the current picture node is a full node, removing the current picture node from the leaf node list, and adding non-full nodes in the backward list of the current picture node to the leaf node list; the full node is a leaf node with a contact number equal to n in an adjacent layer; 2. The method of claim 1, wherein the method is characterized by: if the current picture node has a contained relationship with the picture to be added, traversing the backward picture nodes in the backward list of the current picture node; if the picture to be added has no correlation with the backward picture nodes, adding the picture to be added to the backward list of the current picture node, and judging whether the current picture node is a full node; if the current picture node is a full node, removing the current picture node from the leaf node list, and adding non-full nodes in the forward list of the current picture node to the leaf node list. when the picture to be added is added to the backward list of a picture node, judging whether the picture to be added has a containing or contained relationship with the backward picture nodes in the backward list of the picture node; if yes, adding the picture to be added to the backward list or the forward list of the backward picture node; 3. The method of claim 1, wherein the method further comprises: when the picture to be added is added to the forward list of a picture node, judging whether the picture to be added has a containing or contained relationship with the forward correlation picture nodes in the forward list of the picture node; if yes, adding the picture to be added to the backward list or the forward list of the forward correlation picture node. a method for removing pictures in the social network comprises the following steps: removing a picture to be removed from a corresponding layer of the social network. Remove the picture node to be removed in the leaf node list, and update the forward list and the backward list of the remaining picture nodes after removal.
4. The method of claim 1, wherein the method further comprises: The normalized feature value is a 2 binary of n bits, wherein each bit represents a feature, and 1 and 0 on each bit represent the presence or absence of the feature.
5. A system for improving the efficiency of element matching based on a social network model, characterized in that The method comprises the following steps: The feature value normalization module is configured to obtain feature values of the picture to be matched by using a feature extraction algorithm, and perform data normalization on the feature values to express the features included in the picture by using the normalized data values. The social network construction module is configured to construct a social network by using the normalized data values; the social network is divided into n+1 layers according to the number of features possessed by the pictures, wherein n is the total number of feature categories of the pictures; the pictures in each network layer are associated with the pictures in other layers, and two pictures are considered to be associated if the features possessed by the two pictures have a containing or contained relationship. The forward and backward list establishment module is configured to establish a forward list or / and a backward list for each picture in the social network, wherein the forward list records the pictures directly or indirectly associated in the forward direction with the picture, and the backward list records the pictures directly or indirectly associated in the backward direction with the picture. The social network construction module comprises a picture adding module configured to add pictures to the social network, and a picture removing module configured to remove pictures from the social network. The picture adding module comprises a leaf node list construction module configured to construct a leaf node list for storing picture nodes. The social network adding module is configured to determine the number of features included in the picture to be added, and add the picture to be added to the corresponding layer of the social network according to the number of features. The picture node adding module is configured to determine whether the leaf node list is empty, and if the leaf node list is empty, add the picture to the leaf node list as a picture node. If the leaf node list is not empty, traverse the picture nodes in the leaf node list: If the picture to be added is not associated with all the picture nodes, add the picture to be added to the leaf node list as a picture node. If the current picture node has a containing relationship with the picture to be added, traverse the forward associated picture nodes in the forward list of the current picture node; if the picture to be added is not associated with the forward associated picture nodes, add the picture to the forward list of the current picture node, and determine whether the current picture node is a full node; if the current picture node is a full node, remove the current picture node from the leaf node list, and add the non-full nodes in the backward list of the current picture node to the leaf node list; the full node is a leaf node with a number of adjacent layer contacts equal to n. If the current picture node has a contained relationship with the picture to be added, traverse the backward picture nodes in the backward list of the current picture node; if the picture to be added is not associated with the backward picture nodes, add the picture to the backward list of the current picture node, and determine whether the current picture node is a full node; if the current picture node is a full node, remove the current picture node from the leaf node list, and add the non-full nodes in the forward list of the current picture node to the leaf node list.
6. The system of claim 5, wherein The picture adding module further comprises a forward-backward list arrangement module, configured to, when a to-be-added picture is added to a backward list of a picture node, judge whether the to-be-added picture has a containing or contained relationship with a backward picture node in the backward list of the picture node, and if so, add the to-be-added picture to a backward list or a forward list of the backward picture node. When the to-be-added picture is added to a forward list of a picture node, judge whether the to-be-added picture has a containing or contained relationship with a forward picture node in the forward list of the picture node, and if so, add the to-be-added picture to a backward list or a forward list of the forward picture node.
7. The system of claim 5, wherein The picture removing module comprises a social network removing module, configured to remove a to-be-removed picture from a corresponding level of a social network. A leaf node list removing module is configured to remove a to-be-removed picture node from a leaf node list, and update forward lists and backward lists of remaining picture nodes after the removal.
Citation Information
Patent Citations
Model element matching method for type attribute graph model
CN104598591A
Automatic generation and recommendation of communities in a social network
US7680770B1