Method, device, processor and electronic equipment for determining employee information

By transforming the undirected graph of employee organizational relationships into a directed graph and using pruning conditions to query dense subgraphs in the directed graph, the problem of invalid path calculation in the employee organizational relationship graph is solved, improving employee retrieval efficiency and enterprise work efficiency.

CN116226464BActive Publication Date: 2026-02-06INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310149164.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-14
Publication Date
2026-02-06
Estimated Expiration
2043-02-14

AI Technical Summary

Technical Problem

When searching for employees that meet the requirements in the employee organizational relationship graph, a large number of invalid paths are calculated, resulting in a significant waste of time and computing resources and low efficiency.

Method used

By transforming the undirected graph of employee organizational relationships into a directed graph, and using pruning conditions to recursively query dense subgraphs that meet the query conditions in the directed graph, the calculation of invalid paths is reduced.

Benefits of technology

This improves the query efficiency of dense subgraphs, reduces query time, increases the efficiency of identifying qualified employees, and thus improves the overall work efficiency of the enterprise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116226464B_ABST
    Figure CN116226464B_ABST
Patent Text Reader

Abstract

The application discloses a kind of determination method, device, processor and electronic equipment of staff information, which is applied to the field of financial technology or other fields, and the method comprises: according to the work condition and organization relationship of multiple staff, obtain staff organization relationship undirected graph;According to the query condition of dense subgraph, the staff organization relationship undirected graph is divided, and an undirected graph set is obtained;Each undirected graph in the undirected graph set is colored to obtain a directed graph set;Using pruning condition, recursively query the dense subgraph that meets the query condition in each directed graph of the directed graph set, to obtain a dense subgraph set;According to the dense subgraph set, at least one target person is determined in multiple staffs.By the present application, the problem that a large number of invalid paths are calculated when searching for staff meeting the requirements in the staff organization relationship graph in the related art, a large amount of time and computing resources are consumed, and the efficiency of determining staff meeting the requirements is low 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 financial technology or other fields, and in particular, to a method and device for determining employee information, a processor and an electronic device. BACKGROUND

[0002] When an enterprise completes a project in different business directions, it needs to form a special team from different departments that meet the technical requirements of the project, so that the special team can handle the temporary project, so that the enterprise can properly complete the temporary project in different business directions. In the prior art, when searching for employees who meet the technical requirements of the project among enterprise employees, the employee organizational relationship in the enterprise is often mapped into an employee organizational relationship graph, and a dense subgraph that meets the conditions is searched in the employee organizational relationship graph. However, since each path of each node in the employee organizational relationship graph is traversed when searching in the employee organizational relationship graph, a large number of invalid node paths in the employee organizational relationship graph are calculated, resulting in a large amount of time and computing resources consumed in the calculation process of searching for employees who meet the conditions, and reducing the work efficiency of the enterprise.

[0003] In view of the problem in the related art that a large number of invalid paths are calculated when searching for employees who meet the requirements in the employee organizational relationship graph, a large amount of time and computing resources are consumed, and the efficiency of determining employees who meet the requirements is low, no effective solution has been proposed so far. SUMMARY

[0004] The main purpose of the present application is to provide a method and device for determining employee information, a processor and an electronic device, to solve the problem in the related art that a large number of invalid paths are calculated when searching for employees who meet the requirements in the employee organizational relationship graph, a large amount of time and computing resources are consumed, and the efficiency of determining employees who meet the requirements is low.

