A community division method and device applied in student group social interaction

By constructing a student network diagram and calculating a similarity matrix, combining students' consumption behavior and social network information, the problem of low accuracy of community division when node attributes are large, and a more accurate and comprehensive community division is achieved.

CN119338617BActive Publication Date: 2025-08-08YUNQI SMART TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the case where the node attributes are large, the existing community division algorithms are prone to deviations based on edge weights, and cannot fully tap the similarity between students, resulting in a decrease in the accuracy of community division.

Method used

By obtaining student feature data, including consumption data, basic attribute data and portrait label data, a student network diagram is constructed, and the target structure matrix is used to calculate the similarity matrix between students, combining students' consumption behavior and social network information to divide the community.

Benefits of technology

It improves the accuracy and comprehensiveness of community division, ensures that the results of community division can better reflect students' social relationships and personality characteristics, and avoids the limitations of relying solely on edge weights.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119338617B_ABST
    Figure CN119338617B_ABST
Patent Text Reader

Abstract

The present application provides a community division method and device for application in student group social interaction, which relates to the field of big data analysis. The method includes: in response to a community division operation for 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, student portrait label data and student co-occurrence pairs; the student network graph includes a plurality of graph nodes and a plurality of connection relationships between graph nodes; constructing a target structure matrix corresponding to the student network graph based on 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; performing a community division operation on each student according to the similarity matrix. The present application solves the problem that when the node attributes differ greatly, the division result based on edge weights is prone to deviation, and there is an inability to fully explore the similarities between students, thereby reducing the accuracy of community division.
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, behavioral analysis and profiling of groups have become important areas in academic research and commercial applications. In colleges and universities, in particular, analyzing student consumption and social behaviors can help us better understand the characteristics of student groups and provide personalized services and management strategies.

[0003] Currently, community partitioning technology mainly relies on various algorithms in graph theory, such as the Fast Unfolding algorithm, the Label Propagation Algorithm (LPA), and the DeepWalk algorithm. These algorithms analyze the node and edge structure in the graph and use the connection strength between nodes (edge weight) to divide communities. 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 weight of the edges between nodes, but ignore the attributes of the nodes themselves. At this time, when the node attributes vary 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 vary greatly, the division results based on edge weights are prone to deviation, 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 target structure matrix according to the student community division model; 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, 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; 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; 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 based on 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 using the target structure matrix, specifically including calculating the similarity matrix using 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 Normalization is performed, P is an m*m matrix, m is the number of graph nodes, and T is the transposed matrix.

[0013] Optionally, the similarity value between the i-th graph node and the j-th graph node is calculated according to the node similarity algorithm using 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 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, where the first student and the second student are 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 includes an acquisition module and a processing module, wherein:

[0018] The acquisition module is used to obtain student characteristic data in response to the community division operation for each student. 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 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 multiple graph nodes, and 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 performs any 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 this application have at least the following technical effects or advantages:

[0023] 1. When performing community division operations on each student, obtain student feature data, and group student consumption data according to a preset method 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 the connection relationships between multiple graph nodes; construct a target structure matrix corresponding to the student network graph based on the graph nodes and the connection relationships, and use the target structure matrix to calculate the similarity matrix between each student according to the student community division model, so as to perform community division operations on each student according to the similarity matrix. This not only combines students' consumption behavior and social network information, but also introduces students' basic attribute data and student 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 and second students is calculated using the similarity matrix. The modularity calculation not only considers the connection strength between students, but also combines the students' basic attributes and portrait labels to ensure that the community division can more comprehensively reflect the students' social relationships and personality characteristics, 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 This is a flow chart 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 diagram of a community division device for use in student group social networking, provided in an embodiment of the present application;

[0028] Figure 3 This is a structural 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 those skilled in the art 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 examples of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification of the present application, the singular expressions "a", "an", "said", "above", "the", and "this" are intended to include plural expressions as well, unless the context clearly indicates otherwise. 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 of the listed items.

[0032] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this 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, behavioral analysis and profiling of groups have become important areas in academic research and commercial applications. In colleges and universities, in particular, analyzing student consumption and social behaviors can help us better understand the characteristics of student groups and provide personalized services and management strategies.

[0035] Currently, community partitioning technology mainly relies on various algorithms in graph theory, such as the Fast Unfolding algorithm, the Label Propagation Algorithm (LPA), and the DeepWalk algorithm. These algorithms analyze the node and edge structure in the graph and use the connection strength between nodes (edge weight) to divide communities. 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 weight of the edges between nodes, but ignore the attributes of the nodes themselves. At this time, when the node attributes vary 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, obtain student characteristic data, which includes student consumption data, student basic attribute data, and student portrait label data.

[0039] Specifically, Spark is used to read student characteristic data from the Hive database. This student characteristic data includes, but is not limited to, student consumption data, student basic attribute data, and student portrait tag data. Student consumption data records each student's consumption time, location, and amount. Basic attribute data records each student's age, gender, household registration, and academic performance. Student portrait tag data records each student's interests, behavioral preferences, social circles, and learning habits. The Hive database is a pre-built database that allows SQL-like statements to be used to query and process student consumption data, basic attribute data, and portrait tag data, facilitating data analysis and subsequent community segmentation.

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

