Community division method and device applied to social contact of student groups

By constructing a student network graph and calculating a similarity matrix, combined with students' consumption behavior and basic attribute data, the problem of low accuracy of the community division algorithm in the existing technology when dealing with large differences in node attributes is solved, achieving a more accurate and comprehensive community delineation.

CN119338617AActive Publication Date: 2025-01-21YUNQI SMART TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411424861.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2025-01-21
Estimated Expiration
2044-10-12

AI Technical Summary

Technical Problem

When the existing community division algorithms deal with large differences in node attributes, they are prone to deviations and cannot fully tap into the similarities between students, resulting in a decrease in the accuracy of community division.

Method used

By obtaining student characteristic data, including consumption data, basic attribute data and portrait label data, a student network graph is constructed, and the similarity matrix between students is calculated through the target structure matrix to divide the community.

Benefits of technology

It combines students' consumption behavior, social network information and basic attribute data to improve the accuracy and comprehensiveness of community division and avoid the limitations of relying solely on edge weights.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119338617A_ABST
    Figure CN119338617A_ABST
Patent Text Reader

Abstract

The invention provides a community division method and device applied to student group social contact, and relates to the field of big data analysis. The method comprises the steps that in response to community division operation performed on each student, student feature data are acquired, and the student feature data comprise student consumption data, student basic attribute data and student portrait label data; grouping the student consumption data according to a preset mode to obtain grouped student co-occurrence pairs; constructing a student network graph according to the student basic attribute data, the student portrait label data and the student co-occurrence pairs; the student network graph comprises a plurality of graph nodes and a connection relationship among the plurality of graph nodes; constructing a target structure matrix corresponding to the student network graph according to the graph nodes and the connection relationship, and calculating a similarity matrix between the students according to a student community division model through the target structure matrix; and performing community division operation on each student according to the similarity matrix. According to the method and the device, the problem that the accuracy of community division is reduced due to the fact that the similarity among students cannot be fully mined due to the fact that the division result based on the edge weight is easy to deviate under the condition that the node attribute difference is large is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data analysis, and in particular to a community division method and device applied in student group social interaction. Background Art

[0002] With the rapid development of social networks and big data, group behavior analysis and profiling have become important areas in academic research and commercial applications. Especially in colleges and universities, by analyzing students' consumption behavior, social behavior, etc., we can better understand the characteristics of student groups and provide personalized services and management strategies.

[0003] At present, community partitioning technology mainly relies on various algorithms in graph theory, such as Fast Unfolding algorithm, Label Propagation Algorithm (LPA), Random Walk Algorithm (DeepWalk), etc. The above algorithms divide communities by analyzing the node and edge structure in the graph and using the connection strength between nodes (edge ​​weight). For example, the Fast Unfolding algorithm can quickly and efficiently aggregate nodes into different communities through modularity optimization. However, most of the above algorithms only consider the connection strength between nodes in the graph, that is, the edge weight between nodes, but ignore the properties of the nodes themselves. At this time, when the node attributes differ greatly, the partitioning results based on edge weights are prone to deviations. Therefore, there is a problem that the similarities between students cannot be fully explored, resulting in a reduced accuracy of community partitioning.

[0004] Therefore, there is an urgent need for a community division method and device for application in student group social interaction. Summary of the invention

[0005] The present application provides a community division method and device for application in student group social interaction, which solves the problem that when the node attributes differ greatly, the division results based on edge weights are prone to deviations, and the similarities between students cannot be fully explored, thereby reducing the accuracy of community division.

[0006] In a first aspect of the present application, a community division method for application in student group social interaction is provided, the method comprising: in response to a community division operation performed on each student, obtaining student characteristic data, the student characteristic data including student consumption data, student basic attribute data and student portrait label data; grouping the student consumption data in a preset manner to obtain grouped student co-occurrence pairs; constructing a student network graph based on the student basic attribute data, the student portrait label data and the student co-occurrence pairs; the student network graph includes a plurality of graph nodes and a connection relationship between the plurality of graph nodes, the plurality of graph nodes are constructed by the basic attribute data and the student portrait label data, and each graph node corresponds to each student one-to-one; the connection relationship is constructed by the student co-occurrence pairs; constructing a target structure matrix corresponding to the student network graph based on the graph nodes and the connection relationship, and calculating the similarity matrix between each student based on the student community division model through the target structure matrix; performing a community division operation on each student based on the similarity matrix.