[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for determining employee information is provided, which comprises: obtaining an employee organizational relationship undirected graph according to the working conditions and organizational relationships of a plurality of employees, wherein the employee organizational relationship undirected graph comprises a plurality of nodes and a plurality of edges, wherein each node represents a different employee, each edge represents the organizational relationship between employees, and the attribute set of each node contains the working conditions of the employee corresponding to the node; dividing the employee organizational relationship undirected graph according to the query conditions of a dense subgraph to obtain an undirected graph set, wherein the query conditions include a preset node number M of the dense subgraph and a target attribute set of the dense subgraph; coloring each undirected graph in the undirected graph set to obtain a directed graph set; using a pruning condition to recursively query the dense subgraph that meets the query conditions in each directed graph of the directed graph set to obtain a dense subgraph set; and determining at least one target person from the plurality of employees according to the dense subgraph set.

[0006] Further, according to the query condition of the dense subgraph, the employee organization relationship undirected graph is divided to obtain the undirected graph set, including: setting the direction of each edge of the employee organization relationship undirected graph as the node with a large degree value pointing to the node with a small degree value, to obtain a first directed graph; judging whether the target attribute set is contained in the attribute set of each node in the first directed graph, and whether the number of nodes adjacent to each node is greater than or equal to the preset node number M; in the case that the target attribute set is contained in the attribute set of at least one target node, and the number of nodes adjacent to the at least one target node is greater than or equal to the preset node number M, the subgraph of the at least one target node is divided in the first directed graph to obtain the undirected graph set.

[0007] Further, in the case that the target attribute set is contained in the attribute set of at least one target node, and the number of nodes adjacent to the at least one target node is greater than or equal to the preset node number M, the subgraph of the at least one target node is divided in the first directed graph to obtain the undirected graph set, including: obtaining the adjacent nodes and adjacent edges of the at least one target node in the first directed graph, and composing the local directed graph of each target node in the at least one target node from the at least one target node, the adjacent nodes of each target node in the at least one target node, and the adjacent edges of each target node in the at least one target node, to obtain a local directed graph set; each local directed graph in the local directed graph set is restored to an undirected graph to obtain the undirected graph set.

[0008] Further, coloring each of the undirected graph set to obtain a directed graph set comprises: in a target undirected graph in the undirected graph set, nodes are sorted in descending order of degree values to obtain a node array; a same number of colors as a number of nodes in the target undirected graph is set, and the colors are assigned color serial numbers to obtain a color array; a first node in the node array is marked with a first color with a smallest color serial number in the color array to obtain a colored first node, wherein the first node is a first element of the node array; color serial numbers of adjacent nodes of a second node in the target undirected graph are obtained to obtain a second color set, wherein the second node is a second element of the node array; the second node is marked with a third color except the second color set in the color array with a smallest color serial number to obtain a colored second node; other nodes except the first node and the second node in the node array are colored according to a method of obtaining the colored second node to obtain a colored target undirected graph; other undirected graphs in the undirected graph set are colored according to a method of obtaining the colored target undirected graph to obtain a colored undirected graph set; and the colored undirected graph set is processed to obtain the directed graph set.

[0009] Further, processing the colored undirected graph set to obtain the directed graph set comprises: setting a direction of each edge of each undirected graph in the colored undirected graph set as a node with a larger color serial number pointing to a node with a smaller color serial number to obtain the directed graph set.

[0010] Further, the using the pruning condition to recursively query the dense subgraph meeting the query condition in each directed graph in the set of directed graphs to obtain a set of dense subgraphs comprises: taking a target directed graph in the set of directed graphs as a first input of a recursive query algorithm, taking a third node in the target directed graph as a second input of the recursive query algorithm, and taking the preset node quantity M as a third input of the recursive query algorithm; determining whether the attribute set of the target attribute set is contained in an attribute set of a neighboring node of the second input and whether a color serial number of the neighboring node is greater than or equal to a value of the third input minus one; if the attribute set of the target attribute set is contained in the attribute set of the neighboring node and the color serial number of the neighboring node is greater than or equal to the value of the third input minus one, obtaining an outgoing edge subgraph of the neighboring node in the first input; taking the outgoing edge subgraph as a new first input, taking the neighboring node as a new second input, and taking the value of the third input minus one as a new third input, and substituting them into the recursive query algorithm to continue recursive calculation; when the recursive query algorithm is executed to the value of the new third input being equal to a preset value, determining whether the attribute set of at least one node included in the subgraph corresponding to the new first input contains the target attribute set; if the attribute set of at least one node included in the subgraph corresponding to the new first input contains the target attribute set, obtaining at least one node included in the subgraph corresponding to the new first input and nodes traversed in the recursive query algorithm to obtain one dense subgraph corresponding to the target directed graph; and continuing to execute the recursive query algorithm to calculate the remaining directed graphs in the set of directed graphs except the target directed graph to obtain a set of dense subgraphs.

[0011] Further, if the attribute set of the target attribute set is contained in the attribute set of the neighboring node and the color serial number of the neighboring node is greater than or equal to the value of the third input minus one, the obtaining the outgoing edge subgraph of the neighboring node in the first input comprises: in the directed graph corresponding to the first input, obtaining a node pointed by an outgoing edge of the neighboring node to obtain a set of outgoing edge nodes; obtaining an edge connecting the set of outgoing edge nodes and the neighboring node to obtain a set of outgoing edges; and obtaining the outgoing edge subgraph of the neighboring node in the first input from the neighboring node, the nodes in the set of outgoing edge nodes, and the directed edges in the set of outgoing edges.

[0012] To achieve the above object, according to another aspect of the present application, there is provided a device for determining employee information, comprising: an obtaining unit configured to obtain an employee organization relationship undirected graph according to work conditions and organization relationships of a plurality of employees, wherein the employee organization relationship undirected graph comprises a plurality of nodes and a plurality of edges, each node represents a different employee, each edge represents an organization relationship between employees, and an attribute set of each node contains the work condition of the employee corresponding to the node; a partitioning unit configured to partition the employee organization relationship undirected graph according to a query condition of a dense subgraph to obtain a set of undirected graphs, wherein the query condition comprises a preset node number M of the dense subgraph and a target attribute set of the dense subgraph; a coloring unit configured to color each undirected graph in the set of undirected graphs to obtain a set of directed graphs; a calculating unit configured to recursively query a dense subgraph meeting a query condition in each directed graph in the set of directed graphs using a pruning condition to obtain a set of dense subgraphs; and a determining unit configured to determine at least one target person from the plurality of employees according to the set of dense subgraphs.

[0013] Further, the partitioning unit comprises: a first configuration subunit configured to set a direction of each edge of the employee organization relationship undirected graph as a node with a larger degree value pointing to a node with a smaller degree value to obtain a first directed graph; a first judgment subunit configured to judge whether the target attribute set is contained in an attribute set of each node in the first directed graph and whether a number of nodes adjacent to each node is greater than or equal to the preset node number M; and a partitioning subunit configured to partition a subgraph of at least one target node in the first directed graph to obtain the set of undirected graphs in a case where the target attribute set is contained in an attribute set of the at least one target node and a number of nodes adjacent to the at least one target node is greater than or equal to the preset node number M.

[0014] Further, the partitioning subunit comprises: a first obtaining module configured to obtain adjacent nodes and adjacent edges of the at least one target node in the first directed graph, and to obtain a set of local directed graphs by taking the at least one target node, the adjacent nodes of each target node in the at least one target node and the adjacent edges of each target node in the at least one target node as a local directed graph of each target node in the at least one target node; and a second obtaining module configured to restore each local directed graph in the set of local directed graphs to an undirected graph to obtain the set of undirected graphs.

[0015] Further, the coloring unit comprises: an ordering subunit, configured to order nodes in a target undirected graph in the set of undirected graphs in descending order of degree values of the nodes to obtain a node array; a second configuration subunit, configured to set a plurality of colors in a same number as a number of nodes in the target undirected graph, and assign color serial numbers to the plurality of colors to obtain a color array; a first marking subunit, configured to mark a first node in the node array using a first color with a smallest color serial number in the color array to obtain a colored first node, wherein the first node is a first element of the node array; a first acquisition subunit, configured to acquire color serial numbers of adjacent nodes of a second node in the target undirected graph, to obtain a second color set, wherein the second node is a second element of the node array; a second marking subunit, configured to mark the second node using a third color with a smallest color serial number in the second color set in the color array to obtain a colored second node; a first coloring subunit, configured to color other nodes in the node array except the first node and the second node according to the subunit of obtaining the colored second node to obtain a colored target undirected graph; a second coloring subunit, configured to color other undirected graphs in the set of undirected graphs using the first coloring subunit to obtain a colored set of undirected graphs; and a processing subunit, configured to process the colored set of undirected graphs to obtain the set of directed graphs.

[0016] Further, the processing subunit comprises: a first configuration module, configured to set a direction of each edge of each undirected graph in the colored set of undirected graphs as a node with a larger color serial number pointing to a node with a smaller color serial number to obtain the set of directed graphs.

[0017] Further, the computing unit comprises: a third configuration subunit, configured to take a target directed graph in the directed graph set as a first input of a recursive query algorithm, take a third node in the target directed graph as a second input of the recursive query algorithm, and take the preset node quantity M as a third input of the recursive query algorithm; a second judgment subunit, configured to judge whether the target attribute set is contained in an attribute set of a neighboring node of the second input and whether a color serial number of the neighboring node is greater than or equal to a value of the third input minus one; a second acquisition subunit, configured to acquire an outgoing edge subgraph of the neighboring node in the first input if the target attribute set is contained in the attribute set of the neighboring node and the color serial number of the neighboring node is greater than or equal to the value of the third input minus one; a first calculation subunit, configured to take the outgoing edge subgraph as a new first input, take the neighboring node as a new second input, and take the value of the third input minus one as a new third input, and continue to perform recursive calculation in the recursive query algorithm; a third judgment subunit, configured to judge whether an attribute set of at least one node included in a subgraph corresponding to the new first input contains the target attribute set when the recursive query algorithm is executed to the value of the new third input being equal to a preset value; a third acquisition subunit, configured to acquire at least one node included in the subgraph corresponding to the new first input and nodes traversed in the recursive query algorithm to obtain one dense subgraph corresponding to the target directed graph if the attribute set of the at least one node included in the subgraph corresponding to the new first input contains the target attribute set; and a second calculation subunit, configured to continue to perform calculation on the remaining directed graphs in the directed graph set except the target directed graph in the recursive query algorithm to obtain a dense subgraph set.

[0018] Further, the second acquisition subunit comprises: a third acquisition module, configured to acquire nodes pointed by outgoing edges of the neighboring node in the directed graph corresponding to the first input to obtain an outgoing edge node set; a fourth acquisition module, configured to acquire edges connecting the outgoing edge node set and the neighboring node to obtain an outgoing edge set; and a fifth acquisition module, configured to acquire the outgoing edge subgraph of the neighboring node in the first input from the neighboring node, nodes in the outgoing edge node set, and directed edges in the outgoing edge set.

[0019] In order to achieve the above object, according to an aspect of the present application, a processor is provided, which is used to run a program, wherein the program performs the employee information determination method when running.

[0020] In order to achieve the above object, according to an aspect of the present application, an electronic device is provided, comprising one or more processors and a memory, the memory being configured to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement any one of the above-mentioned employee information determination methods.

[0021] According to the present application, the following steps are adopted: obtaining an employee organizational relationship undirected graph according to the work situations and organizational relationships of a plurality of employees, wherein the employee organizational relationship undirected graph comprises a plurality of nodes and a plurality of edges, each node represents a different employee, each edge represents an organizational relationship between employees, and the attribute set of each node contains the work situation of the employee corresponding to the node; dividing the employee organizational relationship undirected graph according to a query condition of a dense subgraph to obtain a set of undirected graphs, wherein the query condition comprises a preset node number M of the dense subgraph and a target attribute set of the dense subgraph; coloring each undirected graph in the set of undirected graphs to obtain a set of directed graphs; using a pruning condition to recursively query the dense subgraph meeting the query condition in each directed graph of the set of directed graphs to obtain a set of dense subgraphs; and determining at least one target person from the plurality of employees according to the set of dense subgraphs, which solves the problem in the related art that a large number of invalid paths are calculated when searching for employees meeting the requirements in the employee organizational relationship graph, a large amount of time and computing resources are consumed, and the efficiency of determining employees meeting the requirements is low. By coloring the undirected graphs meeting the query condition in the employee organizational relationship undirected graph, the undirected graphs meeting the query condition are converted into directed graphs, and the dense subgraph in which each node meets the query condition is calculated in the directed graph according to the pruning condition, which avoids calculating a large number of invalid query paths in the query process of the dense subgraph, reduces the query time of the dense subgraph, improves the query efficiency of the dense subgraph, achieves the effect of improving the efficiency of determining employees meeting the requirements, and further achieves the effect of improving the work efficiency of the enterprise. BRIEF DESCRIPTION OF DRAWINGS

[0022] The accompanying drawings, which form a part of the present application, are intended to provide further understanding of the present application, and are used to interpret the illustrative embodiments of the present application and their descriptions, and do not constitute improper limitations to the present application. In the drawings:

[0023] Figure 1 is a flowchart of an employee information determination method according to an embodiment of the present application;

[0024] Figure 2 is a schematic diagram of an optional employee information determination method according to an embodiment of the present application Figure 1 ;

[0025] Figure 3This is an illustration of an optional method for determining employee information provided in Embodiment 1 of this application. Figure 2 ;

[0026] Figure 4 This is an illustration of an optional method for determining employee information provided in Embodiment 1 of this application. Figure 3 ;

[0027] Figure 5 This is an illustration of an optional method for determining employee information provided in Embodiment 1 of this application. Figure 4 ;

[0028] Figure 6 This is an illustration of an optional method for determining employee information provided in Embodiment 1 of this application. Figure 5 ;

[0029] Figure 7 This is an illustration of an optional method for determining employee information provided in Embodiment 1 of this application. Figure 6 ;

[0030] Figure 8 This is an illustration of an optional method for determining employee information provided in Embodiment 1 of this application. Figure 7 ;

[0031] Figure 9 This is a schematic diagram of the employee information determination device according to Embodiment 2 of this application;

[0032] Figure 10 This is a schematic diagram of an electronic device for determining employee information according to Embodiment 5 of this application. Detailed Implementation

[0033] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0034] It should be noted that the processing method, apparatus, processor, and electronic device specified in this disclosure can be used in the financial technology field to search for target employees among multiple employees, improving the efficiency of searching for target employees and saving a lot of computing resources. It can also be used in any field other than the financial technology field. The application field of the processing method, apparatus, processor, and electronic device specified in this disclosure is not limited.

