WO2019218480A1 - 一种推送服务的重连方法及设备 - Google Patents

一种推送服务的重连方法及设备 Download PDF

Info

Publication number
WO2019218480A1
WO2019218480A1 PCT/CN2018/097553 CN2018097553W WO2019218480A1 WO 2019218480 A1 WO2019218480 A1 WO 2019218480A1 CN 2018097553 W CN2018097553 W CN 2018097553W WO 2019218480 A1 WO2019218480 A1 WO 2019218480A1
Authority
WO
WIPO (PCT)
Prior art keywords
reconnection
abnormal
reconnect
push service
abnormality
Prior art date
Application number
PCT/CN2018/097553
Other languages
English (en)
French (fr)
Inventor
程慧琳
柳德超
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019218480A1 publication Critical patent/WO2019218480A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0681Configuration of triggering conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services

Definitions

  • the present application belongs to the field of Internet technologies, and in particular, to a method and device for reconnecting a push service.
  • the reconnection method of the existing push service mainly detects a situation in which the communication link is interrupted by creating a cyclic task under the main thread of the server, but the cyclic task brings a large computing burden to the server, and communication occurs.
  • the server When the link is abnormal, the server not only needs to allocate resources to perform the reconnection operation, but also needs additional computing resources to maintain the recurring task, thereby reducing the reconnection efficiency.
  • the embodiment of the present application provides a reconnection method and device for a push service, to solve the reconnection method of the existing push service, which not only needs to allocate resources to perform reconnection operation, but also needs to spend additional computing resources. Maintain the cycle task of monitoring connection anomalies, and reconnect the problem of low efficiency.
  • a first aspect of the embodiment of the present application provides a reconnection method of a push service, including:
  • the abnormal reconnect listener is activated; the abnormal reconnect listener is configured to monitor whether the communication link with the push service database is abnormal; the abnormal reconnect listener is configured with an abnormal threshold and Reconnect response parameters;
  • the abnormality index is greater than the abnormality threshold, performing a reconnection operation based on the reconnection response parameter, and acquiring an abnormality index after reconnection, until the abnormality index after the reconnection is less than or equal to the abnormality threshold.
  • the abnormal reconnection listener for monitoring the abnormality of the communication link with the push service database is activated, and the above communication link is added to the interception object.
  • the running parameters of the communication link are obtained in real time; since the abnormal reconnect listener is configured with an abnormal threshold and a reconnection response parameter, it can automatically identify whether the communication link has an abnormality without performing abnormal monitoring through the main thread of the server. , reducing the resources occupied by the exception listener operation.
  • the reconnection operation is performed based on the reconnection response parameter, the communication link with the push service database is maintained, and the data is improved.
  • the reliability of the transmission Compared with the existing reconnection method of the push service, since the listener has autonomy, it can be managed by the sub-thread. Therefore, the present application does not need to rely on the cyclic task under the main thread to detect the abnormality of the communication link and release. A large number of resources originally used to maintain the recurring tasks, thereby increasing the efficiency of reconnection operations.
  • FIG. 1 is a flowchart of implementing a reconnection method of a push service according to a first embodiment of the present application
  • FIG. 2 is a flowchart of a specific implementation of a reconnection method S104 of a push service according to a second embodiment of the present application;
  • FIG. 3 is a flowchart of a specific implementation of a reconnection method S103 of a push service according to a third embodiment of the present application;
  • FIG. 4 is a flowchart of a specific implementation of a reconnection method of a push service according to a fourth embodiment of the present application.
  • FIG. 5 is a flowchart of a specific implementation of a reconnection method of a push service according to a fifth embodiment of the present application
  • FIG. 6 is a structural block diagram of a reconnection device of a push service according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a reconnection device of a push service according to another embodiment of the present application.
  • the execution entity of the process is a reconnection device of the push service.
  • the reconnecting device of the push service includes, but is not limited to, a reconnecting device with a push service such as a notebook computer, a computer, a server, a tablet computer, and a smart phone.
  • the reconnect device of the push service is specifically a device subscribed to the Redis database server, and maintains a communication connection with the Redis database server during the subscription period.
  • FIG. 1 is a flowchart showing an implementation of a reconnection method of a push service according to a first embodiment of the present application, which is described in detail as follows:
  • an abnormal reconnect listener is activated; the abnormal reconnect listener is configured to monitor whether a communication link with the push service database is abnormal; the abnormal reconnect listener configuration There are exception thresholds and reconnection response parameters.
  • the reconnecting device of the push service can accept the information pushed by the push server by subscribing.
  • the push server receives the message sent by the other device, it will subscribe to the push server.
  • Each device sends the received message to achieve information transfer between servers.
  • the reconnect device can also post information to the push server and push information to other devices through the push server.
  • the reconnecting device when the reconnecting device receives the push service start instruction sent by the user, the abnormal reconnect listener is activated, and the communication between the reconnected device and the push service database is monitored by the abnormal reconnect listener. Whether the link is abnormal.
  • the reconnecting device of the push service when the reconnecting device of the push service is started, a communication connection is automatically established with the push service database to generate a corresponding communication link. In this case, the reconnect device generates a push after the startup is completed. The server starts the command, turns on the push service function, and activates the abnormal reconnect listener accordingly.
  • the service layer in the reconnecting device of the push service is built by the Spring open source framework.
  • the reconnect device creates a listener and configures the created listener based on the exception threshold and the reconnection response parameter, associating the listener with the event to be listened to, ie configuring a listener corresponding to the listener in the spring open source framework.
  • the class and the Event class corresponding to the listener event and declare the above two classes in the configuration file of the spring open source framework. Since the push service is running at the business layer, and the business layer of the reconnected device is built based on the spring open source framework, if the abnormal reconnect listener can be activated automatically when the push service is started, it needs to be configured in the spring open source framework.
  • the listener class and the event class since the push service is running at the business layer, and the business layer of the reconnected device is built based on the spring open source framework, if the abnormal reconnect listener can be activated automatically when the push service is started, it needs to be configured in the spring
  • the abnormal reconnect listener is configured with an abnormal threshold, and identifies whether the current communication link is in an abnormal state based on the abnormal threshold, which is an abnormal recognition condition; the abnormal reconnect listener is further provided with a reconnection response.
  • the parameter, the reconnect device performs a reconnection operation corresponding to the reconnection response parameter.
  • the above two types of parameters may be set by the user of the reconnecting device, or may be uniformly sent by the push service database to each device that subscribes to the push service. In this case, when the push service database detects that any device sends a push service registration request thereto, when the registration success information is returned, the above two parameters are encapsulated in the registration success information to subscribe to the push service. Each device of the database configures an exception reconnect listener based on the above two types of parameters.
  • the communication link is added to the listening object list of the application environment collecting thread, and the operating parameter of the communication link is acquired by the application environment collecting thread.
  • the reconnecting device adds the communication link between the reconnecting device and the push service database to the application environment.
  • the operation thread of the collection thread is collected by the application environment acquisition thread, and the operation parameter of the communication link is used to identify whether the communication link is in an abnormal state. Due to the abnormality of the communication link, it can generally be reflected in its operating parameters, that is, related parameters in the transmission process, such as transmission rate, delay, signal to noise ratio, bit error rate, signal strength, and the like.
  • the application environment collection thread is mainly used to obtain the running parameters of the listening objects corresponding to all kinds of listeners. Specifically, the application environment collection thread establishes an operation parameter collection protocol with all the ports in the reconnecting device. Based on the collection protocol, the operation parameters of each port are automatically reported to the application environment collection thread, and then the listener objects corresponding to different listeners are Run parameters to determine if the listen event is triggered.
  • the application environment collection thread continuously obtains the operation parameters of the communication link, based on the acquisition time.
  • the order is stored in the corresponding cache area, the cache area is a fixed length queue, and the abnormal reconnect listener can obtain the required running parameters from the corresponding queue, and perform related operations of S103.
  • the abnormal reconnect listener is invoked to extract the operating parameter from an output signal of the application environment collecting thread, and determine an abnormality index of the operating parameter.
  • the abnormal reconnect listener acquires the running parameter of the communication link from the application environment collection thread based on the preset acquisition frequency.
  • the collecting frequency may be a clock frequency of the reconnecting device.
  • the abnormal reconnecting listener monitors the running parameter of the communication link in real time; the collecting frequency may also be based on setting, that is, The listening period, in which case the listener obtains the operating parameters from the application environment acquisition thread at a preset listening period interval.
  • the size of the buffer area in which the application environment collection thread stores the running parameter may be determined based on the listening frequency, that is, the higher the listening frequency, the less the allocated buffer area; otherwise, the lower the monitoring frequency, the allocated. The larger the cache area, the stored operational parameters obtained between the listening intervals.
  • the abnormal reconnect listener when the abnormal reconnect listener is set, a corresponding listen event is configured for the listener, and the listen event of the abnormal reconnect listener is specifically an operation parameter of the communication link, and thus the Listen to the event class corresponding to the event configuration.
  • the reconnect device can configure the event class corresponding to the abnormal reconnect listener and the onApplicationEvent class in the listener object list to be the same class name, thereby improving the operation of the abnormal reconnect listener to quickly extract the communication link from the application environment collection thread. parameter.
  • the reconnecting device calculates the abnormal index corresponding to the operating parameter by using a preset abnormal coefficient conversion algorithm.
  • the reconnecting device may configure a corresponding threshold range for each parameter item in the operating parameter, calculate a number of parameter items in the operating parameter that exceed a threshold range, and determine an abnormality of the current time communication link based on the number of the parameter items. index.
  • the abnormal coefficient conversion algorithm may also be a hash function, and the running parameter is imported into the hash function, and the hash value corresponding to the running parameter is determined, and the hash value is used as the abnormal index corresponding to the running parameter.
  • the abnormality index is less than or equal to the abnormal threshold configured by the abnormal reconnect listener, it indicates that the communication link between the current reconnected device and the push service database is working normally, and there is no need to reconnect, and the next listening period can be waited for. If the arrival of the abnormality index is greater than the abnormality threshold, it indicates that the current communication link has an abnormality or has been interrupted, and the related operation of S104 needs to be performed.
  • the reconnecting device extracts the pre-configured reconnection response parameter from the abnormal reconnection listener, and performs a reconnection operation based on the reconnection response parameter. To re-establish the communication link between the reconnected device and the push service database. After the reconnection operation is completed, the reconnect device will again call the abnormal reconnect listener to extract the running parameters and calculate the abnormality index corresponding to the reconnection. If the abnormal execution is still greater than the abnormal threshold, the related operation of S104 is performed again until the abnormality index is less than or equal to the abnormal threshold, indicating that the communication link of the reconnecting device and the push service database returns to normal.
  • the reconnect response parameter includes a reconnection period, and the reconnecting device can establish a communication link with the database server based on the reconnection period.
  • the reconnection response parameter may also include a communication address of the standby database, and the reconnecting device may establish a communication connection with the standby database and receive messages issued by other devices through the standby database.
  • the reconnection method of the push service provided by the embodiment of the present application can be managed by the sub-thread because the listener has autonomy, so the application does not need to rely on the recurring task under the main thread to the communication chain.
  • the abnormality of the road is detected, and a large amount of resources originally used to maintain the cyclic task are released, thereby improving the efficiency of the reconnection operation.
  • FIG. 2 is a flowchart showing a specific implementation of a reconnection method S104 of a push service according to a second embodiment of the present application.
  • S104 includes: S1041 to S1044, which are specifically described as follows:
  • the reconnection response parameter includes: a reconnection period, an adjustment step, and a reconnection threshold; the performing the reconnection operation based on the reconnection response parameter, including:
  • the reconnection response parameter includes a reconnection period
  • a reconnection counter is created to collect the reconnection device and the push service. The number of reconnection operations performed by the communication link between the databases. It should be noted that the initial value of the reconnect counter is 0. Each time the reconnect operation is performed, the reconnecting device adds 1 to the reconnect counter, so that by reading the counter of the reconnect counter, Determines the number of times the reconnect operation is performed based on the current reconnection period.
  • the reconnect device first disconnects the communication link with the push server database and sends a connection request to the push service database to reestablish the communication link. If the reconnecting device does not receive the connection confirmation information returned by the push service database within the preset time threshold, increase the count value of the reconnect counter, and wait for the arrival of the next reconnection period again, and then send the connection request again, repeating If the connection confirmation information returned by the push service database is received within the preset time threshold, the application environment acquisition thread acquires the operation parameters of the communication link, and performs the related operation of S1042.
  • an operating parameter of the reconnected communication link is obtained, and the abnormal reconnect listener is invoked to calculate an abnormality index of the reconnected operating parameter.
  • the communication thread can also acquire the communication through the application environment.
  • the running parameters of the link, and then the reconnecting exception listener can extract the running parameter from the output signal of the application environment collecting thread and calculate its corresponding abnormal index.
  • the calculation method of the abnormality index may refer to the calculation method described in S103, and details are not described herein again.
  • the abnormality index is once again compared with the abnormality threshold to determine whether the current communication link is in an abnormal state. If the abnormality index is less than or equal to the abnormal threshold, whether the reconnection counter is greater than the reconnection threshold, the reconnection success is determined, and the push message of the push server is continuously received through the communication link; After the abnormality index is still greater than the abnormal threshold, it indicates that the reconnection fails, and the operation of S1043 or S1044 is selected based on the size of the count value of the reconnect counter.
  • the reconnection cycle interval establishes a communication link with the push service database.
  • the reconnection period is updated based on the adjustment step. Initializing the count value of the reconnect counter and returning to perform an operation of establishing a communication link with the push service database according to the reconnection period interval.
  • the reconnecting device updates the reconnection period based on the adjustment step, and the update operation may increase the duration of the reconnection period based on the adjustment step, and may reduce the duration of the reconnection period based on the adjustment step.
  • the length of the reconnection period is increased based on the adjustment step size, in which case the initial value of the reconnection period is small, so that it can be quickly recovered at a higher frequency when the communication link is abnormally detected.
  • Communication connection since the high frequency reconnection consumes more resources of the reconnected device, when the number of reconnection operations performed based on the reconnection period exceeds the reconnection threshold, the communication connection is not restored, and the reconnection frequency needs to be reduced. To reduce the amount of resources consumed by reconnect operations. Of course, the reconnecting device can set a maximum reconnection period. When the reconnected reconnection period is greater than the maximum reconnection period, the reconnection operation is performed with the maximum reconnection period.
  • the reconnecting device sets the initial value of the reconnection period to be large, and gradually reduces the duration of the reconnection period. As time passes, the repair is gradually completed, so that increasing the reconnection frequency can quickly resume communication.
  • the triggering time of the reconnection operation is dynamically adjusted based on the three parameters of the reconnection period, the adjustment step size, and the maximum reconnection number threshold, so as to reduce the equipment resources consumed by the reconnection operation, and also enable Improve reconnection efficiency.
  • FIG. 3 is a flowchart showing a specific implementation of a reconnection method S103 of a push service according to a third embodiment of the present application.
  • S103 includes S1031 to S1033, which are described in detail as follows:
  • the operating parameters include: a transmission rate, a bit error rate, and a signal to noise ratio; and the determining an abnormality index of the operating parameter includes:
  • the transmission rate and the historical rate of the communication link are imported into a first anomaly calculation model to calculate a first anomaly factor;
  • the abnormal factor calculation model is specifically:
  • ErrorFactor 1 is the first anomaly factor
  • HstyRate i is the i-th historical rate
  • CurrentRate is the transmission rate
  • Is the mean of the historical rate
  • n is the number of the historical rates.
  • the operating parameters include a transmission rate, a bit error rate, and a signal to noise ratio.
  • the reconnecting device determines three anomaly factors based on the above three types of parameters, and calculates an anomaly index corresponding to the operating parameter based on the anomaly factor, thereby The obtained anomaly index can more accurately determine whether the current communication link is in an abnormal state.
  • the reconnecting device of the push service calculates the mean value of the historical rate based on the recorded historical rate, calculates the standard deviation of the historical rate, determines the standard offset, and then obtains the transmission rate through the current acquisition.
  • the mean of the historical rates determines the current offset, calculates the ratio between the current offset and the standard offset, and uses the ratio as the first anomaly.
  • the ratio is larger, it means that the current offset has an abnormality, and the rate exceeds the normal rate range, so that when the abnormal index is calculated, the contribution is also large; conversely, if the ratio is smaller, the current offset is indicated.
  • the amount is within the normal range, and there is no abnormality in the parameter of the transmission rate.
  • a second anomaly factor is determined based on a product between the transmission rate and the bit error rate.
  • the reconnecting device may calculate a product between the transmission rate and the bit error rate, and determine the number of error characters per unit time, based on the The number of erroneous characters is used as the second anomaly factor. The larger the wrong character, the worse the communication quality of the current communication link, and the larger the value of the second anomaly factor.
  • the first anomaly factor, the second anomaly factor, and the signal to noise ratio are imported into an abnormality index calculation model, and an abnormality index of the operation parameter is calculated;
  • the abnormality index calculation model is specifically:
  • ErrorLevel 10lg(Weight 1 *ErrorFactor 1 +Weight 2 *ErrorFactor 2 )+Weight 3 *SNR
  • ErrorLevel is the abnormality index
  • ErrorFactor 2 is the second abnormality factor
  • SNR is the signal to noise ratio
  • Weight 1 , Weight 2 , and Weight 3 are preset coefficients.
  • the reconnecting device converts the two abnormal factors into two after calculating the first anomaly factor and the second anomaly factor.
  • the parameter value in dB then the sum between the calculation and the signal-to-noise ratio, as the anomaly index of the operating parameters.
  • the first anomaly factor, the second anomaly factor, and the signal to noise ratio are all configured with a weight value, that is, Weight 1 , Weight 2 , and Weight 3 described above, and the user can adjust the above based on the message request for transmitting the message.
  • the value of the three weights For example, if the amount of data to be outputted is large, the focus is on the transmission rate, so that the value of Weight 1 can be greater than the values of the remaining two preset coefficients; if the amount of data to be transmitted is small, then The accuracy of each received message is guaranteed to avoid repeated transmissions, so the value of Weight 2 and Weight 3 can be greater than the value of Weight 1 .
  • the corresponding abnormal factor is determined based on the parameter items included in the operating parameter, and then the abnormality index is calculated based on each abnormal factor, thereby improving the accuracy of the abnormality index for the abnormality of the communication link, and then improving The accuracy of abnormal recognition.
  • FIG. 4 is a flowchart showing a specific implementation of a reconnection method of a push service according to a fourth embodiment of the present application.
  • the abnormal reconnect listener is activated. Previously, it also included: S401 ⁇ S402, as detailed below:
  • a push authorization request is sent to the push service database, and an identifier of the push service database is acquired.
  • the reconnecting device of the push service can simultaneously connect with the plurality of push service databases, thereby receiving messages pushed by the plurality of push service databases, that is, the reconnecting device needs to maintain multiple communication links at the same time.
  • the reconnecting device sends a push authorization request to the push service database, that is, when establishing a subscription relationship with the push service database, the identifier of the push service database is obtained to pass the The logo distinguishes between different push service databases.
  • the reconnecting device sends a push authorization request to the push service database, and the database performs an authentication operation on the push authorization request to identify whether the device has the right to subscribe to the message pushed by the database, and if the authentication is successful, for example, reconnecting the device
  • the device number is in the white list of the push service database, and returns an authorization success information to the push service data, and encapsulates the identifier corresponding to the database in the authorization success information, and the reconnecting device extracts the identifier from the authorization success information.
  • the abnormal reconnect listener corresponding to the push service database is created according to the identifier and the abnormal threshold and the reconnection response parameter input by the user.
  • the abnormal reconnection listener of the push service database may be created, and the push is subsequently received.
  • the abnormal reconnect listener listens for the communication link established with it.
  • the identifier of the corresponding push service database is configured to implement receiving the message of different database pushes at the same time, thereby improving the efficiency of reconnecting the device to obtain information, and because the listener Independent of the main process maintenance, it can be executed by an asynchronous process, so that multiple communication links can be maintained through multiple listeners at the same time.
  • FIG. 5 is a flowchart showing a specific implementation of a reconnection method of a push service according to a fifth embodiment of the present application.
  • the reconnection method of the push service provided by the embodiment further includes: S501 and S502 after determining the abnormality index of the operation parameter. The details are as follows:
  • the communication link between the reconnecting device of the push service and the push service database is not abnormal, but the push message needs to be accepted, except that the link is abnormal.
  • the database server port is also required to be healthy, so a test packet is sent to the push service database to detect if the port connected to the push service database can respond to the request.
  • the response data packet is returned to the reconnecting device within a preset time, and if the reconnecting device receives the response data packet within a preset time, the communication link is identified and If there is no abnormality in the port, the current connection state is maintained, and the message sent by the push service database is received; otherwise, if the response packet is not received within the preset time, the related operation of S502 is performed.
  • the reconnecting device does not receive the response data packet returned by the push service database based on the test data packet within the preset time, it indicates that the operating parameter of the communication link is not abnormal, but the push service database cannot Responding to the request initiated by the reconnect device, that is, the port that may be connected to it is abnormal, and needs to re-establish a connection with the database to replace or activate the port, so that the port can send and receive data normally.
  • the connected port by sending a test data packet to the push service database, it is ensured that the connected port can normally send and receive data, not only whether the operating parameter of the communication link is within a preset range, but also detecting the port performance state. Improve the accuracy of maintenance.
  • FIG. 6 is a structural block diagram of a reconnection device of a push service according to an embodiment of the present application.
  • the reconnection device of the push service includes units for performing the steps in the embodiment corresponding to FIG. 1.
  • please refer to the related description in the embodiment corresponding to FIG. 1 and FIG. For the convenience of explanation, only the parts related to the present embodiment are shown.
  • the reconnecting device of the push service includes:
  • a listener activation unit 61 configured to activate an abnormal reconnect listener if receiving a push service start instruction; the abnormal reconnect listener is configured to monitor whether a communication link with the push service database is abnormal; The listener is configured with an abnormal threshold and a reconnection response parameter;
  • the operation parameter obtaining unit 62 is configured to add the communication link to the listening object list of the application environment collecting thread, and acquire the running parameter of the communication link by using the application environment collecting thread;
  • the operation parameter extraction unit 63 is configured to invoke the abnormal reconnection listener to extract the operation parameter from an output signal of the application environment collection thread, and determine an abnormality index of the operation parameter;
  • the reconnection execution unit 64 is configured to: if the abnormality index is greater than the abnormality threshold, perform a reconnection operation based on the reconnection response parameter, and acquire an abnormality index after reconnection, until the reconnected abnormality index Less than or equal to the abnormal threshold.
  • the reconnection response parameter includes: a reconnection period, an adjustment step, and a reconnection threshold; the reconnection execution unit 64 includes:
  • a reconnection counting unit configured to establish a communication link with the push service database according to the reconnection period interval, and adjust a count value of the reconnect counter
  • An abnormal index re-acquisition unit configured to acquire an operating parameter of the reconnected communication link, and invoke the abnormal reconnect listener to calculate an abnormality index of the re-connected operating parameter
  • a first reconnecting unit configured to: if the count value of the reconnect counter is less than or equal to the reconnection threshold, and the abnormality index after the reconnection is greater than the abnormal threshold, returning to perform according to the reconnecting An operation of establishing a communication link with the push service database at a periodic interval;
  • a second reconnecting unit configured to: if the count value of the reconnect counter is greater than the reconnection threshold, and the abnormality index after the reconnection is greater than the abnormal threshold, update the A reconnection period, initializing the count value of the reconnect counter, and returning to perform an operation of establishing a communication link with the push service database according to the reconnection period interval.
  • the operating parameter includes: a transmission rate, a bit error rate, and a signal to noise ratio;
  • the operating parameter extraction unit 63 includes:
  • a first anomaly factor calculation unit configured to import the transmission rate and a historical rate of the communication link into a first anomaly factor calculation model, and calculate a first anomaly factor;
  • the abnormality factor calculation model is specifically:
  • ErrorFactor 1 is the first anomaly factor
  • HstyRate i is the i-th historical rate
  • CurrentRate is the transmission rate
  • Is the mean of the historical rate
  • n is the number of the historical rates
  • a second abnormal factor calculation unit configured to determine a second abnormality factor based on a product between the transmission rate and the error rate
  • the abnormality index calculation unit is configured to import the first anomaly factor, the second anomaly factor, and the signal to noise ratio into an abnormality index calculation model, and calculate an abnormality index of the operation parameter;
  • the abnormality index calculation model is specifically:
  • ErrorLevel 10lg(Weight 1 *ErrorFactor 1 +Weight 2 *ErrorFactor 2 )+Weight 3 *SNR
  • ErrorLevel is the abnormality index
  • ErrorFactor 2 is the second abnormality factor
  • SNR is the signal to noise ratio
  • Weight 1 , Weight 2 , and Weight 3 are preset coefficients.
  • the reconnecting device of the push service further includes:
  • a database identifier obtaining unit configured to send a push authorization request to the push service database, and obtain an identifier of the push service database
  • a listener creating unit configured to create the abnormal reconnect listener corresponding to the push service database according to the identifier and the abnormal threshold and the reconnection response parameter input by the user.
  • the reconnecting device of the push service further includes:
  • test packet sending unit configured to send a test data packet to the push service database if the abnormality index is less than or equal to the abnormality threshold
  • a third reconnection unit configured to perform the reconnection operation operation based on the reconnection response parameter if the response data packet returned by the test service packet is not received within a preset time period .
  • the reconnecting device of the push service provided by the embodiment of the present application can also detect the abnormality of the communication link without relying on the cyclic task under the main thread, and release a large number of resources originally used for maintaining the cyclic task, thereby improving the resource. The efficiency of reconnect operations.
  • FIG. 7 is a schematic diagram of a reconnection device of a push service according to another embodiment of the present application.
  • the reconnection device 7 of the push service of this embodiment includes a processor 70, a memory 71, and computer readable instructions 72 stored in the memory 71 and executable on the processor 70, For example, the reconnection procedure of the push service.
  • the processor 70 when executing the computer readable instructions 72, implements the functions of the various units in the various apparatus embodiments described above, such as the functions of the modules 61-64 shown in FIG.
  • the computer readable instructions 72 may be partitioned into one or more units, the one or more units being stored in the memory 71 and executed by the processor 70 to complete the application.
  • the one or more units may be a series of computer readable instruction instruction segments capable of performing a particular function for describing the execution of the computer readable instructions 72 in the reconnection device 7 of the push service.
  • the computer readable instructions 72 may be partitioned into a listener activation unit, an operational parameter acquisition unit, an operational parameter extraction unit, and a reconnect execution unit, each unit having a specific function as described above.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本申请适用于互联网技术领域,提供了一种推送服务的重连方法及设备,包括:若接收到推送服务启动指令,则激活异常重连监听器;将通信链路添加到应用环境采集线程的监听对象列表,并通过应用环境采集线程获取通信链路的运行参数;调用所述异常重连监听器从应用环境采集线程的输出信号中提取运行参数,并确定运行参数的异常指数;若异常指数大于异常阈值,则基于重连响应参数执行重连操作,并获取重连后的异常指数,直到重连后的异常指数小于或等于异常阈值。本申请实施例不需依赖主线程下的循环任务来对通信链路的异常进行检测,释放了大量原本用于维持循环任务的资源,从而提高了重连操作的效率。