[0007] Optionally, the student consumption data is grouped in a preset manner to obtain grouped student co-occurrence pairs, specifically including: obtaining the first consumption data and the second consumption data in the student consumption data, the first consumption data and the second consumption data being the consumption data corresponding to any two different students in the student consumption data; judging whether the first consumption data and the second consumption data meet the consumption data recorded on the same day, and judging whether the first consumption data and the second consumption data meet the consumption data recorded at the same location; if the first consumption data and the second consumption data meet the consumption data recorded on the same day, and the first consumption data and the second consumption data meet the consumption data recorded at the same location, confirming that the first consumption data and the second consumption data are grouped as the same student co-occurrence pair.

[0008] Optionally, constructing a target structure matrix corresponding to the student network graph specifically includes: obtaining a first graph node vector corresponding to the student network graph according to the attributes of the graph nodes; obtaining a second graph node vector corresponding to the student network graph according to the connection relationship; constructing a first matrix according to the first graph node vector, and constructing a second matrix according to the second graph node vector; and summing the first matrix and the second matrix to obtain the summed target structure matrix.

[0009] Optionally, the first matrix includes a first dimension, a second dimension and a third dimension, the first dimension is the dimension of the number of graph nodes, the second dimension is the dimension of the number of categories of students' basic attribute data, and the third dimension is the dimension of the embedded vector in the first matrix. After constructing the first matrix according to the first graph node vector, the method also includes: accumulating and summing the second dimension of the first matrix to change the dimension of the first matrix, and the first space-time complexity corresponding to the first matrix before the dimension change is greater than the second space-time complexity corresponding to the first matrix after the dimension change.

[0010] Optionally, the similarity matrix between each student is calculated according to the student community division model through the target structure matrix, specifically including calculating the similarity matrix through the following formula:

[0011] New_S ij =S ij +P i T P j ;

[0012] Among them, New_S ij is the similarity matrix, S ij is the similarity value between the i-th graph node and the j-th graph node in the student network graph, For S ij After normalization, P is an m*m matrix, m is the number of graph nodes, and T is the transposed matrix.

[0013] Optionally, according to the node similarity algorithm, the similarity value between the i-th graph node and the j-th graph node is calculated by the following formula:

[0014]

[0015] Where N(i) is the set of first graph nodes adjacent to the i-th graph node, N(j) is the set of second graph nodes adjacent to the j-th graph node, c is the intersection of the first graph node set and the second graph node set, ω c is the degree of any graph node in the intersection, ω ij is the connection weight value between the i-th graph node and the j-th graph node.

[0016] Optionally, a community division operation is performed on each student according to the similarity matrix, specifically including: calculating the modularity between the first student and the second student according to the similarity matrix, the first student and the second student being any two different students among multiple students; judging whether the modularity is a positive value; if the modularity is a positive value, dividing the first student and the second student into the same community to perform the community division operation.

[0017] In a second aspect of the present application, a community division device for use in student group social interaction is provided, the device comprising an acquisition module and a processing module, wherein:

[0018] The acquisition module is used to respond to the community division operation for each student and obtain student characteristic data, the student characteristic data including student consumption data, student basic attribute data and student portrait label data; group the student consumption data according to a preset method to obtain the grouped student co-occurrence pairs.

[0019] The processing module is used to construct a student network graph based on student basic attribute data, student portrait label data and student co-occurrence pairs; the student network graph includes multiple graph nodes and connection relationships between the multiple graph nodes, the multiple graph nodes are constructed by basic attribute data and student portrait label data, and each graph node corresponds to each student one by one; the connection relationship is constructed by student co-occurrence pairs; the target structure matrix corresponding to the student network graph is constructed according to the graph nodes and the connection relationship, and the similarity matrix between each student is calculated according to the student community division model through the target structure matrix; and the community division operation is performed on each student according to the similarity matrix.