[0035] It should be noted that the user information (including but not limited to user equipment information, user personal information, user work skills, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.

[0036] In order to enable personnel in the art to better understand the present application scheme, the technical scheme in the first embodiment of the present application will be described clearly and completely below in combination with the drawings in the first embodiment of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should belong to the scope of protection of the present application.

[0037] It should be noted that the terms "first", "second" and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0038] Embodiment one

[0039] The present application will be described below in combination with preferred implementation steps, Figure 1 is a flowchart of the employee information determination method provided according to the first embodiment of the present application, as Figure 1 shown, the method comprises the following steps:

[0040] Step S101, according to the work situation and organizational relationship of a plurality of employees, an employee organizational relationship undirected graph is obtained, wherein the employee organizational relationship undirected graph comprises a plurality of nodes and a plurality of edges, wherein each node represents different employees, each edge represents the organizational relationship between employees, and the attribute set of each node contains the work situation of the employee corresponding to the node.

[0041] In the first embodiment, Figure 2 is an employee organizational relationship undirected graph, as Figure 2As shown, the node a, the node b, the node c, the node d, the node e, the node f and the node g all represent different employees within an enterprise; the edge connecting the node a and the node c represents the organizational relationship between the employee a and the employee c, for example, the employee a and the employee c are employees belonging to the same work group, or the employee a and the employee c jointly maintain the same project; the attributes x1, x2 and x3 in the node a represent the working skills of the employee a, for example, the attribute x1 can represent that the technical direction of the employee a is the java technical direction, and the attribute x2 can represent other technical directions such as spring or mysql.

[0042] In step S102, the employee organizational relationship undirected graph is divided according to the query condition of the dense subgraph to obtain a set of undirected graphs, wherein the query condition includes the preset node number M of the dense subgraph and the target attribute set of the dense subgraph.

[0043] In the first embodiment, the dense subgraph represents an employee organizational relationship undirected graph formed by at least one employee meeting the query condition, the preset node number M of the dense subgraph represents the number of employees required for a project, and the target attribute set of the dense subgraph represents the working skills required for an employee required for a project. According to the query condition of the dense subgraph, all subgraphs meeting the condition (i.e. each undirected graph in the set of undirected graphs) in the employee organizational relationship undirected graph are queried to obtain the set of undirected graphs.

[0044] In step S103, each undirected graph in the set of undirected graphs is colored to obtain a set of directed graphs.

[0045] Each undirected graph in the set of undirected graphs is colored in the set of undirected graphs, so that each edge of each undirected graph in the set of undirected graphs is converted into a directed edge, and a set of directed graphs corresponding to each subgraph meeting the query condition is obtained.

[0046] In step S104, the pruning condition is used to recursively query the dense subgraph meeting the query condition in each directed graph in the set of directed graphs to obtain a set of dense subgraphs.

[0047] In the prior art, in order to obtain the dense subgraph meeting the query condition in the employee organizational relationship undirected graph, each edge (i.e. query path) of each directed graph in the set of directed graphs needs to be traversed after the set of directed graphs is obtained. However, due to the existence of nodes not meeting the query condition in the employee organizational relationship undirected graph, the existing dense subgraph query method will spend a lot of time traversing invalid query paths, thereby reducing the efficiency of determining the employee meeting the condition.

[0048] In the first embodiment, the pruning condition is used to filter out the directed graph meeting the query condition in each directed graph in the set of directed graphs, thereby avoiding calculating a large number of invalid query paths in the query process of the dense subgraph, and achieving the effect of accelerating the query speed of the dense subgraph.

[0049] Step S105, at least one target person is determined from the plurality of employees according to the dense subgraph set.

[0050] In summary, the method for determining employee information provided by the embodiment one of the present application, by means of the work situation and the organizational relationship of the plurality of employees, the employee organizational relationship undirected graph is obtained, wherein the employee organizational relationship undirected graph includes a plurality of nodes and a plurality of edges, wherein each node represents a different employee, each edge represents the organizational relationship between employees, and the attribute set of each node contains the work situation of the employee corresponding to the node; according to the query condition of the dense subgraph, the employee organizational relationship undirected graph is segmented to obtain an undirected graph set, wherein the query condition includes the preset node number M of the dense subgraph and the target attribute set of the dense subgraph; each undirected graph in the undirected graph set is colored to obtain a directed graph set; the pruning condition is used to recursively query the dense subgraph that meets the query condition in each directed graph of the directed graph set to obtain a dense subgraph set; at least one target person is determined from the plurality of employees according to the dense subgraph set, which solves the problem that in the related art, when searching for employees meeting the requirements in the employee organizational relationship graph, a large number of invalid paths are calculated, a large amount of time and computing resources are consumed, and the efficiency of determining employees meeting the requirements is low. By coloring the undirected graph that meets the query condition in the employee organizational relationship undirected graph, the undirected graph that meets the query condition is converted into a directed graph, and the dense subgraph in which each node meets the query condition is calculated in the directed graph according to the pruning condition, which avoids calculating a large number of invalid query paths in the query process of the dense subgraph, reduces the query time of the dense subgraph, improves the query efficiency of the dense subgraph, achieves the effect of improving the efficiency of determining employees meeting the requirements, and further achieves the effect of improving the work efficiency of the enterprise.

[0051] Optionally, in the method for determining employee information provided by the embodiment one of the present application, according to the query condition of the dense subgraph, the employee organizational relationship undirected graph is segmented to obtain an undirected graph set, which includes: setting the direction of each edge of the employee organizational relationship undirected graph as the node with a large degree value pointing to the node with a small degree value to obtain a first directed graph; determining whether the target attribute set is contained in the attribute set of each node in the first directed graph, and whether the number of nodes adjacent to each node is greater than or equal to the preset node number M; in the case that the target attribute set is contained in the attribute set of at least one target node, and the number of nodes adjacent to at least one target node is greater than or equal to the preset node number M, the subgraph of at least one target node is segmented in the first directed graph to obtain an undirected graph set.

[0052] In the first embodiment, after obtaining the employee organization relationship undirected graph, the employee organization relationship undirected graph needs to be directed, that is, according to the degree of each node in the employee organization relationship undirected graph, the direction of each undirected edge in the employee organization relationship undirected graph is set as the node with a large degree value pointing to the node with a small degree value, to obtain a directed graph (that is, a first directed graph). For example, Figure 3 is an employee organization relationship undirected graph, as shown in Figure 3 , the employee organization relationship undirected graph includes nodes {v1, v2, v3, v4, v5, v6, v7}, and the degree values corresponding to the plurality of nodes are {4, 4, 4, 5, 4, 2, 1} respectively. Among them, the degree value of node v5 is less than the degree value of node v4, so the direction of the edge connecting node v4 and node v5 is determined as node v4 pointing to node v5. The degree value of node v2 is equal to the degree value of node v1, and because the serial number of node v2 is greater than the serial number of node v1, the direction of the edge connecting node v2 and node v1 is determined as node v2 pointing to node v1. The directions of other edges in the employee organization relationship undirected graph are determined in turn, and the obtained first directed graph is as shown in Figure 4 .

[0053] After obtaining the first directed graph, it is necessary to determine whether each node in the first directed graph meets the query condition, so as to obtain the subgraph of the node (that is, the target node) meeting the query condition in the first directed graph. The undirected graph set is obtained by all target nodes in the first directed graph, wherein there is a case that there is no target node meeting the query condition in the first directed graph.

[0054] By converting the employee organization relationship undirected graph into a directed graph according to the degree value of the node, the subgraph set (that is, the undirected graph set) corresponding to each node meeting the query condition in the employee organization relationship undirected graph is obtained, which achieves the effect of reducing the query time of the dense subgraph.

[0055] Optionally, in the method for determining employee information provided in the first embodiment of the present application, in the case that the attribute set of at least one target node contains the target attribute set, and the number of nodes adjacent to the at least one target node is greater than or equal to the preset node number M, the subgraph of the at least one target node is segmented in the first directed graph to obtain the undirected graph set, which includes: obtaining the adjacent nodes and adjacent edges of the at least one target node in the first directed graph, forming a local directed graph of each target node in the at least one target node by the at least one target node, the adjacent nodes of each target node in the at least one target node and the adjacent edges of each target node in the at least one target node, to obtain a local directed graph set; and restoring each local directed graph in the local directed graph set into an undirected graph to obtain the undirected graph set.