Description

一种推送服务的重连方法及设备
本申请申明享有2018年05月14日递交的申请号为201810456987.6、名称为“一种推送服务的重连方法及设备”中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。
技术领域
本申请属于互联网技术领域,尤其涉及一种推送服务的重连方法及设备。
背景技术
由于位于不同服务器之间的用户无法直接进行消息互传,因此可以通过其中一个服务器向推送服务数据库发布消息,继而将该消息向订阅了推送服务的另一服务器进行推送的方式,实现消息互传,因此服务器与推送服务数据库之间的通信链路是否可靠,则直接影响用户之间的通信效率。
现有推送服务的重连方法,主要是通过在服务器的主线程下创建一个循环任务来检测通信链路是否存在中断的情况,然而循环任务会为服务器带来较大的运算负担,在出现通信链路异常时,服务器不仅需要分配资源来执行重连操作,还需要花费额外的运算资源来维持该循环任务,从而降低了重连效率。
技术问题
有鉴于此,本申请实施例提供了一种推送服务的重连方法及设备,以解决现有推送服务的重连方法,不仅需要分配资源来执行重连操作,还需要花费额外的运算资源来维持监测连接异常的循环任务,重连效率较低的问题。
技术解决方案
本申请实施例的第一方面提供了一种推送服务的重连方法,包括:
若接收到推送服务启动指令,则激活异常重连监听器;所述异常重连监听器用于监测与推送服务数据库之间的通信链路是否异常;所述异常重连监听器配置有异常阈值以及重连响应参数;
将所述通信链路添加到应用环境采集线程的监听对象列表,并通过所述应用环境采集线程获取所述通信链路的运行参数;
调用所述异常重连监听器从所述应用环境采集线程的输出信号中提取所述运行参数,并确定所述运行参数的异常指数;
若所述异常指数大于所述异常阈值,则基于所述重连响应参数执行重连操作,并获取 重连后的异常指数,直到所述重连后的异常指数小于或等于所述异常阈值。
有益效果
本申请实施例通过在检测到用户发起推送服务启动指令时,则激活用于监测与推送服务数据库之间的通信链路异常情况的异常重连监听器,并将上述通信链路添加到监听对象列表中,以实时获取该通信链路的运行参数;由于异常重连监听器配置有异常阈值以及重连响应参数,能够自动识别通信链路是否存在异常,而无需通过服务器的主线程进行异常监控,减少了异常监听操作所占用的资源。当异常重连监听器识别到基于运行参数计算的异常指数大于预设的预存阈值时,则会基于重连响应参数执行重连操作,维护与推送服务数据库之间的通信链路,提高了数据传输的可靠性。与现有的推送服务的重连方法相比,由于监听器具有自主性,可以交由子线程进行管理,因此本申请不需依赖主线程下的循环任务来对通信链路的异常进行检测,释放了大量原本用于维持循环任务的资源,从而提高了重连操作的效率。
附图说明
图1是本申请第一实施例提供的一种推送服务的重连方法的实现流程图;
图2是本申请第二实施例提供的一种推送服务的重连方法S104具体实现流程图;
图3是本申请第三实施例提供的一种推送服务的重连方法S103具体实现流程图;
图4是本申请第四实施例提供的一种推送服务的重连方法具体实现流程图;
图5是本申请第五实施例提供的一种推送服务的重连方法的具体实现流程图;
图6是本申请一实施例提供的一种推送服务的重连设备的结构框图;
图7是本申请另一实施例提供的一种推送服务的重连设备的示意图。
本发明的实施方式
在本申请实施例中,流程的执行主体为推送服务的重连设备。该推送服务的重连设备包括但不限于:笔记本电脑、计算机、服务器、平板电脑以及智能手机等具有推送服务的重连功能的设备。特别地,该推送服务的重连设备具体为订阅了Redis数据库服务器的设备,在订阅期间持续维护与Redis数据库服务器之间的通信连接。图1示出了本申请第一实施例提供的推送服务的重连方法的实现流程图,详述如下:
在S101中,若接收到推送服务启动指令,则激活异常重连监听器;所述异常重连监听器用于监测与推送服务数据库之间的通信链路是否异常;所述异常重连监听器配置有异常阈值以及重连响应参数。
在本实施例中,推送服务的重连设备可通过订阅的方式接受推送服务器推送的信息, 在该情况下,若推送服务器接收到来自其他设备发送的消息,将会向订阅了该推送服务器的各个设备发送接收到的消息,从而实现跨服务器之间的信息传递。当然,重连设备除了能够接受推送服务器推送的消息外,还可向推送服务器发布信息,并通过推送服务器向其他设备进行信息推送。
在本实施例中,当重连设备接收到用户发送的推送服务启动指令时,则会激活异常重连监听器,并通过该异常重连监听器监测重连设备与推送服务数据库之间的通信链路是否存在异常。可选地,当推送服务的重连设备启动时,则会自动与推送服务数据库建立通信连接,生成对应的通信链路,在该情况下,即重连设备在启动完毕后,会生成一个推送服务器启动指令,开启推送服务功能,并对应地激活异常重连接听器。
可选地,在S101之前还包括:推送服务的重连设备中业务层是以Spring开源框架进行搭建。重连设备会创建一个监听器,并基于异常阈值以及重连响应参数配置该创建的监听器,关联该监听器以及所需监听的事件,即在spring的开源框架下配置一个监听器对应的listener类以及监听事件对应的Event类,并在spring开源框架的配置文件中声明上述两个类。由于推送服务是在业务层运行的,而重连设备的业务层是基于spring开源框架搭建的,因此若在启动推送服务时能够自动激活异常重连监听器,则需要在spring开源框架下配置对应的listener类以及Event类。
在本实施例中,异常重连监听器配置有异常阈值,基于异常阈值识别当前的通信链路是否处于异常状态,是一个异常识别的判别条件;该异常重连监听器还设置有重连响应参数,重连设备会基于该重连响应参数执行与之对应的重连操作。需要说明的是,上述两类参数可以由重连设备的用户进行设置,也可以由推送服务数据库统一发送给各个订阅了其推送服务的设备。在该情况下,当推送服务数据库检测到任一设备向其发送了推送服务注册请求,在返回注册成功信息时,会将上述两个参数封装于该注册成功信息内,以便订阅了该推送服务数据库的各个设备基于上述两类参数配置异常重连监听器。
在S102中,将所述通信链路添加到应用环境采集线程的监听对象列表,并通过所述应用环境采集线程获取所述通信链路的运行参数。
在本实施例中,重连设备在激活了异常重连监听器后,会将异常重连监听器所对应的监听对象,即重连设备与推送服务数据库之间的通信链路添加到应用环境采集线程的监听对象列表内,并通过应用环境采集线程获取该通信链路的运行参数,基于采集得到的运行参数,识别该通信链路是否处于异常状态。由于通信链路发生异常,一般可以反映在其运行参数上面,即传输过程中的相关参数,例如传输速率、时延、信噪比、误码率、信号强度等。
在本实施例中,应用环境采集线程主要用于获取所有种类监听器对应监听对象的运行参数。具体地,应用环境采集线程与重连设备中的所有端口建立了运行参数采集协议,基于该采集协议,各个端口的运行参数会自动上报给应用环境采集线程,继而不同监听器对应的监听对象的运行参数,以确定监听事件是否触发。
在本实施例中,重连设备与推送服务数据库建立了订阅关系,并通过通信链路接收该推送服务数据库推送的信息时,应用环境采集线程会持续获取通信链路的运行参数,基于获取时间的次序将该运行参数存储于对应的缓存区域,该缓存区域为一固定长度的队列,异常重连监听器可从对应的队列中获取所需的运行参数,并执行S103的相关操作。
在S103中,调用所述异常重连监听器从所述应用环境采集线程的输出信号中提取所述运行参数,并确定所述运行参数的异常指数。
在本实施例中,重连设备在设置了异常重连监听器后,该异常重连监听器会基于预设的采集频率,从应用环境采集线程中获取通信链路的运行参数。其中,该采集频率可以为重连设备的时钟频率,在该情况下,可以识别为该异常重连监听器实时监听通信链路的运行参数;该采集频率也可以基于用于进行设置,即一监听周期,在该情况下,监听器以预设的监听周期间隔从应用环境采集线程中获取运行参数。需要说明的是,应用环境采集线程存储该运行参数的缓存区域的大小可以基于监听频率所确定,即监听频率越高,所分配的缓存区域越少;反之,若监听频率越低,则所分配的缓存区域越大,以存储在监听间隔之间所获取得到的运行参数。
可选地,在本实施例中,设置异常重连监听器时会为该监听器配置对应的监听事件,对于异常重连监听器的监听事件具体为通信链路的运行参数,因此会为该监听事件配置对应的Event类。而在将通信链路添加到应用环境采集线程的监听对象列表时,也需要在监听对象列表中创建一个onApplicationEvent类。重连设备可以将异常重连监听器对应的Event类与监听对象列表中的onApplicationEvent类配置为相同的类名,从而提高了异常重连监听器快速从应用环境采集线程中提取通信链路的运行参数。
在本实施例中,重连设备在获取了通信链路的运行参数后,会通过预设的异常系数转换算法,计算该运行参数对应的异常指数。可选地,重连设备可以为运行参数中各个参数项配置一个对应的阈值范围,计算运行参数中超过阈值范围的参数项的个数,基于该参数项个数确定当前时刻通信链路的异常指数。当然,该异常系数转换算法也可以为一哈希函数,将运行参数导入到该哈希函数中,确定还运行参数对应的哈希值,将该哈希值作为运行参数对应的异常指数。
在本实施例,若异常指数小于或等于异常重连监听器配置的异常阈值,则表示当前重 连设备与推送服务数据库之间的通信链路正常运作,无需重新连接,可以等待下一个监听周期的到达,返回S102的操作;反之,若该异常指数大于异常阈值,则表示当前的通信链接存在异常或已经中断,需要执行S104的相关操作。
在S104中,若所述异常指数大于所述异常阈值,则基于所述重连响应参数执行重连操作,并获取重连后的异常指数,直到所述重连后的异常指数小于或等于所述异常阈值。
在本实施例中,若基于运行参数确定的异常指数大于异常阈值,则重连设备会从异常重连监听器中提取预先配置的重连响应参数,并基于该重连响应参数执行重连操作,以重新建立重连设备与推送服务数据库之间的通信链接,在重连操作执行完毕后,重连设备会再次调用异常重连监听器提取运行参数并计算重连后所对应的异常指数,若该异常执行仍然大于异常阈值,则再次执行S104的相关操作,直到异常指数小于或等于异常阈值时,表示重连设备与推送服务数据库的通信链路恢复正常。
可选地,重连响应参数包含有重连周期,重连设备可以基于该重连周期与数据库服务器建立通信链路。该重连响应参数还可以包含备用数据库的通信地址,重连设备可以与备用数据库建立通信连接,并通过备用数据库接收其他设备发布的消息。
以上可以看出,本申请实施例提供的一种推送服务的重连方法,由于监听器具有自主性,可以交由子线程进行管理,因此本申请不需依赖主线程下的循环任务来对通信链路的异常进行检测,释放了大量原本用于维持循环任务的资源,从而提高了重连操作的效率。
图2示出了本申请第二实施例提供的一种推送服务的重连方法S104的具体实现流程图。参见图2所示,相对于图1述实施例,本实施例提供的一种推送服务的重连方法中S104包括:S1041~S1044,具体详述如下:
进一步地,所述重连响应参数包括:重连周期、调整步长以及重连次数阈值;所述基于所述重连响应参数执行重连操作,包括:
在S1041中,根据所述重连周期间隔与所述推送服务数据库建立通信链路,并调整重连计数器的计数值。
在本实施例中,重连响应参数中包含重连周期,重连设备在首次检测到异常指数大于预设的异常阈值时,会创建一个重连计数器,以统计该次重连设备与推送服务数据库之间通信链路异常而执行的重连操作的次数。需要说明的是,该重连计数器的初始值为0,每执行一次重连操作,重连设备则会对该重连计数器进行加1操作,从而通过读取该重连计数器的计数器,则可确定基于当前的重连周期执行重连操作的次数。
在本实施例中,重连设备会先断开与推送服务器数据库之间的通信链路,并向推送服务数据库发送一个连接请求,以重新建立通信链路。若重连设备并没有在预设的时间阈值 内接收到推送服务数据库返回的连接确认信息,则增加重连计数器的计数值,并再次等待下一重连周期的到达,再一次发送连接请求,重复执行上述步骤;若在预设的时间阈值内接收到推送服务数据库返回的连接确认信息,则通过应用环境采集线程获取该通信链路的运行参数,并执行S1042的相关操作。
在S1042中,获取重连后的所述通信链路的运行参数,并调用所述异常重连监听器计算重连后的所述运行参数的异常指数。
在本实施例中,如S102以及S103所述,由于该通信链路已经添加到应用环境采集线程的监听对象列表中,因此在通信链路重新连接后,同样可以通过应用环境采集线程获取该通信链路的运行参数,继而重连异常监听器可以从应用环境采集线程的输出信号中提取该运行参数并计算其对应的异常指数。需要说明的是,该异常指数的计算方法可以参照S103中所述的计算方法,在此不再赘述。
在本实施例中,在确定了重连后通信链路所对应的异常指数后,会把该异常指数再一次与异常阈值进行比较,以确定当前的通信链路是否处于异常状态。若该异常指数小于或等于异常阈值,则不论重连计数器的计数值是否大于重连次数阈值,均识别重连成功,继续通过该通信链路接收推送服务器的推送的消息;反之,若重连后,该异常指数依然大于异常阈值,则表示重连失败,基于重连计数器的计数值的大小,选择执行S1043或S1044的操作。
在S1043中,若所述重连计数器的计数值小于或等于所述重连次数阈值,且重连后的所述异常指数大于所述异常阈值,则返回执行根据所述重连周期间隔与所述推送服务数据库建立通信链路的操作。
在本实施例中,当重连后的异常系数仍大于异常阈值时,表示当前通信链路仍处于异常状态,需要再次执行重连操作,在该情况下,若重连计数器的计数值小于或等于重连次数阈值,则表示基于当前重连周期,所执行的重连操作次数仍未超出预设值,可以继续基于该重连周期间隔与推送服务数据库建立通信链路,因此会返回执行根据所述重连周期间隔与所述推送服务数据库建立通信链路的操作。
在S1044中,若所述重连计数器的计数值大于所述重连次数阈值,且重连后的所述异常指数大于所述异常阈值,则基于所述调整步长更新所述重连周期,初始化所述重连计数器的计数值,并返回执行根据所述重连周期间隔与所述推送服务数据库建立通信链路的操作。
在本实施例中,若重连计数器的计数值大于重连次数阈值,则表示基于当前重连周期所执行的重连操作次数超出了预设值,需要对重连周期进行调整,以优化重连设备的重连 操作。具体地,重连设备会基于调整步长更新重连周期,该更新操作可以为基于调整步长增加重连周期的时长,可以基于调整步长减少重连周期的时长。
对于第一种情况,即基于调整步长增加重连周期的时长,在该情况下,重连周期的初始值较小,以便在刚检测到通信链路异常时,能够以较高频率快速恢复通信连接。但由于高频率重连会消耗重连设备较多的资源,因此当基于该重连周期执行重连操作的次数超过重连次数阈值后,仍未恢复通信连接,则需要降低重连的频率,以减少重连操作所消耗的资源数。当然,重连设备可以设置一个最大重连周期,当更新后的重连周期大于最大重连周期时,会以最大重连周期执行重连操作。
对于第二种情况,即基于调整步长减少重连周期的时长,在该情况下,重连周期的初始值较大,由于发生异常情况下,一般线路修复需要一定的处理时间,若该情况下高频发送连接请求,反而会增大线路的负载,从而降低了修复的速度。为了避免上述情况,重连设备设置重连周期的初始值较大,并逐步减少该重连周期的时长,随着时间的推移,修复也逐渐完成,因此加大重连频率可以快速恢复通信。
在本申请实施例中,基于重连周期、调整步长以及最大重连次数阈值这三个参数,动态调整重连操作的触发时机,以减少重连操作所消耗的设备资源的同时,还能够提高重连效率。
图3示出了本申请第三实施例提供的一种推送服务的重连方法S103的具体实现流程图。参见图3所示,相对于图1所述实施例,本实施例提供的一种推送服务的重连方法中S103包括S1031~S1033,具体详述如下:
进一步地,所述运行参数包括:传输速率、误码率以及信噪比;所述确定所述运行参数的异常指数,包括:
在S1031中,将所述传输速率以及所述通信链路的历史速率导入到第一异常因子计算模型,计算第一异常因子;所述异常因子计算模型具体为:
Figure PCTCN2018097553-appb-000001
其中,ErrorFactor 1为所述第一异常因子;HstyRate i为第i个所述历史速率;CurrentRate为所述传输速率;
Figure PCTCN2018097553-appb-000002
为历史速率的均值;n为所述历史速率的个数。
在本实施例中,运行参数包括传输速率、误码率以及信噪比,重连设备分别基于上述三类参数确定三个异常因子,并基于异常因子来计算运行参数所对应的异常指数,从而得到的异常指数能够较准确地确定当前的通信链路是否处于异常状态。
在本实施例中,推送服务的重连设备会基于记录有的历史速率,计算历史速率的均值, 并计算历史速率的标准差,确定标准的偏移量,继而通过当前获取得到的传输速率与历史速率的均值,确定当前的偏移量,计算当前的偏移量与标准的偏移量之间的比值,将该比值作为第一异常因子。当比值越大,则表示当前的偏移量存在异常,速率超过正常的速率范围,从而在计算异常指数时,其贡献量也较大;反之,若该比值越小,则表示当前的偏移量在正常的范围内,传输速率这一参量并不存在异常。
在S1032中,基于所述传输速率以及所述误码率的之间的乘积,确定第二异常因子。
在本实施例中,重连设备在确定了当前传输链路的传输速率以及误码率后,可以计算传输速率以及误码率之间的乘积,确定单位时间内错误字符的个数,基于该错误字符的个数作为第二异常因子。由于错误的字符越大,则表示当前通信链路的通信质量越差,从而第二异常因子的数值也越大。
在S1033中,将所述第一异常因子、第二异常因子以及所信噪比导入异常指数计算模型,计算所述运行参数的异常指数;所述异常指数计算模型具体为:
ErrorLevel=10lg(Weight 1*ErrorFactor 1+Weight 2*ErrorFactor 2)+Weight 3*SNR
其中,ErrorLevel为所述异常指数,ErrorFactor 2为所述第二异常因子;SNR为所述信噪比,Weight 1、Weight 2、Weight 3为预设系数。
在本实施例中,由于信噪比的单位为分贝(dB),为了保证量纲的统一,重连设备在计算了第一异常因子以及第二异常因子后,将上述两个异常因子转换为以dB为单位的参数值,然后在计算与信噪比之间的和,作为运行参数的异常指数。
在本实施例中,第一异常因子、第二异常因子以及信噪比均配置有一个权重值,即上述的Weight 1、Weight 2、Weight 3,用户可以基于对于传输消息的消息要求,调整上述三个权重的数值。例如,若需要输出的消息的数据量较大,则重点关注的是传输速率,从而Weight 1的数值可以大于其余两个预设系数的值;若需要传输的消息的数据量较小,则需要保证每次接收到的消息的准确率,避免重复发送,因此Weight 2、Weight 3的数值可以大于Weight 1的值。
在本申请实施例中,分别基于运行参数中包含的参数项,确定对应的异常因子,然后基于各个异常因子计算异常指数,从而提高了异常指数对于通信链路异常情况表征的准确率,继而提高了异常识别的准确率。
图4示出了本申请第四实施例提供的一种推送服务的重连方法的具体实现流程图。参见图4所示,相对于图1~图3所述实施例,本实施例提供的一种推送服务的重连方法中在 所述若接收到推送服务启动指令,则激活异常重连监听器之前,还包括:S401~S402,具体详述如下:
在S401中,向所述推送服务数据库发送推送授权请求,并获取所述推送服务数据库的标识。
在本实施例中,推送服务的重连设备可以同时与多个推送服务数据库连接,从而接收多个推送服务数据库推送的消息,即重连设备需要同时维护多条通信链路。为了区分不同的通信链路并配置多个监听器,重连设备在向推送服务数据库发送推送授权请求时,即与推送服务数据库建立订阅关系时,则获取该推送服务数据库的标识,以通过该标识区分不同的推送服务数据库。
具体地,重连设备向推送服务数据库发送推送授权请求,该数据库对该推送授权请求进行鉴权操作,识别该设备是否具有权限订阅该数据库推送的消息,若鉴权成功,例如重连设备的设备编号在推送服务数据库的白名单内,则返回一个授权成功信息给推送服务数据,并将该数据库对应的标识封装于授权成功信息内,重连设备从该授权成功信息提取该标识。
在S402中,根据所述标识以及用户输入的所述异常阈值和所述重连响应参数,创建所述推送服务数据库对应的所述异常重连监听器。
在本实施例中,重连设备在获取了推送服务数据库的标识,以及接收用户设置的异常阈值以及重连响应参数后,可以创建该推送服务数据库的异常重连监听器,在后续接收该推送服务数据库发送的消息时,通过该异常重连监听器监听与其建立的通信链路。
在本申请实施例中,在创建异常重连监听器时为其配置对应的推送服务数据库的标识,以实现同时接收不同数据库推送的消息,提高了重连设备获取信息的效率,并且由于监听器不依赖主进程维护,可通过异步进程执行,从而能够同时通过多个监听器维护多条通信链路。
图5示出了本申请第五实施例提供的一种推送服务的重连方法的具体实现流程图。参见图5所示,相对于图1-图3所述实施例,本实施例提供的一种推送服务的重连方法在所述确定所述运行参数的异常指数之后,还包括:S501以及S502,具体详述如下:
在S501中,若所述异常指数小于或等于所述异常阈值,则向所述推送服务数据库发送一个测试数据包。
在本实施例中,若异常指数小于或等于异常阈值,则表示推送服务的重连设备与推送服务数据库之间的通信链路并不存在异常,但需要接受推送消息除了链路无异常外,还需要数据库服务器的端口正常,因此,会向推送服务数据库发送一个测试数据包,以检测与 推送服务数据库连接的端口是否能够对请求进行应答。
在本实施例中,若该端口无异常,则在预设的时间内向重连设备返回应答数据包,若重连设备在预设时间内接收到该应答数据包,则识别该通信链路以及该端口无异常,则保持当前连接状态,接收推送服务数据库发送的消息;反之,拖未在预设的时间内接收到该应答数据包,则执行S502的相关操作。
在S502中,若在预设时间内未接收到所述推送服务数据库基于所述测试数据包返回的应答数据包,则执行所述基于所述重连响应参数执行重连操作操作。
在本实施例中,若重连设备未在预设时间内接收到推送服务数据库基于测试数据包返回的应答数据包,则表示该通信链路的运行参数虽然并无异常,但推送服务数据库无法应答重连设备发起的请求,即可能与其连接的端口存在异常,需要与数据库重新建立连接,以更换或激活该端口,从而使得端口能够正常收发数据。
在本申请实施例中,通过向推送服务数据库发送测试数据包,以确保连接的端口能够正常收发数据,不仅关注通信链路的运行参数是否在预设的范围内,还能检测端口性能状态,提高了维护的准确率。
图6示出了本申请一实施例提供的一种推送服务的重连设备的结构框图,该推送服务的重连设备包括的各单元用于执行图1对应的实施例中的各步骤。具体请参阅图1与图1所对应的实施例中的相关描述。为了便于说明,仅示出了与本实施例相关的部分。
参见图6,所述推送服务的重连设备包括:
监听器激活单元61,用于若接收到推送服务启动指令,则激活异常重连监听器;所述异常重连监听器用于监测与推送服务数据库之间的通信链路是否异常;所述异常重连监听器配置有异常阈值以及重连响应参数;
运行参数获取单元62,用于将所述通信链路添加到应用环境采集线程的监听对象列表,并通过所述应用环境采集线程获取所述通信链路的运行参数;
运行参数提取单元63,用于调用所述异常重连监听器从所述应用环境采集线程的输出信号中提取所述运行参数,并确定所述运行参数的异常指数;
重连执行单元64,用于若所述异常指数大于所述异常阈值,则基于所述重连响应参数执行重连操作,并获取重连后的异常指数,直到所述重连后的异常指数小于或等于所述异常阈值。
可选地,,所述重连响应参数包括:重连周期、调整步长以及重连次数阈值;所述重连执行单元64包括:
重连计数单元,用于根据所述重连周期间隔与所述推送服务数据库建立通信链路,并 调整重连计数器的计数值;
异常指数重获取单元,用于获取重连后的所述通信链路的运行参数,并调用所述异常重连监听器计算重连后的所述运行参数的异常指数;
第一重连单元,用于若所述重连计数器的计数值小于或等于所述重连次数阈值,且重连后的所述异常指数大于所述异常阈值,则返回执行根据所述重连周期间隔与所述推送服务数据库建立通信链路的操作;
第二重连单元,用于若所述重连计数器的计数值大于所述重连次数阈值,且重连后的所述异常指数大于所述异常阈值,则基于所述调整步长更新所述重连周期,初始化所述重连计数器的计数值,并返回执行根据所述重连周期间隔与所述推送服务数据库建立通信链路的操作。
可选地,所述运行参数包括:传输速率、误码率以及信噪比;所述运行参数提取单元63包括:
第一异常因子计算单元,用于将所述传输速率以及所述通信链路的历史速率导入到第一异常因子计算模型,计算第一异常因子;所述异常因子计算模型具体为:
Figure PCTCN2018097553-appb-000003
其中,ErrorFactor 1为所述第一异常因子;HstyRate i为第i个所述历史速率;CurrentRate为所述传输速率;
Figure PCTCN2018097553-appb-000004
为历史速率的均值;n为所述历史速率的个数;
第二异常因子计算单元,用于基于所述传输速率以及所述误码率的之间的乘积,确定第二异常因子;
异常指数计算单元,用于将所述第一异常因子、第二异常因子以及所信噪比导入异常指数计算模型,计算所述运行参数的异常指数;所述异常指数计算模型具体为:
ErrorLevel=10lg(Weight 1*ErrorFactor 1+Weight 2*ErrorFactor 2)+Weight 3*SNR
其中,ErrorLevel为所述异常指数,ErrorFactor 2为所述第二异常因子;SNR为所述信噪比,Weight 1、Weight 2、Weight 3为预设系数。
可选地,所述推送服务的重连设备还包括:
数据库标识获取单元,用于向所述推送服务数据库发送推送授权请求,并获取所述推送服务数据库的标识;
监听器创建单元,用于根据所述标识以及用户输入的所述异常阈值和所述重连响应参 数,创建所述推送服务数据库对应的所述异常重连监听器。
可选地,所述推送服务的重连设备还包括:
测试数据包发送单元,用于若所述异常指数小于或等于所述异常阈值,则向所述推送服务数据库发送一个测试数据包;
第三重连单元,用于若在预设时间内未接收到所述推送服务数据库基于所述测试数据包返回的应答数据包,则执行所述基于所述重连响应参数执行重连操作操作。
因此,本申请实施例提供的推送服务的重连设备同样可以不需依赖主线程下的循环任务来对通信链路的异常进行检测,释放了大量原本用于维持循环任务的资源,从而提高了重连操作的效率。
图7是本申请另一实施例提供的一种推送服务的重连设备的示意图。如图7所示,该实施例的推送服务的重连设备7包括:处理器70、存储器71以及存储在所述存储器71中并可在所述处理器70上运行的计算机可读指令72,例如推送服务的重连程序。所述处理器70执行所述计算机可读指令72时实现上述各个推送服务的重连方法实施例中的步骤,例如图1所示的S101至S104。或者,所述处理器70执行所述计算机可读指令72时实现上述各装置实施例中各单元的功能,例如图6所示模块61至64功能。
示例性的,所述计算机可读指令72可以被分割成一个或多个单元,所述一个或者多个单元被存储在所述存储器71中,并由所述处理器70执行,以完成本申请。所述一个或多个单元可以是能够完成特定功能的一系列计算机可读指令指令段,该指令段用于描述所述计算机可读指令72在所述推送服务的重连设备7中的执行过程。例如,所述计算机可读指令72可以被分割成监听器激活单元、运行参数获取单元、运行参数提取单元以及重连执行单元,各单元具体功能如上所述。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种推送服务的重连方法,其特征在于,包括:
    若接收到推送服务启动指令,则激活异常重连监听器;所述异常重连监听器用于监测与推送服务数据库之间的通信链路是否异常;所述异常重连监听器配置有异常阈值以及重连响应参数;
    将所述通信链路添加到应用环境采集线程的监听对象列表,并通过所述应用环境采集线程获取所述通信链路的运行参数;
    调用所述异常重连监听器从所述应用环境采集线程的输出信号中提取所述运行参数,并确定所述运行参数的异常指数;
    若所述异常指数大于所述异常阈值,则基于所述重连响应参数执行重连操作,并获取重连后的异常指数,直到所述重连后的异常指数小于或等于所述异常阈值。
  2. 根据权利要求1所述的重连方法,其特征在于,所述重连响应参数包括:重连周期、调整步长以及重连次数阈值;所述基于所述重连响应参数执行重连操作,包括:
    根据所述重连周期间隔与所述推送服务数据库建立通信链路,并调整重连计数器的计数值;
    获取重连后的所述通信链路的运行参数,并调用所述异常重连监听器计算重连后的所述运行参数的异常指数;
    若所述重连计数器的计数值小于或等于所述重连次数阈值,且重连后的所述异常指数大于所述异常阈值,则返回执行根据所述重连周期间隔与所述推送服务数据库建立通信链路的操作;
    若所述重连计数器的计数值大于所述重连次数阈值,且重连后的所述异常指数大于所述异常阈值,则基于所述调整步长更新所述重连周期,初始化所述重连计数器的计数值,并返回执行根据所述重连周期间隔与所述推送服务数据库建立通信链路的操作。
  3. 根据权利要求1所述的重连方法,其特征在于,所述运行参数包括:传输速率、误码率以及信噪比;所述确定所述运行参数的异常指数,包括:
    将所述传输速率以及所述通信链路的历史速率导入到第一异常因子计算模型,计算第一异常因子;所述异常因子计算模型具体为:
    Figure PCTCN2018097553-appb-100001
    其中,ErrorFactor 1为所述第一异常因子;HstyRate i为第i个所述历史速率; CurrentRate为所述传输速率;
    Figure PCTCN2018097553-appb-100002
    为历史速率的均值;n为所述历史速率的个数;
    基于所述传输速率以及所述误码率的之间的乘积,确定第二异常因子;
    将所述第一异常因子、第二异常因子以及所信噪比导入异常指数计算模型,计算所述运行参数的异常指数;所述异常指数计算模型具体为:
    ErrorLevel=10lg(Weight 1*ErrorFactor 1+Weight 2*ErrorFactor 2)+Weight 3*SNR
    其中,ErrorLevel为所述异常指数,ErrorFactor 2为所述第二异常因子;SNR为所述信噪比,Weight 1、Weight 2、Weight 3为预设系数。
  4. 根据权利要求1-3任一项所述的重连方法,其特征在于,在所述若接收到推送服务启动指令,则激活异常重连监听器之前,还包括:
    向所述推送服务数据库发送推送授权请求,并获取所述推送服务数据库的标识;
    根据所述标识以及用户输入的所述异常阈值和所述重连响应参数,创建所述推送服务数据库对应的所述异常重连监听器。
  5. 根据权利要求1-3任一项所述的重连方法,其特征在于,在所述确定所述运行参数的异常指数之后,还包括:
    若所述异常指数小于或等于所述异常阈值,则向所述推送服务数据库发送一个测试数据包;
    若在预设时间内未接收到所述推送服务数据库基于所述测试数据包返回的应答数据包,则执行所述基于所述重连响应参数执行重连操作操作。
  6. 一种终端设备,其特征在于,包括:
    监听器激活单元,用于若接收到推送服务启动指令,则激活异常重连监听器;所述异常重连监听器用于监测与推送服务数据库之间的通信链路是否异常;所述异常重连监听器配置有异常阈值以及重连响应参数;
    运行参数获取单元,用于将所述通信链路添加到应用环境采集线程的监听对象列表,并通过所述应用环境采集线程获取所述通信链路的运行参数;
    运行参数提取单元,用于调用所述异常重连监听器从所述应用环境采集线程的输出信号中提取所述运行参数,并确定所述运行参数的异常指数;
    重连执行单元,用于若所述异常指数大于所述异常阈值,则基于所述重连响应参数执行重连操作,并获取重连后的异常指数,直到所述重连后的异常指数小于或等于所述异常阈值。
  7. 根据权利要求6所述的终端设备,其特征在于,所述重连响应参数包括:重连周期、调整步长以及重连次数阈值;所述重连执行单元包括:
    重连计数单元,用于根据所述重连周期间隔与所述推送服务数据库建立通信链路,并调整重连计数器的计数值;
    异常指数重获取单元,用于获取重连后的所述通信链路的运行参数,并调用所述异常重连监听器计算重连后的所述运行参数的异常指数;
    第一重连单元,用于若所述重连计数器的计数值小于或等于所述重连次数阈值,且重连后的所述异常指数大于所述异常阈值,则返回执行根据所述重连周期间隔与所述推送服务数据库建立通信链路的操作;
    第二重连单元,用于若所述重连计数器的计数值大于所述重连次数阈值,且重连后的所述异常指数大于所述异常阈值,则基于所述调整步长更新所述重连周期,初始化所述重连计数器的计数值,并返回执行根据所述重连周期间隔与所述推送服务数据库建立通信链路的操作。
  8. 根据权利要求6所述的终端设备,其特征在于,所述运行参数包括:传输速率、误码率以及信噪比;所述运行参数提取单元包括:
    第一异常因子计算单元,用于将所述传输速率以及所述通信链路的历史速率导入到第一异常因子计算模型,计算第一异常因子;所述异常因子计算模型具体为:
    Figure PCTCN2018097553-appb-100003
    其中,ErrorFactor 1为所述第一异常因子;HstyRate i为第i个所述历史速率;CurrentRate为所述传输速率;
    Figure PCTCN2018097553-appb-100004
    为历史速率的均值;n为所述历史速率的个数;
    第二异常因子计算单元,用于基于所述传输速率以及所述误码率的之间的乘积,确定第二异常因子;
    异常指数计算单元,用于将所述第一异常因子、第二异常因子以及所信噪比导入异常指数计算模型,计算所述运行参数的异常指数;所述异常指数计算模型具体为:
    ErrorLevel=10lg(Weight 1*ErrorFactor 1+Weight 2*ErrorFactor 2)+Weight 3*SNR
    其中,ErrorLevel为所述异常指数,ErrorFactor 2为所述第二异常因子;SNR为所述信噪比,Weight 1、Weight 2、Weight 3为预设系数。
  9. 根据权利要求6-8任一项所述的终端设备,其特征在于,所述终端设备还包括:
    数据库标识获取单元,用于向所述推送服务数据库发送推送授权请求,并获取所述推送服务数据库的标识;
    监听器创建单元,用于根据所述标识以及用户输入的所述异常阈值和所述重连响应参数,创建所述推送服务数据库对应的所述异常重连监听器。
  10. 根据权利要求6-8任一项所述的终端设备,其特征在于,所述终端设备还包括:
    测试数据包发送单元,用于若所述异常指数小于或等于所述异常阈值,则向所述推送服务数据库发送一个测试数据包;
    第三重连单元,用于若在预设时间内未接收到所述推送服务数据库基于所述测试数据包返回的应答数据包,则执行所述基于所述重连响应参数执行重连操作操作。
  11. 一种终端设备,其特征在于,所述终端设备包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
    若接收到推送服务启动指令,则激活异常重连监听器;所述异常重连监听器用于监测与推送服务数据库之间的通信链路是否异常;所述异常重连监听器配置有异常阈值以及重连响应参数;
    将所述通信链路添加到应用环境采集线程的监听对象列表,并通过所述应用环境采集线程获取所述通信链路的运行参数;
    调用所述异常重连监听器从所述应用环境采集线程的输出信号中提取所述运行参数,并确定所述运行参数的异常指数;
    若所述异常指数大于所述异常阈值,则基于所述重连响应参数执行重连操作,并获取重连后的异常指数,直到所述重连后的异常指数小于或等于所述异常阈值。
  12. 根据权利要求11所述的终端设备,其特征在于,所述重连响应参数包括:重连周期、调整步长以及重连次数阈值;所述基于所述重连响应参数执行重连操作,包括:
    根据所述重连周期间隔与所述推送服务数据库建立通信链路,并调整重连计数器的计数值;
    获取重连后的所述通信链路的运行参数,并调用所述异常重连监听器计算重连后的所述运行参数的异常指数;
    若所述重连计数器的计数值小于或等于所述重连次数阈值,且重连后的所述异常指数大于所述异常阈值,则返回执行根据所述重连周期间隔与所述推送服务数据库建立通信链路的操作;
    若所述重连计数器的计数值大于所述重连次数阈值,且重连后的所述异常指数大于所 述异常阈值,则基于所述调整步长更新所述重连周期,初始化所述重连计数器的计数值,并返回执行根据所述重连周期间隔与所述推送服务数据库建立通信链路的操作。
  13. 根据权利要求11所述的终端设备,其特征在于,所述运行参数包括:传输速率、误码率以及信噪比;所述确定所述运行参数的异常指数,包括:
    将所述传输速率以及所述通信链路的历史速率导入到第一异常因子计算模型,计算第一异常因子;所述异常因子计算模型具体为:
    Figure PCTCN2018097553-appb-100005
    其中,ErrorFactor 1为所述第一异常因子;HstyRate i为第i个所述历史速率;CurrentRate为所述传输速率;
    Figure PCTCN2018097553-appb-100006
    为历史速率的均值;n为所述历史速率的个数;
    基于所述传输速率以及所述误码率的之间的乘积,确定第二异常因子;
    将所述第一异常因子、第二异常因子以及所信噪比导入异常指数计算模型,计算所述运行参数的异常指数;所述异常指数计算模型具体为:
    ErrorLevel=10lg(Weight 1*ErrorFactor 1+Weight 2*ErrorFactor 2)+Weight 3*SNR
    其中,ErrorLevel为所述异常指数,ErrorFactor 2为所述第二异常因子;SNR为所述信噪比,Weight 1、Weight 2、Weight 3为预设系数。
  14. 根据权利要求11-13任一项所述的终端设备,其特征在于,在所述若接收到推送服务启动指令,则激活异常重连监听器之前,所述处理器执行所述计算机可读指令时还实现如下步骤:
    向所述推送服务数据库发送推送授权请求,并获取所述推送服务数据库的标识;
    根据所述标识以及用户输入的所述异常阈值和所述重连响应参数,创建所述推送服务数据库对应的所述异常重连监听器。
  15. 根据权利要求11所述的终端设备,其特征在于,在所述确定所述运行参数的异常指数之后,所述处理器执行所述计算机可读指令时实现如下步骤:
    若所述异常指数小于或等于所述异常阈值,则向所述推送服务数据库发送一个测试数据包;
    若在预设时间内未接收到所述推送服务数据库基于所述测试数据包返回的应答数据包,则执行所述基于所述重连响应参数执行重连操作操作。
  16. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其 特征在于,所述计算机可读指令被处理器执行时实现如下步骤:
    若接收到推送服务启动指令,则激活异常重连监听器;所述异常重连监听器用于监测与推送服务数据库之间的通信链路是否异常;所述异常重连监听器配置有异常阈值以及重连响应参数;
    将所述通信链路添加到应用环境采集线程的监听对象列表,并通过所述应用环境采集线程获取所述通信链路的运行参数;
    调用所述异常重连监听器从所述应用环境采集线程的输出信号中提取所述运行参数,并确定所述运行参数的异常指数;
    若所述异常指数大于所述异常阈值,则基于所述重连响应参数执行重连操作,并获取重连后的异常指数,直到所述重连后的异常指数小于或等于所述异常阈值。
  17. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述重连响应参数包括:重连周期、调整步长以及重连次数阈值;所述基于所述重连响应参数执行重连操作,包括:
    根据所述重连周期间隔与所述推送服务数据库建立通信链路,并调整重连计数器的计数值;
    获取重连后的所述通信链路的运行参数,并调用所述异常重连监听器计算重连后的所述运行参数的异常指数;
    若所述重连计数器的计数值小于或等于所述重连次数阈值,且重连后的所述异常指数大于所述异常阈值,则返回执行根据所述重连周期间隔与所述推送服务数据库建立通信链路的操作;
    若所述重连计数器的计数值大于所述重连次数阈值,且重连后的所述异常指数大于所述异常阈值,则基于所述调整步长更新所述重连周期,初始化所述重连计数器的计数值,并返回执行根据所述重连周期间隔与所述推送服务数据库建立通信链路的操作。
  18. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述运行参数包括:传输速率、误码率以及信噪比;所述确定所述运行参数的异常指数,包括:
    将所述传输速率以及所述通信链路的历史速率导入到第一异常因子计算模型,计算第一异常因子;所述异常因子计算模型具体为:
    Figure PCTCN2018097553-appb-100007
    其中,ErrorFactor 1为所述第一异常因子;HstyRate i为第i个所述历史速率;CurrentRate为所述传输速率;
    Figure PCTCN2018097553-appb-100008
    为历史速率的均值;n为所述历史速率的个数;
    基于所述传输速率以及所述误码率的之间的乘积,确定第二异常因子;
    将所述第一异常因子、第二异常因子以及所信噪比导入异常指数计算模型,计算所述运行参数的异常指数;所述异常指数计算模型具体为:
    ErrorLevel=10lg(Weight 1*ErrorFactor 1+Weight 2*ErrorFactor 2)+Weight 3*SNR
    其中,ErrorLevel为所述异常指数,ErrorFactor 2为所述第二异常因子;SNR为所述信噪比,Weight 1、Weight 2、Weight 3为预设系数。
  19. 根据权利要求16-18任一项所述的计算机可读存储介质,其特征在于,在所述若接收到推送服务启动指令,则激活异常重连监听器之前,所述处理器执行所述计算机可读指令时还实现如下步骤:
    向所述推送服务数据库发送推送授权请求,并获取所述推送服务数据库的标识;
    根据所述标识以及用户输入的所述异常阈值和所述重连响应参数,创建所述推送服务数据库对应的所述异常重连监听器。
  20. 根据权利要求16-18任一项所述的计算机可读存储介质,其特征在于,在所述确定所述运行参数的异常指数之后,所述处理器执行所述计算机可读指令时实现如下步骤:
    若所述异常指数小于或等于所述异常阈值,则向所述推送服务数据库发送一个测试数据包;
    若在预设时间内未接收到所述推送服务数据库基于所述测试数据包返回的应答数据包,则执行所述基于所述重连响应参数执行重连操作操作。
