WO2021047021A1 - 信息挖掘方法、装置、设备和存储介质 - Google Patents

信息挖掘方法、装置、设备和存储介质 Download PDF

Info

Publication number
WO2021047021A1
WO2021047021A1 PCT/CN2019/117858 CN2019117858W WO2021047021A1 WO 2021047021 A1 WO2021047021 A1 WO 2021047021A1 CN 2019117858 W CN2019117858 W CN 2019117858W WO 2021047021 A1 WO2021047021 A1 WO 2021047021A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
node
node data
identification list
friend
Prior art date
Application number
PCT/CN2019/117858
Other languages
English (en)
French (fr)
Inventor
邓强
张娟
屠宁
赵之砚
施奕明
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021047021A1 publication Critical patent/WO2021047021A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9536Search customisation based on social or collaborative filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering

Definitions

  • This application relates to the field of data analysis, and in particular to a method, device, equipment and storage medium for information mining.
  • graph data mining is an important method in relationship mining and group profiling.
  • Graph data is composed of node data and edges.
  • the node data in the graph is used to indicate the main body that is connected, and the edge is used to indicate the association between the main bodies. The denser the edge, the greater the edge weight, and the stronger the association.
  • the current typical environment for graph computing is the GraphX environment in the Spark project, the core of which is the realization of the Pregel graph computing model.
  • Graph data is mainly composed of node data attributes and edge attributes.
  • the amount of node data attributes far exceeds the edge attributes.
  • the inventor realizes that the existing GraphX computing model splits graph data into edge-centric data groups in a node-edge-node pattern, and a node associated with multiple edges will be in the data group of each edge. Replication leads to a large amount of redundant storage of node data, which brings a lot of resource consumption for computing.
  • the parameter configuration in GraphX lacks flexibility, and it is difficult to find a solution when a computing bottleneck occurs, which makes it impossible to make better recommendations even if good data is obtained, which severely limits its usability.
  • the present application provides a method for mining configuration information, which can solve the problem of a large amount of resource consumption caused by calculation in the prior art.
  • the first aspect of the present application provides an information mining method, including: loading user data into memory; the user data includes node data and edge data; the node data is used to record the attributes of the node data
  • the node data includes at least friend information; the edge data refers to the attributes of the edge, used to record the relationship between people; traverse the target node data and edge data in the memory, and establish the target node data as The data group of the center; the target node data is any node data of the multiple node data; the edge data in the data group is used to transfer the identification list of the target node data to the adjacent node; the The identification list is used to store the data of all adjacent nodes; obtain the identification list through the adjacent nodes, and remove the data of the adjacent nodes in the identification list to obtain an identification list from which the adjacent node data is removed; The identification list for removing the adjacent node data refers to the two-degree relationship of the target node; the two-degree relationship refers to the second-degree relationship refers to the data of
  • Neighbor(i) represents the i-th friend of the target node.
  • Score represents the number of common good. Calculate the intimacy of the mutual friend, and recommend friends whose intimacy is higher than a first threshold.
  • the intimacy calculation formula is executed by the following mathematical formula:
  • the second aspect of the present application provides an information mining device, including: an input and output module that loads user data into memory; the node data is used to record the attributes of the node data; the node data includes at least friend information; Edge data refers to the attributes of edges, which are used to record the relationship between people; the processing module traverses the target node data and edge data in the memory, and establishes a data group centered on the target node data; the target node The data is any node data among the multiple node data; the edge data in the data group is used to transfer the identification list of the target node data to the adjacent node; the identification list is used to store all adjacent nodes The data; obtain the identification list through the adjacent node, and remove the data of the adjacent node in the identification list, to obtain an identification list from which the adjacent node data is removed; the removal of the adjacent node data
  • the identification list of refers to the second-degree relationship of the target node; the second-degree relationship refers to the second-degree relationship refers to the interval of one no
  • Neighbor(i) represents the i-th friend of the target node
  • Score represents the number of good friends
  • the intimacy is executed by the following mathematical formula:
  • a third aspect of the present application provides an information mining device, including: a memory and at least one processor, the memory stores instructions, the memory and the at least one processor are interconnected through a wire; the at least one processor The device invokes the instructions in the memory, so that the information mining equipment executes the method described in the first aspect.
  • the fourth aspect of the present application provides a computer-readable storage medium that stores instructions in the computer-readable storage medium, and when the computer instructions run on a computer, the computer executes the method described in the first aspect. .
  • user data is loaded into the memory; the user data includes node data and edge data; the node data is used to record the attributes of the node data; the node data includes at least friend information; the edge Data refers to the attributes of edges, which are used to record the relationship between people; traverse the target node data and edge data in the memory to establish a data group centered on the target node data; the target node data is the Any node data in a plurality of node data; use the edge data in the data group to transfer the identification list of the target node data to the adjacent node; the identification list is used to store the data of all adjacent nodes; through The adjacent node obtains an identification list, and removes the data of the adjacent node in the identification list to obtain an identification list from which the adjacent node data is removed; the identification list from which the adjacent node data is removed is Refers to the two-degree relationship of the target node; the two-degree relationship refers to the two-degree relationship that refers to one node data in the two
  • Neighbor(i) represents the i-th friend of the target node.
  • Score represents the number of common good. Calculate the intimacy of the mutual friend, and recommend friends whose intimacy is higher than a first threshold.
  • the intimacy calculation formula is executed by the following mathematical formula:
  • the basic unit of processing is the node and all the connected edges.
  • the node-edge basic unit centered on the node is used. When a node collects its edge attributes, only the basic unit containing the node needs to be operated. Since the basic unit retains all the edges connected by the nodes, it avoids edge traversal and the large number of aggregation operations it brings.
  • the proposed method avoids the edge-centered basic unit of using node-edge-node in GraphX, thereby avoiding the waste of a large amount of storage resources caused by multiple copies of nodes and node attributes.
  • the intimacy relationship is obtained according to a simple mathematical formula, which reduces the complexity of calculation.
  • FIG. 1 is a schematic flowchart of an information mining method in an embodiment of this application
  • Figure 2 is a schematic diagram of the structure of an information mining device in an embodiment of the application
  • Fig. 3 is a schematic diagram of the structure of a computer device for information mining in an embodiment of the application.
  • the embodiments of the present application provide a method, device, equipment, and storage medium for information mining, which are used to avoid the use of node-edge-node edge-centric basic units in GraphX, thereby avoiding duplicating nodes and node attributes A large amount of waste of storage resources caused many times.
  • the intimacy relationship is obtained according to a simple mathematical formula, which reduces the complexity of calculation.
  • steps or modules may include other steps or modules that are not clearly listed or are inherent to these processes, methods, products, or equipment.
  • the division of modules in this application is only a logical division In actual applications, there may be other divisions when implemented. For example, multiple modules may be combined or integrated in another system, or some features may be ignored or not implemented.
  • the user data includes node data and edge data.
  • the node data is used to record the attributes of the node data.
  • the node data includes at least friend information.
  • the edge data refers to the attributes of the edge and is used to record the relationship between people.
  • the side data includes at least family relations, friend relations, and company department relations.
  • the node data includes ID number, mobile phone number, gender, friend information, age, and hobbies.
  • the target node data is any node data in the plurality of node data.
  • the data unit includes the edge data and the two node data associated with the edge data. Therefore, in the data unit saved by GraphX, the same node data will appear in different edge-centric data groups, which will cause redundant storage of node data and occupy additional resources.
  • the identification list is used to store the data of all adjacent nodes.
  • the transfer is performed by side data.
  • the edge of a records the node data adjacent to it, and a has three edges that point to the three node data of b, c, and d respectively. Therefore, by traversing the three edges of a, the list of [b, c, d] can be passed to the data of the three adjacent nodes of a.
  • the identification list for removing the adjacent node data refers to the second-degree relationship of the target node.
  • the two-degree relationship refers to a two-degree relationship, which means that one node data is separated from two node data.
  • the identity list of a is [b, c, d], pass [b, c, d] to node b, node c, and node d, and take node b as an example to remove the information identity of node b in the identity list
  • the list becomes [c, d], so node b forms a second-degree relationship with nodes c and d.
  • the identification list becomes [b, d], so the c node forms a second-degree relationship with the b and d nodes.
  • GraphX's edge-centric data group processing method not only causes the duplication of node data, but also the duplication of the data identification list collected by the node, which causes a large amount of data redundancy and wastes storage resources.
  • Neighbor(i) represents the i-th friend of the target node.
  • Score represents the number of common good.
  • each mutual friend it is equivalent to treat each mutual friend equally and contribute 1 point. However, among mutual friends, some people have many friends and some have few friends. When a common friend has a small number of friends, the mutual friend should be more important, so It can be weighted by dividing by the number of friends of each mutual friend.
  • the intimacy calculation formula is executed by the following mathematical formula:
  • the penalty factor can be adjusted according to the situation. Increased intimacy characteristics by adding To make it more likely to recommend someone you know.
  • the method before the user performs the calculation on the user data, the method further includes: collecting the completed user data, each of the node data has a unique identification number ID, and is stored on the external memory; the user data It is part of the collected user data.
  • the storing on an external memory the method further includes:
  • a SparkRDD is generated according to the text file, and the SparkRDD is converted into a data file during calculation.
  • Reading data into Spark through the data file facilitates GraphX to perform graph calculations.
  • the text file may be a file in formats such as excel, txt, json, etc., which is used to save the acquired user data of the database.
  • the method further includes:
  • kmeans to perform a clustering operation on the common friend includes:
  • the attributes of the resources of the resource set are marked according to the preset n-dimensional attributes to generate a new resource set.
  • the feature extraction is performed on the new resource set by the extraction function to obtain the feature vector and the initial sample space is obtained.
  • the K value is obtained through the parameter bootstrap method, and the K-means clustering is used to classify the initial sample space, so as to divide the initial sample space into K-type resources.
  • the obtaining the K value through the parameter bootstrap method includes:
  • the K value is taken as a preset value, and K-means method is used to obtain K-type statistical values, and a statistical model is obtained.
  • a collection of data samples is generated through the model of the statistics.
  • the using K-means clustering to classify the initial sample space includes:
  • K eigenvectors are arbitrarily selected from the initial sample space as initial cluster centers.
  • the method before the loading user data into the memory, the method further includes:
  • Performing data cleaning on the obtained user data includes:
  • the information is selected by using a structured query language, and the user data of the same monitoring point is used as a group, the repeated user data search is performed, and the repeated user data of the same attribute is deleted.
  • the upper limit and the lower limit are determined by the triple standard deviation method
  • the user data range is constructed according to the upper limit and the lower limit, and if the user data does not fall within the range, then it is determined User data are outliers and will be eliminated.
  • Fig. 2 shows a schematic structural diagram of an information mining device 20, which can be applied to information mining.
  • the information mining apparatus in the embodiment of the present application can implement the steps corresponding to the information mining method performed in the embodiment corresponding to FIG. 1 above.
  • the functions implemented by the information mining device 20 can be implemented by hardware, or implemented by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above-mentioned functions, and the modules may be software and/or hardware.
  • the information mining apparatus may include an input/output module 201 and a processing module 202.
  • the input/output module 201 can be used to control the input, output, and acquisition operations of the input/output module 201.
  • the input/output module 201 can be used to load user data into the memory.
  • the user data includes node data and edge data.
  • the node data is used to record the attributes of the node data.
  • the node data includes at least friend information.
  • the edge data refers to the attributes of the edge and is used to record the relationship between people.
  • the processing module 202 may be used to traverse the target node data and edge data in the memory, and establish a data group centered on the target node data.
  • the target node data is any node data in the plurality of node data.
  • the edge data in the data group is used to transfer the identification list of the target node data to adjacent nodes.
  • the identification list is used to store the data of all adjacent nodes.
  • the identification list for removing the adjacent node data refers to the second-degree relationship of the target node.
  • the two-degree relationship refers to a two-degree relationship, which means that one node data is separated from two node data.
  • the number of mutual friends for extracting friend information is executed by the following mathematical formula:
  • Neighbor(i) represents the i-th friend of the target node.
  • Score represents the number of common good.
  • the intimacy calculation formula is executed by the following mathematical formula:
  • the processing module 202 is further configured to:
  • each of the node data has a unique identification number ID, and is stored on the external storage.
  • the processing module 202 is further configured to:
  • a SparkRDD is generated according to the text file, and the SparkRDD is converted into a data file during calculation.
  • Reading data into Spark through the data file facilitates GraphX to perform graph calculations.
  • the processing module 202 is further configured to:
  • the attributes of the resources of the resource set are marked according to the preset n-dimensional attributes to generate a new resource set.
  • the feature extraction is performed on the new resource set by the extraction function to obtain the feature vector and the initial sample space is obtained.
  • the K value is obtained through the parameter bootstrap method, and the K-means clustering is used to classify the initial sample space, so as to divide the initial sample space into K-type resources.
  • the processing module 202 is further configured to:
  • the K value is taken as a preset value, and K-means method is used to obtain K-type statistical values, and a statistical model is obtained.
  • a collection of data samples is generated through the model of the statistics.
  • the processing module 202 is further configured to:
  • K eigenvectors are arbitrarily selected from the initial sample space as initial cluster centers.
  • the processing module 202 is further configured to:
  • the information is selected by using a structured query language, and the user data of the same monitoring point is used as a group, the repeated user data search is performed, and the repeated user data of the same attribute is deleted.
  • the upper limit and the lower limit are determined by the triple standard deviation method
  • the user data range is constructed according to the upper limit and the lower limit, and if the user data does not fall within the range, then it is determined User data are outliers and will be eliminated.
  • the creation device in the embodiment of the present application is separately introduced above from the perspective of modular functional entities.
  • the following describes a computer device from the perspective of hardware, as shown in FIG. 3, which includes: a processor, a memory, an input and output unit (or Is a transceiver, not identified in FIG. 3) and a computer program stored in the memory and running on the processor.
  • the computer program may be a program corresponding to the information mining method in the embodiment corresponding to FIG. 1.
  • the computer program may be a program corresponding to the information mining method in the embodiment corresponding to FIG. 1.
  • the so-called processor can be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
  • the processor is the control center of the computer device, and various interfaces and lines are used to connect various parts of the entire computer device.
  • the memory may be used to store the computer program and/or module, and the processor implements the computer by running or executing the computer program and/or module stored in the memory and calling data stored in the memory.
  • the memory may mainly include a storage program area and a storage data area.
  • the storage program area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may store Data created based on the use of mobile phones (such as audio data, video data, etc.), etc.
  • the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disks, memory, plug-in hard disks, smart media cards (SMC), and secure digital (SD) cards.
  • non-volatile memory such as hard disks, memory, plug-in hard disks, smart media cards (SMC), and secure digital (SD) cards.
  • Flash Card at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
  • the input and output units can also be replaced by receivers and transmitters, and they can be the same or different physical entities. When they are the same physical entity, they can be collectively referred to as input and output units.
  • the input and output can be a transceiver.
  • the memory may be integrated in the processor, or may be provided separately from the processor.
  • the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium.
  • the computer-readable storage medium stores computer instructions, and when the computer instructions are executed on the computer, the computer executes the following steps:
  • the user data includes node data and edge data; the node data is used to record the attributes of the node data; the node data includes at least friend information; the edge data refers to the attributes of the edge, and To record the relationship between people;
  • the target node data is any node data among the multiple node data;
  • the identification list is used to store the data of all the adjacent nodes
  • the identification list from which the adjacent node data is removed Refers to the two-degree relationship of the target node; the two-degree relationship means that the two-degree relationship refers to the interval of one node data in two node data;
  • Neighbor(i) represents the i-th friend of the target node
  • Score represents the number of common good
  • the intimacy calculation formula is executed by the following mathematical formula:

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种信息挖掘的方法、装置、设备和存储介质,方法包括:将用户数据加载进内存(101);遍历内存中的目标节点数据和边数据,建立以所述目标节点数据为中心的数据组(102);利用数据组中的边数据将目标节点数据的标识列表传递给相邻节点(103);通过相邻节点获得标识列表,并去除所述标识列表中的相邻节点的数据,得到去除相邻节点数据的标识列表(104);提取去除相邻节点数据的标识列表的好友信息,以提取好友信息中的共同好友(105);计算共同好友的亲密度,推荐所述亲密度高于第一阈值的好友(106)。该方法提供了一种模型而避免了将节点以及节点属性复制多次带来的存储资源的浪费。根据简单的数学公式获得亲密度关系,使得计算的繁杂度减少。