[0056] In the first embodiment, in order to obtain the subgraph of the target node from the first directed graph, first, all adjacent nodes and all adjacent edges of the target node in the first directed graph are obtained, and a local directed graph of the target node is formed by the target node, all adjacent nodes of the target node and all adjacent edges of the target node. Then, the direction of each edge in the local directed graph is deleted to obtain an undirected graph. Finally, the undirected graph corresponding to each target node in the first directed graph is summarized to obtain an undirected graph set.

[0057] Optionally, in the method for determining employee information provided in the first embodiment, each undirected graph in the undirected graph set is colored to obtain a directed graph set, including: in a target undirected graph in the undirected graph set, nodes are sorted in descending order of the degree value of the nodes to obtain a node array; a plurality of colors are set in the same number as the plurality of nodes in the target undirected graph, and the plurality of colors are assigned color serial numbers to obtain a color array; a first node in the node array is marked with a first color with the smallest color serial number in the color array to obtain a colored first node, wherein the first node is the first element of the node array; the color serial numbers of adjacent nodes of a second node in the target undirected graph are obtained to obtain a second color set, wherein the second node is the second element of the node array; the second node is marked with a third color with the smallest color serial number in the second color set in the color array to obtain a colored second node; other nodes in the node array except the first node and the second node are colored according to the method of obtaining the colored second node to obtain a colored target undirected graph; other undirected graphs in the undirected graph set are colored according to the method of obtaining the colored target undirected graph to obtain a colored undirected graph set; and the colored undirected graph set is processed to obtain a directed graph set.

[0058] In the first embodiment, in order to convert each undirected graph in the undirected graph set into a directed graph, different color serial numbers are used to color each undirected graph in the undirected graph set according to the degree value of each node in each undirected graph.

[0059] For example, Figure 5 is an undirected graph in the undirected graph set before coloring, and Figure 5As shown, in order to color the undirected graph before coloring, first, the plurality of nodes in the undirected graph before coloring are sorted in descending order of the degree values of the nodes, to obtain a node array {v4, v5, v3, v2, v1, v6, v7}. A same number of colors as the nodes in the node array is set to obtain a color array {1, 2, 3, 4, 5, 6, 7}. Then each node in the undirected graph before coloring is colored, and the color with the smallest color sequence number {1} in the color array {1, 2, 3, 4, 5, 6, 7} is used to mark the node v4 (that is, the node with the largest degree value in the undirected graph before coloring, which is also the first node in the node array) in the node array. Then the node v5 (that is, the second node in the node array) is colored, and there is the colored node v4 among the adjacent nodes of the node v5, so the color {1} of the node v4 is deleted from the color array, to obtain a to-be-colored set {2, 3, 4, 5, 6, 7} corresponding to the node v5, and the color with the smallest color sequence number {2} in the to-be-colored set is used to mark the node v5. Then the node v3 (that is, the third node in the node array) is colored, and the node v3 has the adjacent nodes v4 and v5, so the colors {1, 2} of the nodes v4 and v5 are deleted from the color array, to obtain a to-be-colored set {3, 4, 5, 6, 7} corresponding to the node v3, and the color with the smallest color sequence number {3} in the to-be-colored set is used to mark the node v3. Then the uncolored nodes {v2, v1, v6, v7} in the node array are sequentially colored, to obtain the colored undirected graph. Figure 6 is the colored undirected graph obtained after coloring the undirected graph before coloring.

[0060] By coloring each undirected graph in the undirected graph set, it is beneficial to use the pruning strategy to search the dense subgraph meeting the query condition according to the color sequence number of the node when calculating the dense subgraph meeting the condition, so as to avoid calculating a large number of invalid paths in the query process of the dense subgraph, and to achieve the effect of improving the query efficiency of the dense subgraph.

[0061] Optionally, in the method for determining employee information provided in Embodiment One of the present application, the colored undirected graph set is processed to obtain a directed graph set, including: setting the direction of each edge in each undirected graph in the colored undirected graph set as the node with the larger color sequence number pointing to the node with the smaller color sequence number, to obtain the directed graph set.

[0062] In this embodiment, in order to calculate the dense subgraph meeting the query condition using the pruning strategy, each undirected graph in the colored undirected graph set needs to be directed. The direction of each edge in each undirected graph is set as the node with the larger color sequence number pointing to the node with the smaller color sequence number, to obtain the directed graph corresponding to each undirected graph (that is, the directed graph set). For example, Figure 6 is the colored undirected graph, such as Figure 6As shown, the color sequence number {4} of node v2 is greater than the color sequence number {2} of node v1, so the edge connecting node v2 and node v1 is set to be that node v2 points to node v1. Then other edges in the colored undirected graph are directed to obtain a directed graph. Figure 7 is a graph obtained after the colored undirected graph is directed.

[0063] Optionally, in the method for determining employee information provided in Embodiment One of the present application, the pruning condition is used to recursively query the dense subgraph meeting the query condition in each directed graph in the directed graph set to obtain the dense subgraph set, which includes: taking a target directed graph in the directed graph set as a first input of the recursive query algorithm, taking a third node in the target directed graph as a second input of the recursive query algorithm, and taking the preset node number M as a third input of the recursive query algorithm; judging whether the attribute set of the adjacent node of the second input contains the target attribute set and whether the color sequence number of the adjacent node is greater than or equal to the value of the third input minus one; if the attribute set of the adjacent node contains the target attribute set and the color sequence number of the adjacent node is greater than or equal to the value of the third input minus one, obtaining the out-edge subgraph of the adjacent node in the first input; taking the out-edge subgraph as a new first input, taking the adjacent node as a new second input, and taking the value of the third input minus one as a new third input, and substituting them into the recursive query algorithm to continue recursive calculation; when the recursive query algorithm is executed to the value of the new third input equal to the preset value, judging whether the attribute set of at least one node included in the subgraph corresponding to the new first input contains the target attribute set; if the attribute set of at least one node included in the subgraph corresponding to the new first input contains the target attribute set, obtaining at least one node included in the subgraph corresponding to the new first input and the nodes traversed in the recursive query algorithm to obtain one dense subgraph corresponding to the target directed graph; and continuing to execute the recursive query algorithm to calculate the remaining directed graphs in the directed graph set except the target directed graph to obtain the dense subgraph set.

[0064] In Embodiment One, in order to obtain the dense subgraph meeting the query condition in each directed graph in the directed graph set, each directed graph needs to be substituted into the recursive query algorithm to use two pruning strategies for retrieval. The first pruning strategy in the above two pruning strategies is that the attribute set of the node contains the target attribute set (i.e. the target attribute set in the query condition of the dense subgraph), and the second pruning strategy is that the number of nodes in the out-edge subgraph corresponding to the node is greater than or equal to the preset node number (i.e. the preset node number M in the query condition of the dense subgraph). Through the above two pruning strategies, the dense subgraph set is obtained by recursively querying the dense subgraph meeting the query condition in each directed graph in the directed graph set. Wherein, there may be no dense subgraph meeting the query condition in each directed graph in the directed graph set, so there is a case that the dense subgraph set is an empty set.

[0065] For example, the target attribute set of the dense subgraph can be set to {ML}, and the preset number of nodes M of the dense subgraph can be set to 3. Figure 7 It is a direction Figure X ,like Figure 7 As shown, directed Figure X Includes nodes {v1, v2, v3, v4, v5, v6, v7}, and the attribute set of each node is as follows: Figure 3 The attribute set corresponding to each node is shown. First, node v1 is judged. Since the color index of node v1 is {2}, which is less than the preset number of nodes 3, it is determined that the query path with node v1 as the root node cannot form a dense subgraph that meets the query conditions, so the query path with node v1 as the root node is pruned. Then, node v2 is judged. Since the color index of node v2 is {4}, which is greater than the preset number of nodes 3, and the attribute set {ML, DM, PR} of node v2 contains the target attribute set {ML}, the nodes {v1, v3, v4, v5} adjacent to node v2 are recursively queried in the outgoing edge subgraph corresponding to node v2.

[0066] At this point, the new first input in the recursive algorithm is the outgoing edge subgraph of node v2, the new second input is node v2, and the new third input is the value 2. Next, the algorithm checks the node v1 adjacent to node v2. The color index {2} of node v1 equals 2, and the attribute set {ML, PR} of node v1 contains the target attribute set {ML}. Therefore, in the outgoing edge subgraph corresponding to node v1, a recursive query is performed on the node v4 adjacent to node v1. The attribute set {ML, PR} of node v4 contains the target attribute set {ML}, thus determining a query path v2-v1-v4 that meets the query conditions, resulting in a dense subgraph {v2, v1, v4} that meets the query conditions.

