Data caching method based on dynamic routing microservice gateway
By building a dynamic routing microservice gateway, obtaining routing data and generating data transmission links, the problem of dynamic routing communication quality affecting data transmission in the existing technology is solved, and dynamic optimization and efficiency improvement of data transmission paths are achieved.
Patent Information
- Application Number
- CN202411582224.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-07
Smart Images

Figure CN119484389A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to a data caching method based on a dynamic routing microservice gateway. Background Art
[0002] Dynamic routing data transmission is a technology that dynamically adjusts the data transmission path according to the real-time status of the network. Its core is to optimize the data transmission path and improve network performance and reliability through intelligent routing algorithms and real-time monitoring systems.
[0003] When transmitting data, the fixed data transmission path is easily affected by the communication quality of each dynamic routing end, thus affecting the final transmission of the data. How to automatically optimize the data transmission path according to the communication quality of each dynamic routing in the data transmission path, so as to make the data transmission process more efficient, is the problem we need to solve. To this end, a data caching method based on a dynamic routing microservice gateway is provided. Summary of the invention
[0004] The object of the present invention is to provide a data caching method based on a dynamic routing microservice gateway.
[0005] The purpose of the present invention can be achieved by the following technical solution: A data caching method based on a dynamic routing microservice gateway comprises the following steps:
[0006] Step S1: Build a microservice gateway composed of dynamic routes, and set a corresponding external access scope for each dynamic route;
[0007] Step S2: Acquire routing data of dynamic routing, and generate a data transmission link according to the acquired routing data;
[0008] Step S3: Upload the obtained routing data to the data storage repository via the data transmission link.
[0009] Furthermore, the process of building a microservice gateway consisting of dynamic routing includes:
[0010] Deploy corresponding dynamic routes according to the target scenario area, and set corresponding dynamic attribute information for the dynamic routes;
[0011] The dynamic route is communicatively linked to at least one other dynamic route, and the dynamic route with the communication connection is recorded as a communication-associated route;
[0012] After completing the communication links of all deployed dynamic routes, build a microservice gateway composed of dynamic routes and set the corresponding gateway center to cover the target scenario area through the constructed microservice gateway;
[0013] The dynamic attribute information of each dynamic route is synchronized to a gateway center, wherein a data storage repository is provided in the gateway center, and the dynamic attribute information of the dynamic route synchronized to the gateway center is imported into the data storage repository for storage.
[0014] Furthermore, the process of setting the corresponding external access scope for each dynamic route includes:
[0015] A plurality of signal access channels are set for each dynamic route, and a corresponding signal radiation range is set for each dynamic route; the states of the signal access channels include an occupied state and an idle state;
[0016] Set a signal access type for each signal access channel, and determine the corresponding external access range according to the set signal access type and signal radiation range;
[0017] Detect the signal source within the signal radiation range and obtain the signal type of the signal source. Match the obtained signal type of the signal source with the signal access type of each signal access channel in the idle state. If the signal type of the signal source meets the signal access type, connect the signal source to the corresponding signal access channel and update the state of the connected signal access channel to the occupied state.
[0018] Furthermore, the process of obtaining routing data of dynamic routing includes:
[0019] According to the signal source within the signal radiation range of the dynamic routing, basic information of the signal source is obtained, wherein the basic information of the signal source includes signal type, signal strength and signal source IP;
[0020] The basic information of the signal source obtained is uploaded to the gateway center, and the gateway center determines the dynamic route for communication connection with the signal source according to the signal strength in the basic information of the signal source received;
[0021] Acquire routing data of a dynamic route that communicates with a signal source in real time, wherein the routing data includes a routing IP, basic information of the signal source, and interaction data between the signal source and the dynamic route;
[0022] A data transmission link is generated according to the obtained routing data.
[0023] Furthermore, the process of generating a data transmission link according to the obtained routing data includes:
[0024] The dynamic route corresponding to the signal radiation range of the detected signal source is marked as a reference route end, and the dynamic route connected to the signal source for communication is marked as a primary route end;
[0025] According to the signal strength of the signal source detected by the reference routing end and the main routing end, the location of the signal source is determined, and the distance between the signal source and each reference routing end is obtained, and the distance between the reference routing end and the signal source is recorded as the reference distance;
[0026] Update the location of the signal source in real time, and update each reference distance according to the change of the location of the signal source;
[0027] Set a distance threshold to remove reference routing ends whose reference distance exceeds the distance threshold and whose reference distance is getting farther and farther;
[0028] The reference distance does not exceed the distance threshold, and the reference routing end with closer and closer reference is marked as the first standby node;
[0029] The primary routing end is used as the first link node;
[0030] Associating the existing first standby node with the first link node;
[0031] Generate a corresponding standby transmission link according to the standby node, and generate a primary transmission link according to the first link node;
[0032] Aggregate the generated backup transmission link and primary transmission link as a data transmission link to transmit the routing data obtained by the primary routing end to the data storage library in the gateway center;
[0033] The second dynamic routing end in the backup transmission link is recorded as the second backup node, the second dynamic routing end in the primary transmission link is recorded as the second link node, the second link node is associated with the second backup node, and so on.
[0034] Further, the process of uploading the obtained routing data to the data storage repository via the data transmission link includes:
[0035] According to the bandwidth, delay, and packet loss rate corresponding to each dynamic route on the data transmission link corresponding to the first link node, a path transmission quality evaluation is performed on the data transmission link to obtain a corresponding path quality evaluation coefficient Zp;
[0036] in,
[0037] Among them, α, β, and γ are weight coefficients respectively;
[0038] Set the quality assessment threshold Z0;
[0039] When Zp≥Z0, it indicates that the path transmission quality of the data transmission link is qualified, and the routing data is transmitted through the data transmission link. After all the routing data are uploaded to the first link node, the path transmission quality of the data transmission link is evaluated again according to the real-time bandwidth, delay, and packet loss rate of the remaining dynamic routing of the data transmission link, and so on.
[0040] When Zp<Z0, it indicates that the path transmission quality of the data transmission link is unqualified, and a first standby node associated with the first link node is obtained;
[0041] Obtain a data transmission link corresponding to the first standby node, and perform a path transmission quality evaluation on the data transmission link according to the bandwidth, delay, and packet loss rate of each dynamic route on the data transmission link to obtain a corresponding path quality evaluation coefficient, which is recorded as Zb;
[0042] When Zb≥Z0, it indicates that the path transmission quality of the data transmission link is qualified, and the first standby node is updated to the first link node, and the routing data is transmitted through the data transmission link;
[0043] After all the routing data are uploaded to the first link node, the path transmission quality of the data transmission link is evaluated again according to the real-time bandwidth, delay, and packet loss rate of the remaining dynamic routes of the data transmission link, and so on;
[0044] When Zb<Z0, it means that the path transmission quality of the data transmission link is unqualified;
[0045] If the path transmission qualities of the data transmission links corresponding to all the first standby nodes are unqualified, the standby link nodes of the data transmission links are replaced, and the routing data is transmitted after the standby link nodes are replaced.
[0046] Furthermore, the process of replacing the standby link node of the data transmission link includes:
[0047] According to the bandwidth, delay and packet loss rate of each dynamic route in the first link node, the node quality evaluation is performed to obtain the node quality evaluation coefficient Jp corresponding to the dynamic route i ;
[0048] When Jp i When ≥Z0 / n, it means that the node quality of the corresponding dynamic routing is qualified;
[0049] When Jp i<Z0 / n, it indicates that the node quality of the corresponding dynamic routing is unqualified, and the bandwidth, delay, and packet loss rate corresponding to the first standby node associated with the first link node are obtained, and then the corresponding node quality evaluation coefficient Bj is obtained;
[0050] If Bj>Jp i , performing node replacement on the first standby node and the first link node, that is, updating the first standby node to the first link node;
[0051] When all the routing data are uploaded to the first link node, the path transmission quality of the data transmission link is evaluated again according to the real-time bandwidth, delay, and packet loss rate of the remaining dynamic routing of the data transmission link. The above operation is repeated until the routing data is uploaded to the data storage library in the gateway center.
[0052] Compared with the prior art, the present invention has the following beneficial effects:
[0053] By detecting the signal strength of the signal source within the radiation range of each dynamic route detection signal, the link nodes of the data transmission link and the spare nodes of each link node are determined according to the detected signal source strength, and the path transmission quality of the data transmission link is evaluated. Based on the evaluation result, it is judged whether the path transmission quality of the data transmission link is qualified. If it is unqualified, the data transmission link corresponding to the spare node is replaced, or when the path transmission quality of the data transmission link corresponding to the spare node is unqualified, the link transmission node in the data transmission link is replaced, thereby realizing dynamic optimization of the data transmission link and improving the data transmission efficiency of the routing data. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0055] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0056] like Figure 1 As shown, a data caching method based on a dynamic routing microservice gateway includes the following steps:
[0057] Step S1: Build a microservice gateway composed of dynamic routes, and set a corresponding external access scope for each dynamic route;
[0058] Step S2: Acquire routing data of dynamic routing, and generate a data transmission link according to the acquired routing data;
[0059] Step S3: Upload the obtained routing data to the data storage repository via the data transmission link.
[0060] It should be further explained that in the specific implementation process, the process of building a microservice gateway composed of dynamic routing includes:
[0061] Deploy corresponding dynamic routes according to the target scenario area, and set corresponding dynamic attribute information for the dynamic routes, the dynamic attribute information including route ID, route status, routing protocol, bandwidth, latency and location in the target scenario area, the route status including online status, offline status and load status;
[0062] The dynamic route is communicatively linked to at least one other dynamic route, and the dynamic route with the communication connection is recorded as a communication-associated route;
[0063] After completing the communication links of all deployed dynamic routes, build a microservice gateway composed of dynamic routes and set the corresponding gateway center to cover the target scenario area through the constructed microservice gateway;
[0064] The dynamic attribute information of each dynamic route is synchronized to a gateway center, wherein a data storage repository is provided in the gateway center, and the dynamic attribute information of the dynamic route synchronized to the gateway center is imported into the data storage repository for storage.
[0065] It should be further explained that, in the specific implementation process, the process of setting the corresponding external access scope for each dynamic route includes:
[0066] A plurality of signal access channels are set for each dynamic route, and a corresponding signal radiation range is set for each dynamic route; the states of the signal access channels include an occupied state and an idle state;
[0067] Set a signal access type for each signal access channel, and determine the corresponding external access range according to the set signal access type and signal radiation range;
[0068] Detect the signal source within the signal radiation range and obtain the signal type of the signal source. Match the obtained signal type of the signal source with the signal access type of each signal access channel in the idle state. If the signal type of the signal source meets the signal access type, connect the signal source to the corresponding signal access channel and update the state of the connected signal access channel to the occupied state.
[0069] It should be further explained that, in the specific implementation process, the process of obtaining the routing data of the dynamic routing includes:
[0070] According to the signal source within the signal radiation range of the dynamic routing, basic information of the signal source is obtained, wherein the basic information of the signal source includes signal type, signal strength and signal source IP;
[0071] The basic information of the signal source obtained is uploaded to the gateway center, and the gateway center determines the dynamic route for communication connection with the signal source according to the signal strength in the basic information of the signal source received; it should be further explained that in the specific implementation process, the dynamic route with the highest signal strength is selected as the access end of the signal source;
[0072] Acquire routing data of a dynamic route that communicates with a signal source in real time, wherein the routing data includes a routing IP, basic information of the signal source, and interaction data between the signal source and the dynamic route;
[0073] A data transmission link is generated according to the obtained routing data.
[0074] It should be further explained that, in a specific implementation process, the process of generating a data transmission link according to the obtained routing data includes:
[0075] The dynamic route corresponding to the signal radiation range of the detected signal source is marked as a reference route end, and the dynamic route connected to the signal source for communication is marked as a primary route end;
[0076] According to the signal strength of the signal source detected by the reference routing end and the main routing end, the location of the signal source is determined, and the distance between the signal source and each reference routing end is obtained, and the distance between the reference routing end and the signal source is recorded as the reference distance;
[0077] Update the location of the signal source in real time, and update each reference distance according to the change of the location of the signal source;
[0078] Set a distance threshold to remove reference routing ends whose reference distance exceeds the distance threshold and whose reference distance is getting farther and farther;
[0079] The reference distance does not exceed the distance threshold, and the reference routing end with closer and closer reference is marked as the first standby node;
[0080] The primary routing end is used as the first link node;
[0081] Associating the existing first standby node with the first link node;
[0082] Generate a corresponding standby transmission link according to the standby node, and generate a primary transmission link according to the first link node;
[0083] The generated standby transmission link and primary transmission link are aggregated as a data transmission link to transmit the routing data obtained by the primary routing end to the data storage repository in the gateway center.
[0084] It should be further explained that, in the specific implementation process, the second dynamic routing end in the backup transmission link is recorded as the second backup node, the second dynamic routing end in the primary transmission link is recorded as the second link node, the second link node is associated with the second backup node, and so on.
[0085] It should be further explained that, in a specific implementation process, the process of uploading the obtained routing data to the data storage repository through the data transmission link includes:
[0086] Label each dynamic route on the data transmission link corresponding to the first link node, denoted as i, where i=1, 2, ..., n, n is an integer, and n≥1;
[0087] The bandwidth, delay, and packet loss rate corresponding to the dynamic route labeled i are denoted as B i , D i , L i ;
[0088] Then, a path transmission quality assessment is performed on the data transmission link to obtain a corresponding path quality assessment coefficient, which is recorded as Zp;
[0089] in,
[0090] Among them, α, β, and γ are weight coefficients respectively;
[0091] Set the quality assessment threshold Z0;
[0092] When Zp≥Z0, it indicates that the path transmission quality of the data transmission link is qualified, and the routing data is transmitted through the data transmission link. After all the routing data are uploaded to the first link node, the path transmission quality of the data transmission link is evaluated again according to the real-time bandwidth, delay, and packet loss rate of the remaining dynamic routing of the data transmission link, and so on.
[0093] When Zp<Z0, it indicates that the path transmission quality of the data transmission link is unqualified, and a first standby node associated with the first link node is obtained;
[0094] Obtain a data transmission link corresponding to the first standby node, and perform a path transmission quality evaluation on the data transmission link according to the bandwidth, delay, and packet loss rate of each dynamic route on the data transmission link to obtain a corresponding path quality evaluation coefficient, which is recorded as Zb;
[0095] When Zb>Z0, it indicates that the path transmission quality of the data transmission link is qualified, and the first standby node is updated to the first link node, and the routing data is transmitted through the data transmission link;
[0096] After all the routing data are uploaded to the first link node, the path transmission quality of the data transmission link is evaluated again according to the real-time bandwidth, delay, and packet loss rate of the remaining dynamic routes of the data transmission link, and so on;
[0097] When Zb≤Z0, it means that the path transmission quality of the data transmission link is unqualified;
[0098] If the path transmission qualities of the data transmission links corresponding to all the first standby nodes are unqualified, the standby link nodes of the data transmission links are replaced, and the routing data is transmitted after the standby link nodes are replaced.
[0099] It should be further explained that, in a specific implementation process, the process of replacing the standby link node of the data transmission link includes:
[0100] The node quality evaluation is performed according to the bandwidth, delay, and packet loss rate of each dynamic route in the first link node, and the node quality evaluation coefficient corresponding to the dynamic route labeled i is obtained, which is recorded as Jp i ;
[0101] Among them, Jp i =α×D i +β×B i +γ×L i ;
[0102] When Jp i When ≥Z0 / n, it means that the node quality of the corresponding dynamic routing is qualified;
[0103] When Jp i <Z0 / n, it indicates that the node quality of the corresponding dynamic routing is unqualified, and the bandwidth, delay, and packet loss rate corresponding to the first standby node associated with the first link node are obtained, and then the corresponding node quality evaluation coefficient is obtained, which is recorded as Bj;
[0104] If Bj>Jp i , performing node replacement on the first standby node and the first link node, that is, updating the first standby node to the first link node;
[0105] If Bj≤Jp i , it means that the first standby node is unqualified; it should be further explained that, in the specific implementation process, if all the first standby nodes are unqualified, the first link node will not be replaced;
[0106] When all the routing data are uploaded to the first link node, the path transmission quality of the data transmission link is evaluated again according to the real-time bandwidth, delay, and packet loss rate of the remaining dynamic routing of the data transmission link. The above operation is repeated until the routing data is uploaded to the data storage library in the gateway center.
[0107] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments with equivalent changes without departing from the scope of the technical solution of the present invention. However, any modification or equivalent replacement of the above embodiments made according to the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the scope of the technical solution of the present invention.
Claims
1. A data caching method based on a dynamic routing microservice gateway, characterized in that: The following steps are involved: Step S1: Build a microservice gateway composed of dynamic routes, and set a corresponding external access scope for each dynamic route; Step S2: Acquire routing data of dynamic routing, and generate a data transmission link according to the acquired routing data; Step S3: Upload the obtained routing data to the data storage repository via the data transmission link.
2. According to claim 1, a data caching method based on a dynamic routing microservice gateway is characterized in that: The process of building a microservice gateway consisting of dynamic routes includes: Deploy corresponding dynamic routes according to the target scenario area, and set corresponding dynamic attribute information for the dynamic routes; The dynamic route is communicatively linked to at least one other dynamic route, and the dynamic route with the communication connection is recorded as a communication-associated route; After completing the communication links of all deployed dynamic routes, build a microservice gateway composed of dynamic routes and set the corresponding gateway center to cover the target scenario area through the constructed microservice gateway; The dynamic attribute information of each dynamic route is synchronized to a gateway center, wherein a data storage repository is provided in the gateway center, and the dynamic attribute information of the dynamic route synchronized to the gateway center is imported into the data storage repository for storage.
3. According to claim 2, a data caching method based on a dynamic routing microservice gateway is characterized in that: The process of setting the corresponding external access scope for each dynamic route includes: A plurality of signal access channels are set for each dynamic route, and a corresponding signal radiation range is set for each dynamic route; the states of the signal access channels include an occupied state and an idle state; Set a signal access type for each signal access channel, and determine the corresponding external access range according to the set signal access type and signal radiation range; Detect the signal source within the signal radiation range and obtain the signal type of the signal source. Match the obtained signal type of the signal source with the signal access type of each signal access channel in the idle state. If the signal type of the signal source meets the signal access type, connect the signal source to the corresponding signal access channel and update the state of the connected signal access channel to the occupied state.
4. According to claim 3, a data caching method based on a dynamic routing microservice gateway is characterized in that: The process of obtaining routing data for dynamic routing includes: According to the signal source within the signal radiation range of the dynamic routing, basic information of the signal source is obtained, wherein the basic information of the signal source includes signal type, signal strength and signal source IP; The basic information of the signal source obtained is uploaded to the gateway center, and the gateway center determines the dynamic route for communication connection with the signal source according to the signal strength in the basic information of the signal source received; Acquire routing data of a dynamic route that communicates with a signal source in real time, wherein the routing data includes a routing IP, basic information of the signal source, and interaction data between the signal source and the dynamic route; A data transmission link is generated according to the obtained routing data.
5. According to claim 4, a data caching method based on a dynamic routing microservice gateway is characterized in that: The process of generating a data transmission link according to the obtained routing data includes: The dynamic route corresponding to the signal radiation range of the detected signal source is marked as a reference route end, and the dynamic route connected to the signal source for communication is marked as a primary route end; According to the signal strength of the signal source detected by the reference routing end and the main routing end, the location of the signal source is determined, and the distance between the signal source and each reference routing end is obtained, and the distance between the reference routing end and the signal source is recorded as the reference distance; Update the location of the signal source in real time, and update each reference distance according to the change of the location of the signal source; Set a distance threshold to remove reference routing ends whose reference distance exceeds the distance threshold and whose reference distance is getting farther and farther; The reference distance does not exceed the distance threshold, and the reference routing end with closer and closer reference is marked as the first standby node; The primary routing end is used as the first link node; Associating the existing first standby node with the first link node; Generate a corresponding standby transmission link according to the standby node, and generate a primary transmission link according to the first link node; Aggregate the generated backup transmission link and primary transmission link as a data transmission link to transmit the routing data obtained by the primary routing end to the data storage library in the gateway center; The second dynamic routing end in the backup transmission link is recorded as the second backup node, the second dynamic routing end in the primary transmission link is recorded as the second link node, the second link node is associated with the second backup node, and so on.
6. A data caching method based on a dynamic routing microservice gateway according to claim 5, characterized in that: The process of uploading the acquired routing data to the data repository via the data transmission link includes: According to the bandwidth, delay, and packet loss rate corresponding to each dynamic route on the data transmission link corresponding to the first link node, a path transmission quality evaluation is performed on the data transmission link to obtain a corresponding path quality evaluation coefficient Zp; in, Among them, α, β, and γ are weight coefficients respectively; Set the quality assessment threshold Z0; When Zp≥Z0, it indicates that the path transmission quality of the data transmission link is qualified, and the routing data is transmitted through the data transmission link. After all the routing data are uploaded to the first link node, the path transmission quality of the data transmission link is evaluated again according to the real-time bandwidth, delay, and packet loss rate of the remaining dynamic routing of the data transmission link, and so on. When Zp<Z0, it indicates that the path transmission quality of the data transmission link is unqualified, and a first standby node associated with the first link node is obtained; The data transmission link corresponding to the first standby node is obtained, and according to the bandwidth, delay, and packet loss rate of each dynamic route on the data transmission link, a path transmission quality evaluation is performed on the data transmission link to obtain a corresponding path quality evaluation coefficient Zb.
7. A data caching method based on a dynamic routing microservice gateway according to claim 6, characterized in that: When Zb≥Z0, it indicates that the path transmission quality of the data transmission link is qualified, and the first standby node is updated to the first link node, and the routing data is transmitted through the data transmission link; After all the routing data are uploaded to the first link node, the path transmission quality of the data transmission link is evaluated again according to the real-time bandwidth, delay, and packet loss rate of the remaining dynamic routes of the data transmission link, and so on; When Zb<Z0, it means that the path transmission quality of the data transmission link is unqualified; If the path transmission qualities of the data transmission links corresponding to all the first standby nodes are unqualified, the standby link nodes of the data transmission links are replaced, and the routing data is transmitted after the standby link nodes are replaced.
8. A data caching method based on a dynamic routing microservice gateway according to claim 6, characterized in that: The process of replacing the standby link node of the data transmission link includes: According to the bandwidth, delay and packet loss rate of each dynamic route in the first link node, the node quality evaluation is performed to obtain the node quality evaluation coefficient Jp corresponding to the dynamic route i ; When Jp i When ≥Z0 / n, it means that the node quality of the corresponding dynamic routing is qualified; When Jp i <Z0 / n, it indicates that the node quality of the corresponding dynamic routing is unqualified, and the bandwidth, delay, and packet loss rate corresponding to the first standby node associated with the first link node are obtained, and then the corresponding node quality evaluation coefficient Bj is obtained; If Bj>Jp i , performing node replacement on the first standby node and the first link node, that is, updating the first standby node to the first link node; When all the routing data are uploaded to the first link node, the path transmission quality of the data transmission link is evaluated again according to the real-time bandwidth, delay, and packet loss rate of the remaining dynamic routing of the data transmission link. The above operation is repeated until the routing data is uploaded to the data storage library in the gateway center.
Citation Information
Patent Citations
Route collaborating network system and working method thereof
CN101286944A
Micro-service-based high-concurrency cloud platform file transmission optimization method
CN111526208A
Method for realizing dynamic routing of micro-service gateway
CN112804722A
Data transmission method and system applied to information center network
CN117081978A
Automatic routing in a mesh network of wireless messaging devices
US20210084566A1