Description

信息挖掘方法、装置、设备和存储介质
本申请要求于2019年9月9日提交中国专利局、申请号为201910857778.7、发明名称为“用户关系挖掘方法、装置、设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及数据分析领域,尤其涉及一种信息挖掘的方法、装置、设备和存储介质。
背景技术
在社交领域中,图数据挖掘是关系挖掘和群体画像中的重要方法。图数据由节点数据和边组成,图中的节点数据用于表示发生连接的主体,边用来表示主体之间的关联,边越密集,边权重越大,表示关联越强。目前图计算的典型环境是Spark项目中的GraphX环境,其核心是对Pregel图计算模型的实现。
图数据主要由节点数据属性和边属性构成。在社交网络的图数据中,节点数据属性的量远远超过边属性。发明人意识到现有的GraphX计算模型将图数据拆分成节点-边-节点模式的以边为中心的数据组,和多条边相关联的某个节点会在每一条边的数据组中复制,导致节点数据的大量冗余存储,为计算带来大量的资源消耗。同时GraphX中的参数配置缺乏灵活性,出现计算瓶颈时难以寻找解决方案,使得就算获得很好的数据,也无法做到比较好的推荐,严重限制了其可用性。
发明内容
本申请提供了一种通过配置信息挖掘的方法,能够解决现有技术中计算带来大量的资源消耗的问题。
为了解决上述问题,本申请第一方面提供了一种信息挖掘的方法,包括:将用户数据加载进内存;所述用户数据包括节点数据以及边数据;所述节点数据用于记录节点数据的属性;所述节点数据至少包括好友信息;所述边数据是指边的属性,用于记录人与人之间的关系;遍历内存中的目标节点数据和边数据,建立以所述目标节点数据为中心的数据组;所述目标节点数据为所述多个节点数据中的任一节点数据;利用数据组中的所述边数据将所述目标节点数据的标识列表传递给相邻节点;所述标识列表用于存储所有相邻节点的数据;通过所述相邻节点获得标识列表,并去除所述标识列表中的所述相邻节点的数据,得到去除所述相邻节点数据的标识列表;所述去除所述相邻节点数据的标识列表是指所述目标节点的二度关系;所述两度关系是指二度关系是指两个节点数据中间隔一个节点数据;提取去除所述相邻节点数据的标识列表的好友信息,以提取所述好友信息中的共同好友;所述提取好友 信息的共同好友数通过以下数学公式进行执行:
Figure PCTCN2019117858-appb-000001
其中,Neighbor(i)表示第i个所述目标节点的好友。Score表示共同好好的数量。计算所述共同好友的亲密度,推荐所述亲密度高于第一阈值的好友。所述亲密度计算公式通过以下数学公式进行执行:
Figure PCTCN2019117858-appb-000002
其中,
Figure PCTCN2019117858-appb-000003
为u与f i好友之间的所述亲密度,
Figure PCTCN2019117858-appb-000004
为f i与fof建立好友之间的所述亲密度,0.3为惩罚因子。
本申请第二方面提供了一种信息挖掘的装置,包括:输入输出模块,将用户数据加载进内存;所述节点数据用于记录节点数据的属性;所述节点数据至少包括好友信息;所述边数据是指边的属性,用于记录人与人之间的关系;处理模块,遍历内存中的目标节点数据和边数据,建立以所述目标节点数据为中心的数据组;所述目标节点数据为所述多个节点数据中的任一节点数据;利用数据组中的所述边数据将所述目标节点数据的标识列表传递给相邻节点;所述标识列表用于存储所有相邻节点的数据;通过所述相邻节点获得标识列表,并去除所述标识列表中的所述相邻节点的数据,得到去除所述相邻节点数据的标识列表;所述去除所述相邻节点数据的标识列表是指所述目标节点的二度关系;所述两度关系是指二度关系是指两个节点数据中间隔一个节点数据;提取去除所述相邻节点数据的标识列表的好友信息,以提取所述好友信息中的共同好友;所述提取好友信息的共同好友数通过以下数学公式进行执行:
Figure PCTCN2019117858-appb-000005
其中,Neighbor(i)表示第i个所述目标节点的好友;Score表示共同好好的数量;计算所述共同好友的亲密度,推荐所述亲密度高于第一阈值的好友;所述亲密度计算公式通过以下数学公式进行执行:
Figure PCTCN2019117858-appb-000006
其中,
Figure PCTCN2019117858-appb-000007
为u与f i好友之间的所述亲密度,
Figure PCTCN2019117858-appb-000008
为f i与fof建立好友之间的所述亲密度,0.3为惩罚因子。
本申请第三方面提供了一种信息挖掘的设备,包括:存储器和至少一个处理器,所述存储器中存储有指令,所述存储器和所述至少一个处理器通过线路互联;所述至少一个处理器调用所述存储器中的所述指令,以使得所述信息挖掘的设备执行上述第一方面所述的方法。
本申请的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述计算机指令在计算机上运行时,使得计算机执 行上述第一方面所述的方法。
本申请提供的技术方案中,将用户数据加载进内存;所述用户数据包括节点数据以及边数据;所述节点数据用于记录节点数据的属性;所述节点数据至少包括好友信息;所述边数据是指边的属性,用于记录人与人之间的关系;遍历内存中的目标节点数据和边数据,建立以所述目标节点数据为中心的数据组;所述目标节点数据为所述多个节点数据中的任一节点数据;利用数据组中的所述边数据将所述目标节点数据的标识列表传递给相邻节点;所述标识列表用于存储所有相邻节点的数据;通过所述相邻节点获得标识列表,并去除所述标识列表中的所述相邻节点的数据,得到去除所述相邻节点数据的标识列表;所述去除所述相邻节点数据的标识列表是指所述目标节点的二度关系;所述两度关系是指二度关系是指两个节点数据中间隔一个节点数据;提取去除所述相邻节点数据的标识列表的好友信息,以提取所述好友信息中的共同好友;所述提取好友信息的共同好友数通过以下数学公式进行执行:
Figure PCTCN2019117858-appb-000009
其中,Neighbor(i)表示第i个所述目标节点的好友。Score表示共同好好的数量。计算所述共同好友的亲密度,推荐所述亲密度高于第一阈值的好友。所述亲密度计算公式通过以下数学公式进行执行:
Figure PCTCN2019117858-appb-000010
其中,
Figure PCTCN2019117858-appb-000011
为u与f i好友之间的所述亲密度,
Figure PCTCN2019117858-appb-000012
为f i与fof建立好友之间的所述亲密度,0.3为惩罚因子。相较于现有技术,本申请提供了一种计算模型。处理的基本单元是节点及其相连的所有边,使用节点-边的以节点为中心的基本单元,当某个节点收集其边属性时,仅需要对包含所述节点的基本单元进行操作。由于基本单元保留了节点相连的所有边,避免了边遍历以及其带来的大量聚合操作。所提方法避免了GraphX中使用节点-边-节点的以边为中心的基本单元,从而避免了将节点以及节点属性复制多次带来的大量存储资源的浪费。根据简单的数学公式获得亲密度关系,使得计算的繁杂度减少。
附图说明
图1为本申请实施例中信息挖掘的方法的流程示意图;
图2为本申请实施例中信息挖掘的装置的结构示意图;
图3为本申请实施例中信息挖掘的计算机设备的结构示意图。
具体实施方式
本申请实施例提供了一种信息挖掘的方法、装置、设备及存储介质,用于避免了GraphX中使用节点-边-节点的以边为中心的基本单元,从而避免了将节点以及节点属性复制多次带来的大量存储资源的浪费。根据简单的数学公式获得亲密度关系,使得计算的繁杂度减少。
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例进行描述。
应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或模块的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或模块,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或模块,本申请中所出现的模块的划分,仅仅是一种逻辑上的划分,实际应用中实现时可以有另外的划分方式,例如多个模块可以结合成或集成在另一个系统中,或一些特征可以忽略,或不执行。
请参照图1,以下对本申请提供一种信息挖掘的方法,包括:
101、将用户数据加载进内存。
所述用户数据包括节点数据以及边数据。所述节点数据用于记录节点数据的属性。所述节点数据至少包括好友信息。所述边数据是指边的属性,用于记录人与人之间的关系。
所述边数据至少包括亲属关系,朋友关系以及公司部门关系。所述节点数据包括身份证号、手机号、性别、好友信息、年龄以及爱好。
102、遍历内存中的目标节点数据和边数据,建立以所述目标节点数据为中心的数据组。
所述目标节点数据为所述多个节点数据中的任一节点数据。
解决拷贝通过GraphX建立以边为中心的数据单元,所述数据单元包含所述边数据以及所述边数据关联的两个节点数据。因此GraphX保存的数据单元中,同一个节点数据会出现在不同边为中心的数据组中,从而造成节点数据的冗余存储,占用额外资源。
103、利用数据组中的所述边数据将所述目标节点数据的标识列表传递给相邻节点。
所述标识列表用于存储所有相邻节点的数据。
所述传递通过边数据进行传递。例如a的边记录了与之相邻的节点数据,a有三个边,分别指向b,c,d三个节点数据。因此,通过遍历a的三个边,即可将[b,c,d]这个列表传递到a的三个相邻节点数据上。
104、通过所述相邻节点获得标识列表,并去除所述标识列表中的所述相邻节点的数据,得到去除所述相邻节点数据的标识列表。
所述去除所述相邻节点数据的标识列表是指所述目标节点的二度关系。所述两度关系是指二度关系是指两个节点数据中间隔一个节点数据。
a的标识列表是[b,c,d],将[b,c,d]传递给b节点和、c节点和d节点,以传递给b节点为例,去除标识列表中的b节点信息标识列表变成了[c, d],因此b节点与c和d节点形成二度关系。同理若传递给c节点,则去除标识列表中的c节点信息,标识列表变成了[b、d],因此c节点与b、d节点形成二度关系。
在本例中,通过使用以节点为中心的数据组,对列表数据进行了高效的传递,且避免了节点数据的复制。相比之下,GraphX以边为中心的数据组处理方式不仅造成节点数据的复制,也造成节点收集的数据标识列表的复制,造成大量数据冗余,浪费存储资源。
105、提取去除所述相邻节点数据的标识列表的好友信息,以提取所述好友信息中的共同好友。
所述提取好友信息的共同好友数通过以下数学公式进行执行:
Figure PCTCN2019117858-appb-000013
其中,Neighbor(i)表示第i个所述目标节点的好友。Score表示共同好好的数量。
相当于对每个共同好友一视同仁,都贡献1分,但是共同好友中,有些人好友多,有些好友少,当某个共同好友的所述好友数较少时,这个共同好友应该更加重要,所以可以通过除以每个共同好友的所述好友数进行加权。
如果所述好友数相差过大,需要通过开方、对数等方式进行处理。具体如下:
Figure PCTCN2019117858-appb-000014
Figure PCTCN2019117858-appb-000015
106、计算所述共同好友的亲密度,推荐所述亲密度高于第一阈值的好友。
所述亲密度计算公式通过以下数学公式进行执行:
Figure PCTCN2019117858-appb-000016
其中,
Figure PCTCN2019117858-appb-000017
为u与f i好友之间的所述亲密度,
Figure PCTCN2019117858-appb-000018
为f i与fof建立好友之间的所述亲密度,0.3为惩罚因子。
所述亲密度相差越大,权重越小。惩罚因子可以视情况进行调整。通过增加增加了亲密度特征
Figure PCTCN2019117858-appb-000019
来使得推荐的是认识的人概率更大。
一些实施方式中,所述用户数据在用户进行运算之前,所述方法还包括:收集完成的用户数据,每个所述节点数据都有唯一标识号ID,并存储在外存储器上;所述用户数据是收集完成的用户数据的一部分。
一些实施方式中,所述存储在外存储器上,所述方法还包括:
将数据库中的用户数据储存到文本文件。
根据所述文本文件生成SparkRDD,在进行计算时将所述SparkRDD转换成数据文件。
通过所述数据文件将数据读入Spark,利于GraphX进行图计算。
所述文本文件可以是excel,txt,json等格式的文件,用于保存获取到的数据库的用户数据。
例如将保存在MySQL中的元数据导出到txt文件中。文件信息保存在txt中,则可以通过SparkContext读取所述txt文件生成SparkRDD,并通过转化格式的接口将SparkRDD转换成DataFrame,方便下一步计算。
一些实施方式中,所述提取所述好友信息中的共同好友之后,所述方法还包括:
对所述共同好友采用kmeans进行聚类操作;所述对共同好友采用kmeans进行聚类操作包括:
采集所述GraphX所处的网络环境的资源,以生成资源集合。
根据预设n维属性对所述资源集合的资源进行属性标记,以生成新的资源集合。
通过提取函数对所述新的资源集合进行特征提取,以得到特征向量,并获取初始样本空间。
通过参数自助法得到K值,并运用K均值聚类对所述初始样本空间进行分类,以将所述初始样本空间分为K类资源。
以及,将所述K类资源归入到每一类的聚类中心所对应的资源图谱类中,以完资源图谱。
将相似好友信息的好友进行聚类,认为他们的各项信息相似度较高,推荐出来的朋友更容易认识,有更多的类似的兴趣爱好等,解决无法推荐较为满意的好友的问题。
一些实施方式中,所述通过参数自助法方法得到K值,包括:
将所述K值取一个预设值,并通过K-means方法得到K种类的统计值,并且获取统计量的模型。
通过所述统计量的模型的生成数据样本集合。
获取估计聚类好坏的指标,从K+1开始起,每次递增1,以逐一模拟生成的样本的聚类的总体类内误差WSS。
在所述聚类的WSS满足预设条件时,接受K+1类,且后面依次增加k,直到不满足所述预设条件,以确定所述K值。
获得一个相对较好的聚类K值,可以获得更好的聚类结果。
一些实施方式中,所述运用K均值聚类对所述初始样本空间进行分类,包括:
从所述初始样本空间中任意选择K个特征向量作为初始聚类中心。
获取所述初始样本空间中的其他对象与所述聚类中心的距离。
将每个类别中的所有对象所对应的均值作为类别的聚类中心,并获取目标函数的值,以更新所述聚类中心,直到更新后的聚类中心与前聚类中心相等或差值小于预设阈值。
随机选取聚类中心,以防止刚开始的聚类中心过近的问题。
一些实施方式中,所述将用户数据加载进内存之前,所述方法还包括:
对获取到的所述用户数据进行数据清洗;所述对获取到的所述用户数据进行数据清洗包括:
利用结构化查询语言选取所述信息,同一监测点位的所述用户数据作为一组,进行重复的所述用户数据查找,并删除相同属性的重复所述用户数据。
或者,通过三倍标准差法确定上限值与下限值,根据所述上限值和下限值构造所述用户数据范围,若所述用户数据不落在所述范围,则判断所述用户数据为异常值并进行剔除。
在数据处理之前将异常的数据进行剔除,以防止错误数据对模型的干扰。
如图2所示的一种信息挖掘的装置20的结构示意图,其可应用于信息挖掘。本申请实施例中的信息挖掘的装置能够实现对应于上述图1所对应的实施例中所执行的信息挖掘的方法的步骤。信息挖掘的装置20实现的功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块,所述模块可以是软件和/或硬件。所述信息挖掘的装置可包括输入输出模块201和处理模块202,所述处理模块202和输入输出模块201的功能实现可参考图1所对应的实施例中所执行的操作,此处不作赘述。输入输出模块201可用于控制所述输入输出模块201的输入、输出以及获取操作。
一些实施方式中,所述输入输出模块201可用于将用户数据加载进内存。所述用户数据包括节点数据以及边数据。所述节点数据用于记录节点数据的属性。所述节点数据至少包括好友信息。所述边数据是指边的属性,用于记录人与人之间的关系。
所述处理模块202可用于遍历内存中的目标节点数据和边数据,建立以所述目标节点数据为中心的数据组。所述目标节点数据为所述多个节点数据中的任一节点数据。
利用数据组中的所述边数据将所述目标节点数据的标识列表传递给相邻节点。所述标识列表用于存储所有相邻节点的数据。
通过所述相邻节点获得标识列表,并去除所述标识列表中的所述相邻节点的数据,得到去除所述相邻节点数据的标识列表。所述去除所述相邻节点数据的标识列表是指所述目标节点的二度关系。所述两度关系是指二度关系是指两个节点数据中间隔一个节点数据。
提取去除所述相邻节点数据的标识列表的好友信息,以提取所述好友信息中的共同好友。所述提取好友信息的共同好友数通过以下数学公式进行执行:
Figure PCTCN2019117858-appb-000020
其中,Neighbor(i)表示第i个所述目标节点的好友。Score表示共同好好的数量。
计算所述共同好友的亲密度,推荐所述亲密度高于第一阈值的好友。所述亲密度计算公式通过以下数学公式进行执行:
Figure PCTCN2019117858-appb-000021
其中,
Figure PCTCN2019117858-appb-000022
为u与f i好友之间的所述亲密度,
Figure PCTCN2019117858-appb-000023
为f i与fof建立好友之间的所述亲密度,0.3为惩罚因子。
一些实施方式中,所述处理模块202还用于:
收集完成的用户数据,每个所述节点数据都有唯一标识号ID,并存储在外存储器上。
一些实施方式中,所述处理模块202还用于:
将数据库中的用户数据储存到文本文件。
根据所述文本文件生成SparkRDD,在进行计算时将所述SparkRDD转换成数据文件。
通过所述数据文件将数据读入Spark,利于GraphX进行图计算。
一些实施方式中,所述处理模块202还用于:
采集所述GraphX所处的网络环境的资源,以生成资源集合。
根据预设n维属性对所述资源集合的资源进行属性标记,以生成新的资源集合。
通过提取函数对所述新的资源集合进行特征提取,以得到特征向量,并获取初始样本空间。
通过参数自助法得到K值,并运用K均值聚类对所述初始样本空间进行分类,以将所述初始样本空间分为K类资源。
以及,将所述K类资源归入到每一类的聚类中心所对应的资源图谱类中,以完资源图谱。
一些实施方式中,所述处理模块202还用于:
将所述K值取一个预设值,并通过K-means方法得到K种类的统计值,并且获取统计量的模型。
通过所述统计量的模型的生成数据样本集合。
获取估计聚类好坏的指标,从K+1开始起,每次递增1,以逐一模拟生成的样本的聚类的总体类内误差WSS。
在所述聚类的WSS满足预设条件时,接受K+1类,且后面依次增加k,直到不满足所述预设条件,以确定所述K值。
一些实施方式中,所述处理模块202还用于:
从所述初始样本空间中任意选择K个特征向量作为初始聚类中心。
获取所述初始样本空间中的其他对象与所述聚类中心的距离。
将每个类别中的所有对象所对应的均值作为类别的聚类中心,并获取目标函数的值,以更新所述聚类中心,直到更新后的聚类中心与前聚类中心相 等或差值小于预设阈值。
一些实施方式中,所述处理模块202还用于:
利用结构化查询语言选取所述信息,同一监测点位的所述用户数据作为一组,进行重复的所述用户数据查找,并删除相同属性的重复所述用户数据。
或者,通过三倍标准差法确定上限值与下限值,根据所述上限值和下限值构造所述用户数据范围,若所述用户数据不落在所述范围,则判断所述用户数据为异常值并进行剔除。
上面从模块化功能实体的角度分别介绍了本申请实施例中的创建装置,以下从硬件角度介绍一种计算机设备,如图3所示,其包括:处理器、存储器、输入输出单元(也可以是收发器,图3中未标识出)以及存储在所述存储器中并可在所述处理器上运行的计算机程序。例如,该计算机程序可以为图1所对应的实施例中信息挖掘的方法对应的程序。例如,当计算机设备实现如图2所示的信息挖掘的装置20的功能时,所述处理器执行所述计算机程序时实现上述图2所对应的实施例中由信息挖掘的装置20执行的信息挖掘的方法中的各步骤。或者,所述处理器执行所述计算机程序时实现上述图2所对应的实施例的信息挖掘的装置20中各模块的功能。又例如,该计算机程序可以为图1所对应的实施例中信息挖掘的方法对应的程序。
所称处理器可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,所述处理器是所述计算机装置的控制中心,利用各种接口和线路连接整个计算机装置的各个部分。
所述存储器可用于存储所述计算机程序和/或模块,所述处理器通过运行或执行存储在所述存储器内的计算机程序和/或模块,以及调用存储在存储器内的数据,实现所述计算机装置的各种功能。所述存储器可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、视频数据等)等。此外,存储器可以包括高速随机存取存储器,还可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
所述输入输出单元也可以用接收器和发送器代替,可以为相同或者不同的物理实体。为相同的物理实体时,可以统称为输入输出单元。该输入输出可以为收发器。
所述存储器可以集成在所述处理器中,也可以与所述处理器分开设置。
本申请还提供一种计算机可读存储介质,该计算机可读存储介质可以为 非易失性计算机可读存储介质,也可以为易失性计算机可读存储介质。计算机可读存储介质存储有计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:
将用户数据加载进内存;所述用户数据包括节点数据以及边数据;所述节点数据用于记录节点数据的属性;所述节点数据至少包括好友信息;所述边数据是指边的属性,用于记录人与人之间的关系;
遍历内存中的目标节点数据和边数据,建立以所述目标节点数据为中心的数据组;所述目标节点数据为所述多个节点数据中的任一节点数据;
利用数据组中的所述边数据将所述目标节点数据的标识列表传递给相邻节点;所述标识列表用于存储所有相邻节点的数据;
通过所述相邻节点获得标识列表,并去除所述标识列表中的所述相邻节点的数据,得到去除所述相邻节点数据的标识列表;所述去除所述相邻节点数据的标识列表是指所述目标节点的二度关系;所述两度关系是指二度关系是指两个节点数据中间隔一个节点数据;
提取去除所述相邻节点数据的标识列表的好友信息,以提取所述好友信息中的共同好友;所述提取好友信息的共同好友数通过以下数学公式进行执行:
Figure PCTCN2019117858-appb-000024
其中,Neighbor(i)表示第i个所述目标节点的好友;Score表示共同好好的数量;
计算所述共同好友的亲密度,推荐所述亲密度高于第一阈值的好友;所述亲密度计算公式通过以下数学公式进行执行:
Figure PCTCN2019117858-appb-000025
其中,
Figure PCTCN2019117858-appb-000026
为u与f i好友之间的所述亲密度,
Figure PCTCN2019117858-appb-000027
为f i与fof建立好友之间的所述亲密度,0.3为惩罚因子。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器或者网络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,凡是利用本申请说明书及附图内 容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,这些均属于本申请的保护之内。

