Gateway shared connection control method and system based on containerized service configuration

Through the division and transfer of containerized service configuration and gateway images, the problem of low efficiency and reliability of connection between clients and gateways is solved, and efficient gateway connections and connection status management of multiple clients are realized.

CN117834702BActive Publication Date: 2024-09-17HUIZHIAN INFORMATION TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202311849427.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-29
Publication Date
2024-09-17
Estimated Expiration
2043-12-29

AI Technical Summary

Technical Problem

In the existing technology, the connection between the client and the gateway requires complex debugging and batch connections cannot be achieved, resulting in low connection efficiency and reliability.

Method used

Through the method based on containerized service configuration, obtain the network connection status information of all clients, divide the client clusters, and select appropriate containers and gateway images in the gateway platform for configuration and debugging to ensure the normal working status of the gateway image. When a container is working at its limit, transfer the gateway image to another container to maintain efficient and reliable connections.

Benefits of technology

It realizes the unified gateway connection of multiple clients, ensures normal network communication of the gateway image, and transfers the image under the extreme working state of the container to ensure the efficiency and reliability of the connection between the client and the gateway.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117834702B
    Figure CN117834702B
Patent Text Reader

Abstract

The present invention provides a gateway shared connection control method and system based on containerized service configuration. Based on the work logs of all clients, the network connection status information of all clients is obtained, so that all clients are divided into a number of client clusters, and the subsequent unified gateway connection of multiple clients is realized; a corresponding container is selected in a gateway platform as a docking container of the client cluster, and a matching gateway image is selected and loaded in the docking container, so that the gateway image is debugged to a normal working state, ensuring the normal network communication of the gateway image; all clients under the client cluster are connected to the gateway image of the docking container in turn, so as to realize the integrated gateway connection of multiple clients; when the docking container is in an extreme working state, the gateway image inside the docking container is transferred to another container under the gateway platform, so as to ensure the connection efficiency and reliability between the client and the gateway.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of the Internet, and in particular to a gateway shared connection control method and system based on containerized service configuration. Background Art

[0002] When the client connects to the gateway, it is necessary to perform debugging operations such as command setting and server configuration on the gateway to ensure compatibility between the client and the gateway and maintain a stable connection between the client and the gateway. However, the above method not only requires a lot of complex debugging work, but also can only perform a single connection operation between the client and the gateway at the same time, and cannot achieve batch connection between the client and the gateway, which reduces the connection efficiency and reliability between the client and the gateway. Summary of the invention

[0003] The object of the present invention is to provide a gateway shared connection control method and system based on containerized service configuration, which obtains network connection status information of all clients based on the work logs of all clients, thereby dividing all clients into several client clusters to realize subsequent unified gateway connection for multiple clients; a corresponding container is selected in a gateway platform as a docking container for the client cluster, and a matching gateway image is selected and loaded in the docking container, thereby debugging the gateway image to a normal working state and ensuring normal network communication of the gateway image; all clients under the client cluster are connected to the gateway image of the docking container in turn to realize integrated gateway connection for multiple clients; when the docking container is in an extreme working state, the gateway image inside the docking container is transferred to another container under the gateway platform to ensure the connection efficiency and reliability between the client and the gateway.

[0004] The present invention is achieved through the following technical solutions:

[0005] A gateway shared connection control method based on containerized service configuration includes:

[0006] Based on the work logs of all clients, network connection status information of all clients is obtained; based on the network connection status information, all clients are divided into a number of client clusters;

[0007] Based on the container allocation history record of the gateway platform, a corresponding container is selected in the gateway platform as a docking container of the client cluster; based on the network connection requirement information of the client cluster, a matching gateway image is selected to be loaded in the docking container, and the gateway image is configured and debugged, so that the gateway image is switched to a normal working state;

[0008] Connecting all clients under the client cluster to the gateway image of the docking container in sequence, and obtaining real-time connection load status information of the gateway image; judging whether the docking container is in a limit working state based on the real-time connection load status information;

[0009] When the docking container is in a limit working state, the gateway image inside the docking container is transferred to another container under the gateway platform, and then the connection operation between the client cluster and the gateway image inside the other container is continued.

[0010] Optionally, based on the work logs of all the clients, network connection status information of all the clients is obtained; based on the network connection status information, all the clients are divided into a number of client clusters, including:

[0011] Obtaining the external task data transmission work logs of all clients respectively, analyzing the external task data transmission work logs, and obtaining the external task data transmission destination information of all clients respectively, and using this as the network connection status information;

[0012] Based on the external connection task data transmission destination information, all clients having the same external connection task data transmission destination terminal identity information are divided into the same client cluster, thereby dividing all clients into a number of client clusters.

