A method for quickly running business paths based on graph databases
By searching for nodes and relationships in the graph database in the cloud server and using distributed computing to optimize business paths, the efficiency and fault tolerance issues of the graph database when processing business paths are solved, and fast and reliable business path operation is achieved.
Patent Information
- Application Number
- CN202211729889.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2042-12-30
AI Technical Summary
Existing graph databases have data redundancy, poor memory access locality, parallelism that changes with node in-and-out degrees, and distributed system consistency issues when processing business paths, resulting in the inability to run business paths efficiently and quickly.
By searching for nodes and relationships in a directed graph in the cloud server, distributed computing methods are used to run smart device association codes, optimizing business paths and avoiding path interruptions caused by exceptions.
It realizes rapid business path determination and operation based on graph database, improves fault tolerance and efficiency, and is suitable for large-scale industrial data processing.
Smart Images

Figure CN116049497B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to graph database technology, and more particularly to a method for quickly running business paths based on a graph database. Background Art
[0002] In networks with ever-increasing data volumes, an increasing number of large-scale application systems are building their underlying databases as graph databases. To improve the versatility and compatibility of graph databases, graph databases and their directed graphs are typically built based on a common template. Each directed graph also includes multiple nodes and directional edges between each two nodes. This massive amount of data is then stored in each node of the graph database, resulting in a very complex graph database architecture, often including, for example, billions of nodes or trillions of directional edges. Furthermore, for business path operations targeting specific business scenarios, the amount of data in the graph database is enormous, the data is fully redundant, and the structural relationships of the node data are complex, making it difficult to efficiently process the data in the graph database to run business paths.
[0003] When running business paths using graph databases based on traditional stand-alone systems or distributed MapReduce models, the relationships between data in the graph database are often overlooked, and the business path characteristics specific to specific business scenarios are not fully understood. Consequently, business paths cannot be run efficiently and quickly based on graph databases. To address massive industrial graph data, effective and mature stand-alone graph algorithm libraries have been established, including BG (Byte Graph), LEAD, NetworkX, JDSL, and Standford GraphBase. These libraries implement a tree-like, integrated graph framework based on graph model design, which can reduce the difficulty of model construction and improve the efficiency of business path execution. However, these algorithm libraries essentially only provide an optimized graph database. While they can more efficiently utilize graph databases to run businesses, they cannot meet the fault tolerance requirements of industrial scenarios. Furthermore, these algorithm libraries suffer from significant memory access locality issues, which can lead to serious performance issues for large-scale industrial data.
[0004] Therefore, the main problems with the current method of using graph databases to run business paths include: the data in the graph database is mostly iteratively calculated, the memory access locality is poor, and the business path cannot be quickly run; the computational amount of each node in the directed graph of the graph database is very small; the parallelism of the business path process changes with the node's in-and-out degree; distributed system locality or consistency issues; the high error rate of the distributed system causes the business path to be unable to operate normally; there is currently no general distributed computing system that can process arbitrarily large-scale graph data.
[0005] Against the backdrop of increasingly mature high-performance computing, cloud computing, and distributed architecture technologies, a method for quickly running business paths based on graph databases is possible by quickly adjusting and determining effective business paths by searching for the relationships between various nodes and node data in a directed graph in a cloud server, and by distributing node association codes at the edge of smart devices. Summary of the Invention
[0006] Therefore, in response to the above problems, the present disclosure provides a method for quickly running business paths based on a graph database, which enables the rapid determination of effective business paths for specific business scenarios, and ensures the rapid operation of the entire business path based on the relationship between node data. It uses a distributed computing method to run the code associated with smart devices, thereby avoiding the inability of business paths to operate normally due to various exceptions.
[0007] According to some embodiments of the present disclosure, a method for quickly running a business path based on a graph database is provided, wherein the graph database includes multiple directed graphs, each directed graph includes multiple nodes and directional edges between each two nodes, and the method is characterized in that the method includes the following steps:
[0008] S1. Based on the directed graph selected by the user, find the starting node and the ending node in the directed graph, run the code associated with the starting node in the host computer or cloud server to start the smart device, thereby starting the service path;
[0009] S2. Run the codes associated with the nodes following the starting node in sequence along the direction edges to control the execution of actions of the smart device;
[0010] S3. When the node following the starting node is a selection node associated with an activation configuration condition and has multiple adjacent nodes following it, the configuration information of each adjacent node following the selection node is compared with the activation configuration condition, the adjacent nodes whose configuration information is consistent with the activation configuration condition and the selection node are activated to determine the service path, and the code associated with the activated adjacent nodes is run to control the execution of the action of the corresponding smart device;
[0011] Repeat steps S2 to S3 until the termination node is reached, and the first selection nodes appearing after the start node have been activated. Run the code associated with the termination node in the host computer or cloud server to shut down the smart device, thereby ending the service path.
[0012] According to some embodiments of the present disclosure, step S1 includes establishing a judgment condition table consisting of n rows and n columns based on the number of n nodes in the directed graph and the directional edges corresponding to each node, where each row in the judgment condition table corresponds to the distribution of adjacent nodes in front of the current node, and the row corresponding to the starting node is empty.
[0013] According to some embodiments of the present disclosure, each column in the judgment condition table corresponds to the distribution of adjacent nodes following the current node, wherein the column corresponding to the termination node is empty.
[0014] According to some embodiments of the present disclosure, when a selection node is activated, only the values of the activated adjacent nodes in the column corresponding to the current selection node in the judgment condition table are updated.
[0015] According to some embodiments of the present disclosure, the judgment condition table is traversed to determine whether all selection nodes that appear for the first time after the start node have been activated.
[0016] According to some embodiments of the present disclosure, when the code associated with a node is completed, the value in the row corresponding to the current node in the judgment condition table is updated.
[0017] According to some embodiments of the present disclosure, step S1 includes, when there are multiple starting nodes, running the code associated with each starting node in parallel.
[0018] According to some embodiments of the present disclosure, step S1 includes deploying multiple host computers or cloud servers so that codes associated with multiple starting nodes are executed in a distributed computing manner.
[0019] According to some embodiments of the present disclosure, the cloud server includes a cloud server and an edge cloud server. The cloud server is configured to be able to find and determine the starting node, ending node, and selection node in a directed graph, and the edge cloud server is configured to be able to run node-associated code.
[0020] According to some embodiments of the present disclosure, the cloud server is configured to compare the configuration information of each adjacent node after the selected node with the activation configuration conditions, determine the adjacent nodes whose configuration information is consistent with the activation configuration conditions, and activate the determined adjacent nodes and the selected node.
[0021] According to some embodiments of the present disclosure, when the code execution calculation associated with a node is completed, the thread of the code execution is terminated in the host computer or cloud server.
[0022] According to some embodiments of the present disclosure, a directed graph is established by disassembling a standard process flow of a business scenario based on a general template of a graph database.
[0023] According to some embodiments of the present disclosure, nodes indicate smart devices including robots and scanners, and directional edges indicate operational relationships between smart devices.
[0024] On the basis of conforming to the common sense in this field, the above-mentioned preferred embodiments can be arbitrarily combined to obtain the preferred embodiments of the present disclosure.
[0025] The positive and progressive effects of the above-mentioned embodiments of the present disclosure are:
[0026] 1. Based on a graph database and targeting specific business scenarios, it queries the node types and relationships between nodes in a directed graph while running the code associated with the nodes, thereby quickly running business paths;
[0027] 2. By reading the activation configuration condition information of the selected node in the directed graph and comparing it with the configuration information of the adjacent nodes, the actual service path is adjusted and optimized to avoid the operation of unnecessary nodes, thereby ensuring the fast operation of the service path;
[0028] 3. Use distributed computing methods to run the codes associated with each node, thereby improving the fault tolerance of the business path operation and ensuring the smooth operation of the entire business path. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The above objects and other objects, features and advantages of the present disclosure will be more fully understood by referring to the following illustrative and non-limiting detailed description of exemplary embodiments of the present disclosure when taken in conjunction with the accompanying drawings.
[0030] Figure 1 A schematic diagram of a system 100 for implementing a method for quickly running a business path based on a graph database according to a preferred embodiment of the present disclosure is shown.
[0031] Figure 2 A schematic diagram of a directed graph in a graph database according to a preferred embodiment of the present disclosure is shown.
[0032] Figure 3 A flowchart of a method for quickly running a business path based on a graph database according to a preferred embodiment of the present disclosure is shown.
[0033] Figure 4 Shows the use of Figure 3 Schematic diagram of the business path for quickly running the method in.
[0034] Figure 5 A schematic block diagram of a smart device that can be used to implement an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0035] The present disclosure will become apparent from the detailed description given below. The detailed description and specific embodiments disclose preferred embodiments of the present disclosure only by way of example, thereby fully conveying the scope of the present disclosure to those skilled in the art. Based on the guidance in the detailed description, those skilled in the art will understand that changes and modifications can be made within the scope of the present disclosure. The present disclosure can be implemented in other forms and should not be construed as being limited to the embodiments disclosed herein. For clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0036] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to." Unless otherwise stated, the term "or" means "and / or." The term "based on" means "based, at least in part, on." The terms "one example embodiment" and "an embodiment" mean "at least one example embodiment." The term "another embodiment" means "at least one additional embodiment." Other explicit and implicit definitions may be included below.
[0037] As described above, traditional solutions for running business paths based on graph databases cannot quickly run business paths based on the relationships between data and node types in the graph database, and require a large amount of computing and storage resources to run the associated codes in the nodes of the directed graph.
[0038] In order to at least partially solve one or more of the above-mentioned problems and other potential problems, an example embodiment of the present disclosure proposes a solution for quickly running a business path based on a graph database. In this solution, based on a directed graph selected by a user, the starting node and the ending node in the directed graph are searched, and the code associated with the starting node is run in the host computer or cloud server to turn on the smart device, thereby starting the business path; the code associated with the nodes after the starting node is run in sequence according to the direction edge to control the action execution of the smart device; and when the node after the starting node is a selection node, the configuration information of each adjacent node after the selection node is compared with the activation configuration condition, the adjacent nodes and the selection node whose configuration information is consistent with the activation configuration condition are activated to determine the business path, and the code associated with the activated adjacent nodes is run to control the action execution of the corresponding smart device; the above steps are repeated until the end node is reached, and the selection nodes that appear for the first time after the starting node have been activated, and the code associated with the end node is run to turn off the smart device, thereby ending the business path.
[0039] This solution can adjust and confirm the optimal business path based on the node types and position relationships in the directed graph, and run the code associated with the smart device to control the smart device to perform actions according to the optimal business path. Therefore, the present disclosure can quickly run business paths using a graph database.
[0040] Hereinafter, specific examples of this solution will be described in more detail with reference to the accompanying drawings.
[0041] exist Figure 1 FIG. 1 is a schematic diagram of a system 100 for implementing a method for rapidly running a business path based on a graph database according to a preferred embodiment of the present disclosure. Figure 1 As shown in FIG, the system 100 includes a cloud server 110, a network 120, and a smart device 130. The cloud server 110 and the smart device 130 can exchange data through the network 120 (eg, the Internet).
[0042] The cloud server 110 includes, for example, but is not limited to, a server computer, a multi-processor system, a mainframe computer, a distributed computing environment including any of the above systems or devices, etc. In some embodiments, the cloud server 110 may have one or more processing units 114, including specialized processing units such as a graphics processing unit (GPU), a field programmable gate array (FPGA), and an application-specific integrated circuit (ASIC), as well as general-purpose processing units such as a central processing unit (CPU).
[0043] The cloud server 110 may be, for example, a data storage for providing a graph database 114. Specifically, the cloud server 110 may include at least one processor 112 and at least one memory coupled to the at least one processor 112, wherein the memory stores a plurality of graphs such as Figure 2 The directed graph database 114 shown, each directed graph is based on a general template of the graph database 114 and is established by disassembling a standard process flow of a business scenario, and includes multiple nodes and directional edges between every two nodes.
[0044] In this article, a directed graph refers to a single-connected acyclic directed graph, on which the nodes are classified into different types. For example, a node with no other nodes or directional edges before it is classified as a starting node, a node with no other nodes or directional edges after it is classified as a terminating node, and a node associated with an activation configuration condition and having multiple adjacent nodes thereafter is classified as a selection node. Each single-connected acyclic directed graph includes a determined starting node and a terminating node, and the business logic running according to the directed graph is only one-way from the starting node to the terminating node. Each node is also associated with an executable code that can control the execution of the action of the smart device 130.
[0045] For example, upon confirming a specific directed graph in the graph database 114 corresponding to a business scenario, the cloud server 110 is configured to traverse the nodes and directional edges of the stored directed graph to establish a judgment condition table; and to determine the starting node, ending node, and selected node in the directed graph to determine a business path that matches the specific business scenario. The cloud server 110 is further configured to compare the configuration information of each adjacent node after the selected node with the activation configuration condition, determine the adjacent nodes whose configuration information is consistent with the activation configuration condition, and activate the determined adjacent nodes and the selected node.
[0046] Smart devices 130 include, but are not limited to, users' mobile phones, computers, robots, smart devices equipped with scanners, etc., and are used to perform actions associated with the business system. Smart device 130 may be an edge server that executes code associated with the business system and provides the operation result data and its own execution action data to the cloud server 110 via the network 120. In addition, the system 100 deploys multiple smart devices 131, 132, 133 or edge servers, so that the codes associated with multiple nodes can be run in a distributed computing manner. Note that in this article, the cloud server 110 may be a part of the smart device 130 or may be independent of the smart device 130. The specific structure of the smart device 130 may be, for example, combined as follows Figure 5 As stated.
[0047] The following will be combined Figures 2 to 4 A method for quickly running a business path based on a graph database according to the present disclosure is described. Figure 3 FIG. 3 is a flow chart showing a method 300 for quickly running a business path based on a graph database according to a preferred embodiment of the present disclosure. It should be understood that the method 300 can be implemented in Figure 5 The smart device 500 described above can also be used. Figure 1 The method 300 is executed at the described cloud server 110. It should be understood that the method 300 may further include additional actions not shown and / or may omit actions shown, and the scope of the present disclosure is not limited in this respect.
[0048] At step 301 , the cloud server 110 confirms the directed graph in the graph database 114 that matches the specific business scenario, and the confirmation may be manually activated.
[0049] Regarding the graph database 114, it includes multiple directed graphs, and each directed graph includes multiple nodes and multiple edges. Each node is associated with a node identifier, and each edge is associated with an edge identifier. For example, a node indicates an entity, such as a robot, a robotic arm, a scanner, or a machining center, and a directional edge indicates the relationship between associated entities, such as an operating sequence relationship. Nodes can be associated with attributes to describe various characteristics of the nodes, such as selecting nodes associated with activation configuration conditions. Edges have labels, and edges also have directions, namely directional edges. The storage structure of data in traditional relational databases is a table structure, and the graph database 114 stores a graph structure. In the graph database 114, the relationship between data and data constitutes a graph structure through nodes and relationships. Figure 2 A directed graph (single-connected acyclic directed graph) according to some embodiments is shown, where nodes represent components and directed edges between nodes represent the execution order between two components.
[0050] After manual activation confirmation, the cloud server 110 traverses the directed graph in the activated confirmed graph database, and establishes a judgment condition table consisting of n rows and n columns based on all nodes in the directed graph and the directional edges corresponding to each node. The judgment condition table starts from row 0 and column 0. Each row in the judgment condition table corresponds to the distribution of the adjacent nodes in front of the current node, and the row corresponding to the starting node is empty. In addition, each column in the judgment condition table corresponds to the distribution of the adjacent nodes behind the current node, and the column corresponding to the ending node is empty. For example, for Figure 2 For the single-connected acyclic directed graph shown in FIG. 1 , the cloud server 110 establishes a judgment condition table as shown in Table 1 below.
[0051] Table 1:
[0052]
[0053]
[0054] As shown in Table 1, in the judgment condition table, 1-11 in each row represents the distribution of the adjacent nodes before the current node, and 1-11 in each column represents the distribution of the adjacent nodes after the current node. An empty cell indicates that the node in the column is not adjacent to the node in the row. For example, the data in the cell in the 3rd row of the 2nd column is empty, which means that node 3 is not the adjacent node after node 2, and node 2 is not the adjacent node before node 3. The value 1 in the cell indicates that the node in the column is adjacent to the node in the row. For example, the cell values in the 2nd and 3rd rows of the 1st column are both 1, which means that node 2 and node 3 are adjacent nodes after node 1, and node 1 is the adjacent node before node 2 and node 3.
[0055] As can be seen from Table 1, the data in the row where node 1 is located is empty, and node 1 is Figure 2 The data in the column where node 11 is located is empty. Figure 2 At the same time, whether a node is a selection node can be determined based on whether the number of adjacent nodes in the column where the node is located is greater than 1 and whether the node is associated with an activation configuration condition. For example, in Table 1, the number of adjacent nodes in the column where node 4 is located is greater than 1 and both are associated with an activation configuration condition. Therefore, node 4 is a selection node. At the same time, although the number of adjacent nodes in the columns where nodes 3 and 8 are located is greater than 1, they are not associated with an activation configuration condition. Therefore, node 3 is not a selection node.
[0056] At step 302 , the cloud server 110 finds the start node and the end node in the directed graph, and runs the code associated with the start node to turn on the smart device, thereby starting the service path.
[0057] After the cloud server 110 determines the starting node based on the judgment condition table, it can activate the starting node and read the code associated with the starting node, run the associated code and send a control instruction to the smart device, or transmit the code associated with the starting node to the host computer or smart device to run the associated code, thereby changing the state of the smart device, such as powering on the smart device, thereby controlling the start of the smart device and starting the operation of the business path.
[0058] In some examples, a directed graph has multiple starting nodes. During the execution of a business path, each starting node represents a thread. Multiple starting nodes represent multiple threads launched in parallel on a host computer or cloud server. When the code associated with a node completes execution, the thread executing the code ends on the host computer or cloud server.
[0059] At step 303 , the cloud server 110 sequentially runs the codes associated with the nodes following the start node along the direction edge to control the execution of actions of the smart device.
[0060] Alternatively, when the code associated with the node is finished running, the value in the row corresponding to the current node in the judgment condition table is updated, for example, the value 1 in the cell is modified to the value 2. In this way, the value 2 in the cell indicates that the node in the column and the node in the row are in an adjacent positional relationship, and the running result of the code associated with the node in the column meets the activation condition of the node in the row. For example, if the value in the cell of the 2nd column and the 4th row is 2, it means that the running result of the code associated with node 2 meets the activation of node 4, so the business path runs to node 4. Exemplarily, in the judgment condition table, if all 1s in the 8th row are changed to 2, node 8 is activated and can run. In this way, during the business operation, it is also possible to flexibly judge whether the next node is activated and how to run it according to the actual running results of the previous node operation.
[0061] Alternatively, each time a node is finished running, the judgment condition table can be updated, and all 1s in the column where this node is located can be changed to 2s. Then, the changed rows are triggered to query whether all 1s in the current row have been changed to 2s. If so, the code associated with the node where the current row is located can be run.
[0062] At steps 304 and 305, when the cloud server 110 reads that the node after the starting node is a selection node associated with an activation configuration condition and followed by multiple adjacent nodes, such as node 4, the cloud server 110 compares the configuration information associated with each adjacent node after the selection node, namely node 7 and node 8, with the activation configuration condition respectively, activates the adjacent nodes whose configuration information is consistent with the activation configuration condition, such as node 8, and selects node 4 to determine the business path, and runs the code associated with the activated adjacent node 8 to control the action execution of the corresponding smart device.
[0063] Exemplarily, cloud server 110 includes a cloud server and an edge cloud server. The cloud server can establish a judgment condition table and, based on the judgment condition table, search and determine the starting node, ending node, and selection node in the directed graph according to the above method. The edge cloud server is configured to run the code associated with each node. Furthermore, when the previous node is executed, the cloud server can specify the edge cloud server address as a parameter when activating the next node to run, thereby specifying either a smart device or an edge server to execute the code.
[0064] The cloud server can also find the adjacent nodes after the selected node, compare the configuration information of each adjacent node after the selected node with the activation configuration conditions, determine the adjacent nodes whose configuration information is consistent with the activation configuration conditions, and activate the determined adjacent nodes and the selected node. Figure 2 The value in the cell in the 4th column and 8th row changes from 1 to 2, but the value in the 4th column of node 7 remains unchanged. This indicates that the configuration information at node 8 matches the activation configuration conditions of node 4, and node 8 is activated. However, the configuration information at node 7 does not match the activation configuration conditions of node 4, and node 7 is not activated. This reconfirms the valid service path and avoids the execution of unnecessary node-related code, thereby expediting service path execution.
[0065] At step 306, the cloud server 110 determines whether the adjacent node is a termination node. If not, steps 302 to 305 are repeated until the termination node is found. For example, the cloud server 110 determines whether the node is a termination node by determining whether the column where the node is located in the condition table is empty.
[0066] When cloud server 110 confirms that it has reached the end node, in step 307, cloud server 110 determines whether all selection nodes that appear for the first time after the start node have been activated. If not, steps 302 to 306 are repeated. For example, cloud server 110 determines whether a node is a selection node by determining whether there are more than one cells with a value of 1 in the column containing the node in the condition table. Furthermore, cloud server 110 determines whether the node is the first selection node that appears after the start node by determining whether the cells in the row containing the node and the column containing the previous selection node are empty.
[0067] When the cloud server 110 confirms that it has reached the end node and the first selection node after the start node has been activated, at step 308, the cloud server 110 runs the code associated with the end node and sends the control instruction to the smart device or uploads the associated code to the host computer or smart device to run to control the smart device, thereby terminating the service path and quickly completing the following steps: Figure 4 Operation of the valid business path shown.
[0068] The method for quickly running business paths based on a graph database according to the contents of the present disclosure can utilize the data associated with each node for distributed computing, multiple servers for parallel computing, query the directed graph on the cloud server, and the computing server runs the code associated with the specific node on different edge servers, thereby reducing the memory and CPU occupancy requirements for the same machine. Moreover, each node takes on the business of running its own node, so the computing power of the edge server is fully utilized, and the free adjustment of parallelism can be solved. When the degree of entry and exit is increased, there is no need to modify the computing framework. In addition, when the edge server or smart device fails to run the code, the distributed computing can be retried, and you can choose to restart from a certain node, which can be tentative, with high fault tolerance. It can effectively solve the parallel computing problems encountered in industrial application scenarios through the distributed computing framework.
[0069] The method for quickly running a business path based on a graph database according to the contents of the present disclosure can be used to establish a microservice architecture, wherein the data base uses a graph database, and the microservice architecture includes front-end services, back-end services, framework services, and component libraries. The front-end service uses the Vue framework, the back-end service uses the Java springboot framework, and the framework service uses Python's gunicorn and the message queue Kafka to support high-concurrency framework implementation. The method for quickly running a business path based on a graph database according to the contents of the present disclosure can also be used to quickly carry out tooling modular design software development, intelligent flexible detection line scenario development, etc., extract the mechanisms in the design process and the detection process into code, store the code snippets in each node of the directed graph, and use this method to calculate each node. This method can also be used to develop a low-code development platform, by dragging and dropping to configure the front-end page, and configuring a workflow path, generating a custom interface, and then generating a platform.
[0070] Specifically, using the method disclosed in the present invention to quickly run the business path includes first splitting the detailed business according to its own business logic for each business scenario, and building a directed graph structure, and writing the split detailed business into executable code blocks or interfaces configured on the corresponding nodes of the directed graph. Next, the business is run according to the directed graph structure. Every time the directed graph runs to a node, the code configured for the node is executed. After executing the current node, the subsequent node is executed according to the direction of the edge. The subsequent node to be executed next can also be judged based on the current real-time execution result to select execution.
[0071] Alternatively, for specific business scenarios, multiple sub-directed graphs can also be included in the selected directed graph. For example, in the intelligent flexible detection line scenario, three intelligent devices are included: a host computer, a scanner, and a locator, and each intelligent device has its corresponding directed graph structure, which describes its specific operating logic and route. The detection plan is triggered and activated by the host computer, and the host computer splits the decision logic into common component nodes. Each node is equipped with an executable Python code block, such as a component for initializing and starting the robot, a component for data format conversion, a component for detecting a problem and an alarm, etc.
[0072] In this example of the intelligent flexible detection line scenario, the host computer clicks "Run" to execute the code associated with the starting node and start the scanner and locator at the same time. Then, the code associated with the node after the starting node is run along the direction edge to drive the moving car carrying the scanner and the moving car carrying the locator to the specified position. This process also includes determining the actual running path of the moving car by selecting a node. If the directed graph includes different execution paths, for example, after selecting a node, it includes single point, straight line, circle, stationary, and parallel inspection nodes. For example, the straight-line running business path of the moving car includes component nodes such as the moving car going straight, swinging the arm, stopping the moving car, and charging the moving car, the host computer will compare the configuration information of the selected node with the adjacent nodes thereafter, determine the effective moving business path of the moving car, and execute the node-associated code in the business path in sequence; then, the scanner will first execute the code associated with the detection plan node according to its corresponding directed graph, and calculate the effective path for the scanner to run according to the selected parts and scene environment during the detection through the selected nodes in its directed graph. At this time, after entering the detection business path, wait for the locator to send more detailed positioning information to correct the movement of the robot arm, and then perform the detection again until it reaches the detection termination node and the detection ends.
[0073] In general, the method for quickly running business paths based on a graph database according to the content of the present disclosure is based on the graph database. On the one hand, it queries the node relationship in the directed graph while running the node association code, and performs rapid propagation of node operation. This method is based on the single-connected directed graph of the graph database. According to the needs of scenarios such as intelligent bodies and production lines, it formulates support for parallel computing, distributed computing, support for selective bifurcation and logical bifurcation, support for time control, rapid propagation, dynamic management, and no performance waste; on the other hand, it can be based on the implementation architecture of cloud-based walking and computing (i.e., querying nodes and node relationships while executing node association code), which is divided into front-end services, back-end services, framework services and component services, among which the framework service includes walking services, computing services, scheduling between walking services and computing services, etc., to establish a microservice architecture system that supports high concurrency, high reliability and high availability. In addition, the system supports distributed storage and distributed computing architectures such as distributed cache, distributed database, and distributed file system to improve storage and computing performance. This method can realize a general operation framework for industrial business paths that meets many scenarios of modern intelligent manufacturing based on the optimization algorithm based on the graph database. The framework principle is clear and easy to implement, realizing a new general business operation framework in the industrial field.
[0074] The present disclosure has at least the following advantages: it is applicable to intelligent entities, production lines and future industrial control scenarios and platforms with data as the core; it supports parallel computing, selective bifurcation and logical bifurcation through graph database storage, time control, rapid propagation, dynamic management, and the control process is simple and convenient, which is convenient for engineering reference; through cloud control scenarios, computing is deployed to the edge side, supporting high concurrency, high reliability, and high availability, and supporting distributed storage and distributed computing architectures such as distributed cache, distributed database, and distributed file system, which broadens the application scenarios; the auxiliary software involved is low in cost, easy to use and promote on a large scale, and can be expanded according to existing scenarios, and all intelligent device components support reuse, strong versatility, and easy to promote. The method according to the present disclosure is based on data as the core, based on industrial neural networks, and computing while walking, supporting parallel computing and distributed computing. It specifically involves intelligent devices, production lines, and rapid application development platforms with data as the core, which can provide the underlying framework of future industrial control, factory value trading platform and industrial data master machine, and realize the versatility of industrial classic scenarios and other scenarios.
[0075] Figure 5 1 shows a schematic block diagram of an example smart device 500 that can be used to implement embodiments of the present disclosure. Figure 1 The smart device 130 shown can be implemented by a smart device 500. As shown, the smart device 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to the computer execution code (i.e., executable code) stored in a read-only memory (ROM) 502 or the computer execution code loaded from a storage unit 508 into a random access memory (RAM) 503. In the random access memory 503, various programs and data required for the operation of the smart device 500 can also be stored. The central processing unit 501, the read-only memory 502, and the random access memory 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0076] Multiple components in the smart device 500 are connected to the input / output interface 505, including: an input unit 506, such as a keyboard, mouse, microphone, etc.; an output unit 507, such as various types of displays, smart devices, etc.; a storage unit 508, such as a magnetic disk, optical disk, etc.; and a communication unit 509, such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the smart device 500 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0077] The various processes and procedures described above may be executed by the central processing unit 501. For example, in some embodiments, the method steps may be implemented as a computer software program tangibly contained in a machine-readable medium, such as the storage unit 508. In some embodiments, part or all of the computer executable code may be loaded and / or installed on the smart device 500 via the read-only memory 502 and / or the communication unit 509. When the code is loaded into the random access memory 503 and executed by the central processing unit 501, one or more actions of the method described above may be performed.
[0078] The present disclosure relates to methods, apparatuses, systems, electronic devices, computer-readable storage media, and / or computer program products. The computer program products may include computer-readable executable codes for executing various aspects of the present disclosure.
[0079] A computer-readable storage medium can be a tangible device that can hold and store code used by a code execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punched card or raised structure in a groove on which code is stored, and any suitable combination thereof. As used herein, a computer-readable storage medium is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through an electrical wire.
[0080] The computer-readable executable code described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge computers. The network adapter card or network interface in each computing / processing device receives the computer-readable executable code from the network and forwards the computer-readable executable code to be stored in the computer-readable storage medium in each computing / processing device.
[0081] The computer executable code or computer instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, Python, and conventional procedural programming languages such as "C" or similar programming languages. The computer readable executable code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, various aspects of the present disclosure are implemented by utilizing state information of a computer-readable executable code to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), which can execute the computer-readable executable code.
[0082] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable executable code.
[0083] These computer-readable executable codes can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device is generated to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable executable codes can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture, which includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0084] The computer-readable executable code may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are executed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0085] The flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, code segment or part of an instruction, and the module, code segment or part of the instruction contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.
[0086] While various embodiments of the present disclosure have been described above, the foregoing description is intended to be illustrative, non-exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or technological improvements in the marketplace, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for quickly running a business path based on a graph database, wherein the graph database includes multiple directed graphs, each directed graph includes multiple nodes and directional edges between each two nodes, characterized in that: The method comprises the following steps: S1. Based on a directed graph selected by a user, searching for a start node and an end node in the directed graph, and running a code associated with the start node in a host computer or a cloud server to enable a smart device, thereby starting a service path; S2. Run the codes associated with the nodes following the starting node in sequence along the direction edge to control the execution of actions of the smart device; S3. When the node following the starting node is a selection node associated with an activation configuration condition and followed by multiple adjacent nodes, the configuration information of each adjacent node following the selection node is compared with the activation configuration condition, the adjacent nodes whose configuration information is consistent with the activation configuration condition and the selection node are activated to determine the service path, and the code associated with the activated adjacent nodes is executed to control the execution of actions of the corresponding smart devices; Repeat steps S2 to S3 until the termination node is reached, and the selection nodes that appear for the first time after the start node have been activated. Run the code associated with the termination node in the host computer or cloud server to shut down the smart device, thereby ending the service path.
2. The method according to claim 1, characterized in that The step S1 comprises: A judgment condition table including n rows and n columns is established according to the number of n nodes in the directed graph and the directional edge corresponding to each node, wherein each row in the judgment condition table corresponds to the distribution of adjacent nodes in front of the current node, and the row corresponding to the starting node is empty.
3. The method according to claim 2, characterized in that Each column in the judgment condition table corresponds to the distribution of adjacent nodes following the current node, wherein the column corresponding to the termination node is empty.
4. The method according to claim 3, characterized in that When a selection node is activated, only the values of the activated adjacent nodes in the column corresponding to the current selection node in the judgment condition table are updated.
5. The method according to claim 4, characterized in that The judgment condition table is traversed to determine whether all selection nodes that appear for the first time after the start node have been activated.
6. The method according to claim 3, characterized in that When the code associated with the node is finished running, the row corresponding to the current node in the judgment condition table is updated.
7. The method according to claim 1, characterized in that The step S1 comprises: When there are multiple starting nodes, the code associated with each starting node is executed in parallel.
8. The method according to claim 7, characterized in that The step S1 comprises: Deploy multiple host computers or cloud servers so that the codes associated with multiple starting nodes can run in a distributed computing manner.
9. The method according to claim 1, characterized in that The cloud server includes a cloud server and an edge cloud server. The cloud server is configured to be able to search and determine the starting node, the ending node, and the selection node in the directed graph, and the edge cloud server is configured to be able to run the code associated with the node.
10. The method according to claim 9, characterized in that The cloud server is configured to compare the configuration information of each adjacent node after the selected node with the activation configuration conditions, determine the adjacent nodes whose configuration information is consistent with the activation configuration conditions, and activate the determined adjacent nodes and the selected node.
11. The method according to claim 1, wherein When the code execution and calculation associated with the node are completed, the thread of the code execution is terminated in the host computer or cloud server.
12. The method according to claim 1, characterized in that The directed graph is based on a general template of a graph database and is established by disassembling the standard process flow of a business scenario.
13. The method according to claim 1, wherein The nodes indicate intelligent devices including robots and scanners, and the directional edges indicate the operational relationships between the intelligent devices.
Citation Information
Patent Citations
Multi-round dialogue processing method and device, electronic equipment and storage medium
CN111753061A
Determining application path for execution by bot
US20220004937A1