Claims (20)

  1. 一种信息挖掘的方法,包括:
    将用户数据加载进内存;所述用户数据包括节点数据以及边数据;所述节点数据用于记录节点数据的属性;所述节点数据至少包括好友信息;所述边数据是指边的属性,用于记录人与人之间的关系;
    遍历内存中的目标节点数据和边数据,建立以所述目标节点数据为中心的数据组;所述目标节点数据为所述多个节点数据中的任一节点数据;
    利用数据组中的所述边数据将所述目标节点数据的标识列表传递给相邻节点;所述标识列表用于存储所有相邻节点的数据;
    通过所述相邻节点获得标识列表,并去除所述标识列表中的所述相邻节点的数据,得到去除所述相邻节点数据的标识列表;所述去除所述相邻节点数据的标识列表是指所述目标节点的二度关系;所述两度关系是指二度关系是指两个节点数据中间隔一个节点数据;
    提取去除所述相邻节点数据的标识列表的好友信息,以提取所述好友信息中的共同好友;所述提取好友信息的共同好友数通过以下数学公式进行执行:
    Figure PCTCN2019117858-appb-100001
    其中,Neighbor(i)表示第i个所述目标节点的好友;Score表示共同好好的数量;
    计算所述共同好友的亲密度,推荐所述亲密度高于第一阈值的好友;所述亲密度计算公式通过以下数学公式进行执行:
    Figure PCTCN2019117858-appb-100002
    其中,
    Figure PCTCN2019117858-appb-100003
    为u与f i好友之间的所述亲密度,
    Figure PCTCN2019117858-appb-100004
    为f i与fof建立好友之间的所述亲密度,0.3为惩罚因子。
  2. 根据权利要求1所述的信息挖掘的方法,所述用户数据在用户进行运算之前,所述信息挖掘的方法还包括:
    收集完成的用户数据,每个所述节点数据都有唯一标识号ID,并存储在外存储器上;所述用户数据是收集完成的用户数据的一部分。
  3. 根据权利要求2所述的信息挖掘的方法,所述存储在外存储器上,包括:
    将数据库中的用户数据储存到文本文件;
    根据所述文本文件生成SparkRDD,在进行计算时将所述SparkRDD转换成数据文件;
    通过所述数据文件将数据读入Spark,使用GraphX进行图计算。
  4. 根据权利要求1所述的信息挖掘的方法,所述提取所述好友信息中的共同好友之后,所述信息挖掘的方法还包括:
    采集所述GraphX所处的网络环境的资源,以生成资源集合;
    根据预设n维属性对所述资源集合的资源进行属性标记,以生成新的资源集合;
    通过提取函数对所述新的资源集合进行特征提取,以得到特征向量,并获取初始样本空间;
    通过参数自助法得到K值,并运用K均值聚类对所述初始样本空间进行分类,以将所述初始样本空间分为K类资源;
    以及,将所述K类资源归入到每一类的聚类中心所对应的资源图谱类中,以完资源图谱。
  5. 根据权利要求4所述的信息挖掘的方法,所述通过参数自助法方法得到K值,包括:
    将所述K值取一个预设值,并通过K-means方法得到K种类的统计值,并且获取统计量的模型;
    通过所述统计量的模型的生成数据样本集合;
    获取估计聚类好坏的指标,从K+1开始起,每次递增1,以逐一模拟生成的样本的聚类的总体类内误差WSS;
    在所述聚类的WSS满足预设条件时,接受K+1类,且后面依次增加k,直到不满足所述预设条件,以确定所述K值。
  6. 根据权利要求4所述的信息挖掘的方法,所述运用K均值聚类对所述初始样本空间进行分类,包括:
    从所述初始样本空间中任意选择K个特征向量作为初始聚类中心;
    获取所述初始样本空间中的其他对象与所述聚类中心的距离;
    将每个类别中的所有对象所对应的均值作为类别的聚类中心,并获取目标函数的值,以更新所述聚类中心,直到更新后的聚类中心与前聚类中心相等或差值小于预设阈值。
  7. 根据权利要求1所述的信息挖掘的方法,所述将用户数据加载进内存之前,所述方法还包括:
    利用结构化查询语言选取所述信息,同一监测点位的所述用户数据作为一组,进行重复的所述用户数据查找,并删除相同属性的重复所述用户数据;
    或者,通过三倍标准差法确定上限值与下限值,根据所述上限值和下限值构造所述用户数据范围,若所述用户数据不落在所述范围,则判断所述用户数据为异常值并进行剔除。
  8. 一种信息挖掘的装置,包括:
    输入输出模块,将用户数据加载进内存;所述节点数据用于记录节点数据的属性;所述节点数据至少包括好友信息;所述边数据是指边的属性,用于记录人与人之间的关系;
    处理模块,遍历内存中的目标节点数据和边数据,建立以所述目标节点数据为中心的数据组;所述目标节点数据为所述多个节点数据中的任一节点数据;利用数据组中的所述边数据将所述目标节点数据的标识列表传递给相邻节点;所述标识列表用于存储所有相邻节点的数据;通过所述相邻节点获得标识列表,并去除所述标识列表中的所述相邻节点的数据,得到去除所述相邻节点数据的标识列表;所述去除所述相邻节点数据的标识列表是指所述目标节点的二度关系;所述两度关系是指二度关系是指两个节点数据中间隔一个节点数据;提取去除所述相邻节点数据的标识列表的好友信息,以提取所述好友信息中的共同好友;所述提取好友信息的共同好友数通过以下数学公式进行执行:
    Figure PCTCN2019117858-appb-100005
    其中,Neighbor(i)表示第i个所述目标节点的好友;Score表示共同好好的数量;
    计算所述共同好友的亲密度,推荐所述亲密度高于第一阈值的好友;所述亲密度计算公式通过以下数学公式进行执行:
    Figure PCTCN2019117858-appb-100006
    其中,
    Figure PCTCN2019117858-appb-100007
    为u与f i好友之间的所述亲密度,
    Figure PCTCN2019117858-appb-100008
    为f i与fof建立好友之间的所述亲密度,0.3为惩罚因子。
  9. 根据权利要求8所述的信息挖掘的装置,所述处理模块还用于:
    收集完成的用户数据,每个所述节点数据都有唯一标识号ID,并存储在外存储器上;所述用户数据是收集完成的用户数据的一部分。
  10. 根据权利要求9所述的信息挖掘的装置,所述处理模块具体还用于:
    将数据库中的用户数据储存到文本文件;
    根据所述文本文件生成SparkRDD,在进行计算时将所述SparkRDD转换成数据文件;
    通过所述数据文件将数据读入Spark,使用GraphX进行图计算。
  11. 根据权利要求8所述的信息挖掘的装置,所述处理模块还用于:
    采集所述GraphX所处的网络环境的资源,以生成资源集合;
    根据预设n维属性对所述资源集合的资源进行属性标记,以生成新的资源集合;
    通过提取函数对所述新的资源集合进行特征提取,以得到特征向量,并 获取初始样本空间;
    通过参数自助法得到K值,并运用K均值聚类对所述初始样本空间进行分类,以将所述初始样本空间分为K类资源;
    以及,将所述K类资源归入到每一类的聚类中心所对应的资源图谱类中,以完资源图谱。
  12. 根据权利要求11所述的信息挖掘的装置,所述处理模块具体还用于:
    将所述K值取一个预设值,并通过K-means方法得到K种类的统计值,并且获取统计量的模型;
    通过所述统计量的模型的生成数据样本集合;
    获取估计聚类好坏的指标,从K+1开始起,每次递增1,以逐一模拟生成的样本的聚类的总体类内误差WSS;
    在所述聚类的WSS满足预设条件时,接受K+1类,且后面依次增加k,直到不满足所述预设条件,以确定所述K值。
  13. 根据权利要求11所述的信息挖掘的装置,所述处理模块具体还用于:
    从所述初始样本空间中任意选择K个特征向量作为初始聚类中心;
    获取所述初始样本空间中的其他对象与所述聚类中心的距离;
    将每个类别中的所有对象所对应的均值作为类别的聚类中心,并获取目标函数的值,以更新所述聚类中心,直到更新后的聚类中心与前聚类中心相等或差值小于预设阈值。
  14. 根据权利要求8所述的信息挖掘的装置,所述处理模块还用于:
    利用结构化查询语言选取所述信息,同一监测点位的所述用户数据作为一组,进行重复的所述用户数据查找,并删除相同属性的重复所述用户数据;
    或者,通过三倍标准差法确定上限值与下限值,根据所述上限值和下限值构造所述用户数据范围,若所述用户数据不落在所述范围,则判断所述用户数据为异常值并进行剔除。
  15. 一种信息挖掘的设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如下步骤:
    将用户数据加载进内存;所述用户数据包括节点数据以及边数据;所述节点数据用于记录节点数据的属性;所述节点数据至少包括好友信息;所述边数据是指边的属性,用于记录人与人之间的关系;
    遍历内存中的目标节点数据和边数据,建立以所述目标节点数据为中心的数据组;所述目标节点数据为所述多个节点数据中的任一节点数据;
    利用数据组中的所述边数据将所述目标节点数据的标识列表传递给相邻节点;所述标识列表用于存储所有相邻节点的数据;
    通过所述相邻节点获得标识列表,并去除所述标识列表中的所述相邻节点的数据,得到去除所述相邻节点数据的标识列表;所述去除所述相邻节点数据的标识列表是指所述目标节点的二度关系;所述两度关系是指二度关系是指两个节点数据中间隔一个节点数据;
    提取去除所述相邻节点数据的标识列表的好友信息,以提取所述好友信息中的共同好友;所述提取好友信息的共同好友数通过以下数学公式进行执行:
    Figure PCTCN2019117858-appb-100009
    其中,Neighbor(i)表示第i个所述目标节点的好友;Score表示共同好好的数量;
    计算所述共同好友的亲密度,推荐所述亲密度高于第一阈值的好友;所述亲密度计算公式通过以下数学公式进行执行:
    Figure PCTCN2019117858-appb-100010
    其中,
    Figure PCTCN2019117858-appb-100011
    为u与f i好友之间的所述亲密度,
    Figure PCTCN2019117858-appb-100012
    为f i与fof建立好友之间的所述亲密度,0.3为惩罚因子。
  16. 根据权利要求15所述的信息挖掘的设备,所述处理器执行所述计算机程序实现所述用户数据在用户进行运算之前,还包括以下步骤:
    收集完成的用户数据,每个所述节点数据都有唯一标识号ID,并存储在外存储器上;所述用户数据是收集完成的用户数据的一部分。
  17. 根据权利要求16所述的信息挖掘的设备,所述处理器执行所述计算机程序实现所述存储在外存储器上时,包括以下步骤:
    将数据库中的用户数据储存到文本文件;
    根据所述文本文件生成SparkRDD,在进行计算时将所述SparkRDD转换成数据文件;
    通过所述数据文件将数据读入Spark,使用GraphX进行图计算。
  18. 根据权利要求15所述的信息挖掘的设备,所述处理器执行所述计算机程序实现所述提取所述好友信息中的共同好友之后,还包括以下步骤:
    采集所述GraphX所处的网络环境的资源,以生成资源集合;
    根据预设n维属性对所述资源集合的资源进行属性标记,以生成新的资源集合;
    通过提取函数对所述新的资源集合进行特征提取,以得到特征向量,并获取初始样本空间;
    通过参数自助法得到K值,并运用K均值聚类对所述初始样本空间进行分类,以将所述初始样本空间分为K类资源;
    以及,将所述K类资源归入到每一类的聚类中心所对应的资源图谱类中,以完资源图谱。
  19. 根据权利要求17所述的信息挖掘的设备,所述处理器执行所述计算机程序实现所述通过参数自助法方法得到K值时,包括以下步骤:
    将所述K值取一个预设值,并通过K-means方法得到K种类的统计值,并且获取统计量的模型;
    通过所述统计量的模型的生成数据样本集合;
    获取估计聚类好坏的指标,从K+1开始起,每次递增1,以逐一模拟生成的样本的聚类的总体类内误差WSS;
    在所述聚类的WSS满足预设条件时,接受K+1类,且后面依次增加k,直到不满足所述预设条件,以确定所述K值。
  20. 一种计算机可读存储介质,所述计算机可读存储介质中存储计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:
    将用户数据加载进内存;所述用户数据包括节点数据以及边数据;所述节点数据用于记录节点数据的属性;所述节点数据至少包括好友信息;所述边数据是指边的属性,用于记录人与人之间的关系;
    遍历内存中的目标节点数据和边数据,建立以所述目标节点数据为中心的数据组;所述目标节点数据为所述多个节点数据中的任一节点数据;
    利用数据组中的所述边数据将所述目标节点数据的标识列表传递给相邻节点;所述标识列表用于存储所有相邻节点的数据;
    通过所述相邻节点获得标识列表,并去除所述标识列表中的所述相邻节点的数据,得到去除所述相邻节点数据的标识列表;所述去除所述相邻节点数据的标识列表是指所述目标节点的二度关系;所述两度关系是指二度关系是指两个节点数据中间隔一个节点数据;
    提取去除所述相邻节点数据的标识列表的好友信息,以提取所述好友信息中的共同好友;所述提取好友信息的共同好友数通过以下数学公式进行执行:
    Figure PCTCN2019117858-appb-100013
    其中,Neighbor(i)表示第i个所述目标节点的好友;Score表示共同好好的数量;
    计算所述共同好友的亲密度,推荐所述亲密度高于第一阈值的好友;所述亲密度计算公式通过以下数学公式进行执行:
    Figure PCTCN2019117858-appb-100014
    其中,
    Figure PCTCN2019117858-appb-100015
    为u与f i好友之间的所述亲密度,
    Figure PCTCN2019117858-appb-100016
    为f i与fof建立好友之间的所述亲密度,0.3为惩罚因子。