[0013] Optionally, based on the container allocation history of the gateway platform, a corresponding container is selected in the gateway platform as a docking container of the client cluster; based on the network connection requirement information of the client cluster, a matching gateway image is selected to be loaded in the docking container, and the gateway image is configured and debugged, so that the gateway image is switched to a normal working state, including:

[0014] Analyze the container allocation history of the gateway platform, determine the gateway image loading duration information of all containers under the gateway platform, and use the container with the minimum gateway image loading duration as the docking container of the client cluster;

[0015] The network connection requirement information of the client cluster is analyzed to obtain the identity information of the external task data transmission destination terminal common to all clients under the client cluster, and the gateway image with the shortest network distance to the common external task data transmission destination terminal is loaded into the docking container, and then the gateway instruction configuration and debugging of the gateway image is performed, so as to switch the gateway image to a normal working state.

[0016] Optionally, connecting all clients under the client cluster to the gateway image of the docking container in sequence, and obtaining real-time connection load status information of the gateway image; and judging whether the docking container is in a limit working state based on the real-time connection load status information, including:

[0017] Based on the execution order of the external connection tasks of all the clients under the client cluster, all the clients under the client cluster are sequentially connected to the gateway image of the docking container, and the real-time connection data flow value of the gateway image is obtained as the real-time connection load status information;

[0018] The real-time connection data flow value is compared with a preset flow threshold value. If the real-time connection data flow value is greater than or equal to the preset flow threshold value, it is determined that the docking container is in a limit working state; otherwise, it is determined that the docking container is not in a limit working state.

[0019] Optionally, when judging that the docking container is in the extreme working state, judging whether the docking container is in the extreme working state intermittently includes:

[0020] Step S1: Assume that the data flow value of a connection at a certain moment of a certain docking container is greater than or equal to a preset flow threshold, and the data flow of the subsequent three unit times at that moment in the past 7 days is V i1 、V i12 、V i3 , where i is the number of the last 7 days, which is an integer greater than or equal to 1 and less than or equal to 7. The average data flow of the container in the next three unit times at this time in the last 7 days is:

[0021]

[0022] In the above formula (1), The average data flow of the container in the three subsequent time units at that time in the last 7 days;

[0023] Step S2, based on the result of the above formula (1), calculate the standard deviation of the data flow of the container in the next three unit times at this time in the last 7 days,

[0024]

[0025] In the above formula (2), σ is the standard deviation of the data flow of the container in the next three unit times at that time in the last 7 days;

[0026] Step S3, according to the results of the above formulas (1) and (2), it is determined whether the connection data flow value of the docking container at the moment is greater than or equal to the preset flow threshold value, which is intermittent.

[0027]

[0028] In the above formula (3), V is the preset flow threshold, V' is the connection data flow value of the docking container at that moment, and f is a judgment formula for judging whether the connection data flow value of the docking container at that moment is greater than or equal to the preset flow threshold and is intermittent. When f is greater than 1, it indicates that the connection data flow value of the docking container at that moment is greater than or equal to the preset flow threshold and is intermittent; when f is less than or equal to 1, it indicates that the connection data flow value of the docking container at that moment is greater than or equal to the preset flow threshold and is not intermittent, and the docking container is not in an extreme working state.

[0029] Optionally, when the docking container is in a limit working state, the gateway image inside the docking container is transferred to another container under the gateway platform, and then the connection operation between the client cluster and the gateway image inside the other container is continued, including:

[0030] When the docking container is in a limit working state, another container with a larger data capacity than the docking container is selected from the gateway platform, and the gateway image inside the docking container is transferred to the other container, and then the connection operation between the client cluster and the gateway image inside the other container is continued.

[0031] A gateway shared connection control system based on containerized service configuration, including:

[0032] The client cluster division module is used to obtain the network connection status information of all clients based on the work logs of all clients; and divide all clients into several client clusters based on the network connection status information;

[0033] A container determination module, configured to select a corresponding container in the gateway platform as a docking container for the client cluster based on the container allocation history record of the gateway platform;

[0034] A gateway debugging module, configured to select a matching gateway image to be loaded into the docking container based on the network connection requirement information of the client cluster, and configure and debug the gateway image so as to switch the gateway image to a normal working state;

[0035] A gateway connection load state determination module, used to sequentially connect all clients under the client cluster to the gateway image of the docking container, and obtain real-time connection load state information of the gateway image; based on the real-time connection load state information, determine whether the docking container is in a limit working state;

[0036] The container change module is used to transfer the gateway image inside the docking container to another container under the gateway platform when the docking container is in an extreme working state, and then continue the connection operation between the client cluster and the gateway image inside the other container.

[0037] Optionally, the client cluster division module is used to obtain network connection status information of all clients based on their respective work logs; and divide all clients into a number of client clusters based on the network connection status information, including:

[0038] Obtaining the external task data transmission work logs of all clients respectively, analyzing the external task data transmission work logs, and obtaining the external task data transmission destination information of all clients respectively, using this as the network connection status information;

[0039] Based on the external connection task data transmission destination information, all clients having the same external connection task data transmission destination terminal identity information are divided into the same client cluster, thereby dividing all clients into a number of client clusters.

[0040] Optionally, the container determination module is used to select a corresponding container in the gateway platform as a docking container for the client cluster based on the container allocation history record of the gateway platform, including:

[0041] Analyze the container allocation history of the gateway platform, determine the gateway image loading duration information of all containers under the gateway platform, and use the container with the minimum gateway image loading duration as the docking container of the client cluster;

[0042] The gateway debugging module is used to select a matching gateway image to load into the docking container based on the network connection requirement information of the client cluster, and configure and debug the gateway image so as to switch the gateway image to a normal working state, including:

[0043] The network connection requirement information of the client cluster is analyzed to obtain the identity information of the external task data transmission destination terminal common to all clients under the client cluster, and the gateway image with the shortest network distance to the common external task data transmission destination terminal is loaded into the docking container, and then the gateway instruction configuration and debugging of the gateway image is performed, so as to switch the gateway image to a normal working state.

[0044] Optionally, the gateway connection load state determination module is used to sequentially connect all clients under the client cluster to the gateway image of the docking container, and obtain real-time connection load state information of the gateway image; based on the real-time connection load state information, determine whether the docking container is in a limit working state, including:

[0045] Based on the execution order of the external connection tasks of all the clients under the client cluster, all the clients under the client cluster are sequentially connected to the gateway image of the docking container, and the real-time connection data flow value of the gateway image is obtained as the real-time connection load status information;

[0046] The real-time connection data flow value is compared with a preset flow threshold value. If the real-time connection data flow value is greater than or equal to the preset flow threshold value, it is determined that the docking container is in a limit working state; otherwise, it is determined that the docking container is not in a limit working state.

[0047] Optionally, the container change module is used to transfer the gateway image inside the docking container to another container under the gateway platform when the docking container is in an extreme working state, and then continue the connection operation between the client cluster and the gateway image inside the other container, including:

[0048] When the docking container is in a limit working state, another container with a larger data capacity than the docking container is selected from the gateway platform, and the gateway image inside the docking container is transferred to the other container, and then the connection operation between the client cluster and the gateway image inside the other container is continued.

[0049] Compared with the prior art, the present invention has the following beneficial effects:

[0050] The gateway shared connection control method and system based on containerized service configuration provided by the present application obtain the network connection status information of all clients based on the work logs of all clients, thereby dividing all clients into several client clusters to realize the subsequent unified gateway connection of multiple clients; a corresponding container is selected in the gateway platform as the docking container of the client cluster, and a matching gateway image is selected and loaded in the docking container, so that the gateway image is debugged to a normal working state to ensure the normal network communication of the gateway image; all clients under the client cluster are connected to the gateway image of the docking container in turn to realize the integrated gateway connection of multiple clients; when the docking container is in an extreme working state, the gateway image inside the docking container is transferred to another container under the gateway platform to ensure the connection efficiency and reliability between the client and the gateway. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0052] Figure 1 A schematic flow chart of a gateway shared connection control method based on containerized service configuration provided by the present invention.

[0053] Figure 2 This is a schematic diagram of the structure of a gateway shared connection control system based on containerized service configuration provided by the present invention. DETAILED DESCRIPTION

[0054] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings. It is to be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some structures related to the present application are shown in the accompanying drawings, rather than all structures. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0055] The terms "including" and "having" and any variations thereof in this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0056] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0057] See also Figure 1 As shown, a gateway shared connection control method based on containerized service configuration provided by an embodiment of the present application includes:

[0058] Based on the work logs of all clients, the network connection status information of all clients is obtained; based on the network connection status information, all clients are divided into several client clusters;

[0059] Based on the container allocation history of the gateway platform, a corresponding container is selected in the gateway platform as the docking container of the client cluster; based on the network connection requirement information of the client cluster, a matching gateway image is selected to be loaded in the docking container, and the gateway image is configured and debugged, so that the gateway image is switched to a normal working state;

[0060] Connecting all clients under the client cluster to the gateway image of the docking container in sequence, and obtaining real-time connection load status information of the gateway image; judging whether the docking container is in a limit working state based on the real-time connection load status information;

[0061] When the docking container is in a critical working state, the gateway image inside the docking container is transferred to another container under the gateway platform, and then the connection operation between the client cluster and the gateway image inside the other container is continued.