PCT/CN2018/097553 2018-05-14 2018-07-27 一种推送服务的重连方法及设备 WO2019218480A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810456987.6A CN108616429B (zh) 2018-05-14 2018-05-14 一种推送服务的重连方法及设备
CN201810456987.6 2018-05-14

Publications (1)

Publication Number Publication Date
WO2019218480A1 true WO2019218480A1 (zh) 2019-11-21

Family

ID=63663327

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/097553 WO2019218480A1 (zh) 2018-05-14 2018-07-27 一种推送服务的重连方法及设备

Country Status (2)

Country Link
CN (1) CN108616429B (zh)
WO (1) WO2019218480A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115277723A (zh) * 2022-07-19 2022-11-01 国能信控互联技术有限公司 边缘采集历史模块基于缓冲事件的断点续传方法及系统
EP4210289A4 (en) * 2020-09-30 2024-02-28 Petal Cloud Tech Co Ltd METHOD AND DEVICE FOR MONITORING DEVICE ANOMALIES
CN117880868A (zh) * 2024-03-12 2024-04-12 深圳市诚立业科技发展有限公司 一种短信通信链路监控方法

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108965066B (zh) * 2018-10-17 2020-06-05 网宿科技股份有限公司 一种对传输路径进行探测的方法和装置
CN109413612A (zh) * 2018-10-22 2019-03-01 深圳市元征科技股份有限公司 一种通讯连接建立方法及设备
CN109462646B (zh) * 2018-11-12 2021-11-19 平安科技(深圳)有限公司 一种异常响应的方法及设备
KR20210017327A (ko) * 2019-08-07 2021-02-17 삼성전자주식회사 전자 장치 간의 빠른 통신을 위한 방법 및 장치
CN112351094B (zh) * 2020-11-02 2023-10-03 深圳市安软科技股份有限公司 一种网页推送方法、装置、电子设备及存储介质
CN113055246B (zh) * 2021-03-11 2022-11-22 中国工商银行股份有限公司 异常服务节点识别方法、装置、设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103139818A (zh) * 2011-12-02 2013-06-05 中兴通讯股份有限公司 一种aos中保持长连接的方法、系统、aoe、aog及终端
US9197575B2 (en) * 2014-02-17 2015-11-24 Cellco Partnership Handling of snapshot messages as a result of delivery failure in a two-way push connection
CN106060846A (zh) * 2016-05-24 2016-10-26 北京雾联科技有限公司 基于移动终端测量的无线网络性能参数的采集和显示方法
CN107645517A (zh) * 2016-07-20 2018-01-30 腾讯科技(深圳)有限公司 数据推送方法及装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101914488B1 (ko) * 2011-04-06 2018-11-05 삼성전자주식회사 푸시 알림 서비스를 위한 서버 클러스터 및 방법
CN103220309A (zh) * 2012-01-19 2013-07-24 北京智慧风云科技有限公司 自动推送服务信息的云计算系统及其实现方法
CN105808650A (zh) * 2016-02-26 2016-07-27 中国地质大学(武汉) 护肤品推送方法及推送服务器

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103139818A (zh) * 2011-12-02 2013-06-05 中兴通讯股份有限公司 一种aos中保持长连接的方法、系统、aoe、aog及终端
US9197575B2 (en) * 2014-02-17 2015-11-24 Cellco Partnership Handling of snapshot messages as a result of delivery failure in a two-way push connection
CN106060846A (zh) * 2016-05-24 2016-10-26 北京雾联科技有限公司 基于移动终端测量的无线网络性能参数的采集和显示方法
CN107645517A (zh) * 2016-07-20 2018-01-30 腾讯科技(深圳)有限公司 数据推送方法及装置

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4210289A4 (en) * 2020-09-30 2024-02-28 Petal Cloud Tech Co Ltd METHOD AND DEVICE FOR MONITORING DEVICE ANOMALIES
CN115277723A (zh) * 2022-07-19 2022-11-01 国能信控互联技术有限公司 边缘采集历史模块基于缓冲事件的断点续传方法及系统
CN117880868A (zh) * 2024-03-12 2024-04-12 深圳市诚立业科技发展有限公司 一种短信通信链路监控方法
CN117880868B (zh) * 2024-03-12 2024-05-14 深圳市诚立业科技发展有限公司 一种短信通信链路监控方法