PCT/CN2019/117858 2019-09-09 2019-11-13 信息挖掘方法、装置、设备和存储介质 WO2021047021A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910857778.7A CN110674413B (zh) 2019-09-09 2019-09-09 用户关系挖掘方法、装置、设备和存储介质
CN201910857778.7 2019-09-09

Publications (1)

Publication Number Publication Date
WO2021047021A1 true WO2021047021A1 (zh) 2021-03-18

Family

ID=69077673

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117858 WO2021047021A1 (zh) 2019-09-09 2019-11-13 信息挖掘方法、装置、设备和存储介质

Country Status (2)

Country Link
CN (1) CN110674413B (zh)
WO (1) WO2021047021A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656802A (zh) * 2021-07-19 2021-11-16 同盾科技有限公司 基于知识联邦无向图联邦环检测方法、系统、设备和介质
CN117131364A (zh) * 2023-09-22 2023-11-28 福赛轴承(嘉兴)有限公司 一种滚动轴承的工艺检测集成方法及系统

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114065060B (zh) * 2020-07-28 2023-09-08 中国电信股份有限公司 数据分析方法、装置和存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102637183A (zh) * 2011-02-12 2012-08-15 北京千橡网景科技发展有限公司 用于在社交网络中向用户推荐好友的方法和设备
CN107276843A (zh) * 2017-05-19 2017-10-20 西安电子科技大学 一种基于Spark平台的多目标进化社区检测方法
CN107609165A (zh) * 2017-09-27 2018-01-19 北京科技大学 一种寻找特定人群的方法
CN108073619A (zh) * 2016-11-14 2018-05-25 北京航天长峰科技工业集团有限公司 一种基于图数据结构的数据映射方法
CN108491511A (zh) * 2018-03-23 2018-09-04 腾讯科技(深圳)有限公司 基于图数据的数据挖掘方法和装置、模型训练方法和装置
US20180293316A1 (en) * 2012-12-11 2018-10-11 Tencent Technology (Shenzhen) Company Limited Method and system for second-degree friend query

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10713261B2 (en) * 2013-03-13 2020-07-14 Google Llc Generating insightful connections between graph entities
US20190050898A1 (en) * 2017-08-11 2019-02-14 Grandata, Inc. Bayesian approach to income inference in a communication network
CN109190033B (zh) * 2018-08-23 2022-01-11 微梦创科网络科技(中国)有限公司 一种用户好友推荐方法及系统
CN109951377A (zh) * 2019-03-20 2019-06-28 西安电子科技大学 一种好友分组方法、装置、计算机设备和存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102637183A (zh) * 2011-02-12 2012-08-15 北京千橡网景科技发展有限公司 用于在社交网络中向用户推荐好友的方法和设备
US20180293316A1 (en) * 2012-12-11 2018-10-11 Tencent Technology (Shenzhen) Company Limited Method and system for second-degree friend query
CN108073619A (zh) * 2016-11-14 2018-05-25 北京航天长峰科技工业集团有限公司 一种基于图数据结构的数据映射方法
CN107276843A (zh) * 2017-05-19 2017-10-20 西安电子科技大学 一种基于Spark平台的多目标进化社区检测方法
CN107609165A (zh) * 2017-09-27 2018-01-19 北京科技大学 一种寻找特定人群的方法
CN108491511A (zh) * 2018-03-23 2018-09-04 腾讯科技(深圳)有限公司 基于图数据的数据挖掘方法和装置、模型训练方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
KUNG: "Speaking of Friend Recommendation Algorithm)", 1 February 2016 (2016-02-01), pages 1 - 6, XP009526701, Retrieved from the Internet <URL:https://zhuanlan.zhihu.com/p/20533434> *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656802A (zh) * 2021-07-19 2021-11-16 同盾科技有限公司 基于知识联邦无向图联邦环检测方法、系统、设备和介质
CN113656802B (zh) * 2021-07-19 2024-05-14 同盾科技有限公司 基于知识联邦无向图联邦环检测方法、系统、设备和介质
CN117131364A (zh) * 2023-09-22 2023-11-28 福赛轴承(嘉兴)有限公司 一种滚动轴承的工艺检测集成方法及系统
CN117131364B (zh) * 2023-09-22 2024-02-09 福赛轴承(嘉兴)有限公司 一种滚动轴承的工艺检测集成方法及系统