[0020] 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 used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes any one of the methods described above.

[0021] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to perform any of the above methods.

[0022] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0023] 1. When performing community division operation for each student, obtain student characteristic data, and group student consumption data in a preset way to obtain grouped student co-occurrence pairs, and construct a student network graph based on student basic attribute data, student portrait label data and student co-occurrence pairs. The student network graph includes multiple graph nodes and connection relationships between multiple graph nodes; construct a target structure matrix corresponding to the student network graph based on the graph nodes and connection relationships, and calculate the similarity matrix between each student according to the student community division model through the target structure matrix, so as to perform community division operation on each student according to the similarity matrix, thereby not only combining students' consumption behavior and social network information, but also introducing students' basic attribute data and students' portrait label data to ensure the accuracy and comprehensiveness of community division.

[0024] 2. The second dimension of the first matrix is ​​cumulatively summed to change the dimension of the first matrix, thereby reducing the number of dimensions of the first matrix and simplifying the time complexity of the first matrix.

[0025] 3. The modularity between the first student and the second student is calculated through the similarity matrix. The calculation of the modularity not only takes into account the connection strength between students, but also combines the basic attributes and portrait labels of students to ensure that the community division can more comprehensively reflect the social relationships and personality characteristics of students, avoiding the limitations of relying solely on edge weights for division, and thus optimizing the division effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a flowchart of a community division method applied in student group social interaction provided by an embodiment of the present application;

[0027] Figure 2 This is a module schematic diagram of a community division device for use in student group social interaction provided by an embodiment of the present application;

[0028] Figure 3 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.

[0029] Explanation of the reference numerals: 21, acquisition module; 22, processing module; 301, processor; 302, communication bus; 303, user interface; 304, network interface; 305, memory. DETAILED DESCRIPTION

[0030] 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.

[0031] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to and includes any or all possible combinations of one or more listed items.

[0032] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0033] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.

[0034] With the rapid development of social networks and big data, group behavior analysis and profiling have become important areas in academic research and commercial applications. Especially in colleges and universities, by analyzing students' consumption behavior, social behavior, etc., we can better understand the characteristics of student groups and provide personalized services and management strategies.

[0035] At present, community partitioning technology mainly relies on various algorithms in graph theory, such as Fast Unfolding algorithm, Label Propagation Algorithm (LPA), Random Walk Algorithm (DeepWalk), etc. The above algorithms divide communities by analyzing the node and edge structure in the graph and using the connection strength between nodes (edge ​​weight). For example, the Fast Unfolding algorithm can quickly and efficiently aggregate nodes into different communities through modularity optimization. However, most of the above algorithms only consider the connection strength between nodes in the graph, that is, the edge weight between nodes, but ignore the properties of the nodes themselves. At this time, when the node attributes differ greatly, the partitioning results based on edge weights are prone to deviations. Therefore, there is a problem that the similarities between students cannot be fully explored, resulting in a reduced accuracy of community partitioning.

[0036] Therefore, there is an urgent need for a community division method and device for application in student group social interaction.

[0037] Please refer to Figure 1 , which shows a flow chart of a community division method applied in student group social networking provided by an embodiment of the present application. The method is applied to a server, and the flow chart mainly includes the following steps: S101 to S105.

[0038] Step S101, in response to performing a community division operation on each student, obtaining student characteristic data, the student characteristic data including student consumption data, student basic attribute data and student portrait label data.

[0039] Specifically, based on Spark, student feature data is read from the Hive database. The student feature data includes but is not limited to student consumption data, student basic attribute data, student portrait label data, etc. Among them, student consumption data is used to record each student's consumption time, consumption location, consumption amount, etc., student basic attribute data is used to record each student's age, gender, household registration, academic performance, etc., and student portrait label data is used to record each student's interests, behavioral preferences, social circles, learning habits, etc. The Hive database is a pre-built database. Through the Hive database, SQL-like statements can be used to query and process students' consumption data, basic attribute data, portrait label data, etc., which is convenient for data analysis and subsequent community segmentation operations.