[0062] The beneficial effects of the above embodiments are as follows: the gateway shared connection control method based on containerized service configuration obtains the network connection status information of all clients based on the work logs of all clients, thereby dividing all clients into several client clusters to achieve subsequent unified gateway connection for multiple clients; a corresponding container is selected in the gateway platform as the docking container of the client cluster, and a matching gateway image is selected and loaded in the docking container, so that the gateway image is debugged to a normal working state to ensure normal network communication of the gateway image; all clients under the client cluster are connected to the gateway image of the docking container in turn to achieve integrated gateway connection for multiple clients; when the docking container is in an extreme working state, the gateway image inside the docking container is transferred to another container under the gateway platform to ensure the connection efficiency and reliability between the client and the gateway.

[0063] In another embodiment, based on the work logs of all the clients, the network connection status information of all the clients is obtained; based on the network connection status information, all the clients are divided into a number of client clusters, including:

[0064] Obtaining the external task data transmission work logs of all clients, analyzing the external task data transmission work logs, and obtaining the external task data transmission destination information of all clients, which is used as the network connection status information;

[0065] Based on the external connection task data transmission destination information, all clients having the same external connection task data transmission destination terminal identity information are divided into the same client cluster, thereby dividing all clients into a number of client clusters.

[0066] The beneficial effect of the above embodiment is that the external task data transmission work logs of all clients are analyzed to obtain the external task data transmission destination information of all clients, so that the destinations that all clients want to connect to during the execution of external tasks can be identified, and all clients with the same external task data transmission destination terminal identity information can be divided into the same client cluster, so as to facilitate the subsequent unified processing of the gateway connections of all clients under the same client cluster.

[0067] In another embodiment, based on the container allocation history record of the gateway platform, a corresponding container is selected in the gateway platform as the docking container of the client cluster; based on the network connection requirement information of the client cluster, a matching gateway image is selected to be loaded in the docking container, and the gateway image is configured and debugged, so that the gateway image is switched to a normal working state, including:

[0068] Analyze the container allocation history of the gateway platform, determine the gateway image loading duration information of all containers under the gateway platform, and use the container with the minimum gateway image loading duration as the docking container of the client cluster;

[0069] The network connection requirement information of the client cluster is analyzed to obtain the identity information of the external task data transmission destination terminal common to all clients under the client cluster, and the gateway image with the shortest network distance to the common external task data transmission destination terminal is loaded into the docking container, and then the gateway instruction configuration and debugging of the gateway image is performed to switch the gateway image to a normal working state.

[0070] The beneficial effects of the above embodiments include analyzing the container allocation history of the gateway platform to determine the gateway image loading duration information of all containers under the gateway platform. The greater the gateway image loading duration of the container, the greater the probability of its being called. At this time, the container with the smallest gateway image loading duration is used as the docking container of the client cluster, which can ensure the effective occupation of the docking container by the client cluster. In addition, the network connection demand information of the client cluster is analyzed to obtain the common external task data transmission destination terminal identity information of all clients under the client cluster, and the gateway image with the shortest network distance to the common external task data transmission destination terminal is loaded into the docking container, which can ensure the real-time data transmission between the gateway image and the common external task data transmission destination terminal, and perform gateway instruction configuration debugging on the gateway image, so that the gateway image is switched to a normal working state, thereby ensuring the normal and stable operation of the gateway image inside the docking container.

[0071] In another embodiment, all clients under the client cluster are sequentially connected to the gateway image of the docking container, and real-time connection load status information of the gateway image is obtained; based on the real-time connection load status information, it is determined whether the docking container is in a limit working state, including:

[0072] Based on the execution order of the external connection tasks of all clients under the client cluster, all clients under all client clusters are sequentially connected to the gateway image of the docking container, and the real-time connection data flow value of the gateway image is obtained as the real-time connection load status information;

[0073] The real-time connection data flow value is compared with a preset flow threshold. If the real-time connection data flow value is greater than or equal to the preset flow threshold, it is determined that the docking container is in a limit working state; otherwise, it is determined that the docking container is not in a limit working state.

[0074] The beneficial effect of the above embodiment is that, based on the order of execution of the external connection tasks of all clients under the client cluster, all clients under all client clusters are sequentially connected to the gateway image of the docking container, thereby ensuring the connection reliability between all clients under the client cluster and the gateway image inside the docking container. In addition, by comparing the real-time connection data flow value with the preset flow threshold, it is possible to quickly and accurately identify whether the docking container is in an extreme working state, and to achieve timely replacement of the docking container.

[0075] In another embodiment, when determining that the docking container is in the extreme working state, determining whether the docking container is in the extreme working state intermittently includes:

[0076] Step S1: Assume that the data flow value of a docking container at a certain moment is greater than or equal to a preset flow threshold, and the data flow of the next three unit times at that moment in the past 7 days is V i1 、V i12 、V i3 , where i is the number of the last 7 days, which is an integer greater than or equal to 1 and less than or equal to 7. The average data flow of the container in the next three unit times at this time in the last 7 days is:

[0077]

[0078] In the above formula (1), The average data flow of the container in the three subsequent time units at that time in the last 7 days;

[0079] Step S2, based on the result of the above formula (1), calculate the standard deviation of the data flow of the container in the next three unit times at this time in the last 7 days,

[0080]

[0081] In the above formula (2), σ is the standard deviation of the data flow of the container in the next three unit times at that time in the last 7 days;

[0082] Step S3, based on the results of the above formulas (1) and (2), it is determined whether the connection data flow value of the docking container at this moment is greater than or equal to the preset flow threshold value, which is intermittent.

[0083]

[0084] In the above formula (3), V is the preset flow threshold, V' is the data flow value of the connection of the docking container at that moment, and f is a judgment formula for judging whether the data flow value of the connection of the docking container at that moment is greater than or equal to the preset flow threshold and is intermittent. When f is greater than 1, it indicates that the data flow value of the connection of the docking container at that moment is greater than or equal to the preset flow threshold and is intermittent. When f is less than or equal to 1, it indicates that the data flow value of the connection of the docking container at that moment is greater than or equal to the preset flow threshold and is not intermittent, and the docking container is not in an extreme working state.

[0085] The beneficial effect of the above embodiment is that since many program tasks are scheduled tasks, the data flow value is high when the task is executed, and the data flow value is low when the task is completed. Therefore, at certain moments, such as zero o'clock, the real-time connection data flow value is greater than or equal to the preset flow threshold, but the scheduled task may be completed after a few minutes, and the real-time connection data flow value will be less than the preset flow threshold. In order to avoid judging the above intermittent real-time connection data flow value greater than or equal to the preset flow threshold as an extreme working state, resulting in unnecessary subsequent container change operations, when judging whether the docking container is in an extreme working state, it is judged whether the docking container is in an extreme working state intermittently. According to the data flow changes in the three subsequent unit times corresponding to the moment when the target container data flow value is greater than or equal to the preset flow threshold, it is accurately judged whether the container data flow value is greater than or equal to the preset flow threshold is intermittent, which provides accurate data basis for subsequent container change operations and avoids waste of resources.

[0086] In another embodiment, when the docking container is in an extreme working state, the gateway image in the docking container is transferred to another container under the gateway platform, and the connection operation between the client cluster and the gateway image in the other container is continued, including:

[0087] When the docking container is in a limit working state, another container with a larger data capacity than the docking container is selected from the gateway platform, and the gateway image inside the docking container is transferred to the other container, and then the connection operation between the client cluster and the gateway image inside the other container is continued.

[0088] The beneficial effect of the above embodiment is that when the docking container is in an extreme working state, another container with a larger data capacity than the docking container is selected from the gateway platform, and the gateway image inside the docking container is transferred to the other container, and then the connection operation between the client cluster and the gateway image inside the other container is continued, thereby ensuring a stable connection between the client cluster and the gateway image.

[0089] See also Figure 2 As shown, a gateway shared connection control system based on containerized service configuration provided by an embodiment of the present application includes:

[0090] The client cluster division module is used to obtain the network connection status information of all clients based on the work logs of all clients; based on the network connection status information, all clients are divided into several client clusters;

[0091] A container determination module, used to select a corresponding container in the gateway platform as a docking container for the client cluster based on the container allocation history of the gateway platform;

[0092] A gateway debugging module is used to select a matching gateway image to load into the docking container based on the network connection requirement information of the client cluster, and configure and debug the gateway image so as to switch the gateway image to a normal working state;

[0093] A gateway connection load state determination module is used to sequentially connect all clients under the client cluster to the gateway image of the docking container and obtain real-time connection load state information of the gateway image; based on the real-time connection load state information, determine whether the docking container is in a limit working state;

[0094] The container change module is used to transfer the gateway image inside the docking container to another container under the gateway platform when the docking container is in an extreme working state, and then continue the connection operation between the client cluster and the gateway image inside the other container.

[0095] The beneficial effects of the above embodiments are as follows: the gateway shared connection control system based on containerized service configuration obtains the network connection status information of all clients based on the work logs of all clients, thereby dividing all clients into several client clusters to achieve subsequent unified gateway connection for multiple clients; a corresponding container is selected in the gateway platform as the docking container of the client cluster, and a matching gateway image is selected and loaded in the docking container, thereby debugging the gateway image to a normal working state to ensure normal network communication of the gateway image; all clients under the client cluster are connected to the gateway image of the docking container in turn to achieve integrated gateway connection for multiple clients; when the docking container is in an extreme working state, the gateway image inside the docking container is transferred to another container under the gateway platform to ensure the connection efficiency and reliability between the client and the gateway.

