CN116016442A - ip address resource management method, cloud gateway, electronic device and storage medium - Google Patents

ip address resource management method, cloud gateway, electronic device and storage medium Download PDF

Info

Publication number
CN116016442A
CN116016442A CN202211714808.7A CN202211714808A CN116016442A CN 116016442 A CN116016442 A CN 116016442A CN 202211714808 A CN202211714808 A CN 202211714808A CN 116016442 A CN116016442 A CN 116016442A
Authority
CN
China
Prior art keywords
time
target terminal
period
monitoring period
address resource
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211714808.7A
Other languages
Chinese (zh)
Inventor
陈真
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Greenet Information Service Co Ltd
Original Assignee
Wuhan Greenet Information Service Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Greenet Information Service Co Ltd filed Critical Wuhan Greenet Information Service Co Ltd
Priority to CN202211714808.7A priority Critical patent/CN116016442A/en
Publication of CN116016442A publication Critical patent/CN116016442A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The method is applied to a cloud gateway, real-time flow data of a target terminal are analyzed, a time difference between the latest time of the target terminal accessing a network and the current time is calculated, if the time difference is larger than a preset difference value, the target terminal does not access the network for a long time, the target terminal is possibly in a downlink state, then a reachability detection message is sent to the target terminal, if the target terminal does not return a response message, the target terminal can be judged to be in a downlink state, at the moment, the ip address resource of the target terminal is recovered, and the recovery time is accurate, so that normal use of the target terminal is not influenced, network resources are saved, the utilization rate of the network resources is improved to the greatest extent, and the conditions of insufficient resources and resource waste are reduced.

Description