Also Published As

Publication number Publication date
CN110674413A (zh) 2020-01-10
CN110674413B (zh) 2022-03-25

Similar Documents

Publication Publication Date Title
WO2021047021A1 (zh) 信息挖掘方法、装置、设备和存储介质
EP3248143B1 (en) Reducing computational resources utilized for training an image-based classifier
CN103530334B (zh) 基于比较模板的数据匹配系统和方法
CN110458078B (zh) 一种人脸图像数据聚类方法、系统及设备
CN111325245B (zh) 重复图像识别方法、装置、电子设备及计算机可读存储介质
CN113610239A (zh) 针对机器学习的特征处理方法及特征处理系统
CN110019891B (zh) 图像存储方法、图像检索方法及装置
US20240126817A1 (en) Graph data query
CN110209809B (zh) 文本聚类方法和装置、存储介质及电子装置
CN103345616A (zh) 基于行为分析的指纹存储比对的系统
CN103765421A (zh) 内容控制方法、内容控制装置以及程序
WO2020140624A1 (zh) 从日志中提取数据的方法和相关设备
CN112765150A (zh) 大数据异构融合提取方法及装置
WO2020073526A1 (zh) 基于信任网络的推送方法、装置、计算机设备及存储介质
CN111178196B (zh) 一种细胞分类的方法、装置及设备
CN110516752A (zh) 聚类簇质量评估方法、装置、设备及存储介质
US20160248724A1 (en) Social Message Monitoring Method and Apparatus
CN110825902B (zh) 特征相似性搜索的实现方法、装置、电子设备及存储介质
CN109885831B (zh) 关键术语抽取方法、装置、设备及计算机可读存储介质
CN112307318A (zh) 一种内容发布方法、系统及装置
CN103336800A (zh) 基于行为分析的指纹存储比对的方法
WO2015074493A1 (zh) 一种低频点击的过滤方法、装置、计算机程序以及计算机可读介质
CN113032524A (zh) 商标侵权识别方法、终端设备及存储介质
CN111190902A (zh) 一种医疗数据的结构化方法、装置、设备及存储介质
CN115687676A (zh) 信息检索方法、终端及计算机可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19944809

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19944809

Country of ref document: EP

Kind code of ref document: A1