[0096] In another embodiment, the client cluster division module is used to obtain network connection status information of all clients based on their respective work logs; based on the network connection status information, all clients are divided into a number of client clusters, including:

[0097] Obtaining the external task data transmission work logs of all clients, analyzing the external task data transmission work logs, and obtaining the external task data transmission destination information of all clients, which is used as the network connection status information;

[0098] Based on the external connection task data transmission destination information, all clients having the same external connection task data transmission destination terminal identity information are divided into the same client cluster, thereby dividing all clients into a number of client clusters.

[0099] The beneficial effect of the above embodiment is that the external task data transmission work logs of all clients are analyzed to obtain the external task data transmission destination information of all clients, so that the destinations that all clients want to connect to during the execution of external tasks can be identified, and all clients with the same external task data transmission destination terminal identity information can be divided into the same client cluster, so as to facilitate the subsequent unified processing of the gateway connections of all clients under the same client cluster.

[0100] In another embodiment, the container determination module is used to select a corresponding container in the gateway platform as a docking container for the client cluster based on the container allocation history record of the gateway platform, including:

[0101] Analyze the container allocation history of the gateway platform, determine the gateway image loading duration information of all containers under the gateway platform, and use the container with the minimum gateway image loading duration as the docking container of the client cluster;

[0102] The gateway debugging module is used to select a matching gateway image to load into the docking container based on the network connection requirement information of the client cluster, and configure and debug the gateway image so as to switch the gateway image to a normal working state, including:

[0103] The network connection requirement information of the client cluster is analyzed to obtain the identity information of the external task data transmission destination terminal common to all clients under the client cluster, and the gateway image with the shortest network distance to the common external task data transmission destination terminal is loaded into the docking container, and then the gateway instruction configuration and debugging of the gateway image is performed to switch the gateway image to a normal working state.

[0104] The beneficial effects of the above embodiments include analyzing the container allocation history of the gateway platform to determine the gateway image loading duration information of all containers under the gateway platform. The greater the gateway image loading duration of the container, the greater the probability of its being called. At this time, the container with the smallest gateway image loading duration is used as the docking container of the client cluster, which can ensure the effective occupation of the docking container by the client cluster. In addition, the network connection demand information of the client cluster is analyzed to obtain the common external task data transmission destination terminal identity information of all clients under the client cluster, and the gateway image with the shortest network distance to the common external task data transmission destination terminal is loaded into the docking container, which can ensure the real-time data transmission between the gateway image and the common external task data transmission destination terminal, and perform gateway instruction configuration debugging on the gateway image, so that the gateway image is switched to a normal working state, thereby ensuring the normal and stable operation of the gateway image inside the docking container.

[0105] In another embodiment, the gateway connection load state determination module is used to sequentially connect all clients under the client cluster to the gateway image of the docking container, and obtain real-time connection load state information of the gateway image; based on the real-time connection load state information, determine whether the docking container is in a limit working state, including:

[0106] Based on the execution order of the external connection tasks of all clients under the client cluster, all clients under all client clusters are sequentially connected to the gateway image of the docking container, and the real-time connection data flow value of the gateway image is obtained as the real-time connection load status information;

[0107] The real-time connection data flow value is compared with a preset flow threshold. If the real-time connection data flow value is greater than or equal to the preset flow threshold, it is determined that the docking container is in a limit working state; otherwise, it is determined that the docking container is not in a limit working state.

[0108] The beneficial effect of the above embodiment is that, based on the order of execution of the external connection tasks of all clients under the client cluster, all clients under all client clusters are sequentially connected to the gateway image of the docking container, thereby ensuring the connection reliability between all clients under the client cluster and the gateway image inside the docking container. In addition, by comparing the real-time connection data flow value with the preset flow threshold, it is possible to quickly and accurately identify whether the docking container is in an extreme working state, and to achieve timely replacement of the docking container.

[0109] In another embodiment, the container change module is used to transfer the gateway image inside the docking container to another container under the gateway platform when the docking container is in an extreme working state, and then continue the connection operation between the client cluster and the gateway image inside the other container, including:

[0110] When the docking container is in a limit working state, another container with a larger data capacity than the docking container is selected from the gateway platform, and the gateway image inside the docking container is transferred to the other container, and then the connection operation between the client cluster and the gateway image inside the other container is continued.

[0111] The beneficial effect of the above embodiment is that when the docking container is in an extreme working state, another container with a larger data capacity than the docking container is selected from the gateway platform, and the gateway image inside the docking container is transferred to the other container, and then the connection operation between the client cluster and the gateway image inside the other container is continued, thereby ensuring a stable connection between the client cluster and the gateway image.

