Method, System, Device, and Storage Medium for Pushing a Logical Flow Table to a Client

Subscribe to the OVN database through the native OVSDB protocol and use kubernetes' configmap to store logical flow tables, dynamically modify client subscriptions and push OVN logical flow tables in real time through gRPC or WebSocket protocol, solving the problems of repeated development of multiple teams and poor real-time performance in the existing technology, realizing low operation and maintenance costs and efficient network information management.

CN113836183BActive Publication Date: 2025-06-24JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111064275.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-10
Publication Date
2025-06-24
Estimated Expiration
2041-09-10

AI Technical Summary

Technical Problem

In the acquisition and management of OVN network information, the existing technology has the problems of the high cost of redeveloping plug-ins for multiple teams, poor real-time performance, and inability to meet the needs of different customer scenarios.

Method used

By subscribing to the OVN database using the native OVSDB protocol, using kubernetes' configmap to store logical flow tables, and dynamically modify client subscriptions, push OVN logical flow tables in real time through gRPC or WebSocket protocol.

Benefits of technology

Real-time dynamic adjustment of system subscription logic flow tables with low operation and maintenance costs is realized, reducing development costs, increasing filtering rate, and pushing successful and failed data through CRD records. The client can obtain analysis and display in real time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113836183B_ABST
    Figure CN113836183B_ABST
Patent Text Reader

Abstract

The present invention provides a method, system, device, and storage medium for pushing a logical flow table to a client. The method includes: subscribing to the north-south databases of multiple open virtual network clusters, and saving the data pushed by the north-south database subscription to a cache; in response to subscribing to the full data of all databases, obtaining the full database data and adding it to the push queue; in response to subscribing to partial fields of some databases, dynamically generating a logical table expression according to the filtering conditions, filtering the event queue data and the old and new data queue data, and adding the filtered data to the push queue; and pushing the data in the push queue to the corresponding client based on the connection protocol with the client. The present invention saves the data pushed by the north-south database subscription to a cache. When the client subscribes to the logical flow table, the system generates a logical table and a filtering expression according to the subscription conditions and pushes them to the client.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud platforms, and more specifically, particularly to a method, system, device, and storage medium for pushing a logical flow table to a client. Background Art

[0002] OVN (Open Virtual Network) is a native virtualized network solution provided by OVS (Open Virtual Switch), aiming to solve the performance problems of traditional SDN (Software Defined Network) architectures. The OVN architecture data is stored in the logical flow tables of the OVN northbound database and the OVN southbound database. When there are multiple kubernetes container clusters, openstack virtualization clusters, or both types of clusters in a data center, users need to obtain the OVN network information of containers or virtual machines to analyze the network allocation of containers or virtual machines and meet the requirement of network interconnection between containers or virtual machines. Since the programming languages of Kubernetes and openstack are different, currently, the common solution is to separately write Kubernetes and openstack plugins and use the ovn-nbctl / sbctl commands to obtain network information. However, the disadvantages are as follows:

[0003] 1. Multiple teams need to develop and deploy plugins separately, and a large amount of repetitive development and operation and maintenance work increases the labor cost.

[0004] 2. Using the ovn-nbctl / sbctl commands to query the OVN database to obtain the logical flow table cannot obtain the changes of the OVN logical flow table in real time, and the real-time performance is relatively weak; each query needs to connect to the OVN database once, which reduces the performance of the OVN database.

[0005] 3. The conditions for defining the filtering logical flow table in development cannot meet the requirements of different customers in different scenarios. Summary of the Invention

[0006] In view of this, an object of an embodiment of the present invention is to provide a method, a system, a computer device, and a computer-readable storage medium for pushing a logical flow table to a client. The present invention uses the native OVSDB protocol to subscribe to the OVN database, stores the logical flow table through the configmap of kubernetes (a configuration management component in K8s that can pass configurations in the form of key-value pairs and can save the configuration information used by users), dynamically modifies the logical flow table subscribed by the client, and pushes the OVN logical flow table through the gRPC or WebSocket protocol. It can dynamically adjust the logical flow table subscribed by the system in real time with low operation and maintenance costs; dynamically generates golang expressions according to the client's requirements to filter the data of the cache device, reduces the development cost, and improves the filtering rate; records the successful and failed push data into the CRD (Custom Resource Definition), and the client can listen to this CRD to obtain, analyze, and display in real time.

