Data processing method, device, electronic device and computer-readable storage medium
By generating and displaying a target map of directed acyclic graph, the problem of the inability to display relevant data for business requests in the prior art is solved, efficient visualization and focus of data is achieved, and business process observation is simplified.
Patent Information
- Application Number
- CN202210443678.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-04-25
AI Technical Summary
The prior art cannot effectively display the data corresponding to the current service for different service processing requests, resulting in the inability to meet practical needs when facing a large amount of graph data.
By obtaining the directed acyclic graph corresponding to the service processing request, the display attributes of each node are determined, and the target graph is generated based on the edge direction relationship, only nodes and edges related to the service request are displayed, and other nodes and edges are hidden.
It realizes visualization of the target diagram corresponding to the service processing request, which facilitates users to focus on the data of the current service processing request, quickly obtain the main business process, and avoids the difficulties caused by the data display of the entire system under the situation of large data volume.
Smart Images

Figure CN116992084B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of big data and cloud technology. Specifically, the present application relates to a data processing method, device, electronic device, computer-readable storage medium and computer program product. Background Art
[0002] With the development of information technology, a wide variety of information sources in various fields have generated a large amount of data, far exceeding the ability of the human brain to analyze data. Therefore, how to effectively utilize this data and obtain the desired information through large-scale data analysis has attracted increasing attention.
[0003] In the related art, when faced with graph data with a large amount of data, only all the data can be displayed, and the data corresponding to the current business cannot be displayed specifically for different business processing businesses, which cannot meet practical needs. Summary of the Invention
[0004] The present invention provides a data processing method, apparatus, electronic device, computer-readable storage medium, and computer program product that can visualize only the target graph corresponding to a business processing request, allowing users to focus on the data corresponding to the current business processing request and quickly obtain the main business process. The specific technical solution is as follows:
[0005] According to one aspect of an embodiment of the present application, a data processing method is provided, the method comprising:
[0006] Upon receiving a business processing request, obtaining a directed acyclic graph corresponding to a business processing system corresponding to the business processing request, wherein the business processing system includes a plurality of business processing nodes, the directed acyclic graph includes a plurality of first nodes and a plurality of first edges, each first node corresponds to a business processing node, and the plurality of first edges and the directional relationship between two first nodes connected by each first edge are determined by a business processing flow between the plurality of business processing nodes;
[0007] Determining, according to the business processing request, a display attribute of each first node, wherein the display attribute of a first node is a display state or a contraction state;
[0008] Determining, from the plurality of first nodes, second nodes to be displayed based on the display attribute of each first node and the edge raw data, where the edge raw data includes the plurality of first edges and the directional relationship corresponding to each first edge;
[0009] Determine, from each first edge, each second edge to be displayed according to each second node and the original edge data;
[0010] According to each second node and each second edge, a target graph corresponding to the directed acyclic graph is generated and displayed.
[0011] According to another aspect of an embodiment of the present application, a data processing device is provided, the device including:
[0012] an acquisition module, configured to, upon receiving a business processing request, acquire a directed acyclic graph corresponding to a business processing system corresponding to the business processing request, wherein the business processing system includes a plurality of business processing nodes, the directed acyclic graph includes a plurality of first nodes and a plurality of first edges, each first node corresponding to a business processing node, and the plurality of first edges and the directional relationship between two first nodes connected by each first edge are determined by a business processing flow between the plurality of business processing nodes;
[0013] A graph data processing module, configured to determine a display attribute of each first node according to a business processing request, wherein the display attribute of a first node is a display state or a contraction state;
[0014] Determining, from the plurality of first nodes, second nodes to be displayed based on the display attribute of each first node and the edge raw data, where the edge raw data includes the plurality of first edges and the directional relationship corresponding to each first edge;
[0015] Determine, from each first edge, each second edge to be displayed according to each second node and the original edge data;
[0016] According to each second node and each second edge, a target graph corresponding to the directed acyclic graph is generated and displayed.
[0017] Optionally, when the graph data processing module determines the display attribute of each first node according to the business processing request, it is specifically configured to:
[0018] Determining, according to the service processing request, a target service node corresponding to the service processing request from among the plurality of first nodes;
[0019] The display attribute of the target service node among the plurality of first nodes is set to a display state, and the display attribute of the nodes other than the target service node among the plurality of first nodes is set to a contraction state.
[0020] Optionally, when the graph data processing module determines each second node to be displayed from the plurality of first nodes according to the display attribute of each first node and the original edge data, it is specifically configured to:
[0021] Determine a root node among the plurality of first nodes as a second node;
[0022] For each first node except the root node among the multiple first nodes, based on the directional relationship corresponding to each first edge, determine at least one upstream branch corresponding to the first node; if there is one upstream branch corresponding to the first node in which the display attributes of all nodes in the upstream branch are all in the display state, the first node is determined as the second node.
[0023] Optionally, when the graph data processing module determines the second edges to be displayed from the first edges based on the second nodes and the original edge data, it is specifically configured to:
[0024] Determine, based on the second nodes and the original edge data, the second nodes that have a connection relationship among the second nodes;
[0025] The first edges between the second nodes that are determined to have a connection relationship are determined as second edges.
[0026] Optionally, the graph data processing module may also be used to:
[0027] Determine, based on the original edge data, the operation control corresponding to each non-leaf node in each second node; wherein, if a non-leaf node has a hidden child node, determine that the operation control corresponding to the non-leaf node is a first type of control; if a non-leaf node does not have a hidden child node, determine that the operation control corresponding to the non-leaf node is a second type of control;
[0028] Based on the operation control corresponding to each non-leaf node, the operation control corresponding to each non-leaf node is displayed in the target graph, so that when a trigger operation is received for any operation control in the target graph, the target graph is updated and the updated target graph is displayed.
[0029] Optionally, when the graph data processing module receives a trigger operation for any operation control in the target graph and updates the target graph, it is specifically configured to:
[0030] Upon receiving a trigger operation for any operation control in the target graph, determining, based on the type of the target operation control targeted by the trigger operation, information to be updated corresponding to the target graph from at least one downstream branch of the target node corresponding to the target operation control, the information to be updated including at least one item of a node to be updated or an edge to be updated;
[0031] The corresponding information in the target graph is updated according to the information to be updated, and the type of the operation control corresponding to the target node is updated.
[0032] Optionally, when the type of the target operation control is the first type, the information to be updated is newly displayed information. When the graph data processing module determines the information to be updated corresponding to the target graph from at least one downstream branch of the target node corresponding to the target operation control according to the type of the target operation control targeted by the trigger operation, it is specifically configured to:
[0033] Determine a child node of the target node as a newly added display node, and determine the first edge between the target node and the child node of the target node as a newly added display edge;
[0034] Determine a newly added display node from the other nodes based on the display attributes of the other nodes and the corresponding pointing relationships of the other nodes in the original edge data, where the other nodes are nodes in the at least one downstream branch other than the child nodes of the target node.
[0035] Determine the type of operation control corresponding to each newly added display node based on the original edge data;
[0036] The newly added display information includes each newly added display node, the first edge between the target node and the child node of the target node, and the first edge between each newly added display node;
[0037] When updating the corresponding information in the target graph according to the information to be updated, the graph data processing module is specifically used to:
[0038] Update the corresponding information in the target graph according to the newly added display information.
[0039] Optionally, when the type of the target operation control is the second type, the information to be updated is information to be hidden. When determining the information to be updated corresponding to the target graph from at least one downstream branch of the target node corresponding to the target operation control according to the type of the target operation control targeted by the trigger operation, the graph data processing module is specifically configured to:
[0040] If the target node's child nodes do not have any other parent nodes in the target graph, the target node's child nodes, the first edge between the target node and the target node's child nodes, and the operation controls corresponding to the target node's child nodes in the target graph are determined as information to be hidden.
[0041] If each of the other nodes has another parent node in the target graph, and the other parent node has a corresponding operation control of the second type, determining the first edge between the target node and the child node of the target node in the target graph as the information to be hidden, and each of the other nodes is a node other than the child node of the target node in at least one downstream branch;
[0042] When updating the corresponding information in the target graph according to the information to be updated, the graph data processing module is specifically used to:
[0043] Update the corresponding information in the target graph according to the information to be hidden.
[0044] Optionally, the graph data processing module may also be used to:
[0045] For each second node, upon receiving a delete operation for the second node, the second node is deleted, and based on the original edge data, the in-degree of each node in the downstream nodes of the second node is determined;
[0046] For each node in the downstream nodes of the second node, if the first degree of the node is equal to the in-degree of the node, delete the node; if the first degree of the node is less than the in-degree of the node, add 1 to the deletion count of the node. The first degree of the node is the sum of the deletion counts of the nodes in the upstream nodes of the node;
[0047] For each first edge, upon receiving a delete operation for any node connected to the first edge, the first edge is deleted.
[0048] According to another aspect provided by an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, and the processor executes the computer program to implement the steps of the above method.
[0049] According to another aspect provided by an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.
[0050] According to another aspect provided by an embodiment of the present application, a computer program product is provided, including a computer program, which implements the steps of the above method when executed by a processor.
[0051] The beneficial effects of the technical solution provided by the embodiments of the present application are:
[0052] Through the above method, a first node corresponds to a business processing node, and an edge indicates the business processing flow between business processing nodes. After receiving a business processing request, the display attributes of each first node in the business processing system can be set based on the business processing request. According to the display attributes of each first node and the directional relationship between each edge and each edge in the directed acyclic graph of the business processing system, the target graph corresponding to the directed acyclic graph is determined. It is possible to visualize only the target graph corresponding to the business processing request, making it convenient for users to focus on the data corresponding to the current business processing request and quickly obtain the main business process. Avoid directly displaying the directed acyclic graph corresponding to the entire business processing system when the amount of data in the directed acyclic graph corresponding to the business processing system is large, which causes certain difficulties in observing the flow direction of each business processing flow and locating the data of some business nodes. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments of the present application.
[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments of the present application.
[0055] Figure 1 A schematic diagram of an implementation environment of a data processing method provided in an embodiment of the present application is shown;
[0056] Figure 2 A schematic diagram of signaling interaction in a data processing process provided by an embodiment of the present application is shown;
[0057] Figure 3 A schematic diagram of a business processing system applicable to an embodiment of the present application is shown;
[0058] Figure 4 A schematic diagram of a target map provided in an embodiment of the present application is shown;
[0059] Figure 5 The embodiment of the present application provides Figure 4 a schematic diagram of a target graph after the corresponding target graph is updated;
[0060] Figure 6 The embodiment of the present application provides Figure 5 a schematic diagram of a target graph after the corresponding target graph is updated;
[0061] Figure 7 A schematic diagram showing a flow chart of a data processing method provided in an embodiment of the present application is shown;
[0062] Figure 8A schematic diagram of another target graph provided in an embodiment of the present application is shown;
[0063] Figure 9 A schematic diagram of a partial view of a target map provided by an embodiment of the present application is shown;
[0064] Figure 10 The embodiment of the present application provides Figure 9 A schematic diagram of the local graph after the corresponding local graph is updated;
[0065] Figure 11 A schematic diagram showing a partial view of another target map provided in an embodiment of the present application is shown;
[0066] Figure 12 The embodiment of the present application provides Figure 12 A schematic diagram of the local graph after the corresponding local graph is updated;
[0067] Figure 13 The embodiment of the present application provides Figure 12 A schematic diagram of the local graph after the corresponding local graph is updated;
[0068] Figure 14 The embodiment of the present application provides Figure 13 A schematic diagram of the local graph after the corresponding local graph is updated;
[0069] Figure 15 The embodiment of the present application provides Figure 14 A schematic diagram of the local graph after the corresponding local graph is updated;
[0070] Figure 16 The embodiment of the present application provides Figure 15 A schematic diagram of the local graph after the corresponding local graph is updated;
[0071] Figure 17 A schematic diagram of another target graph provided in an embodiment of the present application is shown;
[0072] Figure 18 The embodiment of the present application provides Figure 17 Schematic diagram of the corresponding target graph after updating;
[0073] Figure 19 A schematic diagram showing a business scenario to which an embodiment of the present application is applicable;
[0074] Figure 20 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;
[0075] Figure 21 A schematic structural diagram of an electronic device applicable to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0076] The following describes the embodiments of the present application in conjunction with the accompanying drawings. It should be understood that the embodiments described below in conjunction with the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.
[0077] Those skilled in the art will understand that, unless otherwise stated, the singular forms "a", "an", "said", and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present application mean that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements, and / or components, but do not exclude implementation as other features, information, data, steps, operations, elements, components, and / or combinations thereof supported by the present technical field. It should be understood that when we say that an element is "connected" or "coupled" to another element, the element can be directly connected or coupled to the other element, or it can refer to the element and the other element establishing a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used here can include wireless connection or wireless coupling. The term "and / or" used here indicates at least one of the items defined by the term, for example, "A and / or B" can be implemented as "A", or as "B", or as "A and B".
[0078] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0079] The following explains the relevant terms involved in the embodiments of the present application.
[0080] Platform brain: A platform used for big data problem inspection, analysis and alarm.
[0081] G6: An open source visualization engine.
[0082] dagre: An open source directed acyclic graph layout algorithm.
[0083] The execution subject of the data processing method provided in the embodiment of the present application can be a data processing device. The data processing device can be a server, which can be a server independent of the server corresponding to the business processing system, and is used to obtain each business node in the business processing system corresponding to the business processing request and the business processing flow corresponding to each business node based on different business processing requests, and generate and display a target graph corresponding to a directed acyclic graph related to the business processing system based on each business node and the corresponding business processing flow. The data processing method can also be implemented by a processor calling computer-readable instructions stored in a memory.
[0084] Among them, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server or server cluster that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.
[0085] The above-mentioned data processing method can be implemented based on the triggering operation of the control on the display interface of any terminal corresponding to the business processing system. The terminal (also referred to as a user terminal or user equipment (UE)) can be a smartphone, a tablet computer, a laptop computer, a desktop computer, an intelligent voice interaction device (such as a smart speaker), a wearable electronic device (such as a smart watch), an in-vehicle terminal, a smart home appliance (such as a smart TV), an AR (Augmented Reality) / VR (Virtual Reality) device, etc.
[0086] Those skilled in the art should understand that the above-mentioned terminals and servers are only examples, and other existing or future terminals or servers that are applicable to the present application should also be included in the scope of protection of the present application and are incorporated herein by reference.
[0087] The data processing method provided in the embodiments of the present application can be implemented based on big data. Big data refers to a collection of data that cannot be captured, managed, and processed by conventional software tools within a certain time frame. It is a massive, high-growth, and diversified information asset that requires a new processing model to have stronger decision-making power, insight discovery, and process optimization capabilities. With the advent of the cloud era, big data has also attracted more and more attention. Big data requires special technologies to effectively process large amounts of data within a tolerable time. Technologies suitable for big data include large-scale parallel processing databases, data mining, distributed file systems, distributed databases, cloud computing platforms, the Internet, and scalable storage systems.
[0088] The data processing method provided in the embodiments of the present application can also be implemented based on cloud technology. For example, the process of generating a target graph corresponding to a directed acyclic graph related to a business processing system in the embodiments of the present application can be implemented using cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or local area network to achieve data calculation, storage, processing, and sharing.
[0089] The data processing method provided in the embodiment of the present application can be applied to the application scenario of generating and displaying a target graph corresponding to a business processing system involving a large number of business nodes, so as to facilitate the management of business nodes and business processes corresponding to different businesses in the business processing system. For example, when the number of business nodes and business processes involved in a business processing system is large, when it is necessary to view the business process corresponding to a certain business, the business processes corresponding to other businesses can be hidden based on the data processing method provided in the embodiment of the present application. The business processing system includes but is not limited to business processing systems involved in industries such as taxation, retail, and education. For example, when the data processing method is applied to the retail industry, based on the data processing method, only the various business nodes currently related to the procurement business in the retail industry can be displayed in the displayed target graph, and the various business nodes related to other businesses can be hidden.
[0090] It should be noted that in the optional embodiments of this application, the data related to the business processing system, business node, business processing flow, etc., when the above embodiments of this application are applied to specific products or technologies, need to obtain the permission or consent of the subject, and the collection, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions. In other words, if the embodiments of this application involve data related to the subject, these data need to be obtained with the authorization and consent of the subject and in compliance with the relevant laws, regulations and standards of the country and region.
[0091] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application. It should be noted that the following embodiments can refer to, draw on, or combine with each other, and the same terms, similar features, and similar implementation steps in different embodiments will not be repeated.
[0092] To facilitate understanding of the application value of the business processing method provided in the embodiment of the present application, the business processing method is first described below in conjunction with a specific application scenario embodiment.
[0093] Figure 1 FIG. 1 shows a schematic diagram of an implementation environment of a data processing method provided in an embodiment of the present application. Figure 1As shown, the implementation environment includes a client 101 corresponding to the business processing system, an application server 102 corresponding to the client 101, and a management server 103 for executing the data processing method. The client 101 can be a client of any business node corresponding to the business processing system, or a client of a management object that manages the business processing system, wherein the management object can be an IT (Internet Technology) personnel who maintains the business processing system. A communication connection is established between the client 101 and the application server 102, and a communication connection is established between the application server 102 and the management server 103. Among them, the mode of each communication connection can be direct or indirect connection through wired or wireless communication, but is not limited to this. The specific requirements can also be determined based on the actual application scenario, and the embodiments of the present application are not limited here.
[0094] It should be noted that the management server 103 can be a server that manages only one business processing system, or it can be a server that manages two or more business processing systems, and this embodiment of the present application does not limit this. The following uses one business processing system corresponding to one management server as an example to illustrate the data processing method provided in the embodiment of the present application.
[0095] Figure 2 The signaling interaction diagram of a data processing process provided by an embodiment of the present application is shown. The data processing process can be implemented through information interaction between the client 101 corresponding to the above-mentioned business processing system, the application server 102 corresponding to the client, and the management server 103 corresponding to the business processing system. Figure 2 The data processing flow shown is the data processing flow in the retail business processing system.
[0096] In order to more clearly explain the data processing process applied to the retail business processing system, the retail business processing system is first introduced as follows:
[0097] Figure 3 A schematic diagram of a business processing system applicable to the embodiment of the present application is shown. Figure 3 As shown, the retail business processing system may include a purchasing node, a warehousing node, a sales node, an amount management node, a defective product processing node, a quality inspection node, a destruction processing node, and the like.
[0098] As an example, in this retail business processing system, the procurement node may include a purchase application node, a purchase and sales agreement signing node, a resource expenditure node, and a pick-up node. The warehousing node may include a quality inspection node, a warehouse entry node, a defective product processing node, and a destruction processing node. The sales node may include a purchase request node, a product removal node, a quality inspection node, a defective product processing node, a destruction processing node, and a sales node. The amount management node includes a resource expenditure node and a resource acquisition node. Both the warehousing node and the sales node involve quality inspection of goods, processing of defective goods, and destruction of low-quality goods. That is, the quality inspection node, the defective product processing node, and the destruction processing node are all child nodes of the warehousing node and the sales node.
[0099] Taking procurement and sales as examples, procurement is implemented by the business process between the procurement node and its downstream nodes (i.e., the downstream node of the procurement node is the child node of the procurement node, the child node of the procurement node's child node, and so on, up to all nodes between nodes without child nodes). Sales is implemented by the business process between the sales node and its downstream nodes. The corresponding business process flows for procurement and sales are as follows:
[0100] After the procurement node completes the purchase of goods, the purchased goods will be quality inspected (i.e., the quality inspection node). If the quality inspection result is qualified, the goods will be put into storage (i.e., the entry warehouse node); if the quality inspection result is unqualified (i.e., defective goods appear), the defective goods will be repaired (i.e., the defective goods processing node). If the repair is successful, the repaired goods can be put back into storage; if the repair is unsuccessful, the unrepaired goods can be destroyed (i.e., the destruction processing node).
[0101] When selling goods at the sales node, if a purchase request is received (i.e., the purchase request subnode), the corresponding goods will be obtained from the warehouse (i.e., the product retrieval node), and the obtained goods will be quality-checked (i.e., the quality inspection node). If the quality inspection result of the goods is qualified, the goods will be sold (i.e., the sales node); if the quality inspection result is unqualified, goods of the same type with qualified quality inspection results will be taken out from the warehouse and sold, and the defective goods will be repaired (i.e., the defective goods processing node). If the repair is successful, the repaired goods can be put back into the warehouse; if the repair is unsuccessful, the unrepaired goods can be destroyed (i.e., the destruction processing node).
[0102] like Figure 2 As shown, the data processing process of the retail business processing system may include the following steps:
[0103] Step 1: In response to the triggering operation of the viewing control of the sales business in the retail business processing system by the client 101 , the application server 102 generates a request to view the sales business, and sends the request to the management server 103 .
[0104] Step 2: The management server 103 obtains the directed acyclic graph corresponding to the business processing system based on the viewing request of the received sales business. The business processing system includes multiple business nodes in the above-mentioned retail business processing system (i.e., the first node, including the above-mentioned procurement node, warehousing node, outbound node, sales node, amount management node, defective product processing node, quality inspection node, destruction business node, etc.) and the first edge between two business nodes with a connection relationship in each business node. The connection relationship is determined according to the business processing flow. For example, the above text records that "if the quality inspection result is unqualified (i.e., defective goods appear), the defective goods will be repaired (i.e., the defective product processing node)". There is a business processing flow between the quality inspection node and the destruction business node, and the quality inspection node points to the destruction business node, and the two can form a first edge.
[0105] Step 3: Based on the above request to view the sales business, the management server 103 sets the display attributes of the nodes related to the sales business in the retail business processing system (the upstream nodes of the sales node (i.e., the parent node of the sales node, the parent node of the parent node of the sales node, ..., and so on, until the root node in the retail business processing system (i.e., the node of the retail business processing system)), the downstream nodes of the sales node) to the display state, and sets the display attributes of other nodes in the retail business processing system except the nodes related to the sales business to the contracted state.
[0106] Step 4: The management server 103 sets the retail business processing system node as the node that needs to be displayed (the second node), and according to the determined first edge, sets the nodes in the upstream branches corresponding to the other nodes related to the sales business except the retail business processing system node whose display attributes are all in the display state as the nodes that need to be displayed.
[0107] Step 5: The management server 103 determines, according to each node to be displayed and each first edge, a first edge between two nodes to be displayed that are connected among the nodes to be displayed as a second edge.
[0108] Step 6: The management server 103 determines whether any non-leaf node (i.e., a node with child nodes) in the second node has any hidden child nodes based on the display attributes of each second node and the downstream nodes of each second node. Figure 4In the "inbound node", set the operation control corresponding to the "inbound node" to the first type of control If there is no hidden child node in a non-leaf node, such as Figure 4 In the "Retail Business Processing System" and "Sales Node", set the operation controls corresponding to "Retail Business Processing System" and "Sales Node" as the second type of controls
[0109] Step 7: The management server 103 determines the position information (i.e., the position in the display interface of the client 101) of the operation controls corresponding to each second node, each second edge, and each non-leaf node in the second node based on the determined second nodes, second edges, and the operation controls corresponding to the non-leaf nodes in each second node based on the dagre algorithm, and renders the determined position information of each second node, each second edge, and the operation controls corresponding to the non-leaf nodes in each second node through the G6 renderer, that is, renders the nodes, edges, and corresponding non-leaf nodes related to the sales business, such as Figure 4 The rendered image is sent to the application server 102, so that the application server 102 sends the received image to the client 101 for display.
[0110] Step 8: The application server 102 generates trigger information based on the trigger operation of each operation control in the display interface of the client 101, and sends the trigger information to the management server 103. The trigger operation can be, for example, an operation control for an "input node" The trigger operation changes the operation control of "input node" from Updated to And each child node of the "warehouse entry node" is set as a newly added display node, and the edge between the "warehouse entry node" and the "child node of the warehouse entry node" (such as the "quality inspection node") is determined as a newly added display edge.
[0111] Step 9: The management server 103 determines the position information (i.e., the position in the display interface of the client 101) of the operation controls, newly added display nodes, and newly added display edges corresponding to each second node, each second edge, and each non-leaf node in the second node based on the determined second nodes, second edges, and the operation controls, newly added display nodes, and newly added display edges corresponding to the non-leaf nodes in each second node based on the dagre algorithm, and renders the determined position information of each second node, each second edge, and each non-leaf node in the second node through the G6 renderer, that is, renders the nodes, edges, and corresponding non-leaf node operation controls related to the sales business and warehousing business, such as Figure 5The rendered updated image is sent to the application server 102, so that the application server 102 sends the received image to the client 101 for display.
[0112] Step 10: The client right-clicks the "inbound node" on the display interface of the client 101 and selects "Delete Control" to trigger the deletion operation of the "inbound node". Based on the deletion operation, the application server 102 generates a deletion message and sends the deletion message to the management server 103
[0113] Step 11: Upon receiving a delete operation from the client for an "incoming node" on the client display interface, management server 103 deletes the "incoming node," which in turn deletes the first edge between the "incoming node" and its parent node, as well as the first edge between the "incoming node" and its child nodes. Management server 103 also transmits the deletion count for the "incoming node" to each of the "incoming node's" downstream nodes. The rendered, updated graph is then sent to application server 102, which then sends the received graph to client 101 for display.
[0114] According to each first edge, determine the in-degree of each node in each downstream node of the entry and exit node. For example, the in-degree of the "quality inspection node" is 2 (that is, the "quality inspection node" is both a child node of the "entry node" and a child node of the "sales node"), and the in-degree of the "entry warehouse node" is 1, and so on. At this time, since the number of deletions of the "quality inspection node" comes from the deletion operation of the "entry node", the number of deletions is 1, and the number of deletions is less than the in-degree. The "quality inspection node" is retained, and only the first edge between the "quality inspection node" and the "entry node" is deleted. As for the "entry warehouse node", since its number of deletions also comes from the deletion operation of the "entry node", the number of deletions is also 1, and the number of deletions is equal to the in-degree. Delete the "entry warehouse node" and the first edge between the "entry warehouse node" and the "entry node". And so on, until the deletion operation of the "entry node" and the downstream branches of the "entry node" (downstream nodes and edges related to downstream nodes) is completed, it can be obtained. Figure 6 The schematic diagram shown.
[0115] Of course, the embodiments of the present application are not limited to the above-mentioned application scenarios, but can also be applied to different service clusters. For example, when the business processing system is a power grid system, the corresponding target graph is generated and displayed according to the power grid systems corresponding to different levels such as country, province, city, county, township / town, and village.
[0116] Figure 7 The flowchart of a data processing method provided by an embodiment of the present application is shown. The data processing method can be implemented by a data processing device, which can be a management server. Figure 7As shown, the method includes the following steps:
[0117] Step S701: When a business processing request is received, a directed acyclic graph corresponding to the business processing system corresponding to the business processing request is obtained. The business processing system includes multiple business processing nodes. The directed acyclic graph includes multiple first nodes and multiple first edges. Each first node corresponds to a business processing node. The multiple first edges and the directional relationship between the two first nodes connected by each first edge are determined by the business processing flow between the multiple business processing nodes.
[0118] Since the received business processing requests may come from different business processing systems, different connection rules of directed acyclic graphs can be pre-set. In an embodiment of the present application, the connection rules of different directed acyclic graphs can be set as graph metadata, so that different directed acyclic graphs can be processed according to the connection rules in the graph metadata. When facing different business processing systems, it is only necessary to provide the specific name of each business processing node in the business processing system and the corresponding pointing relationship of each edge to determine the corresponding directed acyclic graph. The corresponding graph metadata includes point metadata and edge metadata. Among them, the data related to each meta-node can be called point metadata, and the data related to each meta-edge can be called edge metadata. For example, point metadata can include multiple meta-nodes, and edge metadata can include multiple meta-edges and the pointing relationship corresponding to each meta-edge.
[0119] Optionally, the graph metadata can be formatted in JSON. The data associated with each meta-node in the vertex metadata can consist of a node list (allNodes), and the data associated with each meta-edge in the edge metadata can consist of an edge list (allEdges). The edge metadata can also include an out-degree adjacency list (outEdges Map) and an in-degree adjacency list (inEdges Map). The out-degree adjacency list represents the out-degree nodes corresponding to each meta-node, while the in-degree adjacency list represents the in-degree nodes corresponding to each meta-node. The out-degree nodes of a node are the target nodes pointed to by the node as the source node, while the in-degree nodes of a node are the target nodes pointing to the source node of the node. The out-degree of each node, i.e., the number of edges pointing out of the node, can be determined based on the number of out-degree nodes corresponding to the node; the in-degree of each node, i.e., the number of edges pointing into the node, can be determined based on the number of in-degree nodes corresponding to the node.
[0120] It should be noted that the "multiple" in the "multiple" involved in the embodiments of this application generally refers to two or more, and similarly, "multiple" also generally refers to two or more. Of course, when the number of first nodes is two, the corresponding number of first edges can also be one.
[0121] As an example, you can set a meta node in the point metadata in the following way:
[0122]
[0123] Among them, alias represents the alias of the node, prop is used to indicate the property of the node, among which name indicates that the property of the node is a display property, and default represents the default value of the display property of the node. When the default value is true, it means that the display property of the node is in the expanded state, that is, the child nodes of the node need to be displayed; when the default value is false, it means that the display property of the node is in the contracted state, that is, the child nodes of the node do not need to be displayed (i.e., hidden). type represents the language type used to describe the node, and string represents a string. isSqlId indicates whether it is a structured query language SQL (structured query language). The corresponding value is false for non-structured query language, and the value is true for structured query language. vertice_name represents the node type of the node. In this example, the name of the node is API, the node type is xx_apiserver_instance, the display property is in the expanded state, the language type describing the node is string, and the language describing the node is non-structured query language.
[0124] You can set a meta-edge in edge metadata in the following ways:
[0125]
[0126] alias represents the edge's alias, edge_name represents the edge's actual name, and direction represents the directionality of the edge. If the corresponding value is out, it indicates a direction from a source node to a destination node. src_db represents the system type of the source node, and src_vertice represents the node type of the source node. dst_db represents the system type of the destination node, and dst_vertice represents the node type of the destination node. name represents the name of the relationship on the edge, and the corresponding value relationship indicates that a relationship exists. default represents the default value of the specific relationship. When the default value is downstream, it indicates an upstream-downstream relationship, meaning the two nodes on the edge are not in a parent-child relationship and require connections through other nodes to form a true parent-child relationship. When the default value is children, it indicates a true parent-child relationship, meaning the two nodes are directly connected, with one node being the parent of the other. type represents the language used to describe the edge. string represents a string. isSqlId indicates whether it is SQL (Structured Query Language). A value of false indicates non-Structured Query Language, and a value of true indicates SQL. vertice_name indicates the node type. In this example, it represents the edge api_base from the source node (node xx_baseserver_virtual in system xx_system) to the destination node (node xx_baseserver_virtual in system xx_system). The edge is described in the string language, using the unstructured query language.
[0127] It should be understood that, although display attributes are set for each of the aforementioned nodes, these display attributes are the default display attributes for each node, i.e., the display attributes of each node before receiving a service processing request. After receiving a service processing request, the display attributes of each node can be redefined based on the actual service processing request, i.e., the display attributes of each first node can be redefined.
[0128] For the same business processing system, each business node in the business processing system should be pre-configured. No matter what kind of business in the business processing system, it can be implemented through some business processing nodes in the business processing system and the pre-configured business processing processes corresponding to these business processing nodes. Since there may be intersections between different business processing processes, the type of business processing node and the corresponding node name can be set to avoid uniquely identifying different nodes when there is an intersection between business processing processes. In an embodiment of the present application, the data required in the directed acyclic graph corresponding to the business processing system can also be referred to as graph original data. Since the graph is composed of points and edges, the corresponding graph metadata includes point original data and edge original data. Among them, the data related to each first node can be called point original data, and the data related to each first edge can be called edge original data. For example, point original data can include multiple first nodes, and edge original data includes multiple first edges and the corresponding pointing relationship of each first edge.
[0129] In the embodiment of the present application, the business processing request may include but is not limited to a business display request, a business query request, a business hiding request, etc., and the embodiment of the present application does not limit this. Among them, the business display request refers to the display of the target business involved in the business display request. The business query request refers to the query and display of the target business involved in the business query request. If the target business has been displayed, the target business can be highlighted by including but not limited to bolding, highlighting, adding different colors, etc. A business hiding request refers to hiding the target business involved in the business hiding request, that is, not displaying it. In the embodiment of the present application, the business processing request is taken as an example of a business display request for explanation.
[0130] Specifically, the display attributes of a first node can be determined by setting:
[0131]
[0132] Among them, serviceName represents the name of the business processing system where the first node is located, id represents the unique identifier of the first node, which can be the name of the first node, columnName represents the node type of the first node, and expend represents the value of whether the first node is expanded. That is, on the basis of obtaining the point metadata, after obtaining the name of the business processing system where a node is located, the unique identifier of the first node, the node type of the first node and the display attributes of the node, the first node in a directed acyclic graph can be determined. In this example, it represents the target business node in the system named xx_system (business processing system name), the node type is us_apiserver_instance, the node identifier is 18.189.234.177_3479, and the display attribute of the first node is expanded.
[0133] Specifically, you can set up a first side by:
[0134]
[0135] Among them, toType represents the node attribute of the destination node in the edge, fromType represents the node attribute of the source node in the edge, label represents the text description of the edge, that is, pointing from a certain node to (to, that is, 2) another node, from represents the node identifier of the source node in the edge, and to represents the node identifier of the destination node in the edge. That is, based on the edge metadata that has been obtained, after obtaining the node identifier and node type of the source node in an edge, the node identifier and node type of the destination node, and the text description of the edge, the first edge in a directed acyclic graph can be determined. In this example, the first edge is represented from the source node with a node type of yarn_rm and a node identifier of 131.112.123.211 to the destination node with a node type of yarn_nn and a node identifier of 19.26.454.35.
[0136] Step S702: Determine the display attribute of each first node according to the business processing request. The display attribute of a first node is a display state or a contraction state.
[0137] As previously mentioned, different businesses involve different business processes, and the display attribute determines whether a node should be displayed. If a node's display attribute is in the display state, it indicates that the node should be displayed. If a node's display attribute is in the collapsed state, it indicates that the node should be hidden.
[0138] In this implementation, the display attribute of each first node may be determined through the following optional implementation manner.
[0139] Optionally, the determining of the display attribute of each first node according to the business processing request includes:
[0140] Determining, according to the service processing request, a target service node corresponding to the service processing request from among the plurality of first nodes;
[0141] The display attribute of the target service node among the plurality of first nodes is set to a display state, and the display attribute of the nodes other than the target service node among the plurality of first nodes is set to a contraction state.
[0142] The target business node is the node related to the target business involved in the business processing request, for example, Figure 4 The display attribute of the nodes related to the sales business is shown in the display state, and the display attribute of the nodes related to the procurement node, the warehousing node, and the amount management node is in the contraction state.
[0143] By setting the display attribute of the target business node among multiple first nodes to a display state and setting the display attribute of the nodes other than the target business node among multiple first nodes to a contraction state, the target business node related to the business processing request can be filtered out from multiple business processing nodes to further determine the second node that needs to be displayed.
[0144] Step S703: Determine each second node to be displayed from the plurality of first nodes according to the display attribute of each first node and the edge original data, where the edge original data includes a plurality of first edges and a directional relationship corresponding to each first edge.
[0145] Considering that when the display attribute of a node is in the expanded state, the child nodes of the node will be expanded; when the display attribute of the node is in the collapsed state, the child nodes of the node will not be expanded. Therefore, even if the display attribute of each first node is in the expanded state, the first node will not be expanded. In view of this, the embodiment of the present application provides the following optional implementation methods:
[0146] Optionally, determining each second node to be displayed from the plurality of first nodes according to the display attribute of each first node and the original edge data includes:
[0147] Determine a root node among the plurality of first nodes as a second node;
[0148] For each first node except the root node among the multiple first nodes, based on the directional relationship corresponding to each first edge, determine at least one upstream branch corresponding to the first node; if there is one upstream branch corresponding to the first node in which the display attributes of all nodes in the upstream branch are all in the display state, the first node is determined as the second node.
[0149] For each business processing system, the root node of each business processing node must be displayed, and the root node among the multiple first nodes needs to be determined as the second node.
[0150] A node's upstream branches are the branches formed by the edges between nodes that exist during the tracing process, starting with that node as the destination node and tracing forward until the root node is reached, based on the business process corresponding to that node. A node has at least one upstream branch. For example, if a node has two parent nodes, it has at least two upstream branches.
[0151] A node's downstream branches are branches formed by edges between existing nodes, based on the business process flow corresponding to that node, starting with that node and tracing back to a node with no child nodes. For non-leaf nodes, there is at least one downstream branch; for leaf nodes, there are no downstream branches. For example, if a node has two child nodes, it has at least two downstream branches.
[0152] According to the definition of display attributes, a node will be displayed only if at least one of its upstream branches has all first nodes in the display attribute set to "display" (the display attribute is displayed). If no first nodes in any of its upstream branches have all first nodes in the display attribute set to "display" (the display attribute is displayed), the node will not be displayed.
[0153] Through the above method, the second node to be displayed can be accurately determined according to the display attribute of each first node and the original edge data.
[0154] Step S704: Determine the second edges to be displayed from the first edges according to the second nodes and the original edge data.
[0155] Since the original edge data represents the directional relationship corresponding to each edge, the first edges corresponding to the second nodes can be determined as the second edges to be displayed based on the second nodes and the original edge data that need to be displayed and the first edges corresponding to the second nodes.
[0156] Optionally, determining the second edges to be displayed from the first edges according to the second nodes and the original edge data includes:
[0157] Determine, based on the second nodes and the original edge data, the second nodes that have a connection relationship among the second nodes;
[0158] The first edges between the second nodes that are determined to have a connection relationship are determined as second edges.
[0159] An edge consists of two nodes. After determining each second node, we can determine whether each second node is either of the two first nodes connected by any first edge. For a second node, if it is either of the two first nodes connected by any first edge, and the other node on the first edge is also a second node, then the two second nodes are connected to each other, and the first edge between the two second nodes is the second edge.
[0160] In this way, the second side to be displayed can be accurately determined.
[0161] Step S705: Generate and display a target graph corresponding to the directed acyclic graph based on each second node and each second edge.
[0162] Considering that the target graph generated and displayed based on the currently received business processing request is the first graph to be displayed, in the embodiments of the present application, the data related to the target graph may also be referred to as graph raw data. Similarly, graph raw data may also include point raw data and edge raw data. The point raw data may include the aforementioned second nodes, and the edge raw data may include the aforementioned second edges and the corresponding directional relationships of the second edges.
[0163] Optionally, in the target graph, if a business processing flow fails, for example, in the business processing flow, a business node does not process the corresponding business for more than a predetermined time threshold, then the business node and the upstream branch corresponding to the business node can be highlighted to remind the user to detect and process the business node to avoid affecting the entire business processing system, thereby locating the problem node and facilitating users to focus on valid data.
[0164] Through the above method, a first node corresponds to a business processing node, and an edge indicates the business processing flow between business processing nodes. After receiving a business processing request, the display attributes of each first node in the business processing system can be set based on the business processing request. According to the display attributes of each first node and the directional relationship between each edge and each edge in the directed acyclic graph of the business processing system, the target graph corresponding to the directed acyclic graph is determined. It can be realized that only the target graph corresponding to the business processing request is visualized, which is convenient for users to focus on the data corresponding to the current business processing request, quickly obtain the main business process, and locate the problem node. Avoid directly displaying the directed acyclic graph corresponding to the entire business processing system when the amount of data in the directed acyclic graph corresponding to the business processing system is large, which will cause certain difficulties in observing the flow direction of each business processing process and locating the data of some business nodes.
[0165] As an example, Figure 8 FIG. 1 shows a schematic diagram of another target graph provided by an embodiment of the present application. Figure 8 As shown, the service node "Gateway Server Network Management Routing" and its downstream nodes are expanded. However, the display properties of the nodes "Cluster ss-apus," "Cluster localtest," "Cluster qy-flink3," and "Cluster qy-scorpio" are hidden, and their downstream nodes are hidden. Furthermore, for the node "Base100.76.58.2_2f081," the service processing path corresponding to this node has experienced a failure. The corresponding upstream branch is indicated by a dotted line, and the sequence number "③" in the upper right corner of the node indicates the number of failures for this node.
[0166] Optionally, the above method further includes:
[0167] Determine, based on the original edge data, the operation control corresponding to each non-leaf node in each second node; wherein, if a non-leaf node has a hidden child node, determine that the operation control corresponding to the non-leaf node is a first type of control; if a non-leaf node does not have a hidden child node, determine that the operation control corresponding to the non-leaf node is a second type of control;
[0168] Based on the operation control corresponding to each non-leaf node, the operation control corresponding to each non-leaf node is displayed in the target graph, so that when a trigger operation is received for any operation control in the target graph, the target graph is updated and the updated target graph is displayed.
[0169] In this implementation, a leaf node is a node without any child nodes, and a non-leaf node is a node with any child nodes.
[0170] The first type of control is the control If the operation control corresponding to a node is a first type of control, the child nodes of the node can be displayed by triggering the first type of control. If the operation control corresponding to a node is a second type of control, the child nodes of the node can be hidden by triggering the second type of control.
[0171] Through the operation controls corresponding to the non-leaf nodes in each second node displayed in the target graph, it is possible to easily confirm whether each second node in the target graph is a non-leaf node, and through the operation controls corresponding to each non-leaf node, the display status of the child nodes of each non-leaf node (that is, whether it is hidden) can be accurately known, so as to facilitate updating the target graph and displaying the updated target graph when a trigger operation for any operation control is received.
[0172] As an example, Figure 8 As shown, in the target graph, no corresponding operation controls exist for the leaf nodes. The business node "Gateway Server Network Management Routing" and its downstream nodes are expanded. The operation controls for the non-leaf nodes in the business node "Gateway Server Network Management Routing" and its downstream nodes are all second-type operation controls. The display properties of the nodes "Cluster ss-apus", "Cluster localtest", "Cluster qy-flink3", and "Cluster qy-scorpio" are hidden, and their downstream nodes are all hidden. The operation controls corresponding to these nodes are all first-type operation controls.
[0173] Optionally, upon receiving a trigger operation for any operation control in the target graph, updating the target graph may include:
[0174] Upon receiving a trigger operation for any operation control in the target graph, determining, based on the type of the target operation control targeted by the trigger operation, information to be updated corresponding to the target graph from at least one downstream branch of the target node corresponding to the target operation control, the information to be updated including at least one item of a node to be updated or an edge to be updated;
[0175] The corresponding information in the target graph is updated according to the information to be updated, and the type of the operation control corresponding to the target node is updated.
[0176] As previously described, the operation control corresponding to the non-leaf node in the second node can be used to indicate the display status of each child node of the non-leaf node. For a non-leaf node, the type of operation control corresponding to the non-leaf node is different, and the display status of each child node corresponding to it is also different. By triggering an operation control corresponding to a non-leaf node, the display status of the child node of the non-leaf node can be changed. Correspondingly, when the display status of a child node of a non-leaf node changes, the type of the corresponding operation control will also change, and the edge corresponding to the non-leaf node will also change.
[0177] When updating the type of the operation control corresponding to the target node, it can specifically include: if the type of the operation control corresponding to the target node is the first type, the type of the operation control can be updated to the second type; if the type of the operation control corresponding to the target node is the second type, the type of the operation control can be updated to the first type.
[0178] By receiving a trigger operation for any operation control in the target graph, determining the information to be updated corresponding to the target graph from at least one downstream branch of the target node corresponding to the target operation control according to the type of the target operation control targeted by the trigger operation, and updating the corresponding information in the target graph according to the information to be updated, as well as updating the type of the operation control corresponding to the target node, it is possible to achieve diversified display of the target graph corresponding to the directed acyclic graph corresponding to the business system to meet different practical needs.
[0179] Specifically, for different types of operation controls, the method for determining the information to be updated is as follows:
[0180] Optionally, when the type of the target operation control is the first type, the information to be updated is newly displayed information. The determining, based on the type of the target operation control targeted by the triggering operation, the information to be updated corresponding to the target graph from at least one downstream branch of the target node corresponding to the target operation control may include:
[0181] Determine a child node of the target node as a newly added display node, and determine the first edge between the target node and the child node of the target node as a newly added display edge;
[0182] Determine a newly added display node from the other nodes based on the display attributes of the other nodes and the corresponding pointing relationships of the other nodes in the original edge data, where the other nodes are nodes in the at least one downstream branch other than the child nodes of the target node.
[0183] The newly added display information includes each newly added display node, the first edge between the target node and the child node of the target node, and the first edge between each newly added display node;
[0184] The above updating of the corresponding information in the target graph according to the information to be updated includes:
[0185] Update the corresponding information in the target graph according to the newly added display information.
[0186] In this implementation, when the type of the target operation control is the first type, it means that the target node corresponding to the target operation control has a hidden child node. By triggering the target operation control, the child node of the target node and the first edge between the target node and the child node of the target node can be displayed.
[0187] Since the target node's child nodes may also have child nodes, in this implementation, for the target node's child nodes and the child nodes of the lower levels (i.e., other nodes in at least one downstream branch of the target node except the target node's child nodes), the nodes to be displayed (i.e., newly added display nodes) can be directly determined based on the display attributes of these nodes in the original edge data and the nodes that have a pointing relationship with these nodes. The specific method for determining the newly added display nodes is the same as the above-mentioned method for determining the second node, which will not be repeated here. After determining all the newly added display nodes, the first edge between each newly added display node is determined based on the original edge data according to the above-mentioned method for determining the second edge.
[0188] Of course, after determining each newly added display node and each newly added display edge, the operation control corresponding to each non-leaf node in the newly added display node can also be determined according to the above method of determining the type of the operation control of the non-leaf node in the second node.
[0189] In this way, when the type of the target operation control is the first type, the newly added display information can be accurately determined, and the target map can be updated based on the newly added display information.
[0190] As an example, Figure 9 A schematic diagram of a partial view of a target map provided in an embodiment of the present application is shown. Figure 10 The embodiment of the present application provides Figure 9 The schematic diagram of the local graph after the corresponding local graph is updated. Figure 9 As shown, based on the triggering operation of the first type of operation control corresponding to a child node application group virtual node of the cluster localtest node (hereinafter referred to as "application group virtual node 1"), it can be displayed Figure 10 As shown in the partial diagram. Figure 9 and Figure 10 As shown, the type of operation control corresponding to the application group virtual node 1 is Figure 9 The first type of update shown is for Figure 10 The second type shown. And, in Figure 10 In FIG, the child nodes corresponding to the application group virtual node 1 are all displayed as newly added display nodes.
[0191] As another example, Figure 11 A schematic diagram of a partial diagram of another target diagram provided in an embodiment of the present application is shown. Figure 12 The embodiment of the present application provides Figure 12 The schematic diagram of the local graph after the corresponding local graph is updated. Figure 11As shown, based on the triggering operation of the first type of operation control corresponding to a child node application group virtual node (hereinafter referred to as "application group virtual node 2") of the cluster qy-flink3 node, it can be displayed Figure 12 As shown in the partial diagram. Figure 11 and Figure 12 As shown, the type of operation control corresponding to the application group virtual node 2 is represented by Figure 11 The first type of update shown is for Figure 12 The second type shown. And, in Figure 12 In FIG, the child nodes corresponding to the application group virtual node 2 are all displayed as newly added display nodes.
[0192] like Figure 12 As shown in the figure, although the node types corresponding to application group virtual node 1 and application group virtual node 2 are the same, they belong to different clusters (i.e., system types). That is, a node can be uniquely identified by the node type and system type corresponding to the two. Among them, application group virtual node 1 and application group virtual node 2 have the same child nodes (i.e., "duplicate child nodes"), i.e. Figure 10 、 Figure 11 and Figure 12 The nodes "application group root231", "application group root232" and "application group root233" are shown in the dotted box. Figure 11 In the case where the child nodes corresponding to the application group virtual node 1 are displayed, in response to the triggering operation of the operation control for the application group virtual node 2, the child nodes corresponding to the application group virtual node 2 are displayed. It can be seen that the repeated child nodes of the application group virtual node 1 and the application group virtual node 2 have a multiple inflow status display.
[0193] Optionally, when the type of the target operation control is the second type, the information to be updated is information to be hidden, and determining the information to be updated corresponding to the target graph from at least one downstream branch of the target node corresponding to the target operation control according to the type of the target operation control targeted by the triggering operation includes:
[0194] If the target node's child nodes do not have any other parent nodes in the target graph, the target node's child nodes, the first edge between the target node and the target node's child nodes, and the operation controls corresponding to the target node's child nodes in the target graph are determined as information to be hidden.
[0195] If each of the other nodes has another parent node in the target graph, and the other parent node has a corresponding operation control of the second type, determining the first edge between the target node and the child node of the target node in the target graph as the information to be hidden, and each of the other nodes is a node other than the child node of the target node in at least one downstream branch;
[0196] The above updating of the corresponding information in the target graph according to the information to be updated includes:
[0197] Update the corresponding information in the target graph according to the information to be hidden.
[0198] In this implementation, when the type of the target operation control is the second type, it indicates that the target node corresponding to the target operation control has no hidden child nodes. By triggering the target operation control, at least some of the child nodes of the target node need to be hidden.
[0199] Because different nodes may have the same child nodes, for the same node, the node will be hidden only if all its upstream nodes are hidden. Therefore, when the target operation control type is the second type, it is necessary to determine whether the child nodes of the target node have other parent nodes other than the target node in the target graph.
[0200] Among them, if the child nodes of the target node do not have other parent nodes other than the target node in the target graph, then the child nodes of the target node in the target graph, the first edge between the target node and the child nodes of the target node, and the operation controls corresponding to the child nodes of the target node can be hidden, that is, the child nodes of the target node in the target graph, the first edge between the target node and the child nodes of the target node, and the operation controls corresponding to the child nodes of the target node are determined as information to be hidden. If the child nodes of the target node have other parent nodes other than the target node in the target graph, and there are nodes of the second type (that is, the parent node does not have hidden child nodes) of the corresponding operation controls in the other parent nodes, then the first edge between the target node and the child nodes of the target node in the target graph needs to be hidden, that is, the first edge between the target node and the child nodes of the target node in the target graph is determined as information to be hidden.
[0201] In this way, when the type of the target operation control is the second type, the information to be hidden can be accurately determined, and the target map can be updated based on the information to be hidden.
[0202] As an example, Figure 13 The embodiment of the present application provides Figure 12 The schematic diagram of the local graph after the corresponding local graph is updated. Figure 12 The triggering operation of the second type of operation control corresponding to the application group virtual node 1 shown can display Figure 13 As shown in the partial diagram. Figure 12 and Figure 13 As shown, the type of operation control corresponding to the application group virtual node 1 is Figure 12 The second type of update shown is Figure 13 The first type shown. And, in Figure 13 In the figure, all the child nodes corresponding to the application group virtual node 1 except the child nodes repeated with the application group virtual node 2 are hidden, and the first edges between the application group virtual node 1 and the application group root 231, application group root 232 and application group root 233 (i.e., the child nodes repeated with the application group virtual node 1 and the application group virtual node 2) are also hidden.
[0203] As another example, Figure 14 The embodiment of the present application provides Figure 13 The schematic diagram of the local graph after the corresponding local graph is updated. Figure 13 The triggering operation of the first type of operation control corresponding to the application group virtual node 1 shown can display Figure 14 As shown in the partial diagram. Figure 13 and Figure 14 As shown, the type of operation control corresponding to the application group virtual node 1 is Figure 13 The first type of update shown is Figure 14 The second type shown. And, in Figure 14 In the figure, the child nodes corresponding to the application group virtual node 1 except the child nodes repeated with the application group virtual node 2 are redisplayed, and the first edges between the application group virtual node 1 and the application group root 231, application group root 232 and application group root 233 (i.e., the child nodes repeated with the application group virtual node 1 and the application group virtual node 2) are also redisplayed (filled).
[0204] As another example, Figure 15 The embodiment of the present application provides Figure 14 The schematic diagram of the local graph after the corresponding local graph is updated. Figure 14 The trigger operation of the second type of operation control corresponding to the cluster localtest node shown can be displayed Figure 15 As shown in the partial diagram. Figure 14 and Figure 15 As shown, the type of operation control corresponding to the cluster localtest node is Figure 14 The second type of update shown is Figure 15 The first type shown. And, in Figure 15 In the figure, all the child nodes in the downstream nodes corresponding to the cluster localtest node are hidden except for the child nodes repeated with the application group virtual node 2, and the first edges between the application group virtual node 1 and the application group root231, application group root232 and application group root233 (that is, the child nodes repeated with the application group virtual node 1 and the application group virtual node 2) are also hidden.
[0205] As another example, Figure 16 The embodiment of the present application provides Figure 15 The schematic diagram of the local graph after the corresponding local graph is updated. Figure 15 The trigger operation of the first type of operation control corresponding to the cluster localtest node shown can be displayed Figure 16 As shown in the partial diagram. Figure 15 and Figure 16 As shown, the type of operation control corresponding to the cluster localtest node is Figure 15 The first type of update shown is Figure 16 The second type shown. And, in Figure 16 In the figure, all the child nodes in the downstream nodes corresponding to the cluster localtest node except the child nodes repeated with the application group virtual node 2 are re-displayed, and the other nodes in the downstream nodes corresponding to the cluster localtest node except the child nodes of the cluster localtest node are determined based on the display attributes of other nodes and the pointing relationships corresponding to other nodes in the original data of the edge, and the first edges between the application group virtual node 1 and the application group root231, application group root232 and application group root233 (that is, the child nodes repeated with the application group virtual node 1 and the application group virtual node 2) are also re-displayed (filled edges).
[0206] Specifically, the following methods can be used to determine the type of the target operation control targeted by the trigger operation, further determine the information to be updated, and update the target graph based on the information to be updated:
[0207]
[0208]
[0209] It can be seen that when the operation control of a target node is triggered, the information that needs to be updated can be determined based on the full graph data (allNodes, allEdges), the current graph displayable data (nodes, edges), and the currently clicked node ID (currentNode). That is, based on this trigger operation, new information is added to be displayed or hidden.
[0210] Through the above method, it can be determined that the states of each second node displayed in the target graph include the following situations:
[0211] (1) In the target graph, if the display attribute of the second node is in the contracted state, the nodes in the corresponding downstream branches will remain hidden, so that the target graph can more clearly and clearly display the business nodes related to the business processing request and the corresponding business processing flow, such as Figure 8 The nodes shown are "cluster ss-apus", "cluster localtest", "cluster qy-flink3", and "cluster qy-scorpio".
[0212] (2) For some second nodes, the second node has the same child nodes as other second nodes in the level where the second node is located, such as Figures 10 to 12 The nodes "Application Group root231", "Application Group root232", and "Application Group root233" are shown
[0213] (3) When the type of the operation control corresponding to the second node a is the second type, if another second node b has the same child node as the second node a, and the type of the operation control corresponding to the second node b is the first type, by triggering the operation control corresponding to the second node b, in the updated target graph, for the child nodes shared by the second node a and the second node b, multiple edges will flow into the state. Figures 11 to 12 The state changes of the local graph shown.
[0214] (4) When the subnodes corresponding to the second node a and the second node b are both expanded and the types of the operation controls corresponding to the second node a and the second node b are both of the second type, if the operation control corresponding to any one of the second nodes is triggered, but not the operation control corresponding to the other second node, then among the subnodes of the second node whose corresponding operation control is triggered, the non-duplicate subnodes and the edges between the duplicate subnodes and the second node whose corresponding operation control is triggered are hidden, but the duplicate subnodes are not hidden. Figures 12 to 13 The state changes of the local graph shown.
[0215] (5) When hiding a node, for a second node, if the type of the operation control corresponding to the second node is the second type, by triggering the operation control corresponding to the second node, if there is no other parent node other than the second node and the downstream node of the second node in the downstream nodes of the second node, then the downstream nodes of the node are hidden; if there is a node other than the second node and the downstream node of the second node in the downstream nodes of the second node that has no duplicate child nodes, then the nodes in the downstream nodes of the node that have duplicate child nodes are hidden, and the edges between the nodes with duplicate child nodes and the branch where the second node is located are hidden, while the nodes with duplicate child nodes are not hidden. Figures 14 and 15The state changes of the local graph shown.
[0216] (6) When expanding a node, for a second node, if the type of the operation control corresponding to the second node is the first type, by triggering the operation control corresponding to the second node, the downstream nodes of the second node are displayed. If there are nodes in the downstream nodes of the second node that are parent nodes other than the second node and the downstream nodes of the second node, the edges between the node and the other parent nodes are added. Figures 13 and 14 The state changes of the local graph shown, and Figures 15 and 16 The state changes of the local graph shown.
[0217] Optionally, the above method may further include:
[0218] For each second node, upon receiving a delete operation for the second node, the second node is deleted, and based on the original edge data, the in-degree of each node in the downstream nodes of the second node is determined;
[0219] For each node in the downstream nodes of the second node, if the first degree of the node is equal to the in-degree of the node, delete the node; if the first degree of the node is less than the in-degree of the node, add 1 to the deletion count of the node, and the first degree of the node is the sum of the deletion counts of the node's parent nodes;
[0220] For each first edge, upon receiving a delete operation for any node connected to the first edge, the first edge is deleted.
[0221] As described above, the original edge data may also include the in-degree corresponding to each first node. Correspondingly, the in-degree of the corresponding node in the original edge data may be directly used as the in-degree of each node in the downstream nodes of the second node.
[0222] In this implementation, the deletion operation can be performed in the following ways, including but not limited to: directly displaying the deletion control corresponding to each second node in the displayed target graph, or it can be set to perform a setting operation on the second node displayed in the target graph (for example, right-clicking the second node), and further displaying the deletion control based on the setting operation (for example, displaying an operation control list in response to a right-click operation on the second node, including a deletion control in the list). The embodiments of the present application do not limit this.
[0223] When a delete operation is received for a second node, the second node is deleted. For the downstream nodes of the second node, the corresponding deletion count is increased by 1, that is, the delete operation is passed until it is passed to the leaf node in the downstream nodes of the second node.
[0224] Since a node may include multiple parent nodes, when a deletion operation is only received for one of the parent nodes, if the node is deleted directly, it will inevitably affect the business processing flows corresponding to other parent nodes, that is, the business processing flows of other parent nodes of the node need to perform business processing on this node.
[0225] To avoid this situation, considering that the number of in-degrees of a node can be equivalent to the number of its parent nodes, when a delete operation is received for a node, the in-degree of the node can be compared with the number of deletions of the node. If the number of deletions of the node is equal to the in-degree, that is, all the parent nodes of the node have received the deletion operation, then the node can be deleted. If the number of deletions of the node is less than the in-degree, that is, there is a parent node among the parent nodes of the node that has not received the deletion operation, that is, the business process where the parent node that has not received the deletion operation is located still needs to perform business processing at the node, and the node is retained. This can avoid the situation where directly deleting the node affects the business processing flow corresponding to other parent nodes related to the business node.
[0226] Since each edge is based on the connection between two nodes, if one of the nodes is deleted, the original "edge" relationship will naturally no longer exist. That is, when a delete operation is received for any node connected to the first edge, the first edge is directly deleted.
[0227] Through the above deletion operation, it is possible to accurately determine whether each node and each edge is deleted, thereby avoiding the situation where directly deleting the node affects the business processing flow corresponding to other parent nodes related to the business node.
[0228] Specifically, the algorithm for deleting each node may be as follows:
[0229] (1) The in-degree adjacency table (inEdges Map) and the out-degree adjacency table (outEdgesMap) are obtained from the original edge data. The in-degree adjacency table and the out-degree adjacency table are used to record the source node and destination node of each first node, that is, the neighbor nodes of the first node. The inEdges Map can be used to determine whether the in-degree of a node is consistent with the number of deletions of the node. The outEdges Map can be used to traverse a node with a source node as the node until the traversal reaches the leaf node in the downstream branch of the node.
[0230] (2) Directly delete the node that receives the deletion operation (which can be referred to as the target node). For each node in the downstream node of the node that receives the deletion operation, if signalCountMap.get(vertex) = inEdges Map.(vertex) is satisfied, the node is added to the deletion queue to delete the node. Among them, signalCount Map is used to count the number of deletions corresponding to each node in the downstream node of target, that is, the number of times the node is deleted due to the upstream node target of the node. The number of deletions can be counted by traversing the queue (queue) plus a while loop. The type of the node is string type or int type (integer type). Among them, the queue + while training can be: (!queue.empty){}, that is, whether all nodes in the deletion queue have been deleted. Among them, signalCountMap.get(vertex) = inEdges Map.(vertex) indicates that the number of deletions of a node is equal to the in-degree, and the node needs to be deleted. And if a node is deleted, all edges related to the node will be deleted.
[0231] As a specific example, Figure 17 A schematic diagram of another target graph provided in an embodiment of the present application is shown. Figure 18 The embodiment of the present application provides Figure 17 The corresponding target graph is updated. Figure 17 As shown, node 0 is the root node of all nodes in the target graph. It has no in-degree node (i.e., no parent node) and two out-degree nodes (i.e., two child nodes), with a corresponding in-degree of 0 and an out-degree of 2. Node 1 has one in-degree node and two out-degree nodes, with a corresponding in-degree of 1 and an out-degree of 2. Similarly, we can determine that node 2 has an in-degree of 1 and an out-degree of 2; node 3 has an in-degree of 1 and an out-degree of 3; node 4 has an in-degree of 1 and an out-degree of 3; node 5 has an in-degree of 1 and an out-degree of 0; node 6 has an in-degree of 1 and an out-degree of 1; node 7 has an in-degree of 1 and an out-degree of 0; node 8 has an in-degree of 1 and an out-degree of 0; node 9 has an in-degree of 2 and an out-degree of 0; node 10 has an in-degree of 1 and an out-degree of 0; node 11 has an in-degree of 2 and an out-degree of 1; and node 12 has an in-degree of 1 and an out-degree of 0.
[0232] like Figure 17As shown, when a deletion operation is received for node 1 (i.e., the node pointed by the dotted arrow), the deletion counts of each downstream node corresponding to node 1 will increase. Specifically, the deletion count of node 3 is 1, which comes from the deletion operation on node 1; the deletion count of node 4 is 1, which comes from the deletion operation on node 1; the deletion count of node 7 is 1, which comes from the deletion operation on node 3; the deletion count of node 8 is 1, which comes from the deletion operation on node 3; the deletion count of node 9 is 2, which comes from the deletion operations on node 3 and node 4 respectively; the deletion count of node 10 is 1, which comes from the deletion operation on node 4; the deletion count of node 11 is 1, which comes from the deletion operation on node 4.
[0233] Node 3 has been deleted 1 times and its in-degree is 1, which is equal to its in-degree. Therefore, node 3 needs to be deleted; node 4 has been deleted 1 times and its in-degree is 1, which is equal to its in-degree. Therefore, node 4 needs to be deleted; node 7 has been deleted 1 times and its in-degree is 1, which is equal to its in-degree. Therefore, node 7 needs to be deleted; node 8 has been deleted 1 times and its in-degree is 1, which is equal to its in-degree. Therefore, node 8 needs to be deleted; node 9 has been deleted 2 times and its in-degree is 2, which is equal to its in-degree. Therefore, node 9 needs to be deleted; node 10 has been deleted 1 times and its in-degree is 1, which is equal to its in-degree. Therefore, node 10 needs to be deleted; node 11 has been deleted 1 times and its in-degree is 2, which is less than its in-degree. Therefore, node 11 needs to be retained, but the first edge between node 11 and node 4 needs to be deleted. Therefore, although node 12 is connected to node 11, node 12 is the out-degree node of node 11, and node 12 is also the downstream node of node 1, since its only parent node 11 is not deleted, node 12 is also retained.
[0234] After the above deletion operation, we can achieve Figure 17 The target graph shown is updated to Figure 18 Target diagram shown.
[0235] Of course, in the above embodiment, for the information to be updated, the target graph corresponding to the directed acyclic graph can also be re-determined directly based on the information to be updated and the directed acyclic graph. However, the above method is simpler and can reduce the amount of data in the processing process.
[0236] In order to more clearly illustrate the embodiments of the present application, in the specific implementation process, as shown in FIG. Figure 19 As shown, the above processing can be performed in the following ways:
[0237] Step 1: Obtain initial data, including graph metadata (point metadata and edge raw data) and graph raw data (i.e. point raw data and edge raw data).
[0238] Step 2: Build the cache graph based on the original graph data, and build the display graph data (show graph, i.e., target graph) based on the original vertex data and edge data. When displaying for the first time, the full graph data can be displayed.
[0239] Step 3: Render the displayable graph data and display the rendered graph data in the interface.
[0240] Step 4: Based on the user's triggering operation on the operation control in the target graph, the target graph is updated and displayed.
[0241] Based on the same principle as the data processing method provided in the embodiment of the present application, the embodiment of the present application also provides a data processing device. Figure 20 As shown, the device 200 includes:
[0242] An acquisition module 201 is configured to, upon receiving a business processing request, acquire a directed acyclic graph corresponding to a business processing system corresponding to the business processing request, wherein the business processing system includes a plurality of business processing nodes, the directed acyclic graph includes a plurality of first nodes and a plurality of first edges, each first node corresponding to a business processing node, and the plurality of first edges and the directional relationship between two first nodes connected by each first edge are determined by a business processing flow between the plurality of business processing nodes;
[0243] A graph data processing module 202 is configured to determine a display attribute of each first node according to a business processing request, wherein the display attribute of a first node is a display state or a contraction state;
[0244] Determining, from the plurality of first nodes, second nodes to be displayed based on the display attribute of each first node and the edge raw data, where the edge raw data includes the plurality of first edges and the directional relationship corresponding to each first edge;
[0245] Determine, from each first edge, each second edge to be displayed according to each second node and the original edge data;
[0246] According to each second node and each second edge, a target graph corresponding to the directed acyclic graph is generated and displayed.
[0247] Optionally, when determining the display attribute of each first node according to the business processing request, the graph data processing module 202 is specifically configured to:
[0248] Determining, according to the service processing request, a target service node corresponding to the service processing request from among the plurality of first nodes;
[0249] The display attribute of the target service node among the plurality of first nodes is set to a display state, and the display attribute of the nodes other than the target service node among the plurality of first nodes is set to a contraction state.
[0250] Optionally, when determining each second node to be displayed from a plurality of first nodes according to the display attribute of each first node and the original edge data, the graph data processing module 202 is specifically configured to:
[0251] Determine a root node among the plurality of first nodes as a second node;
[0252] For each first node except the root node among the multiple first nodes, based on the directional relationship corresponding to each first edge, determine at least one upstream branch corresponding to the first node; if there is one upstream branch corresponding to the first node in which the display attributes of all nodes in the upstream branch are all in the display state, the first node is determined as the second node.
[0253] Optionally, when the graph data processing module 202 determines the second edges to be displayed from the first edges based on the second nodes and the original edge data, it is specifically configured to:
[0254] Determine, based on the second nodes and the original edge data, the second nodes that have a connection relationship among the second nodes;
[0255] The first edges between the second nodes that are determined to have a connection relationship are determined as second edges.
[0256] Optionally, the graph data processing module 202 may also be used to:
[0257] Determine, based on the original edge data, the operation control corresponding to each non-leaf node in each second node; wherein, if a non-leaf node has a hidden child node, determine that the operation control corresponding to the non-leaf node is a first type of control; if a non-leaf node does not have a hidden child node, determine that the operation control corresponding to the non-leaf node is a second type of control;
[0258] Based on the operation control corresponding to each non-leaf node, the operation control corresponding to each non-leaf node is displayed in the target graph, so that when a trigger operation is received for any operation control in the target graph, the target graph is updated and the updated target graph is displayed.
[0259] Optionally, when the graph data processing module 202 receives a trigger operation for any operation control in the target graph and updates the target graph, it is specifically configured to:
[0260] Upon receiving a trigger operation for any operation control in the target graph, determining, based on the type of the target operation control targeted by the trigger operation, information to be updated corresponding to the target graph from at least one downstream branch of the target node corresponding to the target operation control, the information to be updated including at least one item of a node to be updated or an edge to be updated;
[0261] The corresponding information in the target graph is updated according to the information to be updated, and the type of the operation control corresponding to the target node is updated.
[0262] Optionally, when the type of the target operation control is the first type, and the information to be updated is newly displayed information, the graph data processing module 202, when determining the information to be updated corresponding to the target graph from at least one downstream branch of the target node corresponding to the target operation control according to the type of the target operation control targeted by the trigger operation, is specifically configured to:
[0263] Determine a child node of the target node as a newly added display node, and determine the first edge between the target node and the child node of the target node as a newly added display edge;
[0264] Determine a newly added display node from the other nodes based on the display attributes of the other nodes and the corresponding pointing relationships of the other nodes in the original edge data, where the other nodes are nodes in the at least one downstream branch other than the child nodes of the target node.
[0265] Determine the type of operation control corresponding to each newly added display node based on the original edge data;
[0266] The newly added display information includes each newly added display node, the first edge between the target node and the child node of the target node, and the first edge between each newly added display node;
[0267] When the graph data processing module 202 updates the corresponding information in the target graph according to the information to be updated, it is specifically used to:
[0268] Update the corresponding information in the target graph according to the newly added display information.
[0269] Optionally, when the type of the target operation control is the second type, the information to be updated is information to be hidden. The graph data processing module 202, when determining the information to be updated corresponding to the target graph from at least one downstream branch of the target node corresponding to the target operation control according to the type of the target operation control targeted by the trigger operation, is specifically configured to:
[0270] If the target node's child nodes do not have any other parent nodes in the target graph, the target node's child nodes, the first edge between the target node and the target node's child nodes, and the operation controls corresponding to the target node's child nodes in the target graph are determined as information to be hidden.
[0271] If each of the other nodes has another parent node in the target graph, and the other parent node has a corresponding operation control of the second type, determining the first edge between the target node and the child node of the target node in the target graph as the information to be hidden, and each of the other nodes is a node other than the child node of the target node in at least one downstream branch;
[0272] When the graph data processing module 202 updates the corresponding information in the target graph according to the information to be updated, it is specifically used to:
[0273] Update the corresponding information in the target graph according to the information to be hidden.
[0274] Optionally, the graph data processing module 202 may also be used to:
[0275] For each second node, upon receiving a delete operation for the second node, the second node is deleted, and based on the original edge data, the in-degree of each node in the downstream nodes of the second node is determined;
[0276] For each node in the downstream nodes of the second node, if the first degree of the node is equal to the in-degree of the node, delete the node; if the first degree of the node is less than the in-degree of the node, add 1 to the deletion count of the node. The first degree of the node is the sum of the deletion counts of the nodes in the upstream nodes of the node;
[0277] For each first edge, upon receiving a delete operation for any node connected to the first edge, the first edge is deleted.
[0278] The device of the embodiment of the present application can execute the method provided by the embodiment of the present application, and its implementation principle is similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, and will not be repeated here.
[0279] Based on the same principles as the data processing method and device provided in the embodiments of the present application, an electronic device (such as a server) is also provided in the embodiments of the present application. The electronic device may include a memory, a processor and a computer program stored on the memory. The processor executes the above-mentioned computer program to implement the steps of the method provided in any optional embodiment of the present application.
[0280] Optionally, Figure 21 A schematic diagram of the structure of an electronic device applicable to the embodiment of the present application is shown in FIG. Figure 21 As shown, Figure 21 The electronic device 4000 shown includes: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which may be used for data exchange between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the number of transceivers 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.
[0281] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0282] Bus 4002 may include a path for transmitting information between the above components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. Bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 21 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0283] The memory 4003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation here.
[0284] The memory 4003 is used to store the computer program for executing the embodiment of the present application, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the computer program stored in the memory 4003 to implement the steps shown in the above method embodiment.
[0285] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented.
[0286] An embodiment of the present application also provides a computer program product, including a computer program, which can implement the steps and corresponding contents of the aforementioned method embodiment when executed by a processor.
[0287] The terms "first," "second," "third," "fourth," "1," "2," and the like (if any) in the specification and claims of this application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or sequential sequence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the application described herein can be implemented in an order other than that shown or described in the drawings.
[0288] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the order of implementation of these steps is not limited to the order indicated by the arrows. Unless otherwise clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart can include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage in these sub-steps or stages can also be executed at different times respectively. Under different scenarios at the execution time, the execution order of these sub-steps or stages can be flexibly configured according to demand, and the embodiment of the present application does not limit this.
[0289] The above description is only an optional implementation method for some implementation scenarios of this application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the solution of this application, the use of other similar implementation methods based on the technical ideas of this application also falls within the protection scope of the embodiments of this application.
Claims
1. A data processing method, characterized in that: The method comprises: Upon receiving a business processing request, obtaining a directed acyclic graph corresponding to a business processing system corresponding to the business processing request, wherein the business processing system includes a plurality of business processing nodes, the directed acyclic graph includes a plurality of first nodes and a plurality of first edges, each of the first nodes corresponds to a business processing node, and the plurality of first edges and the directional relationship between two first nodes connected by each first edge are determined by a business processing flow between the plurality of business processing nodes; determining, according to the business processing request, a display attribute of each first node, wherein the display attribute of a first node is a display state or a contraction state; Determining, from the plurality of first nodes, respective second nodes to be displayed based on the display attribute of each first node and the original edge data, wherein the original edge data includes the plurality of first edges and the directional relationship corresponding to each first edge; Determining, from the plurality of first edges, second edges to be displayed according to the second nodes and the original edge data; Generate and display a target graph corresponding to the directed acyclic graph according to each of the second nodes and each of the second edges; The determining, from the plurality of first nodes according to the display attribute of each first node and the original edge data, each second node to be displayed includes: Determine a root node among the multiple first nodes as a second node; For each first node other than the root node among the multiple first nodes, based on the directional relationship corresponding to each first edge, determine at least one upstream branch corresponding to the first node; if there is one upstream branch corresponding to the first node in which the display attributes of all nodes in the upstream branch are all in the display state, the first node is determined as the second node.
2. The method according to claim 1, characterized in that The determining, according to the business processing request, the display attribute of each first node includes: Determining, according to the service processing request, a target service node corresponding to the service processing request among the multiple first nodes; The display attribute of the target service node among the multiple first nodes is set to a display state, and the display attribute of the nodes other than the target service node among the multiple first nodes is set to a contraction state.
3. The method according to claim 1, characterized in that The step of determining, based on the second nodes and the edge original data, the second edges to be displayed from the plurality of first edges includes: Determining, based on the second nodes and the original edge data, second nodes having a connection relationship among the second nodes; The first edges between the second nodes that are determined to have a connection relationship are determined as the second edges.
4. The method according to claim 1, wherein The method further comprises: Determine, based on the edge original data, an operation control corresponding to each non-leaf node in each second node; wherein, if a non-leaf node has a hidden child node, determine that the operation control corresponding to the non-leaf node is a first type of control; if a non-leaf node does not have a hidden child node, determine that the operation control corresponding to the non-leaf node is a second type of control; Based on the operation control corresponding to each non-leaf node, the operation control corresponding to each non-leaf node is displayed in the target graph, so that when a trigger operation is received for any operation control in the target graph, the target graph is updated and the updated target graph is displayed.
5. The method according to claim 4, characterized in that When a trigger operation for any operation control in the target graph is received, updating the target graph includes: Upon receiving a trigger operation for any operation control in the target graph, determining, based on the type of the target operation control targeted by the trigger operation, information to be updated corresponding to the target graph from at least one downstream branch of a target node corresponding to the target operation control, the information to be updated including at least one item of a node to be updated or an edge to be updated; The corresponding information in the target graph is updated according to the information to be updated, and the type of the operation control corresponding to the target node is updated.
6. The method according to claim 5, characterized in that When the type of the target operation control is the first type, the information to be updated is newly displayed information, and determining, based on the type of the target operation control targeted by the triggering operation, the information to be updated corresponding to the target graph from at least one downstream branch of a target node corresponding to the target operation control, includes: Determine a child node of the target node as a newly added display node, and determine a first edge between the target node and the child node of the target node as a newly added display edge; Determining, based on display attributes of the other nodes and the corresponding pointing relationships of the other nodes in the original edge data, a newly added display node from the other nodes, where the other nodes are nodes in the at least one downstream branch other than child nodes of the target node; The newly added display information includes each newly added display node, a first edge between the target node and a child node of the target node, and a first edge between each newly added display node; The updating of the corresponding information in the target graph according to the information to be updated includes: The corresponding information in the target map is updated according to the newly added display information.
7. The method according to claim 5, characterized in that When the type of the target operation control is the second type, the information to be updated is information to be hidden, and determining, based on the type of the target operation control targeted by the triggering operation, the information to be updated corresponding to the target graph from at least one downstream branch of a target node corresponding to the target operation control, includes: If the child nodes of the target node do not have any other parent nodes other than the target node in the target graph, determining the child nodes of the target node in the target graph, the first edge between the target node and the child nodes of the target node, and the operation controls corresponding to the child nodes of the target node as information to be hidden; If each of the other nodes has the other parent node in the target graph, and the other parent node has a node of the second type of corresponding operation control, determining the first edge between the target node and the child node of the target node in the target graph as information to be hidden, and the other nodes are the other nodes in each node in the at least one downstream branch except the child node of the target node; The updating of the corresponding information in the target graph according to the information to be updated includes: The corresponding information in the target graph is updated according to the information to be hidden.
8. The method according to claim 1, characterized in that The method further comprises: For each second node, upon receiving a delete operation for the second node, deleting the second node, and determining the in-degree of each node in the downstream nodes of the second node based on the original edge data; For each node in the downstream nodes of the second node, if the first degree of the node is equal to the in-degree of the node, delete the node; if the first degree of the node is less than the in-degree of the node, increase the deletion count of the node by 1. The first degree of the node is the sum of the deletion counts of the nodes in the upstream nodes of the node; For each first edge, upon receiving a deletion operation for any node connected to the first edge, the first edge is deleted.
9. A data processing device, characterized in that: The device comprises: an acquisition module, configured to, upon receiving a business processing request, acquire a directed acyclic graph corresponding to a business processing system corresponding to the business processing request, wherein the business processing system includes a plurality of business processing nodes, the directed acyclic graph includes a plurality of first nodes and a plurality of first edges, each first node corresponding to a business processing node, and the plurality of first edges and the directional relationship between two first nodes connected by each first edge are determined by a business processing flow between the plurality of business processing nodes; A graph data processing module, configured to determine a display attribute of each first node according to the business processing request, wherein the display attribute of each first node is a display state or a contraction state; Determining, from the plurality of first nodes, respective second nodes to be displayed based on the display attribute of each first node and the original edge data, wherein the original edge data includes the plurality of first edges and the directional relationship corresponding to each first edge; Determining, from the plurality of first edges, second edges to be displayed according to the second nodes and the original edge data; Generate and display a target graph corresponding to the directed acyclic graph according to each of the second nodes and each of the second edges; The graph data processing module is specifically configured to: determine the second nodes to be displayed from the plurality of first nodes according to the display attributes of each first node and the original edge data; Determine a root node among the multiple first nodes as a second node; For each first node other than the root node among the multiple first nodes, based on the directional relationship corresponding to each first edge, determine at least one upstream branch corresponding to the first node; if there is one upstream branch corresponding to the first node in which the display attributes of all nodes in the upstream branch are all in the display state, the first node is determined as the second node.
10. The device according to claim 9, characterized in that When determining the display attribute of each first node according to the business processing request, the graph data processing module is specifically configured to: Determining, according to the service processing request, a target service node corresponding to the service processing request among the multiple first nodes; The display attribute of the target service node among the multiple first nodes is set to a display state, and the display attribute of the nodes other than the target service node among the multiple first nodes is set to a contraction state.
11. The device according to claim 9, characterized in that When the graph data processing module determines, based on the second nodes and the original edge data, the second edges to be displayed from the plurality of first edges, the graph data processing module is specifically configured to: Determining, based on the second nodes and the original edge data, second nodes having a connection relationship among the second nodes; The first edges between the second nodes that are determined to have a connection relationship are determined as the second edges.
12. The device according to claim 9, characterized in that The graph data processing module is further used for: Determine, based on the edge original data, an operation control corresponding to each non-leaf node in each second node; wherein, if a non-leaf node has a hidden child node, determine that the operation control corresponding to the non-leaf node is a first type of control; if a non-leaf node does not have a hidden child node, determine that the operation control corresponding to the non-leaf node is a second type of control; Based on the operation control corresponding to each non-leaf node, the operation control corresponding to each non-leaf node is displayed in the target graph, so that when a trigger operation is received for any operation control in the target graph, the target graph is updated and the updated target graph is displayed.
13. The device according to claim 12, characterized in that When the graph data processing module receives a trigger operation for any operation control in the target graph and updates the target graph, it is specifically configured to: Upon receiving a trigger operation for any operation control in the target graph, determining, based on the type of the target operation control targeted by the trigger operation, information to be updated corresponding to the target graph from at least one downstream branch of a target node corresponding to the target operation control, the information to be updated including at least one item of a node to be updated or an edge to be updated; The corresponding information in the target graph is updated according to the information to be updated, and the type of the operation control corresponding to the target node is updated.
14. The device according to claim 13, characterized in that When the type of the target operation control is the first type, the information to be updated is newly displayed information, and the graph data processing module determines, based on the type of the target operation control targeted by the trigger operation, the information to be updated corresponding to the target graph from at least one downstream branch of the target node corresponding to the target operation control, specifically for: Determine a child node of the target node as a newly added display node, and determine a first edge between the target node and the child node of the target node as a newly added display edge; Determining, based on display attributes of the other nodes and the corresponding pointing relationships of the other nodes in the original edge data, a newly added display node from the other nodes, where the other nodes are nodes in the at least one downstream branch other than child nodes of the target node; The newly added display information includes each newly added display node, a first edge between the target node and a child node of the target node, and a first edge between each newly added display node; When the graph data processing module updates the corresponding information in the target graph according to the information to be updated, it is specifically configured to: The corresponding information in the target map is updated according to the newly added display information.
15. The device according to claim 13, characterized in that When the type of the target operation control is the second type, the information to be updated is information to be hidden. The graph data processing module, when determining, based on the type of the target operation control targeted by the trigger operation, from at least one downstream branch of the target node corresponding to the target operation control, the information to be updated corresponding to the target graph, is specifically configured to: If the child nodes of the target node do not have any other parent nodes other than the target node in the target graph, determining the child nodes of the target node in the target graph, the first edge between the target node and the child nodes of the target node, and the operation controls corresponding to the child nodes of the target node as information to be hidden; If each of the other nodes has the other parent node in the target graph, and the other parent node has a node of the second type of corresponding operation control, determining the first edge between the target node and the child node of the target node in the target graph as information to be hidden, and the other nodes are the other nodes in each node in the at least one downstream branch except the child node of the target node; When the graph data processing module updates the corresponding information in the target graph according to the information to be updated, it is specifically used to: The corresponding information in the target graph is updated according to the information to be hidden.
16. The device according to claim 9, characterized in that The graph data processing module is further used for: For each second node, upon receiving a delete operation for the second node, deleting the second node, and determining the in-degree of each node in the downstream nodes of the second node based on the original edge data; For each node in the downstream nodes of the second node, if the first degree of the node is equal to the in-degree of the node, delete the node; If the first degree of the node is less than the in-degree of the node, add 1 to the deletion count of the node. The first degree of the node is the sum of the deletion counts of all nodes in the upstream nodes of the node. For each first edge, upon receiving a deletion operation for any node connected to the first edge, the first edge is deleted.
17. An electronic device comprising a memory, a processor, and a computer program stored in the memory, wherein: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 8.
18. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
19. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Association map display method and device, computer equipment and storage medium
CN110377667A