[0067] Then, a recursive query is performed on node v3 from the nodes {v1, v3, v4, v5} adjacent to node v2. At this point, the new first input in the recursive algorithm is the outgoing edge subgraph of node v3, the new second input is node v3 itself, and the new third input is the value 2. In the outgoing edge subgraph of node v3, the nodes {v1, v4, v5} adjacent to node v3 are evaluated sequentially. Nodes v1 and v4 both meet the query conditions, but the attribute set {DM, PR} of node v5 does not contain the target attribute set {ML}. Therefore, the path v2-v3-v5 does not meet the query conditions. After traversing all query paths of node v3 adjacent to node v2, two query paths that meet the query conditions are determined: v2-v3-v1 and v2-v3-v4, resulting in two dense subgraphs {v2, v3, v1} and {v2, v3, v4} that meet the query conditions.

[0068] Next, a recursive query is performed on the nodes {v4, v5} among the nodes {v1, v3, v4, v5} adjacent to node v2. Since the color index of node v4 is less than 2, the path under path v2-v4 is pruned; since the attribute set of node v5 does not contain the target attribute set, the path under path v2-v5 is pruned. At this point, the query path with node v2 as the root node has been retrieved, resulting in a dense subgraph that meets the query conditions, including {v2, v1, v4}, {v2, v3, v1}, and {v2, v3, v4}.

[0069] Finally, the nodes {v3,v4,v5,v6,v7} are substituted sequentially into the recursive query algorithm for calculation to obtain the results in the directed query. Figure X The dense subgraphs that meet the query criteria are used to obtain a set of dense subgraphs.

[0070] By setting two pruning strategies to determine whether each node in the query path meets the query conditions, the query path of the dense subgraph is actively adjusted, avoiding the calculation of a large number of invalid query paths when calculating the dense subgraph. This greatly reduces the query time of the dense subgraph, thereby improving the query efficiency of the dense subgraph and further improving the work efficiency of the enterprise.

[0071] Optionally, in the method for determining employee information provided in Embodiment 1 of this application, if the attribute set of adjacent nodes contains the target attribute set, and the color sequence number of the adjacent nodes is greater than or equal to the value of the third input minus one, then obtaining the outgoing edge subgraph of the adjacent nodes in the first input includes: in the directed graph corresponding to the first input, obtaining the nodes pointed to by the outgoing edges of the adjacent nodes to obtain the outgoing edge node set; obtaining the edges connecting the outgoing edge node set and the adjacent nodes to obtain the outgoing edge set; and obtaining the outgoing edge subgraph of the adjacent nodes in the first input from the adjacent nodes, the nodes in the outgoing edge node set, and the directed edges in the outgoing edge set.

[0072] In this first embodiment, in order to obtain the outgoing edge subgraph of the adjacent node in the first input, it is first necessary to obtain the outgoing edge of the adjacent node and the outgoing edge node of the adjacent node (i.e. the node pointed to by the outgoing edge of the adjacent node) in the subgraph corresponding to the first input. Then, the outgoing edge subgraph corresponding to the adjacent node is formed by the adjacent node, the outgoing edge of the adjacent node and the outgoing edge node of the adjacent node.

