CN112199450A - Relation graph building method and device and electronic equipment - Google Patents

Relation graph building method and device and electronic equipment Download PDF

Info

Publication number
CN112199450A
CN112199450A CN202011062184.6A CN202011062184A CN112199450A CN 112199450 A CN112199450 A CN 112199450A CN 202011062184 A CN202011062184 A CN 202011062184A CN 112199450 A CN112199450 A CN 112199450A
Authority
CN
China
Prior art keywords
node
nodes
iteration
adjacent
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011062184.6A
Other languages
Chinese (zh)
Inventor
徐晓笑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202011062184.6A priority Critical patent/CN112199450A/en
Publication of CN112199450A publication Critical patent/CN112199450A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/288Entity relationship models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0635Risk analysis of enterprise or organisation activities

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Educational Administration (AREA)
  • Data Mining & Analysis (AREA)
  • Game Theory and Decision Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Image Generation (AREA)

Abstract

The embodiment of the specification provides a relational graph construction method and device and electronic equipment. The method comprises the following steps: determining a plurality of nodes for generating a target relation graph and node association data corresponding to the nodes. And determining adjacent nodes corresponding to the nodes based on the node association data, wherein the adjacent nodes belong to the plurality of nodes. Multiple iterations perform the following operations: selecting a target adjacent node from adjacent nodes of the selected node as a next node of a topological path, wherein the node which is selected as the topological path cannot be used as the target adjacent node; updating the target adjacent node selected in the current iteration to the selected node in the next iteration; and when the preset ending node in the plurality of nodes is used as the selected node of the current iteration, the iteration is ended. And rendering the topological path from the starting node to the ending node determined by multiple iterations to obtain the target relation map.

Description