Also Published As

Publication number Publication date
CN108616429A (zh) 2018-10-02
CN108616429B (zh) 2019-12-13

Similar Documents

Publication Publication Date Title
WO2019218480A1 (zh) 一种推送服务的重连方法及设备
US20220239508A1 (en) Blockchain message processing method and apparatus, computer, and readable storage medium
US9774697B2 (en) Method, apparatus, and system for pushing notification
WO2021184586A1 (zh) 基于非扁平网络的私有云监控方法、装置、计算机设备及存储介质
US10389801B2 (en) Service request processing method, related apparatus, and system
US8645519B2 (en) Method for interacting messages based on simple network management protocol
WO2021237433A1 (zh) 消息推送方法、装置、电子设备及计算机可读介质
WO2020063086A1 (zh) 基于物联网的数据传输方法及通信装置
US10740142B2 (en) System and method for obtaining task trigger information by a baseband processor of an intelligent device and triggering a hosting task
CN111131401B (zh) 一种服务请求的响应方法及系统
CN112583895B (zh) Tcp通信方法、系统及装置
WO2014176991A1 (zh) 多媒体业务处理装置、方法及系统
CN108243222A (zh) 服务器网络架构方法及装置
WO2019237531A1 (zh) 一种网络节点的监测方法与系统
CN108650482B (zh) 一种视频通话服务的响应方法及设备
CN107248978A (zh) 一种消息监听处理方法及系统
WO2024060408A1 (zh) 网络攻击检测方法和装置、设备及存储介质
WO2018157105A1 (en) Automatic recovery in remote management services
EP3641222A1 (en) Method, apparatus and system for monitoring data traffic
EP4154474A1 (en) Service producer health-check
WO2024040794A1 (zh) 一种异常流量检测方法、装置、电子设备及存储介质
WO2013189421A2 (zh) 分布式的话单统计方法、装置以及系统
CN114640705B (zh) 一种大规模物联终端心跳监控方法
US10020990B2 (en) Network stability reconnaisance tool
CN113542324A (zh) 一种消息推送方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18918842

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18918842

Country of ref document: EP

Kind code of ref document: A1