[0073] Optionally, in this first embodiment, the process of retrieving a dense subgraph that meets the conditions in an undirected graph of employee organizational relationships can be as follows: Figure 8 As shown. First, calculate the undirected graph of employee organizational relationships (i.e., Figure 8 The degree of each node in the undirected graph Ga is calculated, and the nodes in the undirected graph of employee organizational relationships are sorted in descending order of degree value to obtain a node array (i.e., Figure 8(The sequence list in the graph). Then, the direction of each edge in the undirected graph of employee organizational relationships is set to point from the node with the larger degree value to the node with the smaller degree value, resulting in a directed graph (i.e., Figure 8 In the directed graph Gb, the nodes in the node array are searched sequentially according to their order. If the attribute set Qv of the target node contains the target attribute set QA (i.e., the target attribute set in the query conditions of the dense subgraph), and the subgraph of the target node (i.e., the target attribute set in the query conditions of the dense subgraph) is... Figure 8 If the number of nodes in the derived subgraph of the target node is greater than or equal to the preset number of nodes q, then the subgraph of the target node is restored to an undirected graph, resulting in a set of undirected graphs corresponding to at least one target node. Next, each undirected graph in the set is colored, and the color sequence of each node in the colored undirected graph (i.e., the color index of each node) is used as the basis for the coloring process. Figure 8 In the undirected graph, each edge is set to point from a node with a larger color index to a node with a smaller color index, resulting in a set of directed graphs. Then, a recursive query is performed on each directed graph in the set to obtain a dense subgraph that meets the query criteria. Two pruning strategies are used during the recursive query process to speed up the recursive query. Finally, a dense subgraph that meets the query criteria is obtained, i.e., a dense subgraph with q nodes, where the attribute set of each node in the dense subgraph includes the target attribute set (i.e., a dense subgraph with q nodes). Figure 8 (q-clique property group in the middle).

[0074] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0075] Example 2

[0076] This application's second embodiment also provides an employee information determination device. It should be noted that this employee information determination device can be used to execute the employee information determination method provided in this application's first embodiment. The employee information determination device provided in this application's second embodiment is described below.

[0077] Figure 9 This is a schematic diagram of an employee information determination device according to Embodiment 2 of this application. Figure 9 As shown, the device includes: an acquisition unit 901, a segmentation unit 902, a staining unit 903, a calculation unit 904, and a determination unit 905.

[0078] Specifically, the acquisition unit 901 is configured to obtain an employee organizational relationship undirected graph according to working conditions and organizational relationships of a plurality of employees, where the employee organizational relationship undirected graph includes a plurality of nodes and a plurality of edges, each node represents a different employee, each edge represents an organizational relationship between employees, and an attribute set of each node includes working conditions of an employee corresponding to the node.

[0079] The segmentation unit 902 is configured to segment the employee organizational relationship undirected graph to obtain a set of undirected graphs according to a query condition of the dense subgraph, where the query condition includes a preset node number M of the dense subgraph and a target attribute set of the dense subgraph.

[0080] The coloring unit 903 is configured to color each undirected graph in the set of undirected graphs to obtain a set of directed graphs.

[0081] The calculation unit 904 is configured to use a pruning condition to recursively query the dense subgraph meeting the query condition in each directed graph of the set of directed graphs to obtain a set of dense subgraphs.

[0082] The determination unit 905 is configured to determine at least one target person from the plurality of employees according to the set of dense subgraphs.

[0083] The employee information determination apparatus provided in the second embodiment of the present application obtains an employee organization relationship undirected graph according to the work situations and organization relationships of a plurality of employees through the obtaining unit 901, wherein the employee organization relationship undirected graph comprises a plurality of nodes and a plurality of edges, each node represents a different employee, each edge represents an organization relationship between employees, and the attribute set of each node contains the work situation of the employee corresponding to the node; the partition unit 902 partitions the employee organization relationship undirected graph according to the query condition of the dense subgraph to obtain an undirected graph set, wherein the query condition comprises a preset node number M of the dense subgraph and a target attribute set of the dense subgraph; the coloring unit 903 colors each undirected graph in the undirected graph set to obtain a directed graph set; the calculation unit 904 uses the pruning condition to recursively query the dense subgraph meeting the query condition in each directed graph of the directed graph set to obtain a dense subgraph set; and the determination unit 905 determines at least one target person from the plurality of employees according to the dense subgraph set, thereby solving the problem that a large number of invalid paths are calculated when searching for employees meeting the requirements in the employee organization relationship graph in the related art, a large amount of time and computing resources are consumed, and the efficiency of determining employees meeting the requirements is low. The undirected graph meeting the query condition in the employee organization relationship undirected graph is colored, the undirected graph meeting the query condition is converted into a directed graph, the dense subgraph in which each node meets the query condition is calculated in the directed graph according to the pruning condition, the calculation of a large number of invalid query paths in the query process of the dense subgraph is avoided, the query time of the dense subgraph is reduced, the query efficiency of the dense subgraph is improved, the efficiency of determining employees meeting the requirements is improved, and the work efficiency of the enterprise is further improved.

[0084] Optionally, in the employee information determination apparatus provided in the second embodiment of the present application, the partition unit 902 comprises: a first configuration subunit, configured to set the direction of each edge of the employee organization relationship undirected graph as the node with a large degree value pointing to the node with a small degree value to obtain a first directed graph; a first judgment subunit, configured to judge whether the attribute set of each node in the first directed graph contains the target attribute set and whether the number of nodes adjacent to each node is greater than or equal to the preset node number M; and a partition subunit, configured to partition the subgraph of at least one target node in the first directed graph in the case that the attribute set of at least one target node contains the target attribute set and the number of nodes adjacent to at least one target node is greater than or equal to the preset node number M to obtain the undirected graph set.

[0085] Optionally, in the employee information determination apparatus provided in Embodiment Two of the present application, the segmentation subunit comprises: a first acquisition module, configured to acquire adjacent nodes and adjacent edges of at least one target node in the first directed graph, and to form a local directed graph of each of the at least one target node from the at least one target node, the adjacent nodes of each of the at least one target node, and the adjacent edges of each of the at least one target node, thereby obtaining a local directed graph set; and a second acquisition module, configured to restore each local directed graph in the local directed graph set into an undirected graph, thereby obtaining an undirected graph set.

[0086] Optionally, in the employee information determination apparatus provided in Embodiment Two of the present application, the coloring unit 903 comprises: a sorting subunit, configured to sort nodes in a target undirected graph in the undirected graph set in descending order of node degree, thereby obtaining a node array; a second configuration subunit, configured to set a number of colors equal to a number of nodes in the target undirected graph, and to assign color serial numbers to the colors, thereby obtaining a color array; a first marking subunit, configured to mark a first node in the node array using a first color with the smallest color serial number in the color array, thereby obtaining a colored first node, wherein the first node is a first element of the node array; a first acquisition subunit, configured to acquire color serial numbers of adjacent nodes of a second node in the target undirected graph, thereby obtaining a second color set, wherein the second node is a second element of the node array; a second marking subunit, configured to mark the second node using a third color with the smallest color serial number in the second color set, thereby obtaining a colored second node; a first coloring subunit, configured to color other nodes in the node array except the first node and the second node according to the subunit of obtaining the colored second node, thereby obtaining a colored target undirected graph; a second coloring subunit, configured to color other undirected graphs in the undirected graph set using the first coloring subunit, thereby obtaining a colored undirected graph set; and a processing subunit, configured to process the colored undirected graph set, thereby obtaining a directed graph set.

[0087] Optionally, in the employee information determination apparatus provided in Embodiment Two of the present application, the processing subunit comprises: a first configuration module, configured to set a direction of each edge in each undirected graph in the colored undirected graph set as a direction from a node with a larger color serial number to a node with a smaller color serial number, thereby obtaining a directed graph set.

[0088] Optionally, in the employee information determination apparatus provided in Embodiment Two of the present application, the calculation unit 904 comprises: a third configuration sub-unit, configured to take the target directed graph in the directed graph set as a first input of the recursive query algorithm, take the third node in the target directed graph as a second input of the recursive query algorithm, and take the preset node quantity M as a third input of the recursive query algorithm; a second judgment sub-unit, configured to judge whether the target attribute set is contained in the attribute set of the adjacent node of the second input and whether the color serial number of the adjacent node is greater than or equal to the value of the third input minus one; a second acquisition sub-unit, configured to acquire the out-directed edge sub-graph of the adjacent node in the first input if the target attribute set is contained in the attribute set of the adjacent node and the color serial number of the adjacent node is greater than or equal to the value of the third input minus one; a first calculation sub-unit, configured to take the out-directed edge sub-graph as a new first input, take the adjacent node as a new second input, take the value of the third input minus one as a new third input, and continue the recursive calculation in the recursive query algorithm; a third judgment sub-unit, configured to judge whether the attribute set of at least one node included in the sub-graph corresponding to the new first input contains the target attribute set when the recursive query algorithm is executed to the value of the new third input equal to the preset value; a third acquisition sub-unit, configured to acquire at least one node included in the sub-graph corresponding to the new first input and the node traversed in the recursive query algorithm to obtain one dense sub-graph corresponding to the target directed graph if the attribute set of at least one node included in the sub-graph corresponding to the new first input contains the target attribute set; and a second calculation sub-unit, configured to continue to execute the recursive query algorithm to calculate the remaining directed graphs in the directed graph set except the target directed graph to obtain the dense sub-graph set.

[0089] Optionally, in the employee information determination apparatus provided in Embodiment Two of the present application, the second acquisition sub-unit comprises: a third acquisition module, configured to acquire the node pointed by the out-directed edge of the adjacent node in the directed graph corresponding to the first input to obtain an out-directed edge node set; a fourth acquisition module, configured to acquire the edge connecting the out-directed edge node set and the adjacent node to obtain an out-directed edge set; and a fifth acquisition module, configured to acquire the out-directed edge sub-graph of the adjacent node in the first input from the adjacent node, the nodes in the out-directed edge node set and the directed edges in the out-directed edge set.

[0090] The employee information determination apparatus comprises a processor and a memory, and the acquisition unit 901, the segmentation unit 902, the coloring unit 903, the calculation unit 904 and the determination unit 905 are all stored in the memory as program units, and the corresponding functions are realized by the processor executing the program units stored in the memory.

[0091] The processor comprises a core, and the core calls the corresponding program units from the memory. One or more than one core can be set, and the query efficiency of the dense sub-graph can be improved by adjusting the core parameters.

[0092] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0093] Embodiment 3 of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements a method for determining employee information.

[0094] Embodiment 4 of the present invention provides a processor for running a program, wherein the program executes a method for determining employee information during runtime.

[0095] like Figure 10 As shown, Embodiment 5 of the present invention provides an electronic device. The device includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: Based on the work status and organizational relationships of multiple employees, an undirected graph of employee organizational relationships is obtained. The undirected graph of employee organizational relationships includes multiple nodes and multiple edges. Each node represents a different employee, and each edge represents an organizational relationship between employees. The attribute set of each node contains the work status of the employee corresponding to the node. Based on the query conditions of the dense subgraph, the undirected graph of employee organizational relationships is segmented to obtain a set of undirected graphs. The query conditions include a preset number M of nodes in the dense subgraph and a target attribute set of the dense subgraph. Each undirected graph in the set of undirected graphs is colored to obtain a set of directed graphs. Using pruning conditions, dense subgraphs that meet the query conditions are recursively queried in each directed graph of the set of directed graphs to obtain a set of dense subgraphs. Based on the set of dense subgraphs, at least one target person is determined among the multiple employees.

[0096] When the processor executes the program, it also performs the following steps: Based on the query conditions of the dense subgraph, it segments the undirected graph of employee organizational relationships to obtain a set of undirected graphs, including: setting the direction of each edge of the undirected graph of employee organizational relationships to a node with a larger degree value pointing to a node with a smaller degree value, thus obtaining a first directed graph; determining whether the attribute set of each node in the first directed graph contains the target attribute set, and whether the number of nodes adjacent to each node is greater than or equal to a preset number of nodes M; if the attribute set of at least one target node contains the target attribute set, and the number of nodes adjacent to at least one target node is greater than or equal to the preset number of nodes M, then it segments the subgraph of at least one target node in the first directed graph to obtain a set of undirected graphs.

[0097] The processor further implements the following steps when executing the program: in the case that the target attribute set is contained in the attribute set of the at least one target node, and the number of nodes adjacent to the at least one target node is greater than or equal to the preset node number M, the subgraph of the at least one target node in the first directed graph is split to obtain a set of undirected graphs, including: obtaining adjacent nodes and adjacent edges of the at least one target node in the first directed graph, and forming a local directed graph of each of the at least one target node by the at least one target node, the adjacent nodes of each of the at least one target node, and the adjacent edges of each of the at least one target node, to obtain a set of local directed graphs; and restoring each of the set of local directed graphs into an undirected graph to obtain a set of undirected graphs.

[0098] The processor further implements the following steps when executing the program: coloring each of the set of undirected graphs to obtain a set of directed graphs, including: in a target undirected graph in the set of undirected graphs, sorting nodes in a descending order of degree values of the nodes to obtain a node array; setting a same number of colors as a number of nodes in the target undirected graph, and assigning color serial numbers to the colors to obtain a color array; using a first color with a smallest color serial number in the color array to mark a first node in the node array to obtain a colored first node, wherein the first node is a first element of the node array; obtaining color serial numbers of adjacent nodes of a second node in the target undirected graph to obtain a second color set, wherein the second node is a second element of the node array; using a third color with a smallest color serial number in the second color set to mark the second node to obtain a colored second node; coloring other nodes in the node array except the first node and the second node according to the method of obtaining the colored second node to obtain a colored target undirected graph; coloring other undirected graphs in the set of undirected graphs according to the method of obtaining the colored target undirected graph to obtain a set of colored undirected graphs; and processing the set of colored undirected graphs to obtain a set of directed graphs.

[0099] The processor further implements the following steps when executing the program: processing the set of colored undirected graphs to obtain a set of directed graphs, including: setting a direction of each edge of each undirected graph in the set of colored undirected graphs as a node with a larger color serial number pointing to a node with a smaller color serial number to obtain a set of directed graphs.

[0100] The processor further implements the following steps when executing the program: using the pruning condition to recursively query the dense subgraph meeting the query condition in each directed graph in the directed graph set to obtain a dense subgraph set, including: taking a target directed graph in the directed graph set as a first input of a recursive query algorithm, taking a third node in the target directed graph as a second input of the recursive query algorithm, and taking a preset node quantity M as a third input of the recursive query algorithm; determining whether the target attribute set is contained in an attribute set of a neighboring node of the second input and whether a color serial number of the neighboring node is greater than or equal to a value of the third input minus one; if the target attribute set is contained in the attribute set of the neighboring node and the color serial number of the neighboring node is greater than or equal to the value of the third input minus one, obtaining an outgoing edge subgraph of the neighboring node in the first input; taking the outgoing edge subgraph as a new first input, taking the neighboring node as a new second input, and taking the value of the third input minus one as a new third input, and substituting them into the recursive query algorithm to continue recursive calculation; when the recursive query algorithm is executed to the value of the new third input being equal to a preset value, determining whether an attribute set of at least one node included in the subgraph corresponding to the new first input contains the target attribute set; if the attribute set of the at least one node included in the subgraph corresponding to the new first input contains the target attribute set, obtaining the at least one node included in the subgraph corresponding to the new first input and nodes traversed in the recursive query algorithm to obtain one dense subgraph corresponding to the target directed graph; and continuing to execute the recursive query algorithm to calculate the remaining directed graphs in the directed graph set except the target directed graph to obtain the dense subgraph set.

[0101] The processor further implements the following steps when executing the program: if the target attribute set is contained in the attribute set of the neighboring node and the color serial number of the neighboring node is greater than or equal to the value of the third input minus one, obtaining the outgoing edge subgraph of the neighboring node in the first input includes: in the directed graph corresponding to the first input, obtaining nodes pointed to by outgoing edges of the neighboring node to obtain an outgoing edge node set; obtaining edges connecting the outgoing edge node set and the neighboring node to obtain an outgoing edge set; and obtaining the outgoing edge subgraph of the neighboring node in the first input from the neighboring node, the nodes in the outgoing edge node set and the directed edges in the outgoing edge set.

[0102] The device in the present disclosure can be a server, a PC, a PAD, a mobile phone, or the like.

[0103] The application further provides a computer program product, which is adapted to execute the program of the following method steps when executed on a data processing device: obtaining an employee organizational relationship undirected graph according to working conditions and organizational relationships of a plurality of employees, wherein the employee organizational relationship undirected graph comprises a plurality of nodes and a plurality of edges, each node represents a different employee, each edge represents an organizational relationship between employees, and a property set of each node contains the working conditions of the employee corresponding to the node; dividing the employee organizational relationship undirected graph according to a query condition of a dense subgraph to obtain an undirected graph set, wherein the query condition comprises a preset node number M of the dense subgraph and a target property set of the dense subgraph; coloring each undirected graph in the undirected graph set to obtain a directed graph set; using a pruning condition to recursively query the dense subgraph meeting the query condition in each directed graph of the directed graph set to obtain a dense subgraph set; and determining at least one target person from the plurality of employees according to the dense subgraph set.

[0104] When executed on a data processing device, the program is further adapted to execute the program of the following method steps: dividing the employee organizational relationship undirected graph according to the query condition of the dense subgraph to obtain the undirected graph set comprises: setting the direction of each edge of the employee organizational relationship undirected graph as the node with a large degree value pointing to the node with a small degree value to obtain a first directed graph; judging whether the target property set is contained in the property set of each node in the first directed graph and whether the number of nodes adjacent to each node is greater than or equal to the preset node number M; in the case that the target property set is contained in the property set of at least one target node and the number of nodes adjacent to the at least one target node is greater than or equal to the preset node number M, dividing the subgraph of the at least one target node in the first directed graph to obtain the undirected graph set.

[0105] When executed on a data processing device, the program is further adapted to execute the program of the following method steps: in the case that the target property set is contained in the property set of at least one target node and the number of nodes adjacent to the at least one target node is greater than or equal to the preset node number M, dividing the subgraph of the at least one target node in the first directed graph to obtain the undirected graph set comprises: obtaining adjacent nodes and adjacent edges of the at least one target node in the first directed graph, and composing a local directed graph of each target node in the at least one target node from the at least one target node, the adjacent nodes of each target node in the at least one target node and the adjacent edges of each target node in the at least one target node to obtain a local directed graph set; and restoring each local directed graph in the local directed graph set to an undirected graph to obtain the undirected graph set.

[0106] When executed on the data processing device, the program is further adapted to execute the method steps of: coloring each of the set of undirected graphs to obtain a set of directed graphs, including: in a target undirected graph in the set of undirected graphs, sorting nodes in the target undirected graph in descending order of degree values of the nodes to obtain a node array; setting a plurality of colors in a same number as a number of nodes in the target undirected graph, and assigning color sequence numbers to the plurality of colors to obtain a color array; marking a first node in the node array using a first color with a smallest color sequence number in the color array to obtain a colored first node, wherein the first node is a first element of the node array; obtaining color sequence numbers of adjacent nodes of a second node in the target undirected graph to obtain a second color set, wherein the second node is a second element of the node array; marking the second node using a third color with a smallest color sequence number in the second color set in the color array to obtain a colored second node; coloring other nodes in the node array except the first node and the second node according to the method of obtaining the colored second node to obtain a colored target undirected graph; coloring other undirected graphs in the set of undirected graphs according to the method of obtaining the colored target undirected graph to obtain a colored set of undirected graphs; and processing the colored set of undirected graphs to obtain the set of directed graphs.

[0107] When executed on the data processing device, the program is further adapted to execute the method steps of: processing the colored set of undirected graphs to obtain the set of directed graphs, including: setting a direction of each edge of each undirected graph in the colored set of undirected graphs to be from a node with a larger color sequence number to a node with a smaller color sequence number to obtain the set of directed graphs.

[0108] When executed on a data processing device, the program is further adapted to perform the following method steps: recursively querying a dense subgraph meeting a query condition in each directed graph in the directed graph set using a pruning condition, to obtain a dense subgraph set, comprising: taking a target directed graph in the directed graph set as a first input of a recursive query algorithm, taking a third node in the target directed graph as a second input of the recursive query algorithm, and taking a preset node quantity M as a third input of the recursive query algorithm; determining whether a target attribute set is contained in an attribute set of a neighboring node of the second input, and whether a color serial number of the neighboring node is greater than or equal to a value of the third input minus one; if the target attribute set is contained in the attribute set of the neighboring node, and the color serial number of the neighboring node is greater than or equal to the value of the third input minus one, obtaining an out-edge subgraph of the neighboring node in the first input; taking the out-edge subgraph as a new first input, taking the neighboring node as a new second input, and taking the value of the third input minus one as a new third input, and substituting them into the recursive query algorithm to continue recursive calculation; when the recursive query algorithm is executed to the value of the new third input being equal to a preset value, determining whether an attribute set of at least one node included in a subgraph corresponding to the new first input contains the target attribute set; if the attribute set of the at least one node included in the subgraph corresponding to the new first input contains the target attribute set, obtaining the at least one node included in the subgraph corresponding to the new first input and nodes traversed in the recursive query algorithm, to obtain one dense subgraph corresponding to the target directed graph; and continuing to execute the recursive query algorithm to calculate the remaining directed graphs in the directed graph set except the target directed graph, to obtain the dense subgraph set.

[0109] When executed on a data processing device, the program is further adapted to perform the following method steps: if the target attribute set is contained in the attribute set of the neighboring node, and the color serial number of the neighboring node is greater than or equal to the value of the third input minus one, obtaining the out-edge subgraph of the neighboring node in the first input, comprising: in the directed graph corresponding to the first input, obtaining nodes pointed to by out-edges of the neighboring node, to obtain an out-edge node set; obtaining edges connecting the out-edge node set and the neighboring node, to obtain an out-edge set; and obtaining the out-edge subgraph of the neighboring node in the first input from the neighboring node, the nodes in the out-edge node set, and the directed edges in the out-edge set.

[0110] Those skilled in the art will appreciate that embodiments of the present application can be supplied as a method, a system, or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage media, etc.) having computer-usable program code embodied thereon.