ip address resource management method, cloud gateway, electronic device and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an ip address resource management method, a cloud gateway, an electronic device, and a storage medium.
Background
In the management of the current network address resources, a sub local area network is mainly used, namely, the terminal equipment is accessed to the optical modem/router, the ip address applied by the terminal is provided by the router, and belongs to a private network address, the private network address currently has two types of dynamic ip addresses and static ip addresses, the dynamic ip addresses are temporary and can be changed when the system or the router is restarted, the static ip addresses are not changed and are autonomously configured by the terminal, and the system can be kept unchanged for weeks, months or even years. At present, the dynamic ip address is maintained by a lease mechanism, i.e. a fixed lease is configured at the dhcp server end, and after the terminal leases the ip successfully, the ip can be used in the lease. The static ip address is self-configured by the terminal, which can directly use the ip to access the network.
In the current ip address resource release scheme, the release time of the dynamic ip address depends on the lease configuration of the ip address, if the terminal is offline before the lease is over, the dynamic ip address resource still is occupied for a period of time, and other users who want to access the network can access the network due to insufficient resources and fail to access the network normally. The main release scheme of the static ip address is timing cleaning and flow statistics, but because the static ip address is autonomously configured by a user, the adoption of the timing cleaning can cause short-term network fluctuation and even network disconnection risks of the user, and the adoption of the flow statistics has larger error, because no flow generation at present can be that the user is off line or in a standby state, and if the static ip address resource is directly recovered, the normal use of the standby user can be influenced.
In summary, the current network resource management method has the technical problem of inaccurate ip address resource recovery time, and needs to be improved.
Disclosure of Invention
The embodiment of the application provides an ip address resource management method, a cloud gateway, electronic equipment and a storage medium, which are used for relieving the technical problem that the current ip address resource recovery time is inaccurate.
In order to solve the technical problems, the embodiment of the application provides the following technical scheme:
the application provides an ip address resource management method, which is applied to a cloud gateway, and comprises the following steps:
acquiring real-time flow data of a target terminal;
determining the latest time of the target terminal accessing the network according to the real-time flow data, and obtaining the time difference between the latest time and the current time;
when the time difference is larger than a preset difference value, sending a reachability detection message to the target terminal;
and if the response message returned by the target terminal is not received under the preset condition, the ip address resource of the target terminal is recovered.
Meanwhile, the embodiment of the application also provides a cloud gateway, which comprises:
the acquisition module is used for acquiring real-time flow data of the target terminal;
the obtaining module is used for determining the latest time of the target terminal accessing the network according to the real-time flow data and obtaining the time difference between the latest time and the current time;
the sending module is used for sending a reachability detection message to the target terminal when the time difference is larger than a preset difference value;
and the recovery module is used for recovering the ip address resource of the target terminal if the response message returned by the target terminal is not received under the preset condition.
The application also provides an electronic device comprising a memory and a processor; the memory stores an application program, and the processor is configured to run the application program in the memory, so as to execute the steps in the ip address resource management method described in any one of the above.
The embodiment of the application provides a computer readable storage medium, wherein the computer readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the ip address resource management method.
The beneficial effects are that: the method is applied to a cloud gateway, and specifically comprises the steps of firstly obtaining real-time flow data of a target terminal, then determining the latest time of the target terminal for accessing a network according to the real-time flow data, obtaining a time difference between the latest time and the current time, sending a reachability detection message to the target terminal when the time difference is larger than a preset difference value, and recovering the ip address resource of the target terminal if a response message returned by the target terminal is not received under the preset condition. According to the method and the device, the real-time flow data of the target terminal are analyzed, the time difference between the latest time when the target terminal accesses the network and the current time is calculated, if the time difference is larger than the preset difference, the target terminal is not accessed to the network for a long time and is possibly in a downlink state, then a reachability detection message is sent to the target terminal, if the target terminal does not return a response message, the target terminal can be judged to be off line, at the moment, the ip address resource of the target terminal is recovered, the recovery time is accurate, normal use of the target terminal is not affected, network resources are saved, the use rate of the network resources is improved to the greatest extent, and the conditions of insufficient resources and resource waste are reduced.
Drawings
Technical solutions and other advantageous effects of the present application will be made apparent from the following detailed description of specific embodiments of the present application with reference to the accompanying drawings.
Fig. 1 is a schematic view of a scenario of an ip address resource management method according to an embodiment of the present application.
Fig. 2 is a flow chart of an ip address resource management method according to an embodiment of the present application.
Fig. 3 is a schematic diagram of an interaction process between a terminal and a cloud gateway in an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a cloud gateway according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Referring to fig. 1, fig. 1 is a schematic view of a scenario of an application of an ip address resource management method provided in an embodiment of the present application, where the scenario may include a plurality of terminals and a cloud gateway, the terminals may be various terminal devices such as a mobile phone and a computer, and the cloud gateway is a communication device between the terminals and a cloud server, where:
the terminal can apply for a dynamic ip address to the cloud gateway or configure a static ip address by itself, and then use the ip address to access the network, and real-time traffic data can be generated during access. The cloud gateway firstly acquires real-time flow data of the target terminal, then determines the latest time of the target terminal accessing the network according to the real-time flow data, obtains the time difference between the latest time and the current time, and sends a reachability detection message to the target terminal when the time difference is larger than a preset difference value, if a response message returned by the target terminal is not received under the preset condition, the cloud gateway judges that the target terminal is offline, ip address resources of the target terminal can be recovered and distributed to other terminals for reuse, and if a response message returned by the target terminal is received under the preset condition, the cloud gateway judges that the target terminal is in a standby state, and continues the detection process. The ip address resource recovery time calculated by the method is accurate, and recovery at the moment does not influence the normal use of the target terminal, saves network resources and improves the resource utilization rate.
It should be noted that, the schematic system scenario shown in fig. 1 is only an example, and the servers and the scenarios described in the embodiments of the present application are for more clearly describing the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application, and as one of ordinary skill in the art can know, with the evolution of the system and the appearance of a new service scenario, the technical solutions provided in the embodiments of the present application are equally applicable to similar technical problems. The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
Referring to fig. 2, fig. 2 is a flow chart of an ip address resource management method according to an embodiment of the present application, where the method specifically includes:
s1: and acquiring real-time flow data of the target terminal.
The ip address resource management method is applied to a cloud gateway, and the cloud gateway is equipment used as an intercommunication bridge between local and cloud services. The target terminal refers to any terminal accessing the network through the cloud gateway, and before the target terminal accesses the network, the target terminal needs to acquire its own ip address, where the ip address may be a static ip address or a dynamic ip address, and is specifically determined according to the requirement of the target terminal. If the static ip address is the static ip address, the cloud gateway allocates the static ip address to the target terminal, and configures a fixed lease period, after the target terminal leases the dynamic ip address successfully, the ip address can be used in the lease period, and if the static ip address is the static ip address, the target terminal configures the static ip address by itself. For convenience of explanation, the dynamic ip address is taken as an example in this embodiment.
As shown in fig. 3, the cloud gateway in the present application includes a network resource management module, a traffic statistics analysis module and a resource detection recovery module, where the target terminal sends a dhcp message to the cloud gateway to apply for a dynamic ip address, and the network resource management model of the cloud gateway allocates an unoccupied ip address to the target terminal from an address pool in response to a request of the message, so that the target terminal can normally use the ip address to access the network. The target terminal generates real-time flow data when accessing the network, and does not generate real-time flow data when stopping accessing the network, and the work of acquiring, counting, analyzing and the like of the real-time flow data is responsible for a flow statistic analysis module of the cloud gateway.
S2: and determining the latest time of the target terminal accessing the network according to the real-time flow data, and obtaining the time difference between the latest time and the current time.
As shown in fig. 3, the traffic statistics analysis module acquires and counts the real-time traffic data, if the real-time traffic data can be counted all the time, it indicates that the target terminal is accessing the network all the time, the traffic statistics analysis module only needs to keep the statistics state, and if the real-time traffic data is not counted in a fixed period, the traffic statistics analysis module needs to calculate the timeout time for the target terminal to stop accessing the network, and decides whether to notify the resource detection recovery module to perform the subsequent work according to the timeout time.
Specifically, the flow statistics analysis module counts real-time flow data, so that the latest time of the target terminal accessing the network, namely the last access time, can be obtained, and the time difference DeltaT between the latest time T1 and the current time T2, namely the overtime time, is calculated. If the target terminal is accessing the network all the time, the latest time T1 is changed all the time, the time difference DeltaT is 0, if the target terminal stops accessing the network at a certain moment, no real-time traffic data can be generated from the moment, the real-time traffic data can be generated again until the target terminal restarts to access the network, the latest time T1 is the moment of stopping accessing, and the value of the time difference DeltaT is gradually increased along with the current time T.
In one embodiment, S2 specifically includes: acquiring a flow monitoring period of a target terminal; based on the flow monitoring period, the time difference between the latest time and the current time is calculated regularly. When calculating the time difference, a timing calculation method may be adopted, and before calculating the time difference, a flow monitoring period of the target terminal needs to be set, for example, 10 seconds is taken as a period, the value is stored in advance, meanwhile, a timer is maintained in the cloud gateway, and after the value is obtained, calculation is performed once at a fixed time of each flow monitoring period based on the value.
In one embodiment, the step of obtaining the traffic monitoring period of the target terminal specifically includes: according to the historical flow data of the target terminal, determining a first access time period and a second access time period of the target terminal, wherein the offline rate of the target terminal in the first access time period is higher than a threshold value, and the offline rate of the target terminal in the second access time period is not higher than the threshold value; and respectively acquiring a first flow monitoring period of the target terminal in a first access time period and a second flow monitoring period of the target terminal in a second access time period, wherein the first flow monitoring period is smaller than the second flow monitoring period. The step of calculating the time difference between the latest time and the current time at fixed time based on the flow monitoring period specifically comprises the following steps: in the first access period, the time difference between the latest time and the current time is calculated based on the first flow monitoring period timing, and in the second access period, the time difference between the latest time and the current time is calculated based on the second flow monitoring period timing.
When the flow monitoring period of the target terminal is set, a fixed value such as 10 seconds can be set, the network access condition of the target terminal in the historical time period can be analyzed, and different periods are set for timing calculation according to the analysis result, so that whether the target terminal is offline or not can be rapidly known, and calculation resources can be saved. Specifically, the historical flow data of the target terminal in a historical time period is obtained, the historical time period can be a past week, a month or other time periods, and the historical time period can be specifically selected according to the needs. The historical flow data is analyzed to obtain the offline rates of the target terminal in the historical time periods in which time periods in the day are higher and which time periods are higher
The lower time period with higher offline rate is taken as a first access time period, the lower time period 5 with lower offline rate is taken as a second access time period, and then a first flow monitoring period is set for the first access time period, so that the method is that
The second access period sets a second traffic monitoring period. The duration of the first flow monitoring period is smaller than that of the second flow monitoring period, for example, the first flow monitoring period is 10 seconds, the second flow monitoring period is 20 seconds, and the like. In the subsequent calculation, if it is currently located in the first access period of the day
In, the timing calculation of the time difference is performed more frequently based on the first traffic monitoring period, which is relatively less based on the second traffic monitoring period if 0 is currently located in the second access period of the day
Timing calculations of the time differences are frequently performed.
Since the target terminal has a higher offline rate in the first access period in the past period, the probability of recovering the ip address resource in the period is also higher, so that the time can be calculated each time
The period of the difference is set shorter to ensure that the ip address resource can be quickly recovered 5 after the target terminal is taken off line. And since the target terminal has a lower offline rate for the second access period over the past period of time,
the probability that the ip address resource does not need to be recovered in the time period is also larger, so that the period of each calculation time difference can be set longer, and balance is realized before the ip address resource recovery opportunity is accurately calculated and the calculation resources are saved.
S3: and when the time difference is larger than the preset difference value, sending a reachability detection message to the target terminal.
0 when the time difference DeltaT calculated by the flow statistics analysis module is greater than a preset difference value T0, the method indicates that
The target terminal stops accessing the network for a long time and may be offline, and at this time, the resource detection and recovery module is triggered to send a reachability detection message to the target terminal to detect whether the target terminal is online.
In one embodiment, S3 specifically includes: if the target terminal is the IPV4 terminal, the target terminal is oriented
An end sends an arp unicast message; and if the target terminal is the IPV6 terminal, sending an ns unicast 5 message to the target terminal. As shown in fig. 3, the target terminal connected to the cloud gateway may be an IPV4 terminal or an IPV6 terminal, where IPV4 and IPV6 are different versions of the IP protocol, and the arp message and the ns message are messages of different protocols, but are all international general protocols, and for two types of target terminals, the most suitable messages of each type of terminal are respectively adopted to perform reachability detection. Reachability probe used in embodiments of the present application
The test messages all adopt the international standard protocol, so that the non-universality of the custom standard is avoided, the development time is saved, and the development efficiency is improved.
S4: and if the response message returned by the target terminal is not received under the preset condition, recovering the ip address resource of the target terminal.
As shown in fig. 3, if the target terminal returns a response message after receiving the reachability detection message, the resource detection and recovery module determines that the target terminal is in a standby state after receiving the response message, and in this state, although the network is not currently accessed, the ip address resource of the target terminal needs to be reserved, and then the ip address resource is not recovered. If a response message returned by the target terminal is not received under the preset condition, the resource detection and recovery module judges that the target terminal is off line currently, the ip address resource is directly released and recovered to the idle address pool, and when the network resource management module receives a new ip address application, the recovered ip address resource can be optionally reassigned to other terminals so as to improve the utilization rate of the ip address resource. The preset condition may be that the reachability detection message is successfully sent once and a certain period of time has elapsed, or that the reachability detection message is successfully sent many times and a certain period of time has elapsed, etc.
In one embodiment, S43 specifically includes: and when the time difference is larger than the preset difference value, sending a preset number of reachability detection messages to the target terminal at preset time intervals. S4 specifically comprises the following steps: if the response message returned by the target terminal is not received after the last reachability detection message is sent out, recovering the ip address resource of the target terminal after a preset time period.
When the reachability detection message is sent, if the reachability detection message is sent only once, the target terminal is not disconnected but does not receive the response message due to abnormal sending or abnormal receiving, so that misjudgment on the target terminal is caused. Therefore, the method and the device send the preset number of reachability detection messages to the target terminal at preset time intervals, for example, the reachability detection messages are sent 1 time every 0.5 seconds, the total number of the reachability detection messages is 3 times, after the 3 rd time of sending is finished and a preset time period (for example, 1 second is passed), the possibility of misjudgment is small, the target terminal can be judged to be offline, and the ip address resource of the target terminal can be recovered. The specific values of the preset time intervals, the preset number and the preset time period can be set and adjusted according to the actual scene, and in this way, the probability of misjudgment can be reduced, and the accuracy of judging the recovery time is improved.
In one embodiment, after S3, further comprising: judging whether the target terminal is in a long-term standby state according to the times of continuously receiving the response message; if yes, the current flow monitoring period is adjusted, and the time difference between the latest time and the current time is calculated based on the new flow monitoring period at regular time.
If the target terminal is in a standby state for a long time, the time difference is larger than the preset difference value each time when the time difference is calculated regularly, the resource detection recovery module is triggered each time to send the reachability detection message to the target terminal, and the response message is received after each time the reachability detection message is sent, but ip address resources cannot be recovered when the target terminal is in the standby state for a long time, and related resource waste is caused by frequent calculation, message sending and response message operation. Therefore, it is possible to determine whether the target terminal is in a long-term standby state according to the number of times the response message is continuously received, and then determine whether the current calculation mode is maintained or adjustment is required according to the state.
Specifically, the number of times of continuously receiving the response message needs to satisfy a preset number, such as 10 times, and the time interval between any two adjacent response messages needs to be not greater than a preset time difference to serve as the continuous response message, where the time difference may refer to the time of the flow monitoring period, for example, if the flow monitoring period is 10 seconds, the time difference may also be 10 seconds, and the time difference between the receiving time of the previous response message and the receiving time of the next response message needs to be not greater than 10 seconds to serve as the continuous response message. When the number of times of continuously receiving the response message exceeds 10, the target terminal is judged to be in a long-term standby state at the moment, the current flow monitoring period can be adjusted from the moment, the period is prolonged, and the time difference between the latest time and the current time is calculated based on the new flow monitoring period
In one embodiment, the above steps further include: judging whether the target terminal is restored to a normal access state according to the real-time flow data; if yes, the adjusted flow monitoring period is restored, and the time difference between the latest time and the current time is calculated based on the restored flow monitoring period at regular time.
If the real-time flow data shows that the latest time of the target terminal accessing the network is updated, the target terminal is changed from a long-term standby state to a normal access state, the current flow monitoring period can be adjusted again to restore the value to the previous value, and the time difference is calculated continuously and regularly based on the restored flow monitoring period.
The steps of adjustment and restoration can be switched in real time according to the judging result of the state of the target terminal, so that a more reasonable recovery time can be calculated with lower calculation cost.
According to the ip address resource management method provided by the embodiment of the invention, the real-time flow data of the target terminal is analyzed, so that the time difference between the latest time of the target terminal accessing the network and the current time is calculated, if the time difference is larger than the preset difference value, the target terminal does not access the network for a long time, the target terminal is possibly in a standby or off-line state, and then a reachability detection message is sent to the target terminal, if the target terminal does not return a response message, the target terminal can be judged to be off-line, at the moment, the ip address resource of the target terminal is recovered, the recovery time is accurate, and therefore, the normal use of the target terminal is not influenced, the network resource is saved, the use rate of the network resource is improved to the greatest extent, and the conditions of insufficient resource and resource waste are reduced.
As shown in fig. 4, on the basis of the method described in the foregoing embodiment, this embodiment will be further described from the perspective of a cloud gateway, where the cloud gateway may include:
an acquisition module 10, configured to acquire real-time traffic data of a target terminal;
an obtaining module 20, configured to determine, according to the real-time traffic data, a latest time of the target terminal accessing the network, and obtain a time difference between the latest time and a current time;
a sending module 30, configured to send a reachability detection packet to the target terminal when the time difference is greater than a preset difference;
and the recovery module 40 is configured to recover the ip address resource of the target terminal if the response message returned by the target terminal is not received under the preset condition.
It should be noted that, in fig. 3 and fig. 4 are combined, the network resource management module in the cloud gateway includes an obtaining module 10, the flow statistics analysis module includes an obtaining module 20, and the resource detection recovery module includes a sending module 30 and a recovery module 40.
In one embodiment, the deriving module 20 includes:
the acquisition sub-module is used for acquiring the flow monitoring period of the target terminal;
and the calculating sub-module is used for calculating the time difference between the latest time and the current time at fixed time based on the flow monitoring period.
In one embodiment, the obtaining submodule is configured to determine, according to historical traffic data of the target terminal, a first access time period and a second access time period of the target terminal, where a offline rate of the target terminal in the first access time period is higher than a threshold value, and the offline rate of the target terminal in the second access time period is not higher than the threshold value; respectively acquiring a first flow monitoring period of the target terminal in the first access time period and a second flow monitoring period of the target terminal in the second access time period, wherein the first flow monitoring period is smaller than the second flow monitoring period; the calculating submodule is used for calculating the time difference between the latest time and the current time based on the first flow monitoring period in the first access time period, and calculating the time difference between the latest time and the current time based on the second flow monitoring period in the second access time period.
In one embodiment, the sending module 30 is configured to send a preset number of reachability detection messages to the target terminal at preset time intervals when the time difference is greater than a preset difference value; the recovery module 40 is configured to recover ip address resources of the target terminal if a response message returned by the target terminal is not received after the last reachability detection message is sent out, and a preset period of time elapses.
In one embodiment, the transmitting module 30 includes:
the first sending submodule is used for sending an arp unicast message to the target terminal if the target terminal is an IPV4 terminal;
and the second sending submodule is used for sending ns unicast messages to the target terminal if the target terminal is an IPV6 terminal.
In one embodiment, the cloud gateway further comprises:
the first judging module is used for judging whether the target terminal is in a long-term standby state according to the times of continuously receiving the response message;
and the adjusting module is used for adjusting the current flow monitoring period if yes, and calculating the time difference between the latest time and the current time based on the new flow monitoring period at regular time.
In one embodiment, the cloud gateway further comprises:
the second judging module is used for judging whether the target terminal is restored to a normal access state according to the real-time flow data;
and the reduction module is used for reducing the adjusted flow monitoring period if yes, and calculating the time difference between the latest time and the current time based on the reduced flow monitoring period at regular time.
Compared with the prior art, the cloud gateway provided by the application is characterized in that the time difference between the latest time of the target terminal accessing the network and the current time is calculated by analyzing the real-time flow data of the target terminal, if the time difference is larger than the preset difference, the target terminal does not access the network for a long time and is possibly in a down state, then a reachability detection message is sent to the target terminal, if the target terminal does not return a response message, the target terminal can be judged to be off line, the ip address resource of the target terminal is recovered at the moment, the recovery time is accurate, so that the normal use of the target terminal is not influenced, the network resource is saved, the utilization rate of the network resource is improved to the greatest extent, and the conditions of insufficient resource and resource waste are reduced.
Accordingly, the embodiment of the present application further provides an electronic device, as shown in fig. 5, where the electronic device may include a Radio Frequency (RF) circuit 101, a memory 102 including one or more computer readable storage media, an input unit 103, a display unit 104, a sensor 105, an audio circuit 106, a WiFi module 107, a processor 108 including one or more processing cores, and a power supply 109. It will be appreciated by those skilled in the art that the electronic device structure shown in fig. 5 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. Wherein:
the radio frequency circuit 101 may be used for receiving and transmitting signals during the process of receiving and transmitting information or communication, in particular, after receiving downlink information of the base station, the downlink information is processed by one or more processors 108; in addition, data relating to uplink is transmitted to the base station. The memory 102 may be used to store software programs and modules, and the processor 108 may execute various functional applications and ip address resource management by executing the software programs and modules stored in the memory 102. The input unit 103 may be used to receive entered numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to customer settings and function control.
The display unit 104 may be used to display information entered by a client or provided to a client and various graphical client interfaces of a server, which may be composed of graphics, text, icons, video, and any combination thereof.
The electronic device may also include at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Audio circuitry 106 includes speakers that may provide an audio interface between the client and the electronic device.
WiFi belongs to a short-distance wireless transmission technology, and the electronic equipment can help clients to send and receive emails, browse webpages, follow-up streaming media and the like through the WiFi module 107, so that wireless broadband Internet follow-up is provided for the clients. Although fig. 5 shows a WiFi module 107, it is understood that it does not belong to the necessary constitution of the electronic device, and can be omitted entirely as required within a range that does not change the essence of the application.
The processor 108 is a control center of the electronic device that uses various interfaces and lines to connect the various parts of the overall handset, performing various functions of the electronic device and processing the data by running or executing software programs and/or modules stored in the memory 102, and invoking data stored in the memory 102, thereby performing overall monitoring of the handset.
The electronic device further comprises a power supply 109 (e.g. a battery) for powering the components, which may preferably be logically connected to the processor 108 via a power management system, whereby the functions of managing charging, discharging, and power consumption are performed by the power management system.
Although not shown, the electronic device may further include a camera, a bluetooth module, etc., which will not be described herein. Specifically, in this embodiment, the processor 108 in the server loads executable files corresponding to the processes of one or more application programs into the memory 102 according to the following instructions, and the processor 108 executes the application programs stored in the memory 102, so as to implement the following functions:
acquiring real-time flow data of a target terminal;
determining the latest time of the target terminal accessing the network according to the real-time flow data, and obtaining the time difference between the latest time and the current time;
when the time difference is larger than a preset difference value, sending a reachability detection message to the target terminal;
and if the response message returned by the target terminal is not received under the preset condition, the ip address resource of the target terminal is recovered.
In the foregoing embodiments, the descriptions of the embodiments are focused on, and the portions of a certain embodiment that are not described in detail may be referred to the foregoing detailed description, which is not repeated herein.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer readable storage medium having stored therein a plurality of instructions capable of being loaded by a processor to perform the following functions:
acquiring real-time flow data of a target terminal;
determining the latest time of the target terminal accessing the network according to the real-time flow data, and obtaining the time difference between the latest time and the current time;
when the time difference is larger than a preset difference value, sending a reachability detection message to the target terminal;
and if the response message returned by the target terminal is not received under the preset condition, the ip address resource of the target terminal is recovered.
The ip address resource management method, the cloud gateway, the electronic device and the computer readable storage medium provided in the embodiments of the present application are described in detail, and specific examples are applied to illustrate the principles and implementations of the present application, where the description of the above embodiments is only used to help understand the technical solution and the core idea of the present application; those of ordinary skill in the art will appreciate that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. An ip address resource management method, which is applied to a cloud gateway, comprises the following steps:
acquiring real-time flow data of a target terminal;
determining the latest time of the target terminal accessing the network according to the real-time flow data, and obtaining the time difference between the latest time and the current time;
when the time difference is larger than a preset difference value, sending a reachability detection message to the target terminal;
and if the response message returned by the target terminal is not received under the preset condition, the ip address resource of the target terminal is recovered.
2. The ip address resource management method according to claim 1, wherein the step of determining a latest time of the target terminal accessing the network according to the real-time traffic data and obtaining a time difference between the latest time and a current time comprises:
acquiring a flow monitoring period of the target terminal;
and based on the flow monitoring period, calculating the time difference between the latest time and the current time at fixed time.
3. The ip address resource management method according to claim 2, wherein the step of obtaining the traffic monitoring cycle parameter of the target terminal includes:
determining a first access time period and a second access time period of the target terminal according to the historical flow data of the target terminal, wherein the offline rate of the target terminal in the first access time period is higher than a threshold value, and the offline rate of the target terminal in the second access time period is not higher than the threshold value;
respectively acquiring a first flow monitoring period of the target terminal in the first access time period and a second flow monitoring period of the target terminal in the second access time period, wherein the first flow monitoring period is smaller than the second flow monitoring period;
a step of calculating the time difference between the latest time and the current time at regular time based on the flow monitoring period, comprising:
and in the first access time period, calculating the time difference between the latest time and the current time based on the first flow monitoring period, and in the second access time period, calculating the time difference between the latest time and the current time based on the second flow monitoring period.
4. The ip address resource management method according to claim 1, wherein the step of sending the reachability detection message to the target terminal when the time difference is greater than a preset difference value comprises:
when the time difference is larger than a preset difference value, sending a preset number of reachability detection messages to the target terminal at preset time intervals;
if a response message returned by the target terminal is not received under a preset condition, recovering the ip address resource of the target terminal, including:
and if the response message returned by the target terminal is not received after the last reachability detection message is sent out, recovering the ip address resource of the target terminal after a preset time period.
5. The ip address resource management method according to claim 1, wherein the step of transmitting the reachability detection message to the target terminal comprises:
if the target terminal is an IPV4 terminal, an arp unicast message is sent to the target terminal;
and if the target terminal is the IPV6 terminal, sending an ns unicast message to the target terminal.
6. The ip address resource management method according to claim 2, further comprising, after the step of sending the reachability detection message to the target terminal:
judging whether the target terminal is in a long-term standby state according to the times of continuously receiving the response message;
if yes, the current flow monitoring period is adjusted, and the time difference between the latest time and the current time is calculated based on the new flow monitoring period at regular time.
7. The ip address resource management method of claim 6, further comprising, after the step of calculating a time difference between the latest time and the current time based on a new traffic monitoring period timing:
judging whether the target terminal is restored to a normal access state according to the real-time flow data;
if yes, the adjusted flow monitoring period is restored, and the time difference between the latest time and the current time is calculated based on the restored flow monitoring period at regular time.
8. A cloud gateway, comprising:
the acquisition module is used for acquiring real-time flow data of the target terminal;
the obtaining module is used for determining the latest time of the target terminal accessing the network according to the real-time flow data and obtaining the time difference between the latest time and the current time;
the sending module is used for sending a reachability detection message to the target terminal when the time difference is larger than a preset difference value;
and the recovery module is used for recovering the ip address resource of the target terminal if the response message returned by the target terminal is not received under the preset condition.
9. An electronic device comprising a memory and a processor; the memory stores an application program, and the processor is configured to run the application program in the memory to perform the steps in the ip address resource management method as claimed in any one of claims 1 to 7.
10. A computer readable storage medium having stored thereon a computer program for execution by a processor to implement the steps in the ip address resource management method of any of claims 1 to 7.
CN202211714808.7A 2022-12-29 2022-12-29 ip address resource management method, cloud gateway, electronic device and storage medium Pending CN116016442A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211714808.7A CN116016442A (en) 2022-12-29 2022-12-29 ip address resource management method, cloud gateway, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211714808.7A CN116016442A (en) 2022-12-29 2022-12-29 ip address resource management method, cloud gateway, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN116016442A true CN116016442A (en) 2023-04-25