[0040] Step S102: grouping the student consumption data according to a preset method to obtain grouped student co-occurrence pairs.

[0041] Specifically, obtain the first consumption data and the second consumption data in the student consumption data, where the first consumption data and the second consumption data are the consumption data corresponding to any two different students in the student consumption data; determine whether the first consumption data and the second consumption data meet the consumption data recorded on the same day, and determine whether the first consumption data and the second consumption data meet the consumption data recorded at the same location; if the first consumption data and the second consumption data meet the consumption data recorded on the same day, and the first consumption data and the second consumption data meet the consumption data recorded at the same location, confirm that the first consumption data and the second consumption data are grouped as the same student co-occurrence pair. The above steps are as follows: For student consumption data, use the window function in the PySpark SQL statement to group any two students, so as to obtain the grouped student co-occurrence pairs. The consumption data corresponding to any two different students are the first consumption data and the second consumption data. At this time, a temporary table can be created, whose fields are student ID, consumption location, and consumption time, to save the grouped results. Then, according to the results recorded in the temporary table, calculate the number of co-occurrence pairs in the first consumption data and the second consumption data. For example: traverse any two students. If they consume at the same place and the time interval is less than 30s, the two students are paired into a pair, and the initial co-occurrence number is 1, that is, ((student 1, student 2), 1), and generate a structured DataFrame. Finally, group statistics are performed based on this structured DataFrame to form grouped student co-occurrence pairs, that is, ((student 1, student 2), n_counts), where n_counts represents the number of co-occurrences of two students.

[0042] Step S103, constructing a student network graph according to the student basic attribute data, the student portrait label data and the student co-occurrence pairs; the student network graph includes multiple graph nodes and connection relationships between the multiple graph nodes, the multiple graph nodes are constructed by the basic attribute data and the student portrait label data, and each graph node corresponds to each student one by one; the connection relationship is constructed by the student co-occurrence pairs.

[0043] Specifically, based on the student co-occurrence pairs in S102, each group of student feature data is traversed and a student network graph is constructed. The student network graph includes multiple graph nodes, each graph node corresponds to each student one-to-one, and each individual student corresponds to a graph node. Afterwards, the different student basic attribute data and student portrait label data corresponding to each student are saved in the corresponding graph node. Since each student has multiple different attributes and labels, each graph node can correspond to multiple different types of student basic attribute data and student portrait label data; in addition, the graph node connection relationship is constructed by the student co-occurrence pairs, that is, based on the student consumption data, if two students consume at the same time and place and meet a certain time interval restriction, an edge is established between the two students to represent the co-occurrence relationship between the students, and the weight of each edge is determined by the number of co-occurrences. The higher the number of co-occurrences, the greater the weight of the edge, indicating that the connection between the two students is closer.

[0044] Step S104, constructing a target structure matrix corresponding to the student network graph according to the graph nodes and the connection relationships, and calculating the similarity matrix between each student according to the student community division model through the target structure matrix.

[0045] Specifically, the steps of constructing the target structure matrix corresponding to the student network diagram are as follows: according to the attributes of the graph nodes, obtain the first graph node vector corresponding to the student network diagram; according to the connection relationship, obtain the second graph node vector corresponding to the student network diagram; construct the first matrix according to the first graph node vector, and construct the second matrix according to the second graph node vector; sum the first matrix and the second matrix to obtain the summed target structure matrix. In the above process, all discrete student basic attribute data are first digitally encoded to form a Key-Value pair. For example, dict = {"male": 0,"female": 1,"Hubei Wuhan": 2,"student tyrant": 3,"Zhejiang Jiaxing": 4}, etc. This dictionary Key-Value must contain all discrete student basic attribute data.

