Routing data processing method, gateway component, server, medium and system
By obtaining the data change events of the management server in the gateway component and updating the local routing table, the problems of volatile routing data and low cache acquisition efficiency are solved, and more efficient and stable gateway request forwarding is achieved.
Patent Information
- Application Number
- CN202211622220.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-16
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2042-12-16
AI Technical Summary
In the existing technology, routing data is volatile in the memory of gateway nodes, and obtaining routing data through cache results in low gateway request forwarding efficiency, complex and unstable systems.
By obtaining the data change event sent by the management server, the local routing table is updated to ensure that the routing data is obtained and stored from the routing database when the gateway component is started, and updated under the data change event, avoiding the use of external caching components.
It solves the problem of volatile routing data, improves gateway request forwarding efficiency, simplifies the system structure, and enhances stability.
Smart Images

Figure CN116032824B
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method for processing routing data, a gateway component, a server, a medium and a system. Background Art
[0002] In the cloud computing microservice technology stack represented by Spring Cloud, when a gateway node receives an HTTP request, such as a request to open a point-to-point link in an access network, it is necessary to query the routing data in the routing table to forward the request to a service cluster within the enterprise that can provide point-to-point link services in the access network according to the routing data.
[0003] In the prior art, routing data is usually stored in the memory of the gateway node by manual import, but the data in the node memory will be lost after power failure. The gateway node can also obtain routing data by accessing the cache, but if the gateway node accesses the cache to obtain routing data every time it receives an http request, it will increase the time consumption of forwarding requests. At the same time, since the performance of the cache is not stable, it will also increase the complexity and instability of the gateway system. Summary of the invention
[0004] The present application provides a method for processing routing data, a gateway component, a server, a medium and a system, which are used to solve the problems in the prior art that routing data manually imported into the gateway memory is volatile, and the gateway request forwarding efficiency is low due to obtaining routing data through a high-speed cache, and the gateway system is complex and unstable.
[0005] In a first aspect, the present application provides a method for processing routing data, which is applied to a gateway component, including: obtaining a data change event sent by a management server, and obtaining first routing data corresponding to the data change event; updating a local routing table according to a first source address, a first destination address and a first timestamp in the first routing data; wherein the local routing table is a routing table obtained and stored from a routing database when the gateway component is started.
[0006] In a specific embodiment, before obtaining the data change event sent by the management server, the method also includes: after the gateway component is started, recording the initialization startup time; obtaining the second routing data in the routing table in the routing database one by one, and storing the obtained second routing data one by one in the local routing table; opening the routing table change event processing interface to obtain the data change event sent by the management server through the routing table change event processing interface; when opening the routing table change event processing interface, recording the initialization end time; using the time period between the initialization start time and the initialization end time as the data update time period, and querying and obtaining the second routing data within the data update time period in the routing table in the routing database, and updating the local routing table according to the second routing data within the data update time period.
[0007] In a specific implementation, the updating process of the local routing table according to the first source address, the first destination address and the first timestamp in the first routing data includes: determining whether there is local routing data corresponding to the first source address in the local routing table according to the first source address in the first routing data; when it is determined that there is local routing data corresponding to the first source address in the local routing table, comparing the first timestamp in the first routing data with the timestamp in the local routing data; when it is determined that the first timestamp in the first routing data is greater than the timestamp in the local routing data, updating the destination address in the local routing data to the first destination address in the first routing data.
[0008] In a specific implementation, the method further includes: obtaining third routing data in the routing table in the routing database one by one at preset time intervals, so as to update the local routing table according to the third source address, third destination address and third timestamp in the third routing data.
[0009] In a second aspect, the present application provides a method for processing routing data, which is applied to a management server, including: receiving a routing data change request, and updating a routing table in a routing database according to a data change event in the routing data change request; sending the data change event to a gateway component so that the gateway component updates the local routing table according to the data change event.
[0010] In a third aspect, the present application provides a gateway component, comprising: an acquisition module, used to obtain a data change event sent by a management server, and obtain first routing data corresponding to the data change event; a processing module, used to update a local routing table according to a first source address, a first destination address and a first timestamp in the first routing data; wherein the local routing table is a routing table obtained and stored from a routing database when the gateway component is started.
[0011] In a specific embodiment, before obtaining the data change event sent by the management server, the processing module is also used to: after the gateway component is started, record the initialization startup time; obtain the second routing data in the routing table in the routing database one by one, and store the obtained second routing data in the local routing table one by one; open the routing table change event processing interface to obtain the data change event sent by the management server through the routing table change event processing interface; when opening the routing table change event processing interface, record the initialization end time; use the time period between the initialization start time and the initialization end time as the data update time period, and query and obtain the second routing data within the data update time period in the routing table in the routing database, and update the local routing table according to the second routing data within the data update time period.
[0012] In a specific implementation, the processing module is specifically used to: determine whether there is local routing data corresponding to the first source address in the local routing table based on the first source address in the first routing data; when it is determined that there is local routing data corresponding to the first source address in the local routing table, compare the first timestamp in the first routing data with the timestamp in the local routing data; when it is determined that the first timestamp in the first routing data is greater than the timestamp in the local routing data, update the destination address in the local routing data to the first destination address in the first routing data.
[0013] In a specific embodiment, the processing module is also used to: obtain the third routing data in the routing table in the routing database one by one at preset time intervals, so as to update the local routing table according to the third source address, third destination address and third timestamp in the third routing data.
[0014] In a fourth aspect, the present application provides a gateway component, comprising: a processor, a memory, and a communication interface; the memory is used to store executable instructions of the processor; wherein the processor is configured to execute the routing data processing method described in the first aspect by executing the executable instructions.
[0015] In a fifth aspect, the present application provides a readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for processing routing data described in the first aspect.
[0016] In a sixth aspect, the present application provides a management server, comprising: a change processing module, used to receive a routing data change request, and update the routing table in the routing database according to the data change event in the routing data change request; a sending module, used to send the data change event to a gateway component, so that the gateway component updates the local routing table according to the data change event.
[0017] In the seventh aspect, the present application provides a management server, comprising: a processor, a memory, and a communication interface; the memory is used to store executable instructions of the processor; wherein the processor is configured to execute the routing data processing method described in the second aspect by executing the executable instructions.
[0018] In an eighth aspect, the present application provides a readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for processing routing data described in the second aspect.
[0019] In a ninth aspect, the present application provides a gateway system, comprising: the gateway components as described in the third to fifth aspects, the management server as described in the sixth to eighth aspects, and a routing database.
[0020] The present application provides a method for processing routing data, a gateway component, a server, a medium and a system, the method comprising: obtaining a data change event sent by a management server, and obtaining first routing data corresponding to the data change event; updating a local routing table according to a first source address, a first destination address and a first timestamp in the first routing data; wherein the local routing table is a routing table obtained and stored from a routing database when the gateway component is started. Compared with the prior art, the routing data manually imported into the gateway memory is volatile, and the routing data obtained through the cache leads to low gateway request forwarding efficiency, and the gateway system is complex and unstable. The present application updates the local routing table according to the data change event, and the local routing table is a routing table obtained and stored from the routing database when the gateway component is started, so that the gateway component can obtain routing data from the routing database at startup, store it as a local routing table, and can update the local routing table according to the data change event, without the need for an external cache component, solving the problem that the routing data manually imported into the gateway memory is volatile, and the routing data obtained through the cache leads to low gateway request forwarding efficiency, and the gateway system is complex and unstable. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0022] Figure 1 A gateway system structure diagram provided for this application;
[0023] Figure 2 A flowchart of a first embodiment of a method for processing routing data provided by the present application;
[0024] Figure 3 A flowchart of a second embodiment of a method for processing routing data provided by the present application;
[0025] Figure 4 A flowchart of a third embodiment of a method for processing routing data provided by the present application;
[0026] Figure 5 A schematic diagram of the structure of a gateway component embodiment provided by the present application;
[0027] Figure 6 A schematic diagram of the structure of another gateway component embodiment provided by the present application;
[0028] Figure 7 A schematic diagram of the structure of a management server embodiment provided by the present application;
[0029] Figure 8 A schematic diagram of the structure of another management server embodiment provided in the present application. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments made by ordinary technicians in this field under the enlightenment of the embodiments belong to the scope of protection of the present application.
[0031] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] In the cloud computing microservice technology stack represented by Spring Cloud, when a gateway node receives an HTTP request, such as a request to open a point-to-point link in an access network, it is necessary to query the routing data in the routing table to forward the request to a service cluster within the enterprise that can provide point-to-point link services in the access network according to the routing data.
[0033] In the prior art, routing data is usually stored in the memory of the gateway node by manual import, but the data in the node memory will be lost after power failure. The gateway node can also obtain routing data by accessing the cache, but if the gateway node accesses the cache to obtain routing data every time it receives an http request, it will increase the time consumption of forwarding requests. At the same time, since the performance of the cache is not stable, it will also increase the complexity and instability of the gateway system.
[0034] Based on the above technical problems, the technical conception process of this application is as follows: how to ensure the persistence of routing data stored in the gateway node without introducing external cache components such as cache to improve the efficiency of gateway request forwarding.
[0035] The following is a detailed description of the routing data processing scheme of the present application.
[0036] Figure 1 A gateway system structure diagram provided for this application, such as Figure 1As shown, the gateway system may include: a gateway component 11, a management server 12 and a routing database 13. Among them, the gateway component 11 may include multiple nodes. When the gateway component 11 is started, it obtains and stores the routing table from the routing database 13, that is, it is stored as a local routing table in the routing table memory. The gateway component 11 re-obtains routing data from the routing database 13 at preset intervals to update the local routing table in the routing table memory. The gateway component 11 also obtains the data change event sent by the management server 12, and updates the local routing table according to the data change event. The management server 12 also updates the routing table in the routing database 13 according to the data change event.
[0037] Therefore, after receiving the http request, the gateway node can directly query the routing data in the routing table memory to forward the request to the enterprise internal service cluster that can provide the corresponding service according to the routing data.
[0038] The technical solution of the present application is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0039] Figure 2 A flowchart of a first embodiment of a method for processing routing data provided by the present application.
[0040] See also Figure 2 The method for processing routing data is applied to the gateway component and specifically includes the following steps:
[0041] Step S201: Acquire a data change event sent by a management server, and acquire first routing data corresponding to the data change event.
[0042] Step S202: updating the local routing table according to the first source address, the first destination address and the first timestamp in the first routing data.
[0043] The local routing table is a routing table obtained and stored from the routing database when the gateway component is started.
[0044] In this embodiment, when the gateway component is started, it obtains the routing table from the routing database and stores it as a local routing table.
[0045] The management server obtains the routing data change request through the UI interactive interface or from the enterprise internal service cluster. Exemplarily, the routing data change request can be a request to add, update or delete routing data. The management server obtains the data change event in the routing data change request and sends it to the gateway component.
[0046] The gateway component obtains the data change event sent by the management server, and obtains the first routing data corresponding to the data change event. The first routing data includes a first source address, a first destination address, and a first timestamp. The gateway component updates the local routing table according to the first source address, the first destination address, and the first timestamp in the first routing data.
[0047] In this embodiment, the gateway component obtains the data change event sent by the management server, and obtains the first routing data corresponding to the data change event; according to the first source address, the first destination address and the first timestamp in the first routing data, the local routing table is updated; wherein the local routing table is the routing table obtained and stored from the routing database when the gateway component is started. Compared with the prior art, the routing data manually imported into the gateway memory is volatile, and the routing data obtained through the cache leads to low gateway request forwarding efficiency, and the gateway system is complex and unstable. The present application updates the local routing table according to the data change event, and the local routing table is the routing table obtained and stored from the routing database when the gateway component is started, so that the gateway component can obtain the routing data from the routing database at startup, store it as a local routing table, and can update the local routing table according to the data change event, without the need for an external cache component, which solves the problem that the routing data manually imported into the gateway memory is volatile, and the routing data obtained through the cache leads to low gateway request forwarding efficiency, and the gateway system is complex and unstable.
[0048] Figure 3 A flowchart of a second embodiment of a method for processing routing data provided in the present application.
[0049] See also Figure 3 The method for processing routing data is applied to the gateway component and specifically includes the following steps:
[0050] Step S301: After the gateway component is started, the initialization start time is recorded.
[0051] Step S302: Acquire the second routing data in the routing table in the routing database one by one, and store the acquired second routing data in the local routing table one by one.
[0052] Step S303: Open the routing table change event processing interface to obtain the data change event sent by the management server through the routing table change event processing interface.
[0053] Step S304: when the routing table change event processing interface is opened, the initialization end time is recorded.
[0054] Step S305: The time period between the initialization start time and the initialization end time is used as the data update time period, and the second routing data within the data update time period is queried in the routing table in the routing database, and the local routing table is updated according to the second routing data within the data update time period.
[0055] In this embodiment, after the gateway component is started, the initialization startup time startime is recorded, and then the second routing data in the routing table in the routing database is obtained one by one, and the obtained second routing data is stored in the local routing table one by one. Specifically, the gateway component queries all the routing data in the routing table in the routing database in pages, and stores each routing data in the local routing table.
[0056] After all routing data in the routing table in the routing database are stored in the local routing table, the routing table change event processing interface is opened to obtain the data change event sent by the management server through the interface, and when the interface is opened, the initialization end time endtime is recorded.
[0057] The time period between the initialization start time startime and the initialization end time endtime is used as the data update time period, and the second routing data within the data update time period is queried in the routing table in the routing database, and the local routing table is updated according to the second routing data within the data update time period. Specifically, the gateway component queries the routing database in a paged manner, updates all routing data with update time between the initialization start time startime and the initialization end time endtime, and updates the local routing table according to the routing data within the data update time period.
[0058] Specifically, the second routing data may include a second source address, a second destination address, and a second timestamp. It can be determined whether there is local routing data corresponding to the second source address in the local routing table based on the second source address in the second routing data. When it is determined that there is local routing data corresponding to the second source address in the local routing table, the second timestamp in the second routing data is compared with the timestamp in the local routing data. When it is determined that the second timestamp in the second routing data is greater than the timestamp in the local routing data, the destination address in the local routing data is updated to the second destination address in the second routing data, thereby implementing the update process of the local routing table.
[0059] Step S306: Acquire the data change event sent by the management server, and acquire the first routing data corresponding to the data change event.
[0060] Step S307: According to the first source address in the first routing data, determine whether there is local routing data corresponding to the first source address in the local routing table.
[0061] Step S308: When it is determined that there is local routing data corresponding to the first source address in the local routing table, compare the first timestamp in the first routing data with the timestamp in the local routing data.
[0062] Step S309: when it is determined that the first timestamp in the first routing data is greater than the timestamp in the local routing data, the destination address in the local routing data is updated to the first destination address in the first routing data.
[0063] In this embodiment, the first routing data corresponding to the data change event includes a first source address, a first destination address, and a first timestamp. Exemplarily, the first source address may be an access network identifier "access ae", the first destination address may be a set of IP addresses {IP1, IP2, IP3}, and the first timestamp may be the generation time of the first routing data "202211300030", i.e., 00:30 on November 30, 2022.
[0064] According to the first source address in the first routing data, it is determined whether there is local routing data corresponding to the first source address in the local routing table. When it is determined that there is local routing data corresponding to the first source address in the local routing table, the first timestamp in the first routing data is compared with the timestamp in the local routing data. Exemplarily, according to the first source address "access ae" in the first routing data, it is determined that there is local routing data corresponding to the first source address in the local routing table. Exemplarily, the local routing data is<access ae、IP0、202211292310> .
[0065] The first timestamp "202211300030" in the first routing data is compared with the timestamp "202211292310" in the local routing data. The first timestamp in the first routing data is greater than the timestamp in the local routing data, that is, the first routing data is generated later than the local routing data. Then the destination address "IP0" in the local routing data is updated to the first destination address {IP1, IP2, IP3} in the first routing data.
[0066] In this embodiment, the method for processing routing data may further include: obtaining the third routing data in the routing table in the routing database one by one at preset time intervals, so as to update the local routing table according to the third source address, third destination address and third timestamp in the third routing data.
[0067] Specifically, the third routing data may include a third source address, a third destination address, and a third timestamp. It can be determined whether there is local routing data corresponding to the third source address in the local routing table based on the third source address in the third routing data. When it is determined that there is local routing data corresponding to the third source address in the local routing table, the third timestamp in the third routing data is compared with the timestamp in the local routing data. When it is determined that the third timestamp in the third routing data is greater than the timestamp in the local routing data, the destination address in the local routing data is updated to the third destination address in the third routing data, thereby implementing the update process of the local routing table.
[0068] Specifically, the preset time is related to the number of nodes of the gateway component and the amount of routing data. For example, in an environment with hundreds of thousands of routing data and dozens of gateway nodes, the preset time can be set to the order of hours. That is, every hour, the third routing data in the routing table in the routing database is obtained one by one.
[0069] In this embodiment, the gateway component obtains all routing data from the routing database at startup and stores them as a local routing table. After initialization, the second routing data within the data update time period is obtained from the routing database to update the local routing table, and the third routing data is obtained from the routing database at preset intervals to update the local routing table. The network management component can obtain routing data from the routing database at startup and store them as a local routing table. In addition to updating the local routing table according to data change events, the routing data can also be obtained from the routing database after initialization to continuously update the local routing table without the need for external cache components, further solving the problems of the prior art that routing data manually imported into the gateway memory is volatile, and the gateway request forwarding efficiency is low due to obtaining routing data through high-speed cache, and the gateway system is complex and unstable.
[0070] Figure 4 A flowchart of a third embodiment of a method for processing routing data provided by the present application is shown in FIG. Figure 4 The method for processing routing data is applied to a management server and specifically includes the following steps:
[0071] Step S401: receiving a routing data change request, and updating a routing table in a routing database according to a data change event in the routing data change request.
[0072] Step S402: Send the data change event to the gateway component, so that the gateway component updates the local routing table according to the data change event.
[0073] In this embodiment, the management server obtains a routing data change request through a UI interactive interface or from an internal service cluster of an enterprise. Exemplarily, the routing data change request may be a request to add, update, or delete routing data. The management server obtains a data change event in the routing data change request and updates the routing table in the routing database.
[0074] The management server also sends the data change event to the gateway component, so that the gateway component updates the local routing table according to the data change event.
[0075] The gateway component obtains the data change event sent by the management server, and obtains the first routing data corresponding to the data change event. The first routing data includes a first source address, a first destination address, and a first timestamp. The gateway component updates the local routing table according to the first source address, the first destination address, and the first timestamp in the first routing data.
[0076] In this embodiment, the management server receives a routing data change request, and updates the routing table in the routing database according to the data change event in the routing data change request, so that the routing table in the routing database can be continuously updated; the management server also sends the data change event to the gateway component, so that the gateway component updates the local routing table according to the data change event, so that the local routing table in the gateway component can also be continuously updated. The problem of the routing data manually imported into the gateway memory being volatile, the low gateway request forwarding efficiency caused by obtaining routing data through the cache, and the complex and unstable gateway system in the prior art is solved.
[0077] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0078] Figure 5 A schematic diagram of a gateway component embodiment provided in this application; Figure 5 As shown, the gateway component 50 includes: an acquisition module 51 and a processing module 52. The acquisition module 51 is used to acquire the data change event sent by the management server and acquire the first routing data corresponding to the data change event; the processing module 52 is used to update the local routing table according to the first source address, the first destination address and the first timestamp in the first routing data; wherein the local routing table is the routing table acquired and stored from the routing database when the gateway component is started.
[0079] The gateway component provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0080] In a possible implementation scheme, before obtaining the data change event sent by the management server, the processing module 52 is also used to record the initialization startup time after the gateway component is started; obtain the second routing data in the routing table in the routing database one by one, and store the obtained second routing data one by one in the local routing table; open the routing table change event processing interface to obtain the data change event sent by the management server through the routing table change event processing interface; when opening the routing table change event processing interface, record the initialization end time; use the time period between the initialization start time and the initialization end time as the data update time period, and query and obtain the second routing data within the data update time period in the routing table in the routing database, and update the local routing table according to the second routing data within the data update time period.
[0081] The gateway component provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0082] In a possible implementation scheme, the processing module 52 is specifically used to determine whether there is local routing data corresponding to the first source address in the local routing table based on the first source address in the first routing data; when it is determined that there is local routing data corresponding to the first source address in the local routing table, compare the first timestamp in the first routing data with the timestamp in the local routing data; when it is determined that the first timestamp in the first routing data is greater than the timestamp in the local routing data, update the destination address in the local routing data to the first destination address in the first routing data.
[0083] The gateway component provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0084] In a possible implementation, the processing module 52 is also used to obtain the third routing data in the routing table in the routing database one by one at preset time intervals, so as to update the local routing table according to the third source address, third destination address and third timestamp in the third routing data.
[0085] The gateway component provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0086] Figure 6 This is a schematic diagram of the structure of another gateway component provided by this application. Figure 6As shown, the gateway component 60 includes: a processor 61, a memory 62, and a communication interface 63; wherein the memory 62 is used to store executable instructions of the processor 61; the processor 61 is configured to execute the technical solution in any of the aforementioned method embodiments by executing the executable instructions.
[0087] Optionally, the memory 62 may be independent or integrated with the processor 61 .
[0088] Optionally, when the memory 62 is a device independent of the processor 61, the gateway component 60 may further include: a bus 64 for connecting the above devices.
[0089] The server is used to execute the technical solution in any of the aforementioned method embodiments, and its implementation principle and technical effect are similar and will not be repeated here.
[0090] An embodiment of the present application also provides a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the technical solution provided by any of the aforementioned embodiments is implemented.
[0091] Figure 7 A schematic diagram of the structure of a management server embodiment provided in this application; Figure 7 As shown, the management server 70 includes: a change processing module 71 and a sending module 72. The change processing module 71 is used to receive a routing data change request, and update the routing table in the routing database according to the data change event in the routing data change request; the sending module 72 is used to send the data change event to the gateway component, so that the gateway component updates the local routing table according to the data change event.
[0092] The management server provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0093] Figure 8 This is a schematic diagram of another management server structure provided by this application. Figure 8 As shown, the management server 80 includes: a processor 81, a memory 82, and a communication interface 83; wherein the memory 82 is used to store executable instructions of the processor 81; the processor 81 is configured to execute the technical solution in any of the aforementioned method embodiments by executing the executable instructions.
[0094] Optionally, the memory 82 can be independent or integrated with the processor 81.
[0095] Optionally, when the memory 82 is a device independent of the processor 81, the management server 80 may further include: a bus 84 for connecting the above devices.
[0096] The server is used to execute the technical solution in any of the aforementioned method embodiments, and its implementation principle and technical effect are similar and will not be repeated here.
[0097] An embodiment of the present application also provides a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the technical solution provided by any of the aforementioned embodiments is implemented.
[0098] An embodiment of the present application also provides a gateway system, including a gateway component, a management server, and a routing database as provided in any of the aforementioned embodiments.
[0099] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for processing routing data, characterized in that: Applicable to gateway components, including: Obtaining a data change event sent by a management server, and obtaining first routing data corresponding to the data change event; the data change event is obtained by the management server from a routing data change request, and the routing data change request is a request to add, update or delete routing data; the routing data change request is obtained by the management server through a UI interaction interface or from an internal service cluster of an enterprise; updating the local routing table according to the first source address, the first destination address and the first timestamp in the first routing data; The local routing table is a routing table obtained and stored from a routing database when the gateway component is started; Before obtaining the data change event sent by the management server, the method further includes: After the gateway component is started, recording the initialization startup time; Acquire the second routing data in the routing table in the routing database one by one, and store the acquired second routing data in the local routing table one by one; Opening a routing table change event processing interface to obtain a data change event sent by the management server through the routing table change event processing interface; When opening the routing table change event processing interface, record the initialization end time; The time period between the initialization start time and the initialization end time is used as the data update time period, all routing data in the data update time period in the routing database are queried by paging, and the local routing table is updated according to the routing data in the data update time period; The updating process of the local routing table according to the first source address, the first destination address and the first timestamp in the first routing data includes: Determining, according to the first source address in the first routing data, whether there is local routing data corresponding to the first source address in the local routing table; When it is determined that local routing data corresponding to the first source address exists in the local routing table, comparing a first timestamp in the first routing data with a timestamp in the local routing data; When it is determined that the first timestamp in the first routing data is greater than the timestamp in the local routing data, the destination address in the local routing data is updated to the first destination address in the first routing data.
2. The method for processing routing data according to claim 1, characterized in that: Also includes: At preset intervals, the third routing data in the routing table in the routing database are obtained one by one, so as to update the local routing table according to the third source address, the third destination address and the third timestamp in the third routing data.
3. A gateway component, characterized in that: include: An acquisition module, used to acquire a data change event sent by a management server, and acquire first routing data corresponding to the data change event; The data change event is obtained by the management server from a routing data change request, where the routing data change request is a request to add, update or delete routing data; The routing data change request is obtained by the management server through a UI interactive interface or from an internal service cluster of an enterprise; A processing module, configured to update a local routing table according to a first source address, a first destination address and a first timestamp in the first routing data; The local routing table is a routing table obtained and stored from a routing database when the gateway component is started; Before acquiring the data change event sent by the management server, the processing module is further used to: After the gateway component is started, recording the initialization startup time; Acquire the second routing data in the routing table in the routing database one by one, and store the acquired second routing data in the local routing table one by one; Opening a routing table change event processing interface to obtain a data change event sent by the management server through the routing table change event processing interface; When opening the routing table change event processing interface, record the initialization end time; The time period between the initialization start time and the initialization end time is used as the data update time period, all routing data in the data update time period in the routing database are queried by paging, and the local routing table is updated according to the routing data in the data update time period; The processing module is specifically used for: Determining, according to the first source address in the first routing data, whether there is local routing data corresponding to the first source address in the local routing table; When it is determined that local routing data corresponding to the first source address exists in the local routing table, comparing a first timestamp in the first routing data with a timestamp in the local routing data; When it is determined that the first timestamp in the first routing data is greater than the timestamp in the local routing data, the destination address in the local routing data is updated to the first destination address in the first routing data.
4. The gateway component according to claim 3, characterized in that: The processing module is further used for: At preset intervals, the third routing data in the routing table in the routing database are obtained one by one, so as to update the local routing table according to the third source address, the third destination address and the third timestamp in the third routing data.
5. A gateway component, characterized in that: include: Processor, memory, communication interface; The memory is used to store executable instructions of the processor; The processor is configured to execute the method for processing routing data according to claim 1 or 2 by executing the executable instructions.
6. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for processing routing data according to claim 1 or 2 is implemented.
7. A computer program product, characterized in that The computer program product includes computer program codes, and when the computer program codes are executed on a computer, the computer is enabled to implement the method according to claim 1 or 2.
8. A gateway system, characterized in that: include: The gateway component, management server and routing database as claimed in claim 3 or 4.