[0111] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.

[0112] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.

[0113] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.

[0114] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0115] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, for storing instructions and data used and / or generated by the computing device. The memory can also include non-volatile memory, such as read-only memory (ROM), electrically programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or other non-volatile memory.

[0116] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.

[0117] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover non-exclusive inclusions, such that a process, method, article or apparatus that comprises a list of elements does not only include those elements, but also other elements not explicitly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.

[0118] Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, system or computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) containing computer usable program code.

[0119] The above merely provides embodiments of the present application and is not intended to limit the present application. Various modifications and changes can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the scope of the claims of the present application.

Claims

1. A method of determining employee information, characterized by, The method comprises the following steps: According to the work situation and organizational relationship of a plurality of employees, an employee organizational relationship undirected graph is obtained, wherein the employee organizational relationship undirected graph comprises a plurality of nodes and a plurality of edges, each node represents a different employee, each edge represents the organizational relationship between employees, and the attribute set of each node contains the work situation of the employee corresponding to the node; According to the query condition of the dense subgraph, the employee organizational relationship undirected graph is divided to obtain an undirected graph set, wherein the query condition comprises a preset node number M of the dense subgraph and a target attribute set of the dense subgraph; Each undirected graph in the undirected graph set is colored to obtain a directed graph set; Using a pruning condition, a dense subgraph set is obtained by recursively querying the dense subgraph meeting the query condition in each directed graph of the directed graph set; According to the dense subgraph set, at least one target person is determined from the plurality of employees; Wherein, using a pruning condition, a dense subgraph set is obtained by recursively querying the dense subgraph meeting the query condition in each directed graph of the directed graph set, comprising: The target directed graph in the directed graph set is taken as the first input of the recursive query algorithm, the third node in the target directed graph is taken as the second input of the recursive query algorithm, and the preset node number M is taken as the third input of the recursive query algorithm; Determine whether the attribute set of the adjacent node of the second input contains the target attribute set, and whether the color serial number of the adjacent node is greater than or equal to the value of the third input minus one; If the attribute set of the adjacent node contains the target attribute set, and the color serial number of the adjacent node is greater than or equal to the value of the third input minus one, the out-edge subgraph of the adjacent node in the first input is obtained; The out-edge subgraph is taken as the new first input, the adjacent node is taken as the new second input, and the value of the third input minus one is taken as the new third input, which is substituted into the recursive query algorithm to continue recursive calculation; When the recursive query algorithm is executed to the value of the new third input equal to the preset value, it is determined whether the attribute set of at least one node included in the subgraph corresponding to the new first input contains the target attribute set; If the attribute set of at least one node included in the subgraph corresponding to the new first input contains the target attribute set, at least one node included in the subgraph corresponding to the new first input and the nodes traversed in the recursive query algorithm are obtained to obtain one dense subgraph corresponding to the target directed graph; The recursive query algorithm is continued to calculate the remaining directed graphs in the directed graph set except the target directed graph to obtain a dense subgraph set.

2. The method of claim 1, wherein, According to the query condition of the dense subgraph, the employee organizational relationship undirected graph is divided to obtain an undirected graph set, comprising: The direction of each edge of the employee organizational relationship undirected graph is set to the node with a large degree value pointing to the node with a small degree value to obtain a first directed graph; It is determined whether the attribute set of each node in the first directed graph contains the target attribute set, and whether the number of nodes adjacent to each node is greater than or equal to the preset node number M; In a case that the target attribute set is contained in the attribute set of at least one target node, and the number of nodes adjacent to the at least one target node is greater than or equal to the preset node number M, a subgraph of the at least one target node in the first directed graph is segmented to obtain the set of undirected graphs.

3. The method of claim 2, wherein, In a case that the target attribute set is contained in the attribute set of at least one target node, and the number of nodes adjacent to the at least one target node is greater than or equal to the preset node number M, a subgraph of the at least one target node in the first directed graph is segmented to obtain the set of undirected graphs including: Adjacent nodes and adjacent edges of the at least one target node in the first directed graph are obtained, and a local directed graph of each target node in the at least one target node is composed of the at least one target node, the adjacent nodes of each target node in the at least one target node and the adjacent edges of each target node in the at least one target node, to obtain a set of local directed graphs; Each local directed graph in the set of local directed graphs is restored to an undirected graph to obtain the set of undirected graphs.

4. The method of claim 1, wherein, Coloring each undirected graph in the set of undirected graphs to obtain a set of directed graphs including: In a target undirected graph in the set of undirected graphs, nodes are sorted in a descending order of degree values of the nodes to obtain a node array; A number of colors same as a number of nodes in the target undirected graph are set, and color serial numbers of the number of colors are allocated to obtain a color array; A first node in the node array is marked by using a first color with a smallest color serial number in the color array to obtain a colored first node, wherein the first node is a first element of the node array; Color serial numbers of adjacent nodes of a second node in the target undirected graph are obtained to obtain a second color set, wherein the second node is a second element of the node array; The second node is marked by using a third color with a smallest color serial number in the second color set in the color array to obtain a colored second node; Other nodes in the node array except the first node and the second node are colored according to a method of obtaining the colored second node to obtain a colored target undirected graph; Other undirected graphs in the set of undirected graphs are colored according to a method of obtaining the colored target undirected graph to obtain a set of colored undirected graphs; The set of colored undirected graphs is processed to obtain the set of directed graphs.

5. The method of claim 4, wherein, The set of colored undirected graphs is processed to obtain the set of directed graphs including: A direction of each edge of each undirected graph in the set of colored undirected graphs is set to be from a node with a larger color serial number to a node with a smaller color serial number to obtain the set of directed graphs.

6. The method of claim 1, wherein, If the target attribute set is contained in the attribute set of the adjacent node, and the color serial number of the adjacent node is greater than or equal to a value obtained by subtracting one from the first input, obtaining the out-directed edge subgraph of the adjacent node in the first input includes: In the directed graph corresponding to the first input, obtain nodes pointed by outgoing edges of the adjacent node to obtain an outgoing edge node set; Obtain edges connecting the outgoing edge node set and the adjacent node to obtain an outgoing edge set; Obtain an outgoing edge subgraph of the adjacent node in the first input from the adjacent node, nodes in the outgoing edge node set, and directed edges in the outgoing edge set.

7. An employee information determining apparatus characterized by comprising: Comprise: An acquisition unit is configured to obtain an employee organization relationship undirected graph according to working conditions and organization relationships of a plurality of employees, wherein the employee organization relationship undirected graph comprises a plurality of nodes and a plurality of edges, each node represents a different employee, each edge represents an organization relationship between employees, and an attribute set of each node comprises working conditions of an employee corresponding to the node; A segmentation unit is configured to segment the employee organization relationship undirected graph according to a query condition of a dense subgraph to obtain an undirected graph set, wherein the query condition comprises a preset node number M of the dense subgraph and a target attribute set of the dense subgraph; A coloring unit is configured to color each undirected graph in the undirected graph set to obtain a directed graph set; A calculation unit is configured to use a pruning condition to recursively query a dense subgraph meeting a query condition in each directed graph in the directed graph set to obtain a dense subgraph set; A determination unit is configured to determine at least one target person from the plurality of employees according to the dense subgraph set; The calculation unit comprises: a third configuration subunit configured to use a target directed graph in the directed graph set as a first input of a recursive query algorithm, use a third node in the target directed graph as a second input of the recursive query algorithm, and use the preset node number M as a third input of the recursive query algorithm; a second judgment subunit configured to judge whether an attribute set of an adjacent node of the second input comprises the target attribute set and whether a color serial number of the adjacent node is greater than or equal to a value of the third input minus one; a second acquisition subunit configured to acquire an outgoing edge subgraph of the adjacent node in the first input if the attribute set of the adjacent node comprises the target attribute set and the color serial number of the adjacent node is greater than or equal to the value of the third input minus one; a first calculation subunit configured to use the outgoing edge subgraph as a new first input, use the adjacent node as a new second input, use the value of the third input minus one as a new third input, and continue recursive calculation in the recursive query algorithm; a third judgment subunit configured to judge whether an attribute set of at least one node included in a subgraph corresponding to the new first input comprises the target attribute set when the recursive query algorithm is executed to the value of the new third input being equal to a preset value; a third acquisition subunit configured to acquire at least one node included in the subgraph corresponding to the new first input and nodes traversed in the recursive query algorithm to obtain a dense subgraph corresponding to the target directed graph if the attribute set of the at least one node included in the subgraph corresponding to the new first input comprises the target attribute set; and a second calculation subunit configured to continue to execute the recursive query algorithm to calculate the remaining directed graphs in the directed graph set except the target directed graph to obtain the dense subgraph set. 8.An electronic device comprising a memory and a processor, the electronic device comprising: The memory stores a computer program, and the processor is configured to execute the method for determining employee information according to any one of claims 1 to 6 by using the computer program.

9. An electronic device, comprising: One or more processors and a memory are included, and the memory is configured to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method for determining employee information according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Personnel relationship query method and device, electronic equipment and storage medium

    CN110825821A

  • Talent recommendation method and device

    CN112116331A