[0007] Based on the above object, an aspect of an embodiment of the present invention provides a method for pushing a logical flow table to a client, including the following steps: subscribing to the north-south databases of multiple open virtual network clusters, and saving the data pushed by the north-south database subscription into a cache; in response to subscribing to the full data of all databases, obtaining the full database data and adding it to the push queue; in response to subscribing to partial fields of some databases, dynamically generating a logical table expression according to the filtering conditions, filtering the event queue data and the old and new data queue data, and adding the filtered data to the push queue; and pushing the data in the push queue to the corresponding client based on the connection protocol between the push queue and the client.

[0008] In some embodiments, the method further includes: in response to a change in the logical flow table, updating the changed data to the full data queue; comparing the data before and after the change to obtain a change event, and updating the change event to the event queue; and updating the old data before the change and the new data after the change to the old and new data queue.

[0009] In some embodiments, the method further includes: creating a custom resource in each client, and recording the database address, and the information on whether the logical flow table push is successful or failed in the custom resource.

[0010] In some embodiments, the method further includes: creating an application configuration management to store the logical flow table to be listened to, and configuring the logical flow table in the application configuration management through key-value pairs.

[0011] On the other hand, an embodiment of the present invention provides a system for pushing a logical flow table to a client, including: a subscription module configured to subscribe to the north-south databases of multiple open virtual network clusters and save the data pushed by the north-south database subscription to a cache; a full amount module configured to, in response to subscribing to the full amount of data of all databases, obtain the full amount of database data and add it to a push queue; a component module configured to, in response to subscribing to partial fields of partial databases, dynamically generate a logical table expression according to a filtering condition, filter the data in an event queue and the data in a new and old data queue, and add the filtered data to the push queue; and a push module configured to push the data in the push queue to the corresponding client based on the connection protocol between the push queue and the client.

[0012] In some embodiments, the system further includes a queue module configured to: in response to a change in the logical flow table, update the changed data to a full amount data queue; compare the data before and after the change to obtain a change event, and update the change event to the event queue; and update the old data before the change and the new data after the change to the new and old data queue.

[0013] In some embodiments, the system further includes a recording module configured to: create a custom resource for each client and record the database address and information on whether the logical flow table push is successful or failed in the custom resource.

[0014] In some embodiments, the system further includes a creation module configured to: create an application configuration management to store the logical flow table to be listened to and configure the logical flow table in the application configuration management through key-value pairs.

[0015] In yet another aspect, an embodiment of the present invention further provides a computer device, including: at least one processor; and a memory storing computer instructions executable on the processor, and when the instructions are executed by the processor, the steps of the above method are implemented.

[0016] In still another aspect, an embodiment of the present invention further provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above method.

[0017] The present invention has the following beneficial technical effects: subscribing to the OVN database using the native OVSDB protocol, storing the logical flow table through the configmap of kubernetes, dynamically modifying the logical flow table subscribed by the client, and pushing the OVN logical flow table through the gRPC or WebSocket protocol, which can dynamically adjust the logical flow table subscribed by the system in real time with low operation and maintenance costs; dynamically generating golang expressions according to the client's needs to filter the data of the caching device, reducing the development cost and improving the filtering rate; pushing the successful and failed data records into the CRD, and the client can listen to this CRD to obtain and analyze the display in real time. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other embodiments based on these drawings without creative efforts.

[0019] Figure 1 Schematic diagram of an embodiment of the method for pushing a logical flow table to a client provided by the present invention;

[0020] Figure 2 Schematic diagram of an embodiment of the system for pushing a logical flow table to a client provided by the present invention;

[0021] Figure 3 Schematic diagram of the hardware structure of an embodiment of the computer device for pushing a logical flow table to a client provided by the present invention;

[0022] Figure 4 Schematic diagram of an embodiment of the computer storage medium for pushing a logical flow table to a client provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0023] In order to make the purpose, technical solutions and advantages of the present invention more clear and understandable, the following will further describe the embodiments of the present invention in detail with reference to specific embodiments and the accompanying drawings.

[0024] It should be noted that all the expressions using "first" and "second" in the embodiments of the present invention are used to distinguish two entities or parameters with the same name but different, so it can be seen that "first" and "second" are only for the convenience of expression and should not be understood as a limitation to the embodiments of the present invention. This will not be repeated in the subsequent embodiments.

[0025] In the first aspect of the embodiments of the present invention, an embodiment of a method for pushing a logical flow table to a client is proposed. Figure 1Shown is a schematic diagram of an embodiment of the method for pushing a logical flow table to a client provided by the present invention. As Figure 1 shown, the embodiment of the present invention includes the following steps:

[0026] S1. Subscribe to the north-south databases of multiple open virtual network clusters, and save the data pushed by the north-south database subscription to the cache;

[0027] S2. In response to subscribing to the full data of all databases, obtain the full database data and add it to the push queue;

[0028] S3. In response to subscribing to partial fields of partial databases, dynamically generate a logical table expression according to the filtering conditions, filter the event queue data and the old and new data queue data, and add the filtered data to the push queue; and

[0029] S4. Push the data in the push queue to the corresponding client based on the connection protocol between the push queue and the client.

[0030] The main idea of the embodiment of the present invention is to subscribe to the north-south databases of multiple ovn clusters based on the native OVSDB protocol, and save the data pushed by the north-south database subscription to the cache. When the client subscribes to certain logical flow tables of a certain ovn north-south database, the system generates a logical table golang model and a filtering expression according to the subscription conditions, filters the logical flow table data in the cache, and pushes it to the client through the gRPC or WebSocket protocol, achieving the effect of automatic push.

[0031] The embodiment of the present invention mainly includes an ovn cluster connection device, a logical flow table subscription monitoring device, a logical flow table caching device, a client connection subscription device, a filtering and analysis device, and a push device. Among them, the logical flow table subscription monitoring device mainly dynamically adjusts the number of ovn logical flow tables subscribed and monitored by listening to different ovn cluster configmaps. The client connection subscription device mainly generates the ovn logical flow table subscription cache required by the client according to the subscription. The ovn logical flow table subscription queue mainly contains the database flow tables that the user hopes to monitor and the flow table filtering conditions.

[0032] The OVN cluster connection device is mainly used to store the configuration of the connection information of multiple ovn cluster databases and connect to the ovn cluster. When adding an ovn cluster database information to the connection information configuration, the connection device will immediately sense the change, verify whether the connection is valid, and add the database connection to the connected database cache queue; when deleting an ovn cluster database information from the connection information configuration, close the database connection and delete it from the connected database cache queue.

[0033] The logical flow table subscription monitoring device stores the logical flow tables to be monitored in the configmap. When adding, modifying, or deleting a certain logical flow table, this configmap can be directly edited. When the configmap changes, the kubernetes api-server will push the main changes to the logical flow table judgment module, and then add or delete the subscription of the logical flow table.

[0034] The logical flow table caching device mainly includes a full-volume data queue, an event queue, and a new-old data queue.

[0035] Client connection subscription device: The client establishes a connection with this device through the gRPC or WebSocket protocol, and sends subscription database address parameters, database ovn logical flow tables, and logical flow table item parameters to subscribe to the database, database logical flow tables, and logical flow table items that need to be monitored. After receiving the client parameters, this device generates a logical flow table subscription cache to save the client subscription parameters. The cache mainly records the database, database logical flow tables, and logical flow table item filtering parameters subscribed by the client for use by the filtering and analysis device. When the client subscribes to multiple databases, multiple logical flow table subscription caches are generated.

[0036] Filtering and analysis device: Analyze the data in the logical flow table subscription queue generated by the client connection subscription device. When the client hopes to obtain the full-volume logical flow table data, this device copies a copy of the full-volume data in the caching device to the push queue. When the client hopes to obtain partial logical flow table data, this device obtains the logical flow table item filtering parameters from the subscription queue, dynamically generates a logical flow table golang expression, filters the data in the event queue and new-old data queue in the caching device according to the expression, and then appends it to the push queue.

[0037] The push device mainly includes a push end, records of pushed data, and push failure data information. The push end obtains the push data from the push queue and pushes it to the client through the gRPC or WebSocket protocol. The Kubernetes custom resource CRD technology is used to store the records of pushed and push failure data.

[0038] Since resources such as configmap and CRD are defined in Kubernetes, the embodiments of the present invention need to be deployed in a Kubernetes cluster.

[0039] Create an ovn cluster database connection configuration. The connection configuration mainly includes information such as the database connection address and database key, and different databases are distinguished using the connection address. After adding the database information to this configuration, connect to the ovn database through the OVSDB protocol.

[0040] In some embodiments, the method further includes: creating an application configuration management to store the logical flow tables to be monitored, and configuring the logical flow tables in the application configuration management through key-value pairs. Creating a configmap named ovn-watch or creating a configmap with any name annotated with "ovn-watch:true" to store the logical flow tables to be monitored. Configuring specific logical flow tables in the configmap through key-value pairs of "table name": "whether to monitor true / false". For example, when it is necessary to monitor the Logical_Switch flow table, configure the key-value pair "Logical_Switch": "true". When closing the monitoring of the Logical_Switch flow table, the Logical_Switch key-value pair can be deleted or the key-value pair can be modified to "Logical_Switch": "false". When modifying the configmap to add or delete logical flow tables, the Kubernetes Api-server (Application Programming Interface Server) will push the configmap changes to the comparison module to judge and add or delete the subscriptions of the corresponding logical flow tables.

[0041] Subscribing to the north-south databases of multiple Open Virtual Network clusters, and saving the data pushed by the north-south database subscriptions to the cache. The client connects to the subscribed logical flow tables according to the requirements, and the client connection subscription device establishes a connection with the client and generates a logical flow table subscription cache. The logical flow table subscription cache records the logical flow tables subscribed by the client and the filtering logical flow table conditions.

[0042] In some embodiments, the method further includes: in response to a change in the logical flow table, updating the changed data to the full amount data queue; comparing the data before and after the change to obtain a change event, and updating the change event to the event queue; and updating the old data before the change and the new data after the change to the old and new data queue. After subscribing to the logical flow table, when the logical flow table changes, it will be actively pushed to the logical flow table cache device. On the one hand, the logical flow table cache device updates the data to the full amount data queue, and on the other hand, compares the changes in the data before and after to obtain a data change event (increase, modification or deletion) and updates it to the event queue, and at the same time updates the old and new data to the old and new data queue. The data in these data queues provides basic data guarantee for the push client.

[0043] In response to subscribing to the full amount data of all databases, obtaining the full amount data of the databases and adding it to the push queue. When the client subscribes to the full amount data of all databases, it obtains the full amount data of the database flow tables from the cache device and adds it to the push queue.

[0044] In response to subscribing to partial fields of a partial database, a logical table expression is dynamically generated according to filtering conditions to filter event queue data and new and old data queue data, and the filtered data is added to the push queue. When a client subscribes to partial fields of a partial database, a logical table golang expression is dynamically generated according to the filtering conditions in the cache, and event and new and old data queue data are filtered and appended to the push queue.

[0045] Based on the connection protocol between the push queue and the client, the data in the push queue is pushed to the corresponding client.

[0046] In some embodiments, the method further includes: creating a custom resource on each client, and recording information about the success or failure of pushing the database address and the logical flow table in the custom resource. The push end obtains data from the push queue and pushes it to the client through the connection protocol with the client. The table data of push failure and success is recorded in the kubernetes custom crd. According to the client information, CRDs named "xxx-push_sucess_crd" and "push_fail_crd" are created for each client in the kubernetes cluster. The database address and the record information of the push or failure of the logical flow table are recorded in the CRD for users to view.

[0047] The embodiments of the present invention use the native OVSDB protocol to subscribe to the OVN database, store the logical flow table through the configmap of kubernetes, dynamically modify the logical flow table subscribed by the client, and push the OVN logical flow table through the gRPC or WebSocket protocol, which can dynamically adjust the system's subscribed logical flow table in real time and has low operation and maintenance costs; a golang expression is dynamically generated according to the client's requirements to filter the data of the cache device, reducing the development cost and improving the filtering rate; the push success and failure data are recorded in the CRD, and the client can listen to this CRD to obtain and analyze the display in real time.

[0048] It should be particularly noted that each step in each embodiment of the above method for pushing the logical flow table to the client can be cross, replaced, added, or deleted with each other. Therefore, these reasonable permutation and combination transformations for the method of pushing the logical flow table to the client should also fall within the protection scope of the present invention, and the protection scope of the present invention should not be limited to the embodiments.

[0049] Based on the above purpose, the second aspect of the embodiments of the present invention proposes a system for pushing a logical flow table to a client. As Figure 2As shown, system 200 includes the following modules: a subscription module configured to subscribe to the north-south databases of multiple open virtual network clusters and save the data pushed by the north-south database subscription to a cache; a full-volume module configured to, in response to subscribing to the full-volume data of all databases, obtain the full-volume data of the databases and add it to a push queue; a component module configured to, in response to subscribing to partial fields of partial databases, dynamically generate a logical table expression according to a filtering condition, filter the data in an event queue and the data in an old-new data queue, and add the filtered data to the push queue; and a push module configured to push the data in the push queue to corresponding clients based on the connection protocol between the push queue and the clients.

[0050] In some embodiments, the system further includes a queue module configured to: in response to a change in a logical flow table, update the changed data to a full-volume data queue; compare the data before and after the change to obtain a change event, and update the change event to the event queue; and update the old data before the change and the new data after the change to the old-new data queue.

[0051] In some embodiments, the system further includes a record module configured to: create a custom resource for each client and record the database address and information on whether the push of the logical flow table is successful or failed in the custom resource.

[0052] In some embodiments, the system further includes a creation module configured to: create an application configuration management to store the logical flow tables to be listened to and configure the logical flow tables in the application configuration management through key-value pairs.

[0053] The embodiments of the present invention use the native OVSDB protocol to subscribe to the OVN database, store the logical flow tables through the configmap of kubernetes, dynamically modify the logical flow tables subscribed by the clients, and push the OVN logical flow tables through the gRPC or WebSocket protocol, which can dynamically adjust the logical flow tables subscribed by the system in real time and has low operation and maintenance costs; dynamically generate golang expressions according to the client requirements to filter the data of the cache device, reduce the development cost and improve the filtering rate; record the successful and failed push data into the CRD, and the clients can listen to this CRD to obtain, analyze and display in real time.

[0054] Based on the above purpose, in the third aspect of the embodiments of the present invention, a computer device is proposed, including: at least one processor; and a memory storing computer instructions that can run on the processor, and the instructions are executed by the processor to implement the following steps: S1. Subscribe to the north-south databases of multiple open virtual network clusters and save the data pushed by the north-south database subscription to a cache;

[0055] S2. In response to subscribing to all the full data of the database, obtain the full database data and add it to the push queue; S3. In response to subscribing to partial fields of some databases, dynamically generate a logical table expression according to the filtering conditions, filter the event queue data and the old and new data queue data, and add the filtered data to the push queue; and S4. Push the data in the push queue to the corresponding client based on the connection protocol between the push queue and the client.

[0056] In some embodiments, the steps further include: in response to a change in the logical flow table, update the changed data to the full data queue; compare the data before and after the change to obtain a change event, and update the change event to the event queue; and update the old data before the change and the new data after the change to the old and new data queue.

[0057] In some embodiments, the steps further include: create a custom resource in each client, and record the database address and information on whether the logical flow table push is successful or failed in the custom resource.

[0058] In some embodiments, the steps further include: create an application configuration management to store the logical flow table to be listened to, and configure the logical flow table in the application configuration management through key-value pairs.

[0059] The embodiments of the present invention use the native OVSDB protocol to subscribe to the OVN database, store the logical flow table through the configmap of kubernetes, dynamically modify the client's subscription to the logical flow table, and push the OVN logical flow table through the gRPC or WebSocket protocol, which can dynamically adjust the system's subscription to the logical flow table in real time with low operation and maintenance costs; dynamically generate golang expressions according to the client's needs to filter the data of the caching device, reduce development costs, and improve the filtering rate; record the successful and failed push data in the CRD, and the client can listen to this CRD to obtain and analyze the display in real time.

[0060] As Figure 3 shown, it is a schematic diagram of the hardware structure of an embodiment of the computer device for pushing the logical flow table to the client provided by the present invention.

[0061] Taking the device as shown in Figure 3 as an example, in this device, it includes a processor 301 and a memory 302.

[0062] The processor 301 and the memory 302 can be connected through a bus or other means, Figure 3 and taking the connection through the bus as an example.

[0063] The memory 302, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the method of pushing the logical flow table to the client in the embodiments of the present application. The processor 301 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions, and modules stored in the memory 302, that is, implements the method of pushing the logical flow table to the client.

[0064] The memory 302 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the method of pushing the logical flow table to the client, etc. In addition, the memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 302 may optionally include a memory remotely disposed relative to the processor 301, and these remote memories can be connected to the local module through a network. Examples of the above networks include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0065] One or more computer instructions 303 corresponding to the method of pushing the logical flow table to the client are stored in the memory 302, and when executed by the processor 301, execute the method of pushing the logical flow table to the client in any of the above method embodiments.

[0066] Any embodiment of the computer device that executes the above method of pushing the logical flow table to the client can achieve the same or similar effects as any of the foregoing method embodiments corresponding thereto.

[0067] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, executes the method of pushing the logical flow table to the client.

[0068] As Figure 4 shown, it is a schematic diagram of an embodiment of the above computer storage medium provided by the present invention for pushing the logical flow table to the client. Taking the computer storage medium as shown in Figure 4 as an example, the computer-readable storage medium 401 stores a computer program 402 that, when executed by a processor, executes the above method.

[0069] Finally, it should be noted that those of ordinary skill in the art can understand that all or part of the processes in the above-described method embodiments can be implemented by instructing relevant hardware through a computer program. The program for the method of pushing the logic flow table to the client can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-described method embodiments. Among them, the storage medium of the program can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc. The embodiments of the above computer program can achieve the same or similar effects as the corresponding foregoing method embodiments.

[0070] The above are exemplary embodiments disclosed by the present invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the embodiments disclosed by the present invention as defined by the claims. The functions, steps, and / or actions of the method claims according to the disclosed embodiments herein need not be performed in any specific order. In addition, although the elements disclosed by the embodiments of the present invention can be described or claimed in individual form, they can also be understood as plural unless explicitly limited to the singular.

[0071] It should be understood that, as used herein, unless the context clearly supports exceptions, the singular form "a" is also intended to include the plural form. It should also be understood that the "and / or" used herein refers to any and all possible combinations of one or more of the associated listed items.

[0072] The serial numbers of the disclosed embodiments of the present invention above are only for description and do not represent the advantages or disadvantages of the embodiments.

[0073] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware or by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a magnetic disk, or an optical disk, etc.

[0074] Those of ordinary skill in the art should understand that: the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the embodiments disclosed by the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features between the above embodiments or different embodiments can also be combined, and there are many other variations in different aspects of the embodiments of the present invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention shall be included in the protection scope of the embodiments of the present invention.

Claims

1. A method for pushing a logical flow table to a client, characterized in that, It includes the following steps: Subscribe to the north-south databases of multiple open virtual network clusters, and save the data pushed by the north-south database subscriptions to the cache; In response to subscribing to the full data of all databases, obtain the full database data and add it to the push queue; In response to subscribing to partial fields of partial databases, dynamically generate a logical table expression according to the filtering conditions, filter the event queue data and the old and new data queue data, and add the filtered data to the push queue; And Based on the connection protocol between the push queue and the client, push the data in the push queue to the corresponding client; Wherein, the filtering condition is the logical flow table entry filtering parameter sent by the client, and the connection protocol includes the gRPC or WebSocket protocol.

2. The method according to claim 1, characterized in that, The method further includes: In response to a change in the logical flow table, update the changed data to the full data queue; Compare the data before and after the change to obtain a change event, and update the change event to the event queue; and Update the old data before the change and the new data after the change to the old and new data queue.

3. The method according to claim 1, wherein The method further includes: Create a custom resource for each client, and record the database address and the information on whether the logical flow table push is successful or failed in the custom resource.

4. The method according to claim 1, characterized in that, The method further includes: Create an application configuration management to store the logical flow table to be monitored, and configure the logical flow table in the application configuration management through key-value pairs.

5. A system for pushing a logical flow table to a client, characterized in that, It includes: A subscription module configured to subscribe to the north-south databases of multiple open virtual network clusters and save the data pushed by the north-south database subscriptions to the cache; A full data module configured to obtain the full database data and add it to the push queue in response to subscribing to the full data of all databases; A partial data module configured to dynamically generate a logical table expression according to the filtering conditions, filter the event queue data and the old and new data queue data, and add the filtered data to the push queue in response to subscribing to partial fields of partial databases; And A push module configured to push the data in the push queue to the corresponding client based on the connection protocol between the push queue and the client; Wherein, the filtering condition is the logical flow table entry filtering parameter sent by the client, and the connection protocol includes the gRPC or WebSocket protocol.

6. The system according to claim 5, wherein The system further includes a queue module configured to: In response to a change in the logical flow table, update the changed data to the full data queue; Compare the data before and after the change to obtain a change event, and update the change event to the event queue; And Update the old data before the change and the new data after the change to the old and new data queue.

7. The system according to claim 5, wherein The system further includes a recording module configured to: Create a custom resource for each client, and record the database address and the information on whether the logical flow table push is successful or failed in the custom resource.

8. The system according to claim 5, wherein The system further includes a creation module configured to: Create an application configuration management to store the logical flow table to be monitored, and configure the logical flow table in the application configuration management through key-value pairs.

9. A computer device, characterized in that, It includes: At least one processor; And A memory that stores computer instructions executable on the processor, and when the instructions are executed by the processor, the steps of the method according to any one of claims 1-4 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1-4 are implemented.

Citation Information

Patent Citations

  • Method and device for pushing data to client by server

    CN110324370A

  • Calculation Models Using Annotations For Filter Optimization

    US20130290354A1