Family

ID=86020493

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211714808.7A Pending CN116016442A (en) 2022-12-29 2022-12-29 ip address resource management method, cloud gateway, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN116016442A (en)

Similar Documents

Publication Publication Date Title
CN108834203B (en) Network switching method, device, terminal and storage medium
RU2595968C2 (en) Control activation templates
CN1949774B (en) Method and apparatus for managing web application program conversation
CN110474975B (en) Heartbeat processing method and device of application program, electronic equipment and storage medium
CN107517136B (en) Method, device and system for realizing heartbeat keep-alive
CN110708696B (en) Network data recovery method and device, storage medium and electronic equipment
US9237460B2 (en) Traffic control method and device
US20050138462A1 (en) System and method for managing protocol network failures in a cluster system
CN106411629B (en) Method and equipment for monitoring state of CDN node
US10917289B2 (en) Handling network failures in networks with redundant servers
CN109040295B (en) Method and device for determining abnormal disconnection, terminal and storage medium
CN102076065B (en) Method and device of data interaction
CN110691398B (en) Network interaction method, system, equipment and storage medium of intelligent equipment
US20060067332A1 (en) Method and device for detecting connectivity termination of internet protocol version 6 access networks
WO2014063487A1 (en) Traffic control method and device
JP5813891B2 (en) Processing method and processing apparatus for automatically setting Internet access mode
CN112261133A (en) CDN node control method, device, server and storage medium
WO2015051848A1 (en) Method, system and apparatus for user abandonment verification
JP2010072955A (en) Monitoring device, monitoring method and computer program
CN115314540A (en) Request response timeout processing method, device, equipment and medium
EP3641222B1 (en) Method, apparatus and system for monitoring data traffic
CN113328906B (en) Flow real-time monitoring method and device, storage medium and electronic equipment
CN103581107A (en) Server and working mode setting method thereof
CN116016442A (en) ip address resource management method, cloud gateway, electronic device and storage medium
CN113965495A (en) Method and device for detecting activity of terminal application program, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination