Method, device and electronic device for entity recognition of multi-source data
By encoding multiple asset data into vectors and using clustering algorithms, the problem of identifying asset data of the same entity host in a multi-source data environment is solved, achieving accurate management and unified representation of data.
Patent Information
- Application Number
- CN202311712458.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-13
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2043-12-13
AI Technical Summary
In a multi-source data environment, it is difficult to determine whether asset data corresponding to different data sources belongs to the same entity host, resulting in management and identification difficulties.
By obtaining multiple asset data (such as IP address, MAC address, Hostname and SN code), using a preset encoding method to convert it into a vector form, and using cosine similarity calculation and clustering algorithm to determine the similarity of the vectors, thereby identifying Asset data belonging to the same entity host.
It realizes the effective identification of asset data of the same entity host in a multi-source data environment, improves the accuracy and efficiency of data management, and ensures the unified representation and comparison of data from different data sources.
Smart Images

Figure CN117668581B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a method, device and electronic device for entity recognition of multi-source data. Background Art
[0002] Usually, a physical host has multiple identification data, which are IP address, MAC address, Hostname or SN code. And if a physical host has multiple physical or virtual network interfaces, each interface can be assigned a unique IP address, that is, a host may have multiple IP addresses. For multiple identification data of the same host, they will be aggregated into one asset data.
[0003] In an organization or enterprise, there are often a large number of physical hosts, and the organization or enterprise will store a variety of asset data obtained from multiple different data sources. If the organization or enterprise determines whether the entities corresponding to different asset data are the same, it can be more convenient for the organization or enterprise to manage asset data from the same host.
[0004] Therefore, a method is needed to determine the asset data belonging to the same host among the asset data corresponding to different data sources. Summary of the invention
[0005] The present application provides a method, device and electronic device for entity identification of multi-source data, which is convenient for determining asset data belonging to the same host among asset data corresponding to different data sources.
[0006] In a first aspect of the present application, a method for entity identification of multi-source data is provided, in which multiple asset data are obtained, each asset data includes one or more of an IP address, a MAC address, a Hostname and an SN code; a preset method is used to encode the first asset data to obtain a first encoding result, and the second asset data is encoded to obtain a second encoding result, the first asset data and the second asset data are any two asset data among the multiple asset data; according to the first encoding result, a first vector corresponding to the first asset data is determined, and according to the second encoding result, a second vector corresponding to the second asset data is determined; the cosine similarity is used to calculate the similarity between the first vector and the second vector; according to the similarity, a preset clustering algorithm is used to cluster the first vector and the second vector to obtain a first cluster number and a second cluster number, the first cluster number is the cluster number corresponding to the first vector, and the second cluster number is the cluster number corresponding to the second vector; if it is determined that the first cluster number and the second cluster number are the same, it is determined that the first asset data and the second asset data are asset data of the same entity host.
[0007] By adopting the above technical solution, multiple asset data are collected from different data sources, and the asset data is encoded using a preset method, the corresponding encoding results are obtained and converted into vector form, which helps to uniformly represent different types of asset data as vectors, providing a basis for subsequent similarity calculation and clustering analysis. Multiple vectors are clustered using a preset clustering algorithm to determine that the asset data corresponding to the vectors belonging to the same cluster number come from the same physical host, so that asset data from the same host can be effectively identified in multi-source data.
[0008] Optionally, a preset method is used to encode the first asset data to obtain a first encoding result, and the second asset data is encoded. Before obtaining the second encoding result, the method also includes: determining the first identification data included in the first asset data, the first identification data is any one of the first IP address, the first MAC address, the first Hostname and the first SN code; determining the second identification data included in the second asset data, the second identification data is any one of the second IP address, the second MAC address, the second Hostname and the second SN code; determining the distinguishing characteristic values in the first identification data and the second identification data, wherein if the first identification data is the same as the second identification data, the first identification data and the second identification data are the same distinguishing characteristic value; if the first identification data is different from the second identification data, the first identification data and the second identification data are two distinguishing characteristic values; setting each distinguishing characteristic value as the comparison content of the comparison dimension.
[0009] By adopting the above technical solution, by comparing whether the first identification data and the second identification data are the same, the distinguishing characteristic values in the first identification data and the second identification data are determined. If the two are the same, they are the same distinguishing characteristic value; if they are different, they are two different distinguishing characteristic values. This helps to distinguish the characteristics of the asset data. Each distinguishing characteristic value is set as the comparison content of the comparison dimension. Such a setting provides a comparison basis used in subsequent encoding, maps the asset data to a specific comparison dimension, and facilitates subsequent encoding.
[0010] Optionally, a preset method is used to encode the first asset data to obtain a first encoding result, which specifically includes: determining whether the first comparison content is the same as the first identification data, the first comparison content is any one of the multiple comparison contents; if the first comparison content is the same as the first identification data, determining that the first comparison result of the first comparison content in the comparison dimension is a first numerical value, and the comparison dimension corresponds to the first comparison content; if the first comparison content is different from the first identification data, determining that the second comparison result of the first comparison content in the comparison dimension is a second numerical value; and combining the first comparison result and the second comparison result in a preset order to obtain a first encoding result.
[0011] By adopting the above technical solution, the first asset data is encoded and mapped to the first encoding result. In the encoding process, multi-dimensional comparison content is adopted. Specifically, by judging whether the first identification data is the same as the first comparison content, flexible selection is achieved among multiple comparison contents, thereby more comprehensively expressing the relevance and difference of the data. The first comparison result and the second comparison result are combined in a preset order to obtain the final first encoding result.
[0012] Optionally, based on the first encoding result, determining the first vector corresponding to the first asset data specifically includes: based on the first numerical value, determining that the length of the first vector in the comparison dimension corresponding to the first numerical value is a first length, and the numerical value of the first length is the same as the first numerical value; based on the second numerical value, determining that the length of the first vector in the comparison dimension corresponding to the second numerical value is a second length, and the numerical value of the second length is the same as the second numerical value.
[0013] By adopting the above technical solution, the first vector is determined according to the first encoding result, so that the vectorized representation of the first asset data is realized. The relationship between the first value and the second value is directly connected with the determination of the vector length, so that a clear mapping is established between the value and the vector.
[0014] Optionally, if it is determined that the first cluster number and the second cluster number are the same, then the first asset data and the second asset data are determined to be asset data of the same entity host, specifically including: if the similarity between the first vector and the second vector is greater than or equal to a preset similarity threshold, then the first cluster number and the second cluster number are determined to be the same, so as to determine that the first asset data and the second asset data are asset data of the same entity host.
[0015] By adopting the above technical solution, if the similarity between the first vector and the second vector reaches a preset standard, the first asset data and the second asset data are determined as a first cluster. If the similarity does not reach the preset standard, they are respectively assigned to different clusters. In this way, multiple clusters can be generated, each cluster corresponding to a physical host.
[0016] Optionally, according to the similarity, the first vector and the second vector are clustered using a preset clustering algorithm to obtain the first cluster number and the second cluster number. The method also includes: if the similarity between the first vector and the second vector is less than a preset similarity threshold, determining that the first cluster number and the second cluster number are different to determine that the first asset data and the second asset data are not asset data of the same entity host; if it is determined that the similarity between the third vector and the first vector is greater than or equal to the preset similarity threshold, setting the cluster number corresponding to the third vector to the first cluster number, the third vector is the vector corresponding to the third asset data, and the third asset data is any one of the multiple asset data except the first asset data and the second asset data.
[0017] By adopting the above technical solution, when it is determined that the similarity between the first vector and the second vector does not reach the preset standard, it is judged that the first asset data and the second asset data do not come from the same entity body. It is helpful to distinguish different entity hosts and improve the accuracy of entity recognition. The number of the first asset data is determined as the first cluster number, and the number of the second asset data is determined as the second cluster number. This number allocation method helps to identify and track different asset data, making it easier to identify and manage in subsequent processing and analysis. When it is determined that the similarity between the third vector and the first vector reaches the preset standard, the number of the third asset data is determined as the first number. Thereby ensuring that the first asset data and the third asset data can be correctly associated with the same entity host. When it is determined that the similarity between the third vector and the first vector reaches the preset standard, the third asset data is assigned to the first cluster. This means that when generating clustering results, multiple asset data are processed and correctly classified into the corresponding entity host cluster.
[0018] Optionally, obtaining multiple asset data specifically includes: establishing connections with multiple data sources; and receiving at least one asset data sent by any one data source.
[0019] By adopting the above technical solution, connections with multiple data sources are established, which means that asset data can be obtained from different data sources, which helps to comprehensively utilize information from different sources. By establishing connections with multiple data sources, at least one asset data sent from any data source can be received, providing a more comprehensive data foundation for subsequent processing.
[0020] In a second aspect of the present application, a multi-source data entity identification device is provided, the device includes an acquisition module, a processing module and a determination module, wherein: the acquisition module is used to acquire multiple asset data, each asset data includes one or more of an IP address, a MAC address, a Hostname and an SN code; the processing module is used to encode the first asset data using a preset method to obtain a first encoding result, and encode the second asset data to obtain a second encoding result, the first asset data and the second asset data are any two of the multiple asset data; the processing module is also used to determine a first vector corresponding to the first asset data according to the first encoding result, and determine a second vector corresponding to the second asset data according to the second encoding result, to obtain multiple vectors corresponding to the multiple asset data; the processing module is also used to calculate the similarity between the first vector and the second vector using cosine similarity; the processing module is also used to cluster multiple vectors using a preset clustering algorithm according to the similarity to obtain cluster numbers corresponding to the multiple vectors; the determination module is used to determine that the asset data corresponding to the vectors belonging to the same cluster number come from the same entity host.
[0021] In the third aspect of the present application, an electronic device is provided, including a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device performs any of the methods described above.
[0022] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed, any of the above methods is executed.
[0023] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0024] 1. Use the preset encoding method to convert each asset data into a corresponding vector identifier, so that data from different sources can be compared and analyzed in the same vector space. Through the similarity between vectors, it is determined whether the two asset data come from the same entity host, thereby performing entity identification.
[0025] 2. By comparing the identification data of the first asset data and the second asset data, the differential feature values of the first asset data and the second asset data can be accurately determined. These feature values reflect the differences between the two. For example, if the IP addresses of the two entities are the same, it means that the first asset data and the second asset data are similar in the IP address dimension. Otherwise, it means that there are differences. The determined distinguishing feature values are set as the comparison content of the comparison dimension, so that each feature value becomes a dimension in the subsequent similarity calculation.
[0026] 3. By comparing the identification data of the first asset data and the second asset data, determine whether they are the same in different comparison contents. For the same comparison contents, the comparison results of the corresponding dimensions are set to the same value, indicating similarity in this dimension. For different comparison contents, the comparison results of the corresponding dimensions are set to different values. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a flowchart of an entity recognition method for multi-source data provided in an embodiment of the present application.
[0028] Figure 2 It is an example schematic diagram of an entity recognition method for multi-source data provided in an embodiment of the present application.
[0029] Figure 3 It is a module schematic diagram of an entity recognition device for multi-source data provided in an embodiment of the present application.
[0030] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.
[0031] Explanation of the reference numerals: 301, acquisition module; 302, processing module; 303, determination module; 401, processor; 402, communication bus; 403, user interface; 404, network interface; 405, memory. DETAILED DESCRIPTION
[0032] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0033] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.
[0034] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0035] The present application provides a method, device and electronic device for entity recognition of multi-source data, referring to Figure 1 , Figure 1 1 is a flow chart of a method for entity identification of multi-source data provided in an embodiment of the present application. The method is applied to a server and includes steps S101 to S107, which are as follows:
[0036] Step S101: Acquire multiple pieces of asset data, each piece of asset data includes one or more of an IP address, a MAC address, a Hostname, and a SN code.
[0037] In the above steps, obtaining multiple asset data specifically includes: establishing connections with multiple data sources; and receiving at least one asset data sent by any data source.
[0038] Specifically, the server communicates with different systems and obtains multiple asset data from different systems. One system can obtain one or more asset data.
[0039] Step S102: using a preset method, encode the first asset data to obtain a first encoding result, and encode the second asset data to obtain a second encoding result, wherein the first asset data and the second asset data are any two asset data among multiple asset data.
[0040] Before the above steps, the method also includes: determining the first identification data included in the first asset data, the first identification data is any one of the first IP address, the first MAC address, the first Hostname and the first SN code, determining the second identification data included in the second asset data, the second identification data is any one of the second IP address, the second MAC address, the second Hostname and the second SN code; determining the distinguishing characteristic value in the first identification data and the second identification data, wherein if the first identification data is the same as the second identification data, the first identification data and the second identification data are the same distinguishing characteristic value, and if the first identification data is different from the second identification data, the first identification data and the second identification data are two distinguishing characteristic values; setting each distinguishing characteristic value as the comparison content of the comparison dimension.
[0041] Specifically, for the first asset data and the second asset data, determine the identification data they include, such as IP address, MAC address, Hostname and SN code. For each type of identification data, compare the corresponding value in the first asset data and the second asset data. If the two are the same, use the value as a distinguishing feature value; if the two are different, use the two as two different distinguishing feature values. Set each distinguishing feature value as the comparison content of the comparison dimension, and each distinguishing feature value will become a dimension for the subsequent encoding process and similarity calculation.
[0042] For example, if Figure 2As shown, the first IP address of the first asset data is '10.33.70.221', the first MAC address is '00:50:56:a8:ea:02', the first Hostname is 'dev-server', the first SN code is '12345', and the second IP address of the second asset data is '10.33.70.218', the second MAC address is '00:50:56:a8:b6:7f', the second Hostname is 'test-server', and the second SN code is '12345'. At this time, the comparison content of the comparison dimension is: for IP address, the first IP address is different from the second IP address, as two distinguishing feature values; for MAC address, the first MAC address and the second MAC address are different, as two distinguishing feature values; for Hostname, the first Hostname and the second Hostname are different, as two distinguishing feature values; for SN code, the first SN code and the second SN code are the same, as a distinguishing technical feature value. The determined distinguishing characteristic value is the sum of the distinguishing characteristic values corresponding to the identification data, which is 7.
[0043] The first asset data is encoded using a preset method to obtain a first encoding result, which specifically includes:
[0044] Determine whether the first comparison content is the same as the first identification data, the first comparison content is any one of the multiple comparison contents; if the first comparison content is the same as the first identification data, determine that the first comparison result of the first comparison content in the comparison dimension is a first value, and the comparison dimension corresponds to the first comparison content; if the first comparison content is different from the first identification data, determine that the second comparison result of the first comparison content in the comparison dimension is a second value; combine the first comparison result and the second comparison result in a preset order to obtain a first coding result.
[0045] Specifically, determine any one of the multiple comparison contents as the first comparison content. Obtain identification data in the first asset data. Determine whether the first comparison content is the same as the first identification data. If the first comparison content is the same as the first identification data, then the first comparison result is a first numerical value, and the first numerical value is 1 in the embodiment of the present application. If the first comparison content is different from the first identification data, then the first comparison result is a second numerical value, and the second numerical value is 0 in the embodiment of the present application. Clarify the preset order. In the above example, there are a total of 7 distinguishing feature values, which are arranged in a certain order as multiple comparison contents according to the 7 distinguishing feature values. For example, the preset order is to sort in the order of IP address, MAC address, Hostname, and SN code.
[0046] For example, if Figure 2As shown, 7 distinguishing characteristic values are used as 7 comparison contents. For the first comparison content, that is, any comparison content among the multiple comparison contents, if the first comparison content is '10.33.70.221', it is determined whether the first comparison content '10.33.70.221' is the same as the first identification data. If the first IP address '10.33.70.221' in the first identification data is the same as the first comparison content, then under the comparison dimension corresponding to the comparison content '10.33.70.221', the corresponding first comparison result is the first value, and the first value is 1. If the first comparison content is '10.33.70.218', there is no value in the first identification data that is the same as the first comparison content, that is, at this time, for the first comparison content, the first identification data is different from the first comparison content, then under the comparison dimension corresponding to the comparison content '10.33.70.218', the corresponding second comparison result is the second value, and the second value is 0.
[0047] Step S103: Determine a first vector corresponding to the first asset data according to the first encoding result, and determine a second vector corresponding to the second asset data according to the second encoding result, to obtain multiple vectors corresponding to multiple asset data.
[0048] In the above steps, according to the first numerical value, it is determined that the first vector has the first length at the length of the comparison dimension corresponding to the first numerical value, and the numerical value of the first length is the same as the first numerical value; according to the second numerical value, it is determined that the second vector has the second length at the length of the comparison dimension corresponding to the second numerical value, and the numerical value of the second length is the same as the second numerical value.
[0049] Specifically, the first value is used to determine the length of the first vector in the comparison dimension, and the length is defined as the first length. If the first value is 1, the first length is 1. The second value is used to determine the length of the second vector in the second comparison dimension, and the length is defined as the second length. If the second value is 0, the second length is also 0.
[0050] For example, if Figure 2 As shown, after encoding, the first vector corresponding to the first asset data is (1,1,1,1,0,0,0), 1 indicates that in the first four dimensions of the vector, the length of the vector in the first four dimensions is 1, and 0 indicates that the length of the last three dimensions of the vector is 0. The vector corresponding to the second asset data is (0,0,0,1,1,1,1).
[0051] It should be noted that the first asset data and the second asset data are any two asset data among the multiple asset data. When the server continuously takes any two asset data for encoding, it will encode the multiple asset data and generate multiple vectors corresponding to the multiple asset data. One asset data corresponds to one vector. For the convenience of explanation, this application takes the first asset data and the second asset data as an example for explanation.
[0052] Step S104: Calculate the similarity between the first vector and the second vector using cosine similarity.
[0053] In the above steps, the cosine similarity is used to calculate the cosine value of the angle between the first vector and the second vector to measure the similarity between the first vector and the second vector.
[0054] Step S105: clustering the first vector and the second vector using a preset clustering algorithm according to the similarity to obtain a first cluster number and a second cluster number, wherein the first cluster number is the cluster number corresponding to the first vector, and the second cluster number is the cluster number corresponding to the second vector.
[0055] The above steps specifically include: if it is determined that the similarity between the first vector and the second vector reaches the preset standard, then it is determined that the first asset data and the second asset data are from the same physical host, and the first asset data and the second asset data are determined as the first cluster number; if it is determined that the similarity between the first vector and the second vector does not reach the preset standard, then it is determined that the first asset data and the second asset data are different clusters, the number of the first asset data is determined as the first cluster number, and the number of the second asset data is determined as the second cluster number; if it is determined that the similarity between the third vector and the first vector reaches the preset standard, then the number of the third asset data is determined to be the first cluster, the third vector is the vector corresponding to the third asset data, and the third asset data is any one of the multiple asset data except the first asset data and the second asset data.
[0056] Specifically, the preset standard is a preset similarity threshold value defined by the user in the clustering algorithm, and the preset similarity threshold value is used to determine whether the similarity of two vectors is greater than the threshold value, so as to determine whether the two vectors are in the same cluster. If the similarity reaches the preset standard, the two vectors are divided into the same cluster, that is, the first cluster; if the similarity does not reach the preset standard, the two vectors are divided into different clusters, that is, the first cluster and the second cluster; at this time, continue to judge the similarity between the third vector and the first vector, and judge whether its similarity reaches the preset standard. If it reaches the preset standard, the third vector is classified into the first cluster, and so on, until all vectors corresponding to all asset data have obtained their corresponding clusters, and for each cluster, a unique number is assigned to it, and it is judged that the asset data contained in the clusters with the same number comes from the same physical host.
[0057] In another possible implementation, the specific implementation steps of the clustering algorithm are to calculate the similarity of any two asset data, i.e., the first vector and the second vector corresponding to the first asset data and the second asset data, to obtain multiple similarities corresponding to any two vectors. At this time, the preset standard is the highest similarity among the multiple similarities, and the asset data corresponding to the vector with the highest similarity are divided into the same cluster, and the vectors in the cluster are compared with the third vector, and the similarity between the third vector and all the vectors in the cluster (the first vector and the second vector) is calculated respectively, and the average value of the similarity is taken as the similarity between the third vector and all the vectors in the cluster. By analogy, the above steps are repeated to continue to find the highest similarity value, and the corresponding vectors at this time are merged into one cluster until all vectors of all asset data obtain their corresponding clusters.
[0058] Step S106: If it is determined that the first cluster number and the second cluster number are the same, then it is determined that the first asset data and the second asset data are asset data of the same physical host.
[0059] In the above steps, according to the steps in step S105, unique numbers are set for different clusters, and it is determined that the asset data corresponding to the vectors of the clusters with the same unique number are from the same entity.
[0060] Reference Figure 3 The present application also provides an entity identification device for multi-source data, which includes: an acquisition module 301, a processing module 302 and a determination module 303; the processing module 302 is used to encode the first asset data using a preset method to obtain a first encoding result, and encode the second asset data to obtain a second encoding result, the first asset data and the second asset data are any two asset data among the multiple asset data; the processing module 302 is also used to determine the first vector corresponding to the first asset data according to the first encoding result, and determine the second vector corresponding to the second asset data according to the second encoding result; the processing module 302 is also used to calculate the similarity between the first vector and the second vector using cosine similarity; the processing module 302 is also used to cluster the first vector and the second vector using a preset clustering algorithm according to the similarity to obtain a first cluster number and a second cluster number, the first cluster number is the cluster number corresponding to the first vector, and the second cluster number is the cluster number corresponding to the second vector; the determination module 303 is used to determine that the first asset data and the second asset data are asset data of the same entity host if it is determined that the first cluster number and the second cluster number are the same.
[0061] In a possible implementation, before the processing module 302 uses a preset method to encode the first asset data to obtain a first encoding result, and encodes the second asset data to obtain a second encoding result, the method also includes: the determination module 303 determines the first identification data included in the first asset data, the first identification data is any one of the first IP address, the first MAC address, the first Hostname and the first SN code, and determines the second identification data included in the second asset data, the second identification data is any one of the second IP address, the second MAC address, the second Hostname and the second SN code; the determination module 303 determines the distinguishing feature values in the first identification data and the second identification data, wherein if the first identification data is the same as the second identification data, the first identification data and the second identification data are the same distinguishing feature value, and if the first identification data is different from the second identification data, the first identification data and the second identification data are two distinguishing feature values; the processing module 302 sets each distinguishing feature value as the comparison content of the comparison dimension.
[0062] In a possible implementation, the processing module 302 uses a preset method to encode the first asset data to obtain a first encoding result, which specifically includes: the processing module 302 determines whether the first comparison content is the same as the first identification data, and the first comparison content is any one of the multiple comparison contents; if the first comparison content is the same as the first identification data, the determination module 303 determines that the first comparison result of the first comparison content in the comparison dimension is a first value, and the comparison dimension corresponds to the first comparison content; if the first comparison content is different from the first identification data, the determination module 303 determines that the second comparison result of the first comparison content in the comparison dimension is a second value; the processing module 302 combines the first comparison result and the second comparison result in a preset order to obtain a first encoding result.
[0063] In a possible implementation, the processing module 302 determines the first vector corresponding to the first asset data according to the first encoding result, specifically including: the determination module 303 determines that the length of the first vector in the comparison dimension corresponding to the first numerical value is the first length according to the first numerical value, and the numerical value of the first length is the same as the first numerical value; the determination module 303 determines that the length of the first vector in the comparison dimension corresponding to the second numerical value is the second length according to the second numerical value, and the numerical value of the second length is the same as the second numerical value.
[0064] In a possible implementation, if the determination module 303 determines that the first cluster number and the second cluster number are the same, then the first asset data and the second asset data are determined to be asset data of the same entity host, specifically including: if the similarity between the first vector and the second vector is greater than or equal to a preset similarity threshold, then the determination module 303 determines that the first cluster number and the second cluster number are the same, so as to determine that the first asset data and the second asset data are asset data of the same entity host.
[0065] In a possible implementation, the processing module 302 clusters the first vector and the second vector according to the similarity using a preset clustering algorithm to obtain the first cluster number and the second cluster number. The method further includes: if the similarity between the first vector and the second vector is less than a preset similarity threshold, the determination module 303 determines that the first cluster number and the second cluster number are different to determine that the first asset data and the second asset data are not asset data of the same entity host; if it is determined that the similarity between the third vector and the first vector is greater than or equal to the preset similarity threshold, the processing module 302 sets the cluster number corresponding to the third vector to the first cluster number, the third vector is the vector corresponding to the third asset data, and the third asset data is any one of the multiple asset data except the first asset data and the second asset data.
[0066] In a possible implementation, the acquisition module 301 acquires multiple pieces of asset data, specifically including: establishing connections with multiple data sources; the acquisition module 301 receives at least one piece of asset data sent by any one of the data sources.
[0067] It should be noted that: when the device provided in the above embodiment realizes its function, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0068] This embodiment also provides an electronic device, referring to Figure 4 The electronic device may include: at least one processor 401 , at least one communication bus 402 , a user interface 403 , a network interface 404 , and at least one memory 405 .
[0069] The communication bus 402 is used to realize the connection and communication between these components.
[0070] The user interface 403 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 403 may also include a standard wired interface and a wireless interface.
[0071] The network interface 404 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0072] Among them, the processor 401 may include one or more processing cores. The processor 401 uses various interfaces and lines to connect various parts in the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 405, and calling data stored in the memory 405. Optionally, the processor 401 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 401 can integrate one or a combination of a central processing unit 401 (Central Processing Unit, CPU), an image processor 401 (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 401, and it can be implemented separately through a chip.
[0073] Among them, the memory 405 may include a random access memory 405 (Random Access Memory, RAM), and may also include a read-only memory 405 (Read-Only Memory). Optionally, the memory 405 includes a non-transitory computer-readable storage medium. The memory 405 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 405 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 405 may also be at least one storage device located away from the aforementioned processor 401. As shown in the figure, the memory 405 as a computer storage medium may include an operating system, a network communication module, a user interface 403 module, and an application program of an entity recognition method for multi-source data.
[0074] exist Figure 4 In the electronic device shown, the user interface 403 is mainly used to provide an input interface for the user and obtain data input by the user; and the processor 401 can be used to call an application program of an entity recognition method for multi-source data stored in the memory 405. When executed by one or more processors 401, the electronic device executes one or more methods in the above-mentioned embodiments.
[0075] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.
[0076] The present application also provides a computer-readable storage medium, which stores instructions. When executed by one or more processors 401, the electronic device executes one or more methods in the above embodiments.
[0077] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0078] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0079] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0080] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0081] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory 405. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory 405 and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory 405 includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk.
[0082] The above is only an exemplary embodiment of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, it will be easy for those skilled in the art to think of other embodiments of the present disclosure. This application is intended to cover any variation, use or adaptive change of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field that are not recorded in the present disclosure.
Claims
1. A method for entity recognition of multi-source data, characterized in that: The method comprises: Acquire multiple asset data, each of which includes one or more of an IP address, a MAC address, a Hostname, and a SN code; Using a preset method, the first asset data is encoded to obtain a first encoding result, and the second asset data is encoded to obtain a second encoding result, wherein the first asset data and the second asset data are any two asset data among the plurality of asset data; Determine a first vector corresponding to the first asset data according to the first encoding result, and determine a second vector corresponding to the second asset data according to the second encoding result; Calculating the similarity between the first vector and the second vector using cosine similarity; According to the similarity, clustering the first vector and the second vector using a preset clustering algorithm to obtain a first cluster number and a second cluster number, wherein the first cluster number is the cluster number corresponding to the first vector, and the second cluster number is the cluster number corresponding to the second vector; If it is determined that the first cluster number and the second cluster number are the same, then it is determined that the first asset data and the second asset data are asset data of the same physical host; Before encoding the first asset data using a preset method to obtain a first encoding result and encoding the second asset data to obtain a second encoding result, the method further includes: Determine the first identification data included in the first asset data, where the first identification data is any one of a first IP address, a first MAC address, a first Hostname, and a first SN code; determine the second identification data included in the second asset data, where the second identification data is any one of a second IP address, a second MAC address, a second Hostname, and a second SN code; Determine a distinguishing characteristic value in the first identification data and the second identification data, wherein if the first identification data and the second identification data are the same, then the first identification data and the second identification data are the same distinguishing characteristic value; if the first identification data and the second identification data are different, then the first identification data and the second identification data are two distinguishing characteristic values; Setting each of the distinguishing feature values as comparison content of the comparison dimension; The first asset data is encoded by a preset method to obtain a first encoding result, which specifically includes: Determine whether a first comparison content is identical to the first identification data, wherein the first comparison content is any one of the plurality of comparison contents; If the first comparison content is identical to the first identification data, determining that a first comparison result of the first comparison content in the comparison dimension is a first value, and the comparison dimension corresponds to the first comparison content; If the first comparison content is different from the first identification data, determining that a second comparison result of the first comparison content in the comparison dimension is a second value; Combining the first comparison result and the second comparison result in a preset order to obtain the first encoding result; The determining, according to the first encoding result, a first vector corresponding to the first asset data specifically includes: According to the first value, determining that the length of the first vector in the comparison dimension corresponding to the first value is a first length, and the value of the first length is the same as the first value; According to the second value, it is determined that the length of the first vector in the comparison dimension corresponding to the second value is a second length, and the value of the second length is the same as the second value.
2. The entity recognition method for multi-source data according to claim 1, characterized in that: If it is determined that the first cluster number and the second cluster number are the same, determining that the first asset data and the second asset data are asset data of the same physical host specifically includes: If the similarity between the first vector and the second vector is greater than or equal to a preset similarity threshold, it is determined that the first cluster number and the second cluster number are the same, so as to determine that the first asset data and the second asset data are asset data of the same physical host.
3. The entity recognition method for multi-source data according to claim 1, characterized in that: After clustering the first vector and the second vector according to the similarity using a preset clustering algorithm to obtain a first cluster number and a second cluster number, the method further includes: If the similarity between the first vector and the second vector is less than a preset similarity threshold, determining that the first cluster number and the second cluster number are different, so as to determine that the first asset data and the second asset data are not asset data of the same physical host; If it is determined that the similarity between the third vector and the first vector is greater than or equal to a preset similarity threshold, the cluster number corresponding to the third vector is set to the first cluster number, the third vector is a vector corresponding to third asset data, and the third asset data is any one of the multiple asset data except the first asset data and the second asset data.
4. The entity recognition method for multi-source data according to claim 1, characterized in that: The acquisition of multiple asset data specifically includes: Establish connections to multiple data sources; Receive at least one item of asset data sent by any one of the data sources.
5. An entity recognition device for multi-source data, characterized in that: The device is used to execute the method according to any one of claims 1 to 4, and comprises an acquisition module (301), a processing module (302) and a determination module (303), wherein: The acquisition module (301) is used to acquire multiple asset data, each of which includes one or more of an IP address, a MAC address, a Hostname, and a SN code; The processing module (302) is used to encode the first asset data using a preset method to obtain a first encoding result, and to encode the second asset data to obtain a second encoding result, wherein the first asset data and the second asset data are any two asset data among the plurality of asset data; The processing module (302) is further used to determine a first vector corresponding to the first asset data according to the first encoding result, and to determine a second vector corresponding to the second asset data according to the second encoding result; The processing module (302) is further used to calculate the similarity between the first vector and the second vector using cosine similarity; The processing module (302) is further configured to cluster the first vector and the second vector using a preset clustering algorithm according to the similarity to obtain a first cluster number and a second cluster number, wherein the first cluster number is the cluster number corresponding to the first vector, and the second cluster number is the cluster number corresponding to the second vector; The determination module (303) is used to determine that the first asset data and the second asset data are asset data of the same physical host if it is determined that the first cluster number and the second cluster number are the same.
6. An electronic device, characterized in that: The electronic device comprises a processor (401), a memory (405), a user interface (403) and a network interface (404), wherein the memory (405) is used to store instructions, the user interface (403) and the network interface (404) are used to communicate with other devices, and the processor (401) is used to execute the instructions stored in the memory (405) so that the electronic device executes the method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 4 is performed.
Citation Information
Patent Citations
Unsupervised representation learning method and device based on multi-source heterogeneous features
CN114219084A
Text topic generation method and device, equipment and storage medium
CN114492429A
Abnormal account identification method and device, equipment and storage medium
CN115982664A
Resource matching method and device, electronic equipment and storage medium
CN116069499A
Knowledge base alignment method and apparatus, computer device and storage medium
WO2020114022A1