[0046] When obtaining the first matrix, it is necessary to find the embedded vector in the Key-Value pair. At this time, according to each graph node of the student, find the number from the key-Value pair. For example, assuming that the attribute recorded in the graph node corresponding to a student is {male, Hubei Wuhan, academic master}, then in the Key-Value pair, the first graph node vector corresponding to the student is input = [0,2,3], and it is converted into a tensor. Finally, based on the torch framework, the tensor is passed into the embedding table to generate the embedding vector corresponding to the student. After that, the embedding vector corresponding to each student is obtained, so that the first matrix is ​​A. (m,n,o) , where the first matrix includes a first dimension m, a second dimension n, and a third dimension o. The first dimension m is the number dimension of graph nodes, that is, the number of students. The second dimension n is the number dimension of categories of students' basic attribute data, that is, the sum of the number of categories of students' basic attribute data and the number of categories of students' portrait label data. The third dimension o is the dimension of the embedded vector in the first matrix. In this application, the third dimension can be customized by artificial setting. When taking values, if a higher dimension is selected, more information can be expressed, but the calculation complexity will also increase. On the contrary, if a lower dimension is selected, the information in the data may not be fully expressed. Therefore, in order to ensure the balance of calculation, this application sets the value of o to 128. The second dimension of the first matrix is ​​accumulated and summed to change the dimension of the first matrix, so that A (m,n,128) Transformed into B (m,1,128) , that is, all attribute vectors of each node are accumulated into a single vector, and finally the second dimension is removed to convert it into the final first matrix C (m,128) .

[0047] When obtaining the second matrix, based on the network graph formed in step S102, adjacent graph nodes are accessed in a random manner, and a sequence is generated according to the connection relationship and through multiple walks. Then, according to the above sequence, the DeepWalk algorithm is used to generate the second node vector corresponding to each student. The second matrix can be expressed as G (m,128) .

[0048] After that, the first matrix C (m,128) and the second matrix G (m,128) Add the corresponding ones to obtain the merged target structure matrix M (m,128) According to the target structure matrix, the pairwise similarity matrix between students can be obtained as P (m,m) , and P (m,m) =M (m,128) *M T (m,128) . By calculating the similarity between edges and graph nodes, the above P (m,m) Normalize, and the normalized result matrix is ​​recorded as

[0049]

[0050] Among them, S ij is the similarity value between the i-th graph node and the j-th graph node in the student network graph, and S ij It can be obtained through the node similarity algorithm:

[0051]

[0052] Where N(i) is the set of first graph nodes adjacent to the i-th graph node, N(j) is the set of second graph nodes adjacent to the j-th graph node, c is the intersection of the first graph node set and the second graph node set, ω c is the degree of any graph node in the intersection, ω ij is the connection weight between the i-th graph node and the j-th graph node. The connection weight can be determined by the number of co-occurrences. The higher the number of co-occurrences, the greater the connection weight. Then, through the student community division model, the final merged similarity matrix is ​​calculated as New_S (i,j) :

[0053]

[0054] Among them, New_S ij is the similarity matrix, S ij is the similarity value between the i-th graph node and the j-th graph node in the student network graph, For S ij After normalization, P is an m*m matrix, m is the number of graph nodes, and T is the transposed matrix.

[0055] Step S105, performing a community division operation on each student according to the similarity matrix.

[0056] Specifically, according to the similarity matrix, the modularity between the first student and the second student is calculated, and the first student and the second student are any two different students among the multiple students; it is determined whether the modularity is a positive value; if the modularity is a positive value, the first student and the second student are divided into the same community to perform a community division operation. The modularity can be calculated by the following formula:

[0057]

[0058] Among them, Q is the modularity, ‖New_S‖ is the sum of the symmetric similarity matrix, ∑ i ∑New_S i is the sum of the i-th row matrix, ∑ j ∑New_S j is the sum of the j-th column matrix, is the indicator function, if The modularity is positive. This means that the modularity is not a positive value. After the initial division, the same community is iteratively divided until there is no increase in modularity, and the community division operation is terminated.

