A graph structure and SQL statement based stream processing method and system
By creating SQL nodes and generating SQL structure diagrams in stream processing operations, the problem of convenient management and maintenance of stream processing operations is solved, enabling intuitive management of multiple SQL statements and reducing the number of nodes.
Patent Information
- Application Number
- CN202511349958.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-09-22
AI Technical Summary
The existing technology for managing and maintaining stream processing services is not very convenient, especially when multiple SQL statements are converted into multiple graph nodes, making maintenance difficult.
By creating several SQL nodes, each corresponding to a SQL statement, and dragging and connecting them in the order of the calculation process, an SQL structure graph is generated. Combining the graph structure and SQL statements, the traditional graph nodes with single computing capabilities are replaced.
It enables intuitive management of stream processing services, reduces the number of nodes, and improves maintenance convenience.
Smart Images

Figure CN120849417B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a stream processing method, system and device based on graph structure and SQL statements and a medium. BACKGROUND
[0002] Stream processing is a real-time data stream analysis technology that realizes low-latency and high-throughput real-time computing by continuously processing dynamic data streams, and is widely used in financial risk control, Internet of Things monitoring and edge computing scenarios. In actual production environment, there are two common technical implementation routes for stream processing computing: one is to describe the stream processing business through SQL statements, but usually a SQL statement cannot completely describe the entire stream processing business, and can only be used as one link in describing the business process. In order to completely describe the entire stream processing business, multiple SQL statements are needed, which is difficult to manage intuitively. The second is to describe the stream processing business by using a graph. Graph description is more flexible than SQL statement description, and it can connect the data processing channels through dragging. Theoretically, the entire business process can be covered by one graph, but the computing power of the graph nodes is usually single. A stream processing process expressed by a SQL statement may need ten nodes in the corresponding graph rule, which can easily lead to too many graph nodes and is difficult to maintain.
[0003] In the prior art, the patent with application number 202111311866.0 discloses a stream data processing method, which determines each SQL command in the SQL statement as a node and each logical keyword (such as AND, OR, NOT, etc.) as an edge to generate a SQL graph to schedule and process stream data, thereby improving computing efficiency. In other words, this patent essentially determines each element in a single SQL statement as a node or an edge, and then converts the single SQL statement into a graph. As can be seen, in the case where multiple SQL statements are needed for stream processing business, it means that multiple SQL statements need to be converted into multiple graphs, and each graph contains a large number of nodes and edges, which makes it more difficult to manage and maintain. The patent with application number 202010676621.7 discloses a stream processing method, which directly configures a DAG graph based on a stream processing task, optimizes the DAG graph by matching high-order operators, and monitors the progress of the stream processing task without using SQL statements to reduce the cost of learning SQL for users. This is the scheme mentioned above that uses a graph to describe stream processing business, which has the problem of being difficult to maintain.
[0004] At present, there is no effective solution to the problem of how to improve the management and maintenance convenience of stream processing business in the related art. SUMMARY
[0005] Embodiments of the present application provide a stream processing method, system, device and medium based on a graph structure and SQL statements to at least solve the problem of how to improve the management and maintenance convenience of stream processing services in related technologies.
[0006] In a first aspect, the embodiments of the present application provide a stream processing method based on a graph structure and SQL statements, which comprises:
[0007] Based on the computing requirements of the stream processing service, a plurality of SQL nodes are created to meet the computing requirements, wherein one SQL node corresponds to one SQL statement;
[0008] Based on the computing flow of the stream processing service, the SQL nodes are connected in the order of the computing flow to generate a SQL structure diagram for completing the stream processing service.
[0009] In some embodiments, based on the computing requirements of the stream processing service, a plurality of SQL nodes are created to meet the computing requirements, wherein one SQL node corresponds to one SQL statement, which comprises:
[0010] Based on the computing requirements of the stream processing service, a plurality of SQL nodes are created to meet the computing requirements, wherein each SQL node is a node of a visual operation;
[0011] SQL statements are created for executing the stream processing service, wherein each SQL statement is a stream processing sub-rule describing one link in the stream processing service;
[0012] The SQL nodes and the SQL statements are associated and bound one by one, so that the SQL nodes have the ability to call the corresponding SQL statements to complete the stream processing service.
[0013] In some embodiments, based on the computing requirements of the stream processing service, a plurality of SQL nodes are created to meet the computing requirements, which comprises:
[0014] Based on the computing requirements of the current stream processing service, a plurality of SQL nodes are created to meet the computing requirements, and the exclusive data subscription pipeline of each SQL node is declared.
[0015] In some embodiments, the SQL nodes and the SQL statements are associated and bound one by one, so that the SQL nodes have the ability to call the corresponding SQL statements to complete the stream processing service, which comprises:
[0016] Based on the SQL statements, corresponding stream processing sub-rules are created;
[0017] The data pipeline of each of the stream processing sub-rules is defined as a dedicated data subscription pipeline of the corresponding SQL node, so that the SQL node has the capability of invoking the corresponding SQL statement to complete the stream processing service, wherein the dedicated data subscription pipeline is a memory data subscription pipeline of a dedicated topic.
[0018] In some embodiments, defining the data channel of each of the stream processing sub-rules as the dedicated data subscription pipeline of the corresponding SQL node comprises:
[0019] The data input of each of the stream processing sub-rules is associatedly bound to the data input of the corresponding SQL node, and the data output of each of the stream processing sub-rules is associatedly bound to the data output of the corresponding SQL node, so as to complete the definition of the data pipeline of all the stream processing sub-rules as the dedicated data subscription pipeline of the corresponding SQL node.
[0020] In some embodiments, based on the calculation flow of the stream processing service, the SQL nodes are connected in the order of the calculation flow to generate the SQL structure diagram for completing the stream processing service, which comprises:
[0021] Based on the calculation flow of the stream processing service, the SQL nodes are connected in the order of the calculation flow to obtain the data flow channel.
[0022] In the data flow channel, the data source is declared with the node name of the current SQL node as a prefix, and the data source is linked to the data output of the previous SQL node, that is, the stream processing sub-rule of the current SQL node directly obtains the data sent by the previous SQL node through the data pipeline, so as to generate the SQL structure diagram for completing the stream processing service.
[0023] In some embodiments, after the corresponding stream processing sub-rule is created based on the SQL statement, the method further comprises:
[0024] A life cycle management tag is added to the stream processing sub-rule, wherein the life cycle management tag is bound to the process of the corresponding SQL node.
[0025] After the stream processing service is completed through the generated SQL structure diagram, if the process of the SQL node inside the SQL structure diagram is closed, the stream processing sub-rule corresponding to the SQL node is triggered to be deleted together.
[0026] In a second aspect, the embodiments of the present application provide a stream processing system based on a graph structure and SQL statements, which is used to execute the method of the first aspect, and the system comprises a node creation module and a structure diagram generation module.
[0027] The node creation module is configured to create a plurality of SQL nodes for meeting the computing requirement of the stream processing service according to the computing requirement of the stream processing service, wherein one SQL node corresponds to one SQL statement.
[0028] The structure diagram generation module is configured to generate a SQL structure diagram for completing the stream processing service by dragging and connecting the SQL nodes in the order of the computing flow of the stream processing service.
[0029] In a third aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method of the first aspect when executing the computer program.
[0030] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program executable by a processor to implement the method of the first aspect.
[0031] Compared with the related art, the stream processing method, system, device and medium based on the graph structure and the SQL statement provided by the embodiments of the present application create a plurality of SQL nodes for meeting the computing requirement of the stream processing service according to the computing requirement of the stream processing service, wherein one SQL node corresponds to one SQL statement; the SQL nodes are dragged and connected in the order of the computing flow of the stream processing service to generate a SQL structure diagram for completing the stream processing service, which realizes the combination of the graph structure and the SQL statement, abstracts a single SQL statement into a corresponding single node in the graph structure, in other words, a plurality of SQL statements for completely describing the stream processing service can be stored in one structure diagram as a plurality of SQL nodes, which is convenient for intuitive management, and the SQL nodes replace the traditional graph nodes with single computing capability, greatly reduces the number of nodes required by the stream processing service, is easy to maintain, and solves the problem of how to improve the management and maintenance convenience of the stream processing service. BRIEF DESCRIPTION OF DRAWINGS
[0032] The accompanying drawings, which are included to provide a further understanding of the present application, constitute a part of the present application and illustrate the illustrative embodiments of the present application and their description serve to explain the present application, but do not constitute improper limitations on the present application. In the drawings:
[0033] Figure 1 is a step flowchart of the stream processing method based on the graph structure and the SQL statement according to the embodiments of the present application;
[0034] Figure 2 is a data flow diagram based on the SQL node according to the embodiments of the present application;
[0035] Figure 3 is a schematic diagram of an internal structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application. Based on the embodiments provided by the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort fall within the scope of the present application.
[0037] Obviously, the accompanying drawings in the following description are only some examples or embodiments of the present application, and for those of ordinary skill in the art, the present application can be applied to other similar scenarios without creative effort based on the accompanying drawings. In addition, it can be understood that although the efforts made in the development process can be complex and lengthy, for those of ordinary skill in the art related to the content disclosed in the present application, some design, manufacture or production changes based on the technical content disclosed in the present application are only routine technical means and should not be understood as insufficient disclosure of the content disclosed in the present application.
[0038] In the present application, the phrase "embodiments" means that the specific features, structures or characteristics described in conjunction with the embodiments can be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily mean the same embodiment, nor is it an independent or alternative embodiment to other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in the present application can be combined with other embodiments without conflict.
[0039] Unless otherwise defined, technical terms and scientific terms used in the present application shall have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terms "a", "an", "one", "this", and the like, as used in the specification herein, do not imply quantity of one, but rather denote the presence of at least one of something or unit. The terms "comprise", "comprising", "include", "including", "have", and "having" and the like, as used in the specification herein, are intended to cover the presence of one or more steps, or units, or components, or features, but do not exclude the presence of one or more other steps, units, components, or features. The terms "connect", "connected", "coupling", and the like, as used in the specification herein, are not limited to direct or physical connections, but can include indirect connections, such as electrical connections. The term "multiple" refers to two or more. The term "and / or" describes the associated relationship of the associated objects, which means that there can be three relationships, for example, "A and / or B" can mean that A exists alone, A and B exist together, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects. The terms "first", "second", "third", and the like, as used in the specification herein, are merely to distinguish similar objects, and do not represent a specific order of the objects.
[0040] The embodiment of the present application provides a stream processing method based on a graph structure and an SQL statement, Figure 1 is a step flow chart of the stream processing method based on the graph structure and the SQL statement according to the embodiment of the present application, as Figure 1 shown, the method comprises the following steps:
[0041] Step S102, based on the computing requirement of the stream processing service, creating a plurality of SQL nodes for meeting the computing requirement, wherein one SQL node corresponds to one SQL statement;
[0042] Step S102 specifically comprises the following steps:
[0043] Step S1021, based on the computing requirement of the stream processing service, creating a plurality of SQL nodes for meeting the computing requirement, wherein each SQL node is a node of visual operation;
[0044] Step S1021 specifically, based on the computing requirement of the current stream processing service, creating a plurality of SQL nodes for meeting the computing requirement, and declaring the exclusive data subscription pipeline of each SQL node.
[0045] Step S1022, creating an SQL statement for executing the stream processing service, wherein each SQL statement is a stream processing sub-rule describing one link in the stream processing service.
[0046] In step S1023, the SQL nodes are associated with the SQL statements one by one, so that the SQL nodes have the ability to call the corresponding SQL statements to complete the stream processing business.
[0047] In step S1023, the corresponding stream processing sub-rules are created based on the SQL statements; the data pipeline of the stream processing sub-rules is defined as the exclusive data subscription pipeline of the corresponding SQL nodes one by one, so that the SQL nodes have the ability to call the corresponding SQL statements to complete the stream processing business, wherein the exclusive data subscription pipeline is the memory data subscription pipeline of the exclusive topic. Preferably, the data input of the stream processing sub-rules is associated with the data input of the corresponding SQL nodes one by one, and the data output of the stream processing sub-rules is associated with the data output of the corresponding SQL nodes one by one, so as to complete the definition of the data pipeline of all stream processing sub-rules as the exclusive data subscription pipeline of the corresponding SQL nodes.
[0048] It should be noted that in the above steps S1021 to S1023, a new computing node, named SQL node, is designed according to the graph rule. Unlike the computing nodes in the common graph rule, the SQL node can directly accept a SQL statement as a parameter to describe the data processing flow. Figure 2 is a data flow diagram based on the SQL node according to the embodiment of the present application, as shown in Figure 2 The SQL node can be connected to any other node in the graph rule calculation, including other SQL nodes, by dragging, to form a data processing channel of the graph rule. In other words, it realizes the combination of ingenious graph structure and SQL statement, abstracts a single SQL statement into a corresponding single node in the graph structure, that is, multiple SQL statements which completely describe the stream processing business can be stored in a structure graph as multiple SQL nodes, which is convenient for intuitive management. At the same time, the SQL node replaces the traditional graph node with single computing ability, greatly reduces the number of nodes required for stream processing business, and is easy to maintain.
[0049] It is further needed to be explained that for step S1023, the data transmission between the sub-rules and the SQL nodes is connected by using the memory data subscription pipeline with specific topics. When the SQL node is created, the SQL node creates a declaration of the memory data subscription pipeline with the exclusive topic, and when the stream processing sub-rule is created, the data input and data output of the sub-rule are defined as the memory data subscription pipeline of the corresponding topic, so as to achieve the effect of connection. Specifically, after the stream processing sub-rule is created, the input and output of the sub-rule and the input and output of the SQL node (the memory data subscription pipeline of the exclusive topic) need to be connected, that is, the input of the SQL node is connected to the input of the sub-rule, and the output of the sub-rule is connected to the output of the SQL node, so that after the data in the graph rule is transferred to the SQL node, the SQL node transfers the data to the sub-rule for processing. It is further needed to be explained that the memory data subscription pipeline of the topic describes a real-time data subscription architecture based on memory. It logically isolates the data stream through the topic (message theme), and buffers or directly processes the data in the memory during the processing process.
[0050] Step S104, based on the calculation flow of the stream processing service, the SQL nodes are connected in the order of the calculation flow to generate the SQL structure diagram for completing the stream processing service.
[0051] Step S104 specifically includes the following steps:
[0052] Step S1041, based on the calculation flow of the stream processing service, the SQL nodes are connected in the order of the calculation flow to obtain the data flow channel;
[0053] Step S1042, in the data flow channel, the data source is declared with the node name of the current SQL node as a prefix, and the data source is linked to the data output of the previous SQL node, that is, the stream processing sub-rule of the current SQL node directly obtains the data sent by the previous SQL node through the data pipeline, to generate the SQL structure diagram for completing the stream processing service.
[0054] It should be noted that the stream processing sub-rule is essentially a sub-rule created by a SQL statement, and the SQL statement has a data source declaration, so it is necessary to ensure that the data source of the SQL statement corresponding to the sub-rule must be connected with the memory data subscription pipeline of the SQL node. In other words, the data source declaration in the SQL statement cannot use a real data source that has been defined in advance. In step S104, the current SQL node in the data flow channel declares a data source with its own node name as a prefix (the data source in the SQL statement of the sub-rule of the current SQL node must also be this name, otherwise an error will be reported in the verification stage), and the data source is a subscription pipeline of the same topic as the memory data subscription pipeline of the previous SQL node. In this way, the sub-rule of the current SQL node can obtain the data sent by the previous SQL node from the already established memory data subscription pipeline after being created.
[0055] Through the above steps in the embodiments of the present application, the combination of the ingenious graph structure and the SQL statement is realized, a single SQL statement is abstracted into a corresponding single node in the graph structure, in other words, a plurality of SQL statements for completely describing a stream processing service can be stored in a structure graph as a plurality of SQL nodes, which is convenient for intuitive management, and the SQL node is used to replace the traditional graph node with single computing capability, so that the number of nodes required by the stream processing service is greatly reduced, and the stream processing service is easy to maintain, thereby solving the problem of how to improve the management and maintenance convenience of the stream processing service.
[0056] It should be noted that the steps shown in the above process or the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0057] In some embodiments, after creating the corresponding stream processing sub-rule based on the SQL statement, the method further includes:
[0058] Adding a life cycle management tag to the stream processing sub-rule, wherein the life cycle management tag is bound to the process of the corresponding SQL node;
[0059] After completing the stream processing service through the generated SQL structure graph, if the process of the SQL node inside the SQL structure graph is closed, the stream processing sub-rule corresponding to the SQL node is triggered to be deleted together.
[0060] It should be noted that the stream processing sub-rule is essentially a sub-rule created by a SQL statement, and the life cycle of the sub-rule and the SQL structure Figure 1When the SQL structure diagram is created, the corresponding SQL node internally creates the child rule at the time of creation. When the SQL structure diagram is closed, the corresponding SQL node internally deletes the child rule at the time of closing. All child rules are marked with a special tag, which is used to identify that this is a child rule. When the process needs to start the rule after restarting, all rules need to be traversed, and the child rule is deleted from the storage first. Then the logic of restarting the original rule is followed, that is, the life cycle of the child rule must be managed by the corresponding SQL node.
[0061] The embodiment of the application provides a flow processing system based on a graph structure and an SQL statement, which is used for executing the method provided in the above embodiment, and the system comprises a node creation module and a structure diagram generation module.
[0062] The node creation module is used for creating a plurality of SQL nodes for meeting the calculation requirement according to the calculation requirement of the flow processing service, wherein one SQL node corresponds to one SQL statement.
[0063] The structure diagram generation module is used for dragging and connecting the SQL nodes according to the calculation flow of the flow processing service in the order of the calculation flow, and generating an SQL structure diagram for completing the flow processing service.
[0064] Through the node creation module and the structure diagram generation module in the embodiment of the application, the combination of the graph structure and the SQL statement is realized, a single SQL statement is abstracted into a corresponding single node in the graph structure, in other words, a plurality of SQL statements for completely describing the flow processing service can be stored in one structure diagram as a plurality of SQL nodes, which is convenient for intuitive management, and the SQL node is used to replace the traditional graph node with single calculation capability, so that the number of nodes required by the flow processing service is greatly reduced, and the flow processing service is easy to maintain, thereby solving the problem of how to improve the management and maintenance convenience of the flow processing service.
[0065] It should be noted that each of the above modules can be a functional module or a program module, which can be implemented by software or hardware. For the modules implemented by hardware, each of the above modules can be located in the same processor, or each of the above modules can be located in different processors in any combination.
[0066] The embodiment provides an electronic device, comprising a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the method embodiments.
[0067] Optionally, the electronic device can further comprise a transmission device and an input / output device, wherein the transmission device is connected with the processor, and the input / output device is connected with the processor.
[0068] Optionally, the electronic device further comprises a processor, a memory, a network interface, a display screen and an input device connected through a system bus. The processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the electronic device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement a stream processing method based on a graph structure and an SQL statement. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen. The input device of the electronic device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the electronic device, or an external keyboard, touchpad or mouse, etc.
[0069] It should be noted that the specific examples in the embodiments can refer to the examples described in the above embodiments and optional implementation manners, and the embodiments will not be described here.
[0070] In addition, in combination with the stream processing method based on the graph structure and the SQL statement in the above embodiments, the embodiments of the present application can provide a storage medium for implementation. The storage medium stores a computer program; the computer program is executed by the processor to implement any one of the stream processing methods based on the graph structure and the SQL statement in the above embodiments.
[0071] In one embodiment, Figure 3 is a schematic diagram of the internal structure of an electronic device according to the embodiments of the present application, as Figure 3 shown, an electronic device is provided, which can be a server, and the internal structure diagram thereof can be as Figure 3 shown. The electronic device comprises a processor, a network interface, an internal memory and a non-volatile memory connected through an internal bus, wherein the non-volatile memory stores an operating system, a computer program and a database. The processor is configured to provide computing and control capabilities, the network interface is configured to communicate with an external terminal through a network connection, the internal memory is configured to provide an environment for the operating system and the computer program to run, the computer program is executed by the processor to implement a stream processing method based on a graph structure and an SQL statement, and the database is configured to store data.
[0072] Those skilled in the art can understand that Figure 3 the structure shown in the above embodiments is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device can comprise more or fewer components than those shown in the diagram, or combine certain components, or have a different arrangement of components.
[0073] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiment methods. Any reference to memory, storage, database or other medium used in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0074] Those skilled in the art should understand that any combination of the technical features of the above-mentioned embodiments can be made, and in order to make the description simple, all possible combinations of the technical features in the above-mentioned embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.
[0075] The above-mentioned embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of the patent of the present application should be subject to the appended claims.
Claims
1. A method for stream processing based on graph structure and SQL statement, characterized in that, The method comprises: Based on the computing requirement of the stream processing service, a plurality of SQL nodes for meeting the computing requirement are created, wherein one SQL node corresponds to one SQL statement, comprising: based on the computing requirement of the current stream processing service, a plurality of SQL nodes for meeting the computing requirement are created, and the exclusive data subscription pipeline of each SQL node is declared, wherein each SQL node is a node of visual operation; SQL statements for executing the stream processing service are created, wherein each SQL statement is a stream processing sub-rule describing one link in the stream processing service; The SQL nodes are associated and bound with the SQL statements one by one, so that the SQL nodes have the ability to call the corresponding SQL statements to complete the stream processing service, comprising: based on the SQL statements, corresponding stream processing sub-rules are created; the data pipeline of the stream processing sub-rule is defined as the exclusive data subscription pipeline of the corresponding SQL node one by one, so that the SQL node has the ability to call the corresponding SQL statement to complete the stream processing service, wherein the exclusive data subscription pipeline is a memory data subscription pipeline of an exclusive topic; Based on the computing flow of the stream processing service, the SQL nodes are dragged and connected in the order of the computing flow to generate an SQL structure diagram for completing the stream processing service.
2. The method of claim 1, wherein, Defining the data channel of the stream processing sub-rule as the exclusive data subscription pipeline of the corresponding SQL node one by one comprises: Associating and binding the data input of the stream processing sub-rule with the data input of the corresponding SQL node one by one, and associating and binding the data output of the stream processing sub-rule with the data output of the corresponding SQL node one by one, to complete the definition of the data pipeline of all stream processing sub-rules as the exclusive data subscription pipeline of the corresponding SQL node.
3. The method of claim 2, wherein, Based on the computing flow of the stream processing service, the SQL nodes are dragged and connected in the order of the computing flow to generate an SQL structure diagram for completing the stream processing service, comprising: Based on the computing flow of the stream processing service, the SQL nodes are dragged and connected in the order of the computing flow to obtain a data flow channel; In the data flow channel, the data source is prefixed with the node name of the current SQL node and linked to the data output of the previous SQL node, that is, the stream processing sub-rule of the current SQL node directly obtains the data sent by the previous SQL node through the data pipeline, to generate an SQL structure diagram for completing the stream processing service.
4. The method of claim 1, wherein, After creating the corresponding stream processing sub-rule based on the SQL statement, the method further comprises: A life cycle management tag is added to the stream processing sub-rule, wherein the life cycle management tag is bound with the process of the corresponding SQL node; After completing the stream processing service through the generated SQL structure diagram, if the process of the SQL node inside the SQL structure diagram is closed, the stream processing sub-rule corresponding to the SQL node is triggered to be deleted together. 5.A stream processing system based on graph structure and SQL statement, characterized in that, The system is used for executing the method in any one of claims 1 to 4, and the system comprises a node creation module and a structure diagram generation module; The node creation module is used for creating a plurality of SQL nodes for meeting the calculation requirement of the stream processing service according to the calculation requirement of the stream processing service, wherein one SQL node corresponds to one SQL statement; The structure diagram generation module is used for dragging and connecting the SQL nodes according to the calculation flow of the stream processing service in the order of the calculation flow, and generating an SQL structure diagram for completing the stream processing service. 6.An electronic device comprising a memory and a processor, the electronic device comprising: The memory stores a computer program, and the processor is configured to run the computer program to execute the method in any one of claims 1 to 4.
7. A computer readable storage medium having stored thereon a computer program, characterized in that The program is executed by the processor to implement the method in any one of claims 1 to 4.
Citation Information
Patent Citations
A stream processing method and device
CN111897693B
Streaming data processing method and device
CN114356955A
Stream computing method, device and system
CN107678790A
Real-time processing system for sensing stream data
CN114372084A