[0041] Specifically, the first consumption data and the second consumption data in the student consumption data are obtained, 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; it is determined whether the first consumption data and the second consumption data meet the consumption data recorded on the same day, and 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 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 to obtain the grouped student co-occurrence pairs. The consumption data corresponding to any two different students is the first consumption data and the second consumption data. At this time, you can create a temporary table whose fields are student ID, consumption location, and consumption time to save the grouped results. Then, based on 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 with an initial co-occurrence count of 1, that is, ((student 1, student 2), 1), and generate a structured DataFrame. Finally, based on this structured DataFrame, group statistics are performed to form grouped student co-occurrence pairs, that is, ((student 1, student 2), n_counts), where n_counts represents the number of times the two students co-occur.

[0042] Step S103, construct a student network graph based on the 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, and the multiple graph nodes are constructed by the 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 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: construct a target structure matrix corresponding to the student network graph according to the graph nodes and the connection relationships, and calculate the similarity matrix between each student according to the student community division model through the target structure matrix.

[0045] Specifically, the steps for constructing the target structure matrix corresponding to the student network graph are as follows: according to the attributes of the graph nodes, obtain the first graph node vector corresponding to the student network graph; according to the connection relationship, obtain the second graph node vector corresponding to the student network graph; 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 master": 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 embedding 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 the graph nodes, that is, the number of students. The second dimension n is the category number dimension of the students' basic attribute data, that is, the sum of the number of categories of the students' basic attribute data and the number of categories of the 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 computational complexity will also be increased. 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 the calculation, this application sets the value of o to 128. The second dimension of the first matrix is cumulatively summed to change the dimension of the first matrix, thereby changing A (m,n,128) Converted to 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 randomly, and a sequence is generated according to the connection relationship 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] Afterwards, the first matrix C (m,128) and the second matrix G (m,128) Add the corresponding values 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 Normalization is performed, P is an m*m matrix, m is the number of graph nodes, and T is the transposed matrix.

[0055] Step S105: Perform community division operation on each student according to the similarity matrix.

[0056] Specifically, based on the similarity matrix, the modularity between the first student and the second student is calculated, where the first student and the second student are any two different students from a plurality of students; and whether the modularity is a positive value is determined; 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 using 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 matrix in row i, ∑ j ∑New_S j is the sum of the j-th column matrix, is the indicator function, if Then the modularity is positive. This means that the modularity is not positive. 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] This application adopts the above method. When performing a community division operation on each student, 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, student portrait label data and student co-occurrence pairs. The student network graph includes multiple graph nodes and connection relationships between 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 through the target structure matrix, the similarity matrix between each student is calculated according to the student community division model, so that a community division operation is performed on each student according to the similarity matrix. This not only combines the student's consumption behavior and social network information, but also ensures the accuracy and comprehensiveness of the community division by introducing the student's basic attribute data and student portrait label data.

[0060] Please refer to Figure 2 , which shows a module 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. 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] The 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 multiple graph nodes, and 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.

[0063] In one possible implementation, the acquisition module 21 is used to group 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, where the first consumption data and the second consumption data are 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 one possible implementation, the processing module 22 is used to construct a target structure matrix corresponding to the student network graph, specifically including: obtaining a first graph node vector corresponding to the student network graph based on the attributes of the graph nodes; obtaining a second graph node vector corresponding to the student network graph based on the connection relationship; constructing a first matrix based on the first graph node vector, and constructing a second matrix based on the second graph node vector; summing the first matrix and the second matrix to obtain the summed target structure matrix.

[0065] In a possible embodiment, 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 configured to calculate the similarity matrix between each student according to the student community division model using the target structure matrix, specifically including calculating the similarity matrix using 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 Normalization is performed, 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 configured to calculate the similarity value between the i-th graph node and the j-th graph node according to a node similarity algorithm and 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 between the i-th graph node and the j-th graph node.

[0072] In one possible implementation, the processing module 22 is used to perform a community division operation on each student based on a similarity matrix, specifically including: calculating the modularity between a first student and a second student based on 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 the above embodiments provide devices that implement their functions using only the division of the above functional modules as examples. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be 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 embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0074] This application also provides an electronic device. Figure 3 , Figure 3 3 is a schematic diagram of the structure of an electronic device provided by 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 implement the connection and communication between these components.

[0076] The user interface 303 may include a display screen (Display) and a camera (Camera). Optionally, the 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] The processor 301 may include one or more processing cores. The processor 301 utilizes various interfaces and lines to connect various parts of the entire server. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 305, and calling data stored in the memory 305, the processor 301 performs various server functions and processes data. Optionally, the processor 301 may be implemented in at least one hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 301 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily 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; and the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 301 and may be implemented separately on a single chip.

[0079] Among them, the memory 305 may include a random access memory (RAM) or 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 also be optionally 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 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 simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should know that this application is not limited to the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for this application.

[0081] The present application also provides a computer-readable storage medium storing instructions, which, when executed by one or more processors, enable an electronic device to execute one or more of the methods described in the above embodiments.