[0059] The present application adopts the above method. When performing a community division operation on each student, the student characteristic data is obtained, and the student consumption data is grouped in a preset manner to obtain grouped student co-occurrence pairs, and a student network graph is constructed based on the student basic attribute data, the student portrait label data, and the student co-occurrence pairs. The student network graph includes multiple graph nodes and connection relationships between the multiple graph nodes; a target structure matrix corresponding to the student network graph is constructed based on the graph nodes and the connection relationships, and the similarity matrix between each student is calculated based on the target structure matrix according to the student community division model, so that a community division operation is performed on each student according to the similarity matrix, thereby not only combining the student's consumption behavior and social network information, but also introducing the student's basic attribute data and student portrait label data to ensure the accuracy and comprehensiveness of the community division.

[0060] Please refer to Figure 2 , which shows a module schematic diagram of a community division device applied in student group social networking provided by an embodiment of the present application, the device is a server, and the server includes an acquisition module 21 and a processing module 22, wherein,

[0061] The acquisition module 21 is used to obtain student characteristic data in response to the community division operation for each student, and the student characteristic data includes student consumption data, student basic attribute data and student portrait label data; the student consumption data is grouped according to a preset method to obtain grouped student co-occurrence pairs.

[0062] Processing module 22 is used to construct a student network graph based on student basic attribute data, student portrait label data and student co-occurrence pairs; the student network graph includes multiple graph nodes and connection relationships between the multiple graph nodes, the multiple graph nodes are constructed by basic attribute data and student portrait label data, and each graph node corresponds to each student one by one; the connection relationship is constructed by student co-occurrence pairs; the target structure matrix corresponding to the student network graph is constructed according to the graph nodes and the connection relationship, and the similarity matrix between each student is calculated according to the student community division model through the target structure matrix; and community division operations are performed on each student according to the similarity matrix.

[0063] In a possible implementation, the acquisition module 21 is used to group the student consumption data in a preset manner to obtain grouped student co-occurrence pairs, specifically including: obtaining the first consumption data and the second consumption data in the student consumption data, the first consumption data and the second consumption data being the consumption data corresponding to any two different students in the student consumption data; judging whether the first consumption data and the second consumption data meet the consumption data recorded on the same day, and judging whether the first consumption data and the second consumption data meet the consumption data recorded at the same location; if the first consumption data and the second consumption data meet the consumption data recorded on the same day, and the first consumption data and the second consumption data meet the consumption data recorded at the same location, confirming that the first consumption data and the second consumption data are grouped as the same student co-occurrence pair.

[0064] In a possible implementation, the processing module 22 is used to construct a target structure matrix corresponding to the student network diagram, specifically including: obtaining a first graph node vector corresponding to the student network diagram according to the attributes of the graph nodes; obtaining a second graph node vector corresponding to the student network diagram according to the connection relationship; constructing a first matrix according to the first graph node vector, and constructing a second matrix according to the second graph node vector; and summing the first matrix and the second matrix to obtain the summed target structure matrix.

[0065] In a possible implementation, the first matrix includes a first dimension, a second dimension and a third dimension, the first dimension is the number dimension of graph nodes, the second dimension is the number dimension of categories of students' basic attribute data, and the third dimension is the dimension of embedded vectors in the first matrix. The processing module 22 is used to construct the first matrix according to the first graph node vector. The method also includes: accumulating and summing the second dimension of the first matrix to change the dimension of the first matrix, and the first space-time complexity corresponding to the first matrix before the dimension change is greater than the second space-time complexity corresponding to the first matrix after the dimension change.

[0066] In a possible implementation, the processing module 22 is used to calculate the similarity matrix between each student according to the student community division model through the target structure matrix, specifically including calculating the similarity matrix through the following formula:

[0067]

[0068] Among them, New_S ij is the similarity matrix, S ij is the similarity value between the i-th graph node and the j-th graph node in the student network graph, For S ij After normalization, P is an m*m matrix, m is the number of graph nodes, and T is the transposed matrix.

[0069] In a possible implementation, the processing module 22 is used to calculate the similarity value between the i-th graph node and the j-th graph node according to the node similarity algorithm and by the following formula:

[0070]

[0071] Where N(i) is the set of first graph nodes adjacent to the i-th graph node, N(j) is the set of second graph nodes adjacent to the j-th graph node, c is the intersection of the first graph node set and the second graph node set, ω c is the degree of any graph node in the intersection, ω ij is the connection weight value between the i-th graph node and the j-th graph node.

[0072] In a possible implementation, the processing module 22 is used to perform a community division operation on each student according to a similarity matrix, specifically including: calculating the modularity between a first student and a second student according to the similarity matrix, where the first student and the second student are any two different students from a plurality of students; determining whether the modularity is a positive value; if the modularity is a positive value, dividing the first student and the second student into the same community to perform a community division operation.

[0073] 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.

[0074] The present application also provides an electronic device. Figure 3 , Figure 3 30 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include: at least one processor 301, at least one communication bus 302, a user interface 303, at least one network interface 304, and a memory 305.

[0075] The communication bus 302 is used to realize the connection and communication between these components.

[0076] The user interface 303 may include a display screen (Display) and a camera (Camera). The optional user interface 303 may also include a standard wired interface and a wireless interface.

[0077] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0078] Among them, the processor 301 may include one or more processing cores. The processor 301 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 305, and calling data stored in the memory 305. Optionally, the processor 301 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 301 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (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; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 301, and it can be implemented separately through a chip.

[0079] Among them, the memory 305 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 305 includes a non-transitory computer-readable storage medium. The memory 305 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 305 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 305 may optionally also be at least one storage device located away from the aforementioned processor 301. Refer to Figure 3 , the memory 305 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a community division application program used in student group social interaction.

[0080] exist Figure 3In the electronic device shown, the user interface 303 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 301 can be used to call the community division application stored in the memory 305 for application in the social interaction of student groups. When executed by one or more processors 301, the electronic device executes one or more of the methods described in the above embodiments. It should be noted that for the aforementioned method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited to the described order of actions, 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.

[0081] The present application also provides a computer-readable storage medium, which stores instructions. When executed by one or more processors, the electronic device executes one or more of the methods described in the above embodiments.

[0082] 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.

[0083] 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.

[0084] 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.

[0085] 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.

[0086] 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. 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 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 includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.

[0087] The above are only exemplary embodiments disclosed in this application, and the scope of the disclosure of this application cannot be limited by this. That is, any equivalent changes and modifications made according to the teachings disclosed in this application are still within the scope of the disclosure of this application. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other implementation schemes disclosed in this application.

[0088] This application is intended to cover any modifications, uses or adaptive changes disclosed in this application, which follow the general principles disclosed in this application and include common knowledge or customary technical means in the technical field not recorded in this application.

Claims

1. A community division method applied in student group social interaction, characterized in that: The method comprises: In response to performing a community division operation on each student, obtaining student characteristic data, wherein the student characteristic data includes student consumption data, student basic attribute data, and student portrait label data; Grouping the student consumption data according to a preset method to obtain grouped student co-occurrence pairs; A student network graph is constructed according to the student basic attribute data, the student portrait label data and the student co-occurrence pairs; the student network graph includes a plurality of graph nodes and a connection relationship between the plurality of graph nodes, the plurality of graph nodes are constructed by the basic attribute data and the student portrait label data, each graph node corresponds to each student one by one; the connection relationship is constructed by the student co-occurrence pairs; Constructing a target structure matrix corresponding to the student network graph according to the graph nodes and the connection relationships, and calculating a similarity matrix between each of the students according to a student community division model through the target structure matrix; The community division operation is performed on each of the students according to the similarity matrix.

2. The method according to claim 1, characterized in that The grouping of the student consumption data according to a preset method to obtain grouped student co-occurrence pairs specifically includes: Acquire first consumption data and second consumption data in the student consumption data, where the first consumption data and the second consumption data are consumption data corresponding to any two different students in the student consumption data; Determine whether the first consumption data and the second consumption data meet the consumption data recorded on the same day, and determine whether the first consumption data and the second consumption data meet the consumption data recorded at the same location; If the first consumption data and the second consumption data meet the consumption data recorded on the same day, and the first consumption data and the second consumption data meet the consumption data recorded at the same location, it is confirmed that the first consumption data and the second consumption data are grouped into the same student co-occurrence pair.

3. The method according to claim 1, characterized in that The constructing of the target structure matrix corresponding to the student network diagram specifically includes: According to the attributes of the graph nodes, a first graph node vector corresponding to the student network graph is obtained; according to the connection relationship, a second graph node vector corresponding to the student network graph is obtained; Construct a first matrix according to the first graph node vector, and construct a second matrix according to the second graph node vector; The first matrix and the second matrix are summed to obtain the summed target structure matrix.

4. The method according to claim 3, characterized in that The first matrix includes a first dimension, a second dimension and a third dimension, the first dimension is the number dimension of the graph nodes, the second dimension is the number dimension of the categories of the student basic attribute data, and the third dimension is the dimension of the embedded vector in the first matrix. After constructing the first matrix according to the first graph node vector, the method further includes: The second dimension of the first matrix is ​​cumulatively summed to change the dimension of the first matrix, and a first space-time complexity corresponding to the first matrix before the dimension change is greater than a second space-time complexity corresponding to the first matrix after the dimension change.

5. The method according to claim 1, characterized in that By using the target structure matrix, a similarity matrix between each of the students is calculated according to the student community division model, specifically including calculating the similarity matrix by the following formula: Among them, New_S ij is the similarity matrix, S ij is the similarity value between the i-th graph node and the j-th graph node in the student network graph, For S ij Normalization is performed, P is an m*m matrix, m is the number of graph nodes, and T is a transposed matrix.

6. The method according to claim 5, characterized in that The method further comprises: According to the node similarity algorithm, the similarity value between the i-th graph node and the j-th graph node is calculated by the following formula: Wherein, N(i) is the set of first graph nodes adjacent to the i-th graph node, N(j) is the set of second graph nodes adjacent to the j-th graph node, c is the intersection of the first graph node set and the second graph node set, ω c is the degree of any graph node in the intersection, ω ij is the connection weight value between the i-th graph node and the j-th graph node.

7. The method according to claim 1, characterized in that The performing the community division operation on each student according to the similarity matrix specifically includes: Calculating the modularity between a first student and a second student according to the similarity matrix, where the first student and the second student are any two different students among the plurality of students; Determining whether the modularity is a positive value; If the modularity is a positive value, the first student and the second student are divided into the same community to perform the community division operation.

8. A community division device used in student group social interaction, characterized in that: The device comprises an acquisition module and a processing module, wherein: The acquisition module is used to respond to the community division operation for each student, acquire student characteristic data, the student characteristic data including student consumption data, student basic attribute data and student portrait label data; group the student consumption data according to a preset method to obtain grouped student co-occurrence pairs; The processing module is used to construct a student network graph according to the student basic attribute data, the student portrait label data and the student co-occurrence pairs; the student network graph includes multiple graph nodes and connection relationships between the multiple graph nodes, the multiple graph nodes are constructed by the basic attribute data and the student portrait label data, and each graph node corresponds to each student one by one; the connection relationship is constructed by the student co-occurrence pairs; a target structure matrix corresponding to the student network graph is constructed according to the graph nodes and the connection relationship, and a similarity matrix between each of the students is calculated according to the target structure matrix according to the student community division model; and the community division operation is performed on each of the students according to the similarity matrix.

9. An electronic device, characterized in that: It includes a processor, a communication bus, a user interface, a network interface and a memory, wherein the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes the method according to any one of claims 1 to 7.

10. 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 7 is performed.

Citation Information

Patent Citations

  • User classification method and device

    CN113111133A

  • Object clustering method and apparatus

    WO2018149292A1

  • Data processing method, device and storage medium

    WO2018219223A1