[0112] In general, the gateway shared connection control method and system based on containerized service configuration obtains the network connection status information of all clients based on the work logs of all clients, thereby dividing all clients into several client clusters to achieve subsequent unified gateway connection for multiple clients; a corresponding container is selected in the gateway platform as the docking container of the client cluster, and a matching gateway image is selected and loaded in the docking container, so that the gateway image is debugged to a normal working state to ensure normal network communication of the gateway image; all clients under the client cluster are connected to the gateway image of the docking container in turn to achieve integrated gateway connection for multiple clients; when the docking container is in an extreme working state, the gateway image inside the docking container is transferred to another container under the gateway platform to ensure the connection efficiency and reliability between the client and the gateway.

[0113] The above is only a specific implementation of the present invention, and any other improvements made based on the concept of the present invention are considered to be within the protection scope of the present invention.

Claims

1. A gateway shared connection control method based on containerized service configuration, characterized in that: include: Based on the work logs of all clients, obtain the network connection status information of all clients; Based on the network connection status information, all clients are divided into a number of client clusters; Based on the container allocation history record of the gateway platform, selecting a corresponding container in the gateway platform as a docking container for the client cluster; Based on the network connection requirement information of the client cluster, a matching gateway image is selected and loaded into the docking container, and the gateway image is configured and debugged, so that the gateway image is switched to a normal working state; Connecting all clients under the client cluster to the gateway image of the docking container in sequence, and obtaining real-time connection load status information of the gateway image; judging whether the docking container is in a limit working state based on the real-time connection load status information; When the docking container is in an extreme working state, the gateway image in the docking container is transferred to another container under the gateway platform, and then the connection operation between the client cluster and the gateway image in the other container is continued; Among them, based on the container allocation history of the gateway platform, a corresponding container is selected in the gateway platform as the docking container of the client cluster; based on the network connection requirement information of the client cluster, a matching gateway image is selected to be loaded in the docking container, and the gateway image is configured and debugged, so that the gateway image is switched to a normal working state, including: Analyze the container allocation history of the gateway platform, determine the gateway image loading duration information of all containers under the gateway platform, and use the container with the minimum gateway image loading duration as the docking container of the client cluster; Analyze the network connection demand information of the client cluster to obtain the common external task data transmission destination terminal identity information of all clients under the client cluster, load the gateway image with the shortest network distance to the common external task data transmission destination terminal into the docking container, and then perform gateway instruction configuration debugging on the gateway image, so as to switch the gateway image to a normal working state; The method includes sequentially connecting all clients under the client cluster to the gateway image of the docking container, and obtaining real-time connection load status information of the gateway image; and judging whether the docking container is in a limit working state based on the real-time connection load status information, including: Based on the execution order of the external connection tasks of all the clients under the client cluster, all the clients under the client cluster are sequentially connected to the gateway image of the docking container, and the real-time connection data flow value of the gateway image is obtained as the real-time connection load status information; The real-time connection data flow value is compared with a preset flow threshold value. If the real-time connection data flow value is greater than or equal to the preset flow threshold value, it is determined that the docking container is in a limit working state; otherwise, it is determined that the docking container is not in a limit working state.

2. The gateway shared connection control method based on containerized service configuration according to claim 1, characterized in that: Based on the work logs of all clients, obtain the network connection status information of all clients; Based on the network connection status information, all clients are divided into several client clusters, including: Obtaining the external task data transmission work logs of all clients respectively, analyzing the external task data transmission work logs, and obtaining the external task data transmission destination information of all clients respectively, and using this as the network connection status information; Based on the external connection task data transmission destination information, all clients having the same external connection task data transmission destination terminal identity information are divided into the same client cluster, thereby dividing all clients into a number of client clusters.

3. The gateway shared connection control method based on containerized service configuration according to claim 1, characterized in that: When judging that the docking container is in the extreme working state, judging whether the docking container is in the extreme working state intermittently includes: Step S1: Assume that the data flow value of a docking container at a certain time is greater than or equal to a preset flow threshold, and the data flow of the next three units of time at that time in the past 7 days is V i1 、V i12 、V i3 , where i is the number of the last 7 days, which is an integer greater than or equal to 1 and less than or equal to 7. The average data flow of the container in the next three unit times at this time in the last 7 days is: In the above formula (1), The average data flow of the container in the three subsequent time units at that time in the last 7 days; Step S2, based on the result of the above formula (1), calculate the standard deviation of the data flow of the container in the next three unit times at this time in the last 7 days, In the above formula (2), σ is the standard deviation of the data flow of the container in the next three unit times at that time in the last 7 days; Step S3, according to the results of the above formulas (1) and (2), it is determined whether the connection data flow value of the docking container at the moment is greater than or equal to the preset flow threshold value, which is intermittent. In the above formula (3), V is the preset flow threshold, V' is the connection data flow value of the docking container at that moment, and f is a judgment formula for judging whether the connection data flow value of the docking container at that moment is greater than or equal to the preset flow threshold and is intermittent. When f is greater than 1, it indicates that the connection data flow value of the docking container at that moment is greater than or equal to the preset flow threshold and is intermittent; when f is less than or equal to 1, it indicates that the connection data flow value of the docking container at that moment is greater than or equal to the preset flow threshold and is not intermittent, and the docking container is not in an extreme working state.