Relation graph building method and device and electronic equipment
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a method and an apparatus for building a relationship graph, and an electronic device.
Background
In the field of wind control, relationship maps are often used to show relationships from person to person, person to company, and company to company. Risk transfer states among the nodes can be captured through the relation graph, and important data support is provided for wind control decisions.
The better state of the relationship graph is that all paths from the starting node to the target node can be seen clearly at a glance, but at present, most of relationship networks displayed by the relationship graph are complicated and complicated, and clear and readable experience is not brought. Therefore, how to improve readability of the relational graph is a technical problem which needs to be solved urgently at present.
Disclosure of Invention
The embodiment of the specification aims to provide a relation graph construction method, a relation graph construction device and electronic equipment, which are used for generating a clear and readable relation graph.
In order to achieve the above object, the embodiments of the present specification are implemented as follows:
in a first aspect, a method for constructing a relationship graph is provided, which includes:
determining a plurality of nodes for generating a target relation graph and node association data corresponding to the nodes;
determining adjacent nodes corresponding to the nodes based on the node association data, wherein the adjacent nodes belong to the plurality of nodes;
multiple iterations perform the following operations: selecting a target adjacent node from adjacent nodes of the selected node as a next node of a topological path, wherein the node which is selected as the topological path cannot be used as the target adjacent node; updating the target adjacent node selected in the current iteration to the selected node in the next iteration; the selected node of the first iteration is a preset initial node in the nodes, and when a preset final node in the nodes is used as the selected node of the current iteration, the iteration is ended;
and rendering the topological path from the starting node to the ending node determined by the multiple rounds of iteration to obtain a target relation map.
In a second aspect, there is provided a relationship map construction apparatus, including:
the data extraction module is used for determining a plurality of nodes for generating a target relation map and node association data corresponding to the nodes;
the preprocessing module is used for determining adjacent nodes corresponding to the nodes based on the node association data, wherein the adjacent nodes belong to the plurality of nodes;
the topology calculation module performs the following operations in a plurality of rounds of iteration: selecting a target adjacent node from adjacent nodes of the selected node as a next node of a topological path, wherein the node which is selected as the topological path cannot be used as the target adjacent node; updating the target adjacent node selected in the current iteration to the selected node in the next iteration; the selected node of the first iteration is a preset initial node in the plurality of nodes, and is a node of a topological path, and when a preset final node in the plurality of nodes is used as the selected node of the current iteration, the iteration is finished;
and the map rendering module renders the topological path from the starting node to the ending node determined by the multiple rounds of iteration to obtain the target relation map.
In a third aspect, an electronic device is provided that includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being executed by the processor to:
determining adjacent nodes corresponding to the nodes based on the node association data, wherein the adjacent nodes belong to the plurality of nodes;
multiple iterations perform the following operations: selecting a target adjacent node from adjacent nodes of the selected node as a next node of a topological path, wherein the node which is selected as the topological path cannot be used as the target adjacent node; updating the target adjacent node selected in the current iteration to the selected node in the next iteration; the selected node of the first iteration is a preset initial node in the plurality of nodes, and is a node of a topological path, and when a preset final node in the plurality of nodes is used as the selected node of the current iteration, the iteration is finished;
and rendering the topological path from the starting node to the ending node determined by the multiple rounds of iteration to obtain a target relation map.
In a fourth aspect, a computer-readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, performs the steps of:
determining adjacent nodes corresponding to the nodes based on the node association data, wherein the adjacent nodes belong to the plurality of nodes;
multiple iterations perform the following operations: selecting a target adjacent node from adjacent nodes of the selected node as a next node of a topological path, wherein the node which is selected as the topological path cannot be used as the target adjacent node; updating the target adjacent node selected in the current iteration to the selected node in the next iteration; the selected node of the first iteration is a preset initial node in the plurality of nodes, and is a node of a topological path, and when a preset final node in the plurality of nodes is used as the selected node of the current iteration, the iteration is finished;
and rendering the topological path from the starting node to the ending node determined by the multiple rounds of iteration to obtain a target relation map.
Based on the scheme of the embodiment of the specification, node traversal can be performed from the starting node to the ending node without repeatability, and the topological path between the starting node and the ending node is determined, so that a clear and readable relational graph is rendered, and the user experience is improved. The generated relation map can provide more visual data support for wind control decision in the field of wind control, so that the method has higher practicability.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative efforts.
Fig. 1 is a first flowchart of a relationship graph building method provided in an embodiment of the present specification.
Fig. 2 is a second flowchart of a relationship graph building method provided in an embodiment of the present specification.
Fig. 3 is a third schematic flow chart of a relationship graph building method provided in an embodiment of the present specification.
Fig. 4 is a fourth flowchart of a method for constructing a relationship graph provided in an embodiment of the present disclosure.
Fig. 5 is a fifth flowchart of a relationship graph constructing method provided in an embodiment of the present specification.
Fig. 6 is a sixth flowchart of a relationship graph constructing method provided in an embodiment of the present specification.
Fig. 7 is a seventh flowchart of a relationship graph constructing method provided in an embodiment of the present specification.
Fig. 8 is a schematic structural diagram of a relationship graph builder provided in an embodiment of the present specification.
Fig. 9 is a schematic structural diagram of an electronic device provided in an embodiment of this specification.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step should fall within the scope of protection of the present specification.
As mentioned above, in the field of wind control, relationship maps are often used to show person-to-person, person-to-company, and company-to-company relationships. Risk transfer states among the nodes can be captured through the relation graph, and important data support is provided for wind control decisions. The better state of the relationship graph is that all paths from the starting node to the target node can be seen clearly at a glance, but at present, most of relationship networks displayed by the relationship graph are complicated and complicated, and clear and readable experience is not brought. In view of the above, this document aims to provide a high-readability relational graph building scheme to improve user experience.
FIG. 1 is a flowchart of a method for constructing a relationship map according to an embodiment of the present disclosure. The method shown in fig. 1 may be performed by a corresponding apparatus below, comprising the steps of:
s102, determining a plurality of nodes used in the target relation graph and node association data corresponding to the plurality of nodes.
Here, assuming that the main execution body of the method in the embodiment of the present specification is a service end, service objects may be regarded as nodes based on service data, and service connections between the service objects may be regarded as node association data.
It should be understood that the relationship type shown in the target relationship map is not unique, and the embodiments of the present specification are specifically limited. By way of example introduction, the target relationship graph may be an enterprise relationship graph, and the corresponding plurality of nodes at least include: a business, and at least one of a corporate, stockholder, and board of directors associated with the business.
And S104, determining adjacent nodes corresponding to the nodes based on the node association data, wherein the adjacent nodes belong to the plurality of nodes.
It should be understood that the nodes and the adjacent nodes corresponding to the nodes present a relationship in the node-associated data, and in the relationship map, two associated nodes may represent the relationship in a connection manner.
S106, executing the following operations in multiple iterations: selecting a target adjacent node from adjacent nodes of the selected node as a next node of a topological path, wherein the node which is selected as the topological path cannot be used as the target adjacent node; updating the target adjacent node selected in the current iteration to the selected node in the next iteration; and when the preset ending node in the plurality of nodes is used as the selected node of the current iteration, the iteration is ended.
The starting node and the ending node can be set according to reading requirements of the relation graph. Based on the method of this step, not limited to a topology path from the starting node to the ending node can be determined.
In addition, if the selected node of the current iteration corresponds to the only non-ending node which can be selected as the target adjacent node, the previous iteration is returned to reselect the next node of the topological path. If the last round of iteration of the return has the problem that only non-end nodes can be selected as target adjacent points, the previous round of iteration of the return can be continued, and the like.
And S108, rendering the topological path from the starting node to the ending node determined by multiple iterations to obtain a target relation map.
Specifically, in this step, based on a topological path determined through multiple iterations, rendering layout may be performed on the plurality of nodes, and rendering positions corresponding to the plurality of nodes are determined; and then, rendering the topological path determined by the multiple iterations according to the rendering positions corresponding to the multiple nodes to obtain a target relation map.
In the method shown in fig. 1 in the embodiment of the present description, nodes can be repeatedly traversed from the start node to the end node, and a topological path between the start node and the end node is determined, so that a clear and readable relation graph is rendered, and user experience is improved. The generated relation map can provide more visual data support for wind control decision in the field of wind control, so that the method has higher practicability.
If the above-mentioned multiple iterations determine at least two kinds of topology paths from the start node to the end node, then, on the basis of rendering positions of the start node and the end node, a rendering position of the at least two kinds of topology paths determined by the multiple iterations and corresponding to other nodes may also be determined, where the other nodes correspond to different rendering positions in different topology paths.
And then, the rendering positions of other nodes are subjected to duplicate removal. And arranging the rendered topological paths according to the number of nodes corresponding to the topological paths determined by multiple iterations to obtain an adjusted and optimized target relation map.
It should be understood that the optimized target relationship graph can clearly and briefly present each topological path.
The method for constructing the relationship map according to the embodiment of the present disclosure is described in detail below with reference to a practical application.
The overall implementation flow of the target relationship graph construction of the embodiment is as follows:
referring first to fig. 2, after determining a plurality of nodes used for generating a target relationship graph and node association data corresponding to the plurality of nodes, adjacent nodes of the respective nodes are determined through the plurality of nodes and the node association data.
And then, selecting a starting node and an ending node from the plurality of nodes according to the use requirement of the target relation graph. And calculating a topological path from the starting node to the ending node.
The calculation flow of the topological path comprises the following steps:
first, two stacks, a main stack and an auxiliary stack, are prepared. A main stack: each element is a single node and is used for storing the nodes on the current path; and (3) stack assistance: each element is used for storing a neighbor node list of the corresponding element of the main stack.
The "start node" is placed on the primary stack, while the list of neighbor nodes for the start node is placed on the secondary stack.
Then, as shown in fig. 3, the main stack is built: checking the auxiliary stack, popping up an adjacent node list at the top of the auxiliary stack, taking out nodes which are not in the main stack in the adjacent node list, and pressing the nodes into the top of the main stack; and meanwhile, the rest node list is pushed back to the auxiliary stack again, the adjacent node list of the node newly pushed into the main stack is continuously inquired, and the adjacent node list of the node newly pushed into the main stack is pushed into the auxiliary stack until the ending node is pushed to the top of the main stack.
In the process of stacking, if the adjacent node list at the top of the secondary stack is an empty set, which indicates that the end node is not found when the topological path goes to the end, the stack is reduced for the primary stack: and popping up the current node at the top of the main stack, and simultaneously popping up the empty adjacent node list at the top of the auxiliary stack.
And after the stack reduction of the main stack is completed, continuing to execute a new stack building process until the node at the top of the main stack is the end node.
The execution strategy of the multi-round iterative stack building process is as follows:
building a stack for the main stack as long as the stack top of the auxiliary stack is a non-empty adjacent node list;
reducing the stack of the main stack as long as the top of the auxiliary stack is an empty adjacent node list;
as long as the top of the main stack is the end node, the nodes of the output main stack form a topology path, and other topology paths need to be found continuously after stack reduction.
Referring to fig. 4, fig. 4 is a schematic diagram of a primary stack and a secondary stack when a topology path is successfully output. When the top of the main stack is a tail node, the nodes of the main stack are output in the order from bottom to top to obtain a topology path: start node-intermediate node 1-intermediate node 2-end node.
Referring to fig. 5, fig. 5 is a schematic diagram of a primary stack and a secondary stack when stack reduction is required. When the top of the main stack is the intermediate node 5, and the adjacent node list of the intermediate node 5 corresponding to the auxiliary stack top is an empty set, popping the intermediate node 5 from the main stack and the corresponding adjacent node list from the corresponding main stack and the auxiliary stack, returning to the intermediate node 4 for station building, namely, selecting other nodes from the adjacent node list of the intermediate node 4 of the auxiliary stack and pressing the other nodes into the main stack.
After all the topological paths are output by the calculation method, rendering and layout of each node can be started.
And determining rendering positions of other intermediate nodes in each topological path on the basis of the rendering positions of the starting node and the ending node.
Preferably, as shown in fig. 6, all the topology paths are arranged from a greater number to a fewer number according to the number of nodes corresponding to each topology path, so as to determine the rendering position of each intermediate node. The redundant intermediate nodes 6, 3 are then deduplicated. Rendering positions of all nodes shown in fig. 7 are obtained.
And then, rendering the topological paths according to the rendering positions of all the nodes shown in fig. 7 to obtain a target relation graph.
Based on the target relationship graph shown in fig. 7, after the topological paths are sorted and the nodes are deduplicated, each topological path with a simple structure and clear and readable relationship expression can be obtained.
The above is a description of the method of the embodiments of the present specification. It will be appreciated that appropriate modifications may be made without departing from the principles outlined herein, and such modifications are intended to be included within the scope of the embodiments herein.
Corresponding to the relationship graph construction method shown in fig. 1, an embodiment of the present specification further provides a relationship graph construction apparatus. Fig. 8 is a block diagram of a relational map construction apparatus 800 according to an embodiment of the present disclosure, including:
the data extraction module 810 determines a plurality of nodes for generating a target relationship graph and node association data corresponding to the nodes.
And a preprocessing module 820 for determining an adjacent node corresponding to each node based on the node association data, wherein the adjacent node belongs to the plurality of nodes.
The topology calculation module 830, for multiple iterations, performs the following operations: selecting a target adjacent node from adjacent nodes of the selected node as a next node of a topological path, wherein the node which is selected as the topological path cannot be used as the target adjacent node; updating the target adjacent node selected in the current iteration to the selected node in the next iteration; and when the preset ending node in the plurality of nodes is used as the selected node of the iteration of the current round, the iteration is ended.
And the map rendering module 840 renders the topological path from the starting node to the ending node determined by the multiple iterations to obtain the target relation map.
The relational graph construction device in the embodiment of the specification can perform node traversal from the starting node to the ending node without repeatability, and determine the topological path between the starting node and the ending node, so that a clear and readable relational graph is rendered, and the user experience is improved. The generated relation map can provide more visual data support for wind control decision in the field of wind control, so that the method has higher practicability.
Optionally, the graph rendering module 840 performs rendering layout on the plurality of nodes based on the topological paths determined by the multiple iterations, and determines rendering positions corresponding to the plurality of nodes; and then, rendering the topological path determined by the multiple iterations according to rendering positions corresponding to the multiple nodes to obtain the target relation map.
If the multiple iterations determine at least two topology paths from the start node to the end node, the graph rendering module 840 may determine, after determining the rendering positions of the start node and the end node, rendering positions of other nodes corresponding to the at least two topology paths determined by the multiple iterations on the basis of the rendering positions of the start node and the end node, where the other nodes correspond to different rendering positions in different topology paths. And then, after determining that the other nodes correspond to rendering positions in at least two topological paths determined by the multiple iterations, performing duplicate removal on the rendering positions of the other nodes. And arranging the rendered topological paths according to the number of nodes corresponding to the topological paths determined by the multiple iterations to obtain the adjusted and optimized target relation map.
Alternatively, if the selected node of the current iteration corresponds to a unique non-end node that can be selected as the target adjacent node, the topology calculation module 830 may return to the previous iteration to reselect the next node of the topology path to which the selected node belongs.
Optionally, the target relationship graph is an enterprise relationship graph, and the plurality of nodes at least include an enterprise and at least one of a legal person, a stockholder and a board of director associated with the enterprise.
Obviously, the relationship graph building apparatus according to the embodiment of the present specification may be an execution subject of the relationship graph building method shown in fig. 1, and thus the functions of the relationship graph building method realized in fig. 1 to 7 can be realized. Since the principle is the same, the detailed description is omitted here.
Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present specification. Referring to fig. 9, at a hardware level, the electronic device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (E8 extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 9, but this does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form the relationship map construction device on the logic level. The processor is used for executing the program stored in the memory and is specifically used for executing the following operations:
determining a plurality of nodes for generating a target relation graph and node association data corresponding to the nodes.
And determining adjacent nodes corresponding to the nodes based on the node association data, wherein the adjacent nodes belong to the plurality of nodes.
Multiple iterations perform the following operations: selecting a target adjacent node from adjacent nodes of the selected node as a next node of a topological path, wherein the node which is selected as the topological path cannot be used as the target adjacent node; updating the target adjacent node selected in the current iteration to the selected node in the next iteration; and when the preset ending node in the plurality of nodes is used as the selected node of the iteration of the current round, the iteration is ended.
And rendering the topological path from the starting node to the ending node determined by the multiple rounds of iteration to obtain a target relation map.
The electronic device in the embodiment of the specification can perform node traversal from the starting node to the ending node without repeatability, and determine the topological path between the starting node and the ending node, so that a clear and readable relation graph is rendered, and user experience is improved. The generated relation map can provide more visual data support for wind control decision in the field of wind control, so that the method has higher practicability.
The relationship graph constructing method disclosed in the embodiment shown in fig. 1 in this specification can be applied to a processor, or can be implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present specification may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present specification may be embodied directly in a hardware decoding processor, or in a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
It should be understood that the electronic device of the present specification may implement the functions of the above-described relationship map building apparatus in the embodiments shown in fig. 1 to 7. Since the principle is the same, the detailed description is omitted here.
Of course, besides the software implementation, the electronic device in this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
Furthermore, the present specification embodiments also propose a computer-readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a portable electronic device comprising a plurality of application programs, are capable of causing the portable electronic device to perform the method of the embodiment shown in fig. 1, and in particular to perform the following method:
determining a plurality of nodes for generating a target relation graph and node association data corresponding to the nodes.
And determining adjacent nodes corresponding to the nodes based on the node association data, wherein the adjacent nodes belong to the plurality of nodes.
Multiple iterations perform the following operations: selecting a target adjacent node from adjacent nodes of the selected node as a next node of a topological path, wherein the node which is selected as the topological path cannot be used as the target adjacent node; updating the target adjacent node selected in the current iteration to the selected node in the next iteration; and when the preset ending node in the plurality of nodes is used as the selected node of the iteration of the current round, the iteration is ended.
And rendering the topological path from the starting node to the ending node determined by the multiple rounds of iteration to obtain a target relation map.
It will be appreciated that the above instructions, when executed by a portable electronic device comprising a plurality of applications, enable the relationship map building apparatus described above to carry out the functions of the embodiments shown in figures 1 to 7. Since the principle is the same, no further description is provided herein.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification. Moreover, all other embodiments obtained by a person skilled in the art without making any inventive step shall fall within the scope of protection of this document.

Claims (10)

1. A relational map construction method comprises the following steps:
determining a plurality of nodes for generating a target relation graph and node association data corresponding to the nodes;
determining adjacent nodes corresponding to the nodes based on the node association data, wherein the adjacent nodes belong to the plurality of nodes;
multiple iterations perform the following operations: selecting a target adjacent node from adjacent nodes of the selected node as a next node of a topological path, wherein the node which is selected as the topological path cannot be used as the target adjacent node; updating the target adjacent node selected in the current iteration to the selected node in the next iteration; the selected node of the first iteration is a preset initial node in the nodes, and when a preset final node in the nodes is used as the selected node of the current iteration, the iteration is ended;
and rendering the topological path from the starting node to the ending node determined by the multiple rounds of iteration to obtain a target relation map.
2. The method of claim 1, wherein the first and second light sources are selected from the group consisting of,
rendering the topological path from the starting node to the ending node determined by the multiple iterations, including:
rendering and laying out the nodes based on the topological paths determined by the multiple rounds of iteration, and determining rendering positions corresponding to the nodes;
and rendering the topological path determined by the multiple iterations according to rendering positions corresponding to the multiple nodes to obtain the target relation map.
3. The method of claim 2, wherein the first and second light sources are selected from the group consisting of,
determining at least two topological paths from the starting node to the ending node through the multiple rounds of iteration;
rendering and laying out the nodes based on the topological paths determined by the multiple rounds of iteration, and determining rendering positions corresponding to the nodes, wherein the rendering positions comprise:
determining rendering positions of the starting node and the ending node;
and determining rendering positions of other nodes in at least two topological paths determined by the multiple iterations on the basis of the rendering positions of the starting node and the ending node, wherein the other nodes correspond to different rendering positions in different topological paths.
4. The method of claim 3, wherein the first and second light sources are selected from the group consisting of,
rendering and laying out the nodes based on the topological paths determined by the multiple rounds of iteration, and determining rendering positions corresponding to the nodes, further comprising:
and after determining rendering positions of the other nodes in the at least two topological paths determined by the multiple iterations, performing duplicate removal on the rendering positions of the other nodes.
5. The method of claim 3, wherein the first and second light sources are selected from the group consisting of,
after the rendering of the topological path from the starting node to the ending node determined by the multiple iterations, the method further includes:
and arranging the rendered topological paths according to the number of nodes corresponding to the topological paths determined by the multiple iterations to obtain the adjusted and optimized target relation map.
6. The method according to any one of claims 1 to 5,
and if the selected node of the iteration of the current round corresponds to the only non-ending node which can be selected as the target adjacent node, returning to the previous round of iteration to reselect the next node of the topological path to which the selected node belongs.
7. The method according to any one of claims 1 to 5,
the target relationship graph is an enterprise relationship graph, and the plurality of nodes at least comprise enterprises and at least one of legal persons, stockholders and board of directors associated with the enterprises.
8. A relationship graph construction apparatus comprising:
the data extraction module is used for determining a plurality of nodes for generating a target relation map and node association data corresponding to the nodes;
the preprocessing module is used for determining adjacent nodes corresponding to the nodes based on the node association data, wherein the adjacent nodes belong to the plurality of nodes;
the topology calculation module performs the following operations in a plurality of rounds of iteration: selecting a target adjacent node from adjacent nodes of the selected node as a next node of a topological path, wherein the node which is selected as the topological path cannot be used as the target adjacent node; updating the target adjacent node selected in the current iteration to the selected node in the next iteration; the selected node of the first iteration is a preset initial node in the plurality of nodes, and is a node of a topological path, and when a preset final node in the plurality of nodes is used as the selected node of the current iteration, the iteration is finished;
and the map rendering module renders the topological path from the starting node to the ending node determined by the multiple rounds of iteration to obtain the target relation map.
9. An electronic device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being executed by the processor to:
determining a plurality of nodes for generating a target relation graph and node association data corresponding to the nodes;
determining adjacent nodes corresponding to the nodes based on the node association data, wherein the adjacent nodes belong to the plurality of nodes;
multiple iterations perform the following operations: selecting a target adjacent node from adjacent nodes of the selected node as a next node of a topological path, wherein the node which is selected as the topological path cannot be used as the target adjacent node; updating the target adjacent node selected in the current iteration to the selected node in the next iteration; the selected node of the first iteration is a preset initial node in the plurality of nodes, and is a node of a topological path, and when a preset final node in the plurality of nodes is used as the selected node of the current iteration, the iteration is finished;
and rendering the topological path from the starting node to the ending node determined by the multiple rounds of iteration to obtain a target relation map.
10. A computer-readable storage medium having a computer program stored thereon, which when executed by a processor, performs the steps of:
determining a plurality of nodes for generating a target relation graph and node association data corresponding to the nodes;
determining adjacent nodes corresponding to the nodes based on the node association data, wherein the adjacent nodes belong to the plurality of nodes;
multiple iterations perform the following operations: selecting a target adjacent node from adjacent nodes of the selected node as a next node of a topological path, wherein the node which is selected as the topological path cannot be used as the target adjacent node; updating the target adjacent node selected in the current iteration to the selected node in the next iteration; the selected node of the first iteration is a preset initial node in the plurality of nodes, and is a node of a topological path, and when a preset final node in the plurality of nodes is used as the selected node of the current iteration, the iteration is finished;
and rendering the topological path from the starting node to the ending node determined by the multiple rounds of iteration to obtain a target relation map.
CN202011062184.6A 2020-09-30 2020-09-30 Relation graph building method and device and electronic equipment Pending CN112199450A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011062184.6A CN112199450A (en) 2020-09-30 2020-09-30 Relation graph building method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011062184.6A CN112199450A (en) 2020-09-30 2020-09-30 Relation graph building method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN112199450A true CN112199450A (en) 2021-01-08

Family

ID=74012958

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011062184.6A Pending CN112199450A (en) 2020-09-30 2020-09-30 Relation graph building method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112199450A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127649A (en) * 2021-05-07 2021-07-16 支付宝(杭州)信息技术有限公司 Map construction method and device
CN115391564A (en) * 2022-09-01 2022-11-25 企查查科技有限公司 Method for constructing relation map based on webworker

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2868948A1 (en) * 2014-10-24 2016-04-24 The Governing Council Of The University Of Toronto System and method for identifying experts on social media
CN105677648A (en) * 2014-11-18 2016-06-15 四三九九网络股份有限公司 Community detection method and system based on label propagation algorithm
US20170163502A1 (en) * 2015-12-04 2017-06-08 CENX, Inc. Classifier based graph rendering for visualization of a telecommunications network topology
CN110223168A (en) * 2019-06-24 2019-09-10 浪潮卓数大数据产业发展有限公司 A kind of anti-fraud detection method of label propagation and system based on business connection map
CN111181761A (en) * 2019-10-30 2020-05-19 腾讯科技(深圳)有限公司 CDN node deployment method and device
CN111538863A (en) * 2020-03-19 2020-08-14 天津完美引力科技有限公司 Data display method, device and system, storage medium and electronic device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2868948A1 (en) * 2014-10-24 2016-04-24 The Governing Council Of The University Of Toronto System and method for identifying experts on social media
CN105677648A (en) * 2014-11-18 2016-06-15 四三九九网络股份有限公司 Community detection method and system based on label propagation algorithm
US20170163502A1 (en) * 2015-12-04 2017-06-08 CENX, Inc. Classifier based graph rendering for visualization of a telecommunications network topology
CN110223168A (en) * 2019-06-24 2019-09-10 浪潮卓数大数据产业发展有限公司 A kind of anti-fraud detection method of label propagation and system based on business connection map
CN111181761A (en) * 2019-10-30 2020-05-19 腾讯科技(深圳)有限公司 CDN node deployment method and device
CN111538863A (en) * 2020-03-19 2020-08-14 天津完美引力科技有限公司 Data display method, device and system, storage medium and electronic device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
HANSHUO ZHANG; DONGJU YANG: "Research on Construction and Evolution of Relational Graph of the Science and Technology Data", IEEE, 13 April 2020 (2020-04-13) *
宗利永;吴强;: "基于文本挖掘对英语流利说App用户满意度影响因素的研究", 新媒体研究, no. 23, 10 December 2019 (2019-12-10) *
蔡青松;陈希厚;: "无线传感网中基于谱矩的链路优化策略", 通信学报, no. 2, 30 November 2017 (2017-11-30) *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127649A (en) * 2021-05-07 2021-07-16 支付宝(杭州)信息技术有限公司 Map construction method and device
CN115391564A (en) * 2022-09-01 2022-11-25 企查查科技有限公司 Method for constructing relation map based on webworker
CN115391564B (en) * 2022-09-01 2024-03-26 企查查科技股份有限公司 Method for constructing relationship map based on webworker

Similar Documents

Publication Publication Date Title
CN109409889B (en) Block determining method and device in block chain and electronic equipment
CN112199450A (en) Relation graph building method and device and electronic equipment
EP4033440A1 (en) Consensus method, apparatus and device of block chain
CN112902970A (en) Routing inspection path planning method and routing inspection robot
CN116127908A (en) Wiring method, device, equipment and storage medium of circuit layout
CN114564904A (en) FPGA full-path rapid time sequence analysis method and device, computer and storage medium
CN111861744A (en) Method for realizing parallelization of block chain transaction and block chain link point
CN111198961A (en) Commodity searching method and device and server
CN110569315B (en) Data processing method and device based on data warehouse
CN113568877A (en) File merging method and device, electronic equipment and storage medium
CN111159187A (en) Two-dimensional query method and device, terminal device and computer readable storage medium
CN111046004A (en) Data file storage method, device, equipment and storage medium
CN104572687A (en) Recognition method and device of microblogging key users
CN113986931B (en) Report paging method and device, storage medium and computing equipment
CN110866127A (en) Method for establishing index and related device
CN114579716A (en) Knowledge graph query method and device
CN115358825A (en) Matching transaction method and system based on block chain prediction machine
CN114741616A (en) Method and device for measuring spatial position relationship and electronic equipment
CN114218265A (en) Processing method and device of offline model, storage medium and processor
CN111966734A (en) Data processing method and electronic equipment of spreadsheet combined with RPA and AI
CN115953501B (en) Method, device, equipment and storage medium for generating ordered discrete point set
CN112783922B (en) Query method and device based on relational database
CN113312436B (en) Spatial index processing method and device
CN112988809B (en) Data query method, device, equipment and medium based on relational database
CN108647302B (en) Database sorting method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40044676

Country of ref document: HK