[0082] In the above embodiments, the description of each embodiment has its own focus. 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 merely schematic, such as the division of units, which is only a logical function division. In actual implementation, there may be other division methods, 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 interface, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0084] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0085] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or 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. The computer software product is stored in a memory and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute 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 foregoing description is merely an exemplary embodiment of the present disclosure and does not limit the scope of the present disclosure. In other words, any equivalent variations and modifications made based on the teachings of the present disclosure are still within the scope of the present disclosure. Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the disclosure and practical experience.

[0088] This application is intended to cover any modifications, uses or adaptations 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 disclosed in this application.

Claims

1. A community division method applied in student group social interaction, characterized in that: The method comprises: In response to the community segmentation operation for each student, student characteristic data is obtained, the student characteristic data including student consumption data, student basic attribute data, and student portrait label data; the student consumption data includes the time, location, and amount of consumption of each student; the student basic attribute data includes the age, gender, household registration, and academic performance of each student; the student portrait label data includes the interests, hobbies, behavioral preferences, social circles, and learning habits of each student; Grouping the student consumption data according to a preset method 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 plurality of connection relationships between the graph nodes, the plurality of graph nodes being constructed by the basic attribute data and the student portrait label data, each graph node corresponding to each student one-to-one; the connection relationships being constructed by the student co-occurrence pairs; The 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; the similarity matrix is calculated using the following formula: ; in, is the similarity matrix, In the student network diagram, The graph nodes and The similarity value between graph nodes, For Perform normalization processing, for matrix, is the number of graph nodes, is the transposed matrix, For the The matrix corresponding to the graph nodes, For the The matrix corresponding to the graph nodes; and according to the node similarity algorithm, the first is calculated by the following formula The graph nodes and Similarity value between graph nodes: ; in, For the a set of adjacent first graph nodes of the graph nodes, For the a set of adjacent second graph nodes of the graph nodes, is the intersection of the first graph node set and the second graph node set, is the degree of any graph node in the intersection, For the The graph nodes and The connection weight value between the graph nodes; The community division operation is performed on each student according to the similarity matrix, specifically including: calculating the modularity by the following formula: ; in, is the modularity, is the sum of the symmetric similarity matrices, For the The sum of the row matrices, For the The sum of the column matrices, is an indicator function; if it is confirmed that the modularity no longer increases, the community division operation is terminated.

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: Obtaining first consumption data and second consumption data from 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; Determining whether the first consumption data and the second consumption data are consumption data recorded on the same day, and determining whether the first consumption data and the second consumption data are 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 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; Constructing a first matrix according to the first graph node vector, and constructing 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, wherein 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 accumulated and summed to perform a dimensional change on the first matrix, wherein a first spatiotemporal complexity corresponding to the first matrix before the dimensional change is greater than a second spatiotemporal complexity corresponding to the first matrix after the dimensional change.

5. The method according to claim 1, wherein The performing the community division operation on each student according to the similarity matrix specifically includes: calculating, according to the similarity matrix, a modularity between a first student and a second student, 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.

6. A community division device used in student group social interaction, characterized in that: The device includes an acquisition module and a processing module, wherein: The acquisition module is configured to acquire student characteristic data in response to performing a community segmentation operation on each student, wherein the student characteristic data includes student consumption data, student basic attribute data, and student portrait label data; the student consumption data includes the time, location, and amount of consumption of each student; the student basic attribute data includes the age, gender, household registration, and academic performance of each student; and the student portrait label data includes the interests, hobbies, behavioral preferences, social circles, and learning habits of each student; The processing module is used to construct 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 multiple graph nodes and multiple connection relationships between the 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-to-one; the connection relationship is constructed by the student co-occurrence pairs; a target structure matrix corresponding to the student network graph is constructed based on the graph nodes and the connection relationship, and a similarity matrix between each of the students is calculated based on the target structure matrix according to the student community division model; the similarity matrix is calculated using the following formula: ; in, is the similarity matrix, In the student network diagram, The graph nodes and The similarity value between graph nodes, For Perform normalization processing, for matrix, is the number of graph nodes, is the transposed matrix, For the The matrix corresponding to the graph nodes, For the The matrix corresponding to the graph nodes; and according to the node similarity algorithm, the first is calculated by the following formula The graph nodes and Similarity value between graph nodes: ; in, For the a set of adjacent first graph nodes of the graph nodes, For the a set of adjacent second graph nodes of the graph nodes, is the intersection of the first graph node set and the second graph node set, is the degree of any graph node in the intersection, For the The graph nodes and The connection weight value between the graph nodes; performing the community division operation on each of the students according to the similarity matrix, specifically including: calculating the modularity by the following formula: ; in, is the modularity, is the sum of the symmetric similarity matrices, For the The sum of the row matrices, For the The sum of the column matrices, is an indicator function; if it is confirmed that the modularity no longer increases, the community division operation is terminated.

7. An electronic device, characterized in that: The electronic device comprises 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 5.

8. 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 5 is performed.

Citation Information

Patent Citations

  • User classification method and device

    CN113111133A

  • Object clustering method and apparatus

    WO2018149292A1