4. The gateway shared connection control method based on containerized service configuration according to claim 1, characterized in that: When the docking container is in an extreme working state, the gateway image in the docking container is transferred to another container under the gateway platform, and the connection operation between the client cluster and the gateway image in the other container is continued, including: When the docking container is in a limit working state, another container with a larger data capacity than the docking container is selected from the gateway platform, and the gateway image inside the docking container is transferred to the other container, and then the connection operation between the client cluster and the gateway image inside the other container is continued.

5. A gateway shared connection control system based on containerized service configuration, characterized in that: include: The client cluster division module is used to obtain the network connection status information of all clients based on their respective work logs; Based on the network connection status information, all clients are divided into a number of client clusters; A container determination module, configured to select a corresponding container in the gateway platform as a docking container for the client cluster based on the container allocation history record of the gateway platform; A gateway debugging module is used to select a matching gateway image to load into the docking container based on the network connection requirement information of the client cluster, and configure and debug the gateway image. This enables the gateway mirror to switch to a normal working state; A gateway connection load state determination module, used to sequentially connect all clients under the client cluster to the gateway image of the docking container, and obtain real-time connection load state information of the gateway image; based on the real-time connection load state information, determine whether the docking container is in a limit working state; A container change module, used for transferring the gateway image inside the docking container to another container under the gateway platform when the docking container is in an extreme working state, and then continuing the connection operation between the client cluster and the gateway image inside the other container; The container determination module is used to select a corresponding container in the gateway platform as a docking container for the client cluster based on the container allocation history record of the gateway platform, including: Analyze the container allocation history of the gateway platform, determine the gateway image loading duration information of all containers under the gateway platform, and use the container with the minimum gateway image loading duration as the docking container of the client cluster; The gateway debugging module is used to select a matching gateway image to load into the docking container based on the network connection requirement information of the client cluster, and configure and debug the gateway image so as to switch the gateway image to a normal working state, including: Analyze the network connection demand information of the client cluster to obtain the common external task data transmission destination terminal identity information of all clients under the client cluster, load the gateway image with the shortest network distance to the common external task data transmission destination terminal into the docking container, and then perform gateway instruction configuration debugging on the gateway image, so as to switch the gateway image to a normal working state; The gateway connection load state determination module is used to sequentially connect all clients under the client cluster to the gateway image of the docking container, and obtain real-time connection load state information of the gateway image; based on the real-time connection load state information, determine whether the docking container is in a limit working state, including: Based on the execution order of the external connection tasks of all the clients under the client cluster, all the clients under the client cluster are sequentially connected to the gateway image of the docking container, and the real-time connection data flow value of the gateway image is obtained as the real-time connection load status information; The real-time connection data flow value is compared with a preset flow threshold value. If the real-time connection data flow value is greater than or equal to the preset flow threshold value, it is determined that the docking container is in a limit working state; otherwise, it is determined that the docking container is not in a limit working state.

6. The gateway shared connection control system based on containerized service configuration according to claim 5, characterized in that: The client cluster division module is used to obtain the network connection status information of all clients based on their respective work logs; Based on the network connection status information, all clients are divided into several client clusters, including: Obtaining the external task data transmission work logs of all clients respectively, analyzing the external task data transmission work logs, and obtaining the external task data transmission destination information of all clients respectively, and using this as the network connection status information; Based on the external connection task data transmission destination information, all clients having the same external connection task data transmission destination terminal identity information are divided into the same client cluster, thereby dividing all clients into a number of client clusters.

7. The gateway shared connection control system based on containerized service configuration according to claim 5, characterized in that: The container change module is used to transfer the gateway image inside the docking container to another container under the gateway platform when the docking container is in an extreme working state, and then continue the connection operation between the client cluster and the gateway image inside the other container, including: When the docking container is in a limit working state, another container with a larger data capacity than the docking container is selected from the gateway platform, and the gateway image inside the docking container is transferred to the other container, and then the connection operation between the client cluster and the gateway image inside the other container is continued.

Citation Information

Patent Citations

  • Home gateway for controlling smart home and implement method thereof

    CN104869054A

  • Container based practical training platform and implementation method thereof

    CN107967837A

  • A micro-service injection molding MES cloud platform

    CN109714358A

  • Mass data sharing method, open sharing platform and electronic equipment

    CN109936571A

  • Method for realizing API gateway based on kubernetes and Kong

    CN111371679A