CN110875857A - Method, device and system for reporting disconnected network state - Google Patents
Method, device and system for reporting disconnected network state Download PDFInfo
- Publication number
- CN110875857A CN110875857A CN201811014357.XA CN201811014357A CN110875857A CN 110875857 A CN110875857 A CN 110875857A CN 201811014357 A CN201811014357 A CN 201811014357A CN 110875857 A CN110875857 A CN 110875857A
- Authority
- CN
- China
- Prior art keywords
- terminal
- message
- communication
- preset
- network
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 85
- 238000004891 communication Methods 0.000 claims abstract description 203
- 230000006855 networking Effects 0.000 claims abstract description 51
- 238000004590 computer program Methods 0.000 claims description 30
- 238000013507 mapping Methods 0.000 claims description 27
- 230000006870 function Effects 0.000 claims description 23
- 230000015654 memory Effects 0.000 claims description 19
- 238000012544 monitoring process Methods 0.000 claims description 16
- 238000012790 confirmation Methods 0.000 claims description 7
- 230000004044 response Effects 0.000 claims description 5
- 238000004806 packaging method and process Methods 0.000 claims description 2
- 230000000694 effects Effects 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 14
- 238000007726 management method Methods 0.000 description 14
- 230000004048 modification Effects 0.000 description 8
- 238000012986 modification Methods 0.000 description 8
- 230000005540 biological transmission Effects 0.000 description 7
- 238000012545 processing Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 5
- 230000006399 behavior Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000007488 abnormal function Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 238000013024 troubleshooting Methods 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/54—Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention provides a method, a device and a system for reporting a disconnected network state, wherein the method comprises the following steps: and when the first terminal is determined to be in the disconnected state, starting a preset communication mode, wherein the communication identifier of the preset communication mode meets a preset rule, and the preset rule is used for enabling a second terminal currently in the networking state to sense that the first terminal is currently in the disconnected state, so that the disconnected state of the first terminal is reported to the server through the second terminal. The invention solves the problem that the service center usually only can abandon the management and control of the offline terminal in the related art, thereby losing the management and control capability of the terminal, and achieves the technical effects that the server can accurately judge the offline reason and the current state of the terminal, thereby eliminating the fault of the service center or the frequently connected service and further managing and controlling the offline equipment.
Description
Technical Field
The invention relates to the field of communication, in particular to a method, a device and a system for reporting a network disconnection state.
Background
In the process of developing a mobile terminal management control system (MDM) function, a special scene exists, and important attention and solution are urgently needed. Namely, the mobile terminal is under the control of the loss of connection state.
Most of mobile terminal applications in the related art need to interact with respective cloud service centers. The service center determines whether the mobile terminal is in an offline state generally according to a heartbeat (Heart Beat) mechanism. The heartbeat mechanism is that a long connection is established between a service center and a mobile terminal through a computer network on a Transmission Control Protocol (TCP) layer, and a message (namely a data packet) is sent to the other party at preset time intervals to indicate the current state of the terminal. The service center can judge whether the terminal is lost through receiving the stable heartbeat message sent by the mobile terminal.
It follows that the service center is primarily maintaining a heartbeat (Heart Beat) connection with the mobile terminal through the network. If the network residing state of the service center is normal, but the heartbeat connection is disconnected, which indicates that the mobile terminal is in the offline state at this time, the service center will also lose the control capability of the terminal, which is also a general processing scheme of the similar product in the field for the offline terminal.
However, the above scheme for determining the terminal loss of connection by sending the service data through heartbeat or timing has an obvious defect: the service center cannot accurately locate the reason of the loss of contact of the mobile terminal. The loss of the terminal may be due to the fact that the terminal itself is abnormally in a disconnected state, but the loss of the terminal due to the abnormal function of the service center, the software failure, the abnormal heartbeat service and the like cannot be eliminated. Therefore, the service center can only adopt a scheme of giving up controlling the lost terminal for the lost terminal.
Disclosure of Invention
At least some embodiments of the present invention provide a method, an apparatus, and a system for reporting a network disconnection state, so as to at least solve a problem in the related art that a service center generally only can give up management and control of an offline terminal for the offline terminal, thereby losing the management and control capability of the offline terminal.
According to an embodiment of the present invention, a method for reporting a network outage state is provided, including:
and when the first terminal is determined to be in the disconnected state, starting a preset communication mode, wherein the communication identifier of the preset communication mode meets a preset rule, and the preset rule is used for enabling a second terminal currently in the networking state to sense that the first terminal is currently in the disconnected state, so that the disconnected state of the first terminal is reported to the server through the second terminal.
According to another embodiment of the present invention, another method for reporting a network outage state is provided, including:
monitoring whether a first terminal starts a preset communication mode or not; when the first terminal starts a preset communication mode, determining that a communication identifier of the preset communication mode meets a preset rule, wherein the preset rule is used for sensing that the first terminal is in a disconnected state currently and the second terminal is in a networking state currently by the second terminal; and reporting the network disconnection state of the first terminal to a server.
According to another embodiment of the present invention, another method for reporting a network outage state is provided, including:
receiving a first message reported by a second terminal establishing communication with a first terminal, wherein the second terminal is currently in a networking state; analyzing the first message to obtain a first message type identifier and identifier information of the first terminal; and determining that the first terminal is in the disconnected state according to the first message type identifier and the identifier information of the first terminal.
According to another embodiment of the present invention, an apparatus for reporting a network outage status is provided, including:
and the starting module is used for starting a preset communication mode when the first terminal is determined to be in the network disconnection state, wherein the communication identifier of the preset communication mode meets a preset rule, and the preset rule is used for enabling a second terminal which is currently in the networking state to sense that the first terminal is currently in the network disconnection state, so that the network disconnection state of the first terminal is reported to the server through the second terminal.
According to another embodiment of the present invention, another apparatus for reporting a network outage status is provided, including:
the monitoring module is used for monitoring whether the first terminal starts a preset communication mode or not; the determining module is used for determining that the communication identifier of the preset communication mode meets a preset rule when the first terminal is monitored to start the preset communication mode, wherein the preset rule is used for sensing that the first terminal is in a network disconnection state and the second terminal is currently in a network connection state by the second terminal; and the first reporting module is used for reporting the network disconnection state of the first terminal to the server.
According to another embodiment of the present invention, another apparatus for reporting a network outage status is provided, including:
the first receiving module is used for receiving a first message reported by a second terminal which establishes communication with the first terminal, wherein the second terminal is currently in a networking state; analyzing the first message to obtain a first message type identifier and identifier information of the first terminal; and the determining module is used for determining that the first terminal is in the disconnected state according to the first message type identifier and the identifier information of the first terminal.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
Through at least part of embodiments of the invention, under the condition that the terminal is in the disconnected state, the current state of the disconnected terminal can be actively reported to the service center through a non-direct connection way, so that the service center can adopt more technical measures to realize the management and control of the disconnected terminal instead of only adopting a strategy of giving up the management and control, thereby solving the problem that the service center can only give up the management and control of the disconnected terminal to the disconnected terminal in the related technology, which leads to the loss of the management and control capability of the terminal, achieving the technical effects that the server can accurately judge the disconnected reason and the current state of the terminal, thereby eliminating the fault of the service center or the frequently connected service and further managing and controlling operation on the disconnected device.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic diagram of an operating environment of a reporting method of a network outage state according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for reporting a network outage state according to an embodiment of the present invention;
fig. 3 is a flowchart of another method for reporting a network outage status according to an embodiment of the present invention;
fig. 4 is a flowchart of a method for reporting a network outage status according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating that a terminal reports a disconnected network and an disconnected network state by turning on a Wi-Fi hotspot function in a disconnected network environment according to an alternative embodiment of the present invention;
fig. 6 is a flowchart illustrating a network disconnection terminal connecting to a surrounding network terminal and reporting a network disconnection/disconnection status thereof in a network disconnection environment according to an alternative embodiment of the present invention;
FIG. 7 is a flowchart of a service center maintaining a terminal password and interacting with a terminal for password update according to an alternative embodiment of the present invention;
fig. 8 is a block diagram of a device for reporting a network outage state according to an embodiment of the present invention;
fig. 9 is a block diagram of a device for reporting a network outage state according to an alternative embodiment of the present invention;
fig. 10 is a block diagram of another apparatus for reporting a network outage state according to an embodiment of the present invention;
fig. 11 is a block diagram of another apparatus for reporting a network outage status according to an alternative embodiment of the present invention;
fig. 12 is a block diagram of a device for reporting a network outage state according to another embodiment of the present invention;
fig. 13 is a block diagram of a device for reporting a network outage status according to an alternative embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Example 1
The method embodiments provided by the application can be run on a server and/or a terminal. Fig. 1 is a schematic diagram of an operating environment of a method for reporting a disconnected network status according to an embodiment of the present invention, and as shown in fig. 1, the method for reporting a disconnected network status according to the present invention may be executed on a first terminal 1 (i.e., a disconnected network terminal), a second terminal 2 (i.e., a networked terminal), or a server 3 (hereinafter, also referred to as a service center) shown in fig. 1. In an embodiment, the reporting of the network disconnection state of the first terminal 1 is implemented by using the interaction among the first terminal 1, the second terminal 2 and the server 3 as shown in fig. 1. In one embodiment, each of the first terminal 1, the second terminal 2 and the server 3 may include: one or more processors (which may include, but are not limited to, a processing device such as a Microprocessor (MCU) or a programmable logic device (FPGA)) and memory for storing data. In an embodiment, each of the devices may further include a transmission device for a communication function and an input-output device. It will be understood by those of ordinary skill in the art that the drawings shown in fig. 1 are for illustration purposes only and are not intended to limit the implementation of the present invention.
The memory may be configured to store a computer program, for example, a software program and a module of an application software, such as a computer program corresponding to the reporting method of the network disconnection state in the embodiment of the present invention, and the processor executes various functional applications and data processing by running the computer program stored in the memory, that is, implements the reporting method of the network disconnection state. The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include memory located remotely from the processor, and these remote memories may be connected to the various devices described above via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of a terminal or a server. In one example, the transmission device includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In order to realize that the terminal actively reports the loss of connection state in the network disconnection environment, a service center system arranged at the cloud end of a computer network and an application installed on the mobile terminal are required to be deployed.
When the method embodiment provided by the application runs on a server, the main functions of the service center system include the following aspects:
(1) and receiving the data with the specific format reported by the terminal application through a computer network, and analyzing the data to judge whether the data is the network disconnection and loss information reported by the mobile terminal.
(2) Feature information for each terminal is stored, which may include, but is not limited to: unique identification of the terminal and a communication key. The unique Identifier may be one or more combinations of International Mobile Equipment Identity (IMEI), Mobile Equipment Identity (MEID), International Mobile Subscriber Identity (IMSI), and the like, which may uniquely identify the terminal Identity. The communication key can be a password used for a local area network or near field communication function, such as a terminal Wi-Fi hotspot, Bluetooth and Near Field Communication (NFC).
(3) And formulating naming rules of Wi-Fi hotspots, Bluetooth and NFC of each terminal.
(4) Issuing commands to terminals in the network, which may include but is not limited to: the terminal is started in a network disconnection state, and comprises a Wi-Fi hotspot name (or near field communication identification such as Bluetooth and NFC), a Wi-Fi hotspot password (or near field communication function passwords such as Bluetooth and NFC), a network disconnection message format reported by the terminal and the like.
When the method embodiment provided by the application is run on a terminal, the main functions of the terminal application may include the following aspects:
(1) and monitoring the computer network state of the terminal, wherein the computer network refers to the computer network where the service center is located, and only the terminal and the service center which are located in the same network environment are determined to be in a connection state. When the terminal finds that the network is disconnected, the terminal actively starts the own network or the near field communication function, which may include but is not limited to: Wi-Fi hot spot, bluetooth, NFC, these functions that open possess certain characteristic identification, for example: the name of the Wi-Fi hotspot meets a preset rule. Hereinafter, the specific implementation process of the present invention will be described in detail mainly by taking the default communication mode as a Wi-Fi hotspot as an example.
(2) All the networking terminals monitor whether other terminals with network or near field communication functions of Wi-Fi hotspots, Bluetooth, NFC and the like exist around and whether the names meet the offline naming rules set by the service center. And if so, requesting the service center to connect the password of the loss of contact terminal so as to actively initiate the connection.
(3) And receiving connection requests initiated by other terminals in the network disconnection state, and sending the network disconnection and loss message to other terminals which request to establish success according to a preset format.
(4) And sending the received data sent by the disconnected network terminal to a service center through a computer network.
The network-breaking reporting method is suitable for an interactive scene of connecting the terminal and the cloud service center, and the terminal needs to be constantly connected with the cloud service center due to business requirements. When the normal connection is disconnected, the service center can receive the network disconnection information reported by the terminal so as to accurately judge the loss of connection reason and the current state of the terminal, thereby eliminating the fault of the service center or the normal connection service and further performing management and control operation on the network disconnection equipment.
Specific application scenarios may include, but are not limited to, one of the following: (1) the mobile office equipment carries own equipment office (BYOD) application, namely mobile office, and the scene comprises a mobile phone, a tablet and other terminals with communication modules used in office; (2) various intelligent hardware in the intelligent home are interconnected and communicated through home Wi-Fi, so that the monitoring and positioning of home network states and the networking states of all intelligent terminals are facilitated, and the management and troubleshooting of the intelligent terminals are enhanced; (3) the Internet of vehicles; (4) industrial internetworks, such as: water, electricity and gas monitoring terminal with wireless communication module.
In this embodiment, a method for reporting a network disconnection state of the network disconnection terminal is provided, and fig. 2 is a flowchart of a method for reporting a network disconnection state according to an embodiment of the present invention, as shown in fig. 2, the method includes the following steps:
step S202, when the first terminal is determined to be in the network disconnection state, a preset communication mode is started, wherein a communication identifier of the preset communication mode meets a preset rule, and the preset rule is used for enabling a second terminal currently in the networking state to sense that the first terminal is currently in the network disconnection state, so that the network disconnection state of the first terminal is reported to a server through the second terminal.
Through the steps, under the condition that the terminal is in the disconnected network state, the current state of the disconnected terminal can be actively reported to the service center through a non-direct connection way, so that the service center can adopt more technical measures to realize the management and control of the disconnected terminal instead of only adopting a strategy of giving up the management and control, the problem that the management and control capability of the disconnected terminal is lost due to the fact that the service center can only give up the management and control of the disconnected terminal to the disconnected terminal in the related art can be solved, the problem that the server can accurately judge the disconnected reason and the current state of the terminal is achieved, faults of the service center or the frequently-connected service are eliminated accordingly, and the technical effect of further management and control operation of the disconnected network equipment is achieved.
In an embodiment, the execution subject of the method steps involved in the method embodiment may be a network disconnection terminal, and the like, but is not limited thereto.
In one embodiment, the sequence numbers of the method steps involved in the method embodiment do not represent the execution order.
In one embodiment, the preset rules include: the first part is designated by the server, and the second part is identification information of the first terminal, so that the second terminal reports the network disconnection state of the first terminal to the server through the identification information.
In an optional embodiment, the network disconnection terminal monitors and confirms network disconnection, and starts a preset Wi-Fi hotspot. The Wi-Fi hotspot is automatically started by software after the terminal is disconnected, and the name of the Wi-Fi hotspot meets the requirements of preset rules: [ PREFIX ] [ SUFFIX ], where [ PREFIX ] (corresponding to the first part above) is specified by the service center, for example: a fixed string, [ SUFFIX ] (corresponding to the second part above) is a unique identification for each terminal, for example: IMEI, MEID, IMSI or a terminal unique identity generated by the service center.
In one embodiment, the preset rule further comprises one of: a third part, wherein the third part is a password with a preset communication function; the third part and the fourth part, wherein the fourth part is the update cycle of the password of the preset communication function.
In addition, in the preset rule, a Wi-Fi hotspot password (equivalent to the third part) can be selectively set, the password is randomly generated when the Wi-Fi hotspot is started, and the password is selectively dynamically updated according to a certain time interval (equivalent to the fourth part), so that any other device is prevented from accessing.
The random password generation policy includes, but is not limited to, one of:
(1) generating based on a time stamp, wherein the time stamp can be the opening time of the Wi-Fi hotspot or the related time of other attributes of the current equipment;
(2) based on current device attributes, it may include, but is not limited to: some hardware attributes (e.g., Mac address);
(3) various combinations of information, such as: timestamp + device attributes;
(4) encoding or encrypting on the basis of various information listed in (1) to (3) above.
In one embodiment, the preset rules include: a first portion, wherein the first portion is specified by the server.
In another optional embodiment, the network disconnection terminal monitors and confirms network disconnection, and starts a preset Wi-Fi hotspot, the Wi-Fi hotspot is automatically started by software after the network disconnection of the terminal, and the Wi-Fi hotspot name meets the requirement of a preset rule, and the rule is specified by the service center, for example: a fixed string (corresponding to the first part).
In an embodiment, after the step S202, the method further includes the following steps:
step S204, monitoring a connection request of a second terminal through a preset communication function;
step S206, in response to the connection request, sending a first message to the second terminal, so that the second terminal reports the first message to the server, where the first message is used to indicate that the first terminal is currently in a disconnected state, and the first message includes: identification information of the first terminal.
And the terminal in the normal networking state monitors the surrounding Wi-Fi hotspots, if the hotspot name is found to meet the rule set by the service center, the hotspot name is sent to the service center in a specific format message, the service center is requested to return the Wi-Fi hotspot password, wherein the message comprises the Wi-Fi hotspot name and the Wi-Fi hotspot password message identifier. And the service center maintains the corresponding relation between the Wi-Fi hotspot names of all the terminals and the Wi-Fi hotspot passwords. And the service center analyzes all the messages reported by the terminal, and if the analyzed message type is a Wi-Fi hotspot password request message, the service center searches for a corresponding password according to the Wi-Fi hotspot name in the message and returns the password. And the networking terminal uses the password returned by the service center to connect the Wi-Fi hotspot of the disconnected terminal. The method comprises the steps that a disconnected network terminal monitors a Wi-Fi hotspot connection event, and sends a disconnected network report message (equivalent to the first message) to a networking terminal after the connection is successful, wherein the message comprises the following steps: and unique identification of the disconnected network terminal.
In an embodiment, the first message further comprises at least one of: the network outage time of the first terminal and the geographic position of the first terminal.
In an optional embodiment, the network disconnection reporting message sent by the network disconnection terminal to the networking terminal after the connection is successful may further include other additional information, for example: additional offline time, additional geographic location, and additional offline time and geographic location at the same time.
In an embodiment, after the step S202, the method further includes the following steps:
step S208, receiving a second message from the second terminal, wherein the second message is used for indicating that the server knows that the first terminal is currently in the disconnected state;
step S210, in response to the second message, performing one of the following operations:
(1) closing a preset communication mode;
(2) keeping the communication connection with the second terminal and hiding the preset communication mode;
(3) keeping opening a preset communication mode;
(4) and keeping opening the preset communication mode and limiting the number of the terminals accessed through the preset communication mode.
In an optional embodiment, after the service center confirms the disconnected network terminal, the message for confirming the disconnected network and the disconnected network is replied to the networked terminal. And the networking terminal forwards the message for confirming the disconnection and the loss of the network replied by the service center to the disconnection terminal. The disconnected network terminal can implement one of the following behaviors according to actual conditions:
(1) the network-breaking terminal finishes the network-breaking and loss-of-connection reporting operation, and actively closes the Wi-Fi hotspot in order to reduce power consumption or avoid discovery of other equipment;
(2) the disconnected network terminal finishes the operation of reporting the disconnected network and the lost connection, but keeps the current connection with the networked terminal in order to keep the subsequent communication with the service center, and hides the Wi-Fi hot spot in order to avoid the increase of power consumption caused by the connection of other equipment;
(3) in order to avoid the network disconnection of the network disconnection terminal and the service center again caused by the network disconnection of the network connection terminal, the network disconnection terminal always keeps the opening state of the Wi-Fi hotspot and allows other devices to be connected, and the upper limit of the number of the connected terminals can be selectively set to avoid power consumption caused by excessive terminal connection.
In this embodiment, another method for reporting a network disconnection state running in a networked terminal is further provided, and fig. 3 is a flowchart of another method for reporting a network disconnection state according to an embodiment of the present invention, as shown in fig. 3, the flowchart includes the following steps:
step S302, monitoring whether a first terminal starts a preset communication mode;
step S304, when it is monitored that the first terminal starts the preset communication mode, determining that the communication identifier of the preset communication mode meets a preset rule, wherein the preset rule is used for sensing that the first terminal is currently in a network disconnection state and the second terminal is currently in a network connection state by the second terminal;
and step S306, reporting the network disconnection state of the first terminal to a server.
In an embodiment, the execution subject of the method steps involved in the method embodiment may be a networked terminal or the like, but is not limited thereto.
In one embodiment, the sequence numbers of the method steps involved in the method embodiment do not represent the execution order.
In one embodiment, in step S304, determining that the communication identifier satisfies the preset rule may include the following steps:
step S3041, determining that the communication identifier includes a first part and a second part of a preset rule, where the first part is specified by the server, and the second part is identifier information of the first terminal.
In an optional embodiment, the network disconnection terminal monitors and confirms network disconnection, and starts a preset Wi-Fi hotspot. The Wi-Fi hotspot is automatically started by software after the terminal is disconnected, and the name of the Wi-Fi hotspot meets the requirements of preset rules: [ PREFIX ] [ SUFFIX ], where [ PREFIX ] (corresponding to the first part above) is specified by the service center, for example: a fixed string, [ SUFFIX ] (corresponding to the second part above) is a unique identification for each terminal, for example: IMEI, MEID, IMSI or a terminal unique identity generated by the service center. All terminals with normal networking state monitor surrounding Wi-Fi hotspots, and if the hotspot names include [ PREFIX ] and [ SUFFIX ], the hotspot names are determined to meet the [ PREFIX ] [ SUFFIX ] rule.
In an embodiment, in step S306, reporting the network disconnection status of the first terminal to the server may include the following processing steps:
step S3061, analyzing the identification information of the first terminal from the communication identification;
step S3062, encapsulate the identification information of the first terminal and the reporting identification of the network-cut-off message into a first message;
step S3063, report the first message to the server.
If the networking terminal finds that the hotspot name meets the [ PREFIX ] [ SUFFIX ] rule, resolving the [ SUFFIX ] from the hotspot name, and reporting the message (which is equivalent to the first message) in a specific format to a service center, wherein the message comprises the [ SUFFIX ] and a network disconnection reporting message identifier.
In one embodiment, in step S304, determining that the communication identifier satisfies the preset rule may include the following steps:
step S3042, determining that the communication identifier includes a first part of the preset rule, where the first part is specified by the server.
The network disconnection terminal monitors and confirms network disconnection, a preset Wi-Fi hotspot is started, the Wi-Fi hotspot is automatically started by software after the network disconnection of the terminal, the name of the Wi-Fi hotspot meets the requirement of a preset rule, and the rule is specified by a service center, for example: a fixed string (corresponding to the first part). And if the networking terminal finds the fixed character string from the Wi-Fi hotspot name, determining that the Wi-Fi hotspot name meets the requirement of a preset rule.
In an embodiment, before reporting the network disconnection status of the first terminal to the server in step S306, the method may further include the following steps:
step S308, packaging the communication identifier and the communication password message identifier into a second message;
step S310, reporting the second message to a server;
step S312, receiving a communication password corresponding to a preset communication mode from the server;
step S314, sending a connection request to the first terminal by adopting a communication password;
step S316, after the connection is successfully established, receiving a third message from the first terminal, where the third message is used to indicate that the first terminal is currently in a disconnected state, and the third message includes: identification information of the first terminal.
And if the networking terminal finds that the hotspot name meets the rule set by the service center, the networking terminal sends the hotspot name to the service center in a specific format message (equivalent to the second message) and requests the service center to return the Wi-Fi hotspot password, wherein the message comprises the Wi-Fi hotspot name and a message identifier requesting the Wi-Fi hotspot password. And the service center maintains the corresponding relation between the Wi-Fi hotspot names of all the terminals and the Wi-Fi hotspot passwords. And the service center analyzes all the messages reported by the terminal, and if the analyzed message type is a Wi-Fi hotspot password request message, the service center searches for a corresponding password according to the Wi-Fi hotspot name in the message and returns the password. And the networking terminal uses the password returned by the service center to connect the Wi-Fi hotspot of the disconnected terminal. The disconnected network terminal monitors a Wi-Fi hotspot connection event, and sends a disconnected network report message (equivalent to the third message) to the networking terminal after the connection is successful, wherein the message comprises: the unique identifier of the disconnected network terminal can be added with other additional information, such as: additional offline time, additional geographic location, and additional offline time and geographic location at the same time.
In an embodiment, in step S306, reporting the network disconnection status of the first terminal to the server may include the following steps:
step S3064, forward the third message to the server.
The networking terminal forwards the network disconnection report message sent by the network disconnection terminal to the service center, and the networking terminal can add other additional information in the message sent by the network disconnection terminal before forwarding.
In an embodiment, after the step S306 reports the network disconnection status of the first terminal to the server, the method may further include the following steps:
step S318, receiving a fourth message from the server, wherein the fourth message is used for indicating that the server knows that the first terminal is currently in the disconnected state;
step S320, forwarding the fourth message to the first terminal.
The service center analyzes all the messages reported by the terminal, if the analyzed message type is the network breaking reporting message, the unique identifier of the network breaking equipment is extracted from the message body and the equipment is further processed. Then, the service center replies a message (corresponding to the fourth message) confirming the disconnection of the network to the networking terminal. And the networking terminal forwards the message for confirming the disconnection and the loss of the network replied by the service center to the disconnection terminal.
Fig. 4 is a flowchart of a reporting method for a network outage state according to an embodiment of the present invention, where as shown in fig. 4, the process includes the following steps:
step S402, receiving a first message reported by a second terminal establishing communication with a first terminal, wherein the second terminal is currently in a networking state;
step S404, analyzing the first message to obtain a first message type identifier and identifier information of the first terminal;
step S406, determining that the first terminal is in the disconnected state according to the first message type identifier and the identifier information of the first terminal.
In an embodiment, the execution subject of the method steps involved in the method embodiment may be a server or the like, but is not limited thereto.
In one embodiment, the sequence numbers of the method steps involved in the method embodiment do not represent the execution order.
In one embodiment, in step S406, determining that the first terminal is in the network disconnection state according to the first message type identifier and the identifier information of the first terminal may include the following steps:
step S4061, determining the first message as the message reporting the disconnected state according to the first message type identifier;
step S4062, determining that the first terminal is in the disconnected state according to the identification information of the first terminal.
The service center analyzes all the messages reported by the networking terminal, if the analyzed message type is the network breaking reporting message (equivalent to the first message), the service center extracts the unique identifier of the network breaking equipment from the message body and further processes the equipment.
In an embodiment, before receiving the first message reported by the second terminal in step S402, the method may further include the following steps:
step S408, receiving a second message reported by the second terminal, where the second message includes: the second message type identifier and a communication identifier of a preset communication mode adopted by the first terminal;
step S410, obtaining a communication password corresponding to the communication identifier according to the second message type identifier and the communication identifier;
step S412, returning the communication password to the second terminal, where the communication password is used to obtain the identification information of the first terminal.
And the terminal in the normal networking state monitors the surrounding Wi-Fi hotspots, and if the hotspot name is found to meet the rule set by the service center, the hotspot name is sent to the service center in a specific format message (equivalent to the second message) to request the service center to return the Wi-Fi hotspot password, wherein the message comprises the Wi-Fi hotspot name and the Wi-Fi hotspot password message identifier. And the service center maintains the corresponding relation between the Wi-Fi hotspot names of all the terminals and the Wi-Fi hotspot passwords.
In one embodiment, in step S410, acquiring the communication password corresponding to the communication identifier according to the second message type identifier and the communication identifier may include the following steps:
step S4101, determining the second message as the message for acquiring the communication password according to the second message type identifier;
step S4102, searching a corresponding communication password from a preset corresponding relation according to the communication identifier.
The service center analyzes all messages reported by the networking terminal, and if the analyzed message type is a Wi-Fi hotspot password request message, the service center searches for a corresponding password according to the Wi-Fi hotspot name in the message and returns the password.
In an embodiment, before receiving the first message reported by the second terminal in step S402, the method may further include the following steps:
step S414, generating a first communication key and issuing the first communication key to the first terminal;
step S416, receiving an update result reported by the first terminal, wherein the update result is obtained by the first terminal updating a local existing second communication key by using the first communication key;
step S418, if the updating result shows that the updating is successful, updating the mapping relation between the identification information of the first terminal and the second communication key into the mapping relation between the identification information of the first terminal and the first communication key;
step S420, a third message is returned to the first terminal, wherein the third message is used for indicating that the mapping relation between the identification information of the first terminal and the first communication key is updated successfully;
step S422, if the confirmation reply from the first terminal is not received within the preset time range, the mapping relationship between the identification information of the first terminal and the first communication key is restored to the mapping relationship between the identification information of the first terminal and the second communication key.
The service center generates a new password and sends the new password to the terminal, and the mapping relation between the terminal and the original password is not updated at the moment. And the terminal updates the new password sent by the service center to the local after receiving the new password, records the original password, reports the updating result to the service center, and starts a timer to wait for the service center to reply. And after receiving the password updating success information reported by the terminal, the service center establishes a mapping relation between the new password and the terminal. After the mapping relationship is updated successfully, the service center sends a mapping relationship modification success confirmation (equivalent to the third message) to the terminal, and starts a timer to wait for the terminal to reply. And if the terminal does not receive the modification reply of the service center within the timeout time range, restoring the local password from the new password to the original password. If the terminal receives the modification reply of the service center within the overtime time range, the terminal discards the record of the original password and sends a reply confirming the receipt to the service center again. If the service center does not receive the terminal confirmation reply within the overtime time range, the mapping relation between the terminal and the new password is restored to the mapping relation between the terminal and the old password.
In an embodiment, in step S406, after determining that the first terminal is in the offline state according to the first message type identifier and the identifier information of the first terminal, the method may further include the following steps:
step S424, a fourth message is returned to the second terminal, where the fourth message is used to indicate that the server knows that the first terminal is currently in the disconnected state.
The service center replies a message (equivalent to the fourth message) for confirming the disconnection of the network to the networking terminal. And the networking terminal forwards the message for confirming the disconnection and the loss of the network replied by the service center to the disconnection terminal.
The above implementation will be described in further detail with reference to the exemplary embodiments shown in fig. 5 to 7.
Fig. 5 is a flowchart of reporting a disconnected network and offline state of a terminal in a disconnected network environment by starting a Wi-Fi hotspot function according to an optional embodiment of the present invention, where as shown in fig. 5, the process may include the following steps:
step S501, the network disconnection terminal monitors the self networking state, wherein the network refers to the same computer network where the service center is located.
And step S502, the network disconnection terminal monitors and confirms the network disconnection, and starts a preset Wi-Fi hotspot. The Wi-Fi hotspot is automatically started by software after the terminal is disconnected, and the name of the Wi-Fi hotspot meets the requirements of preset rules: [ PREFIX ] [ SUFFIX ], where [ PREFIX ] is specified by the service center, for example: a fixed string, [ SUFFIX ] is a unique identification for each terminal, such as: IMEI, MEID, IMSI or a terminal unique identity generated by the service center. And selectively setting a Wi-Fi hotspot password, randomly generating the password when the Wi-Fi hotspot is opened, and selectively and dynamically updating according to a certain time interval to prevent any other equipment from accessing.
The random password generation policy includes, but is not limited to, one of:
(1) generating based on a time stamp, wherein the time stamp can be the opening time of the Wi-Fi hotspot or the related time of other attributes of the current equipment;
(2) based on current device attributes, it may include, but is not limited to: some hardware attributes (e.g., Mac address);
(3) various combinations of information, such as: timestamp + device attributes;
(4) encoding or encrypting on the basis of various information listed in (1) to (3) above.
Step S503, all terminals in a normal networking state monitor surrounding Wi-Fi hotspots, and if finding that the hotspot name satisfies the [ PREFIX ] [ SUFFIX ] rule, parse [ SUFFIX ] from the hotspot name and report the message in a specific format to the service center, where the message includes [ SUFFIX ] and a network disconnection report message identifier, for example: { "type": disconnect "," device ":" [ SUFFIX ] "};
step S504, the service center analyzes the information reported by the terminal, if the analyzed information type is the network breaking report information, the unique identifier of the network breaking equipment is extracted from the information body and the equipment is further processed.
Fig. 6 is a flowchart of a network disconnection terminal connecting to a surrounding network terminal under a network disconnection environment and reporting a network disconnection and disconnection status of the network disconnection terminal according to an alternative embodiment of the present invention, and as shown in fig. 6, the flowchart may include the following processing steps:
step S601, the network disconnection terminal monitors the self networking state, wherein the network refers to the same computer network where the service center is located.
Step S602, the network disconnection terminal monitors and confirms network disconnection, and starts a preset Wi-Fi hotspot, the Wi-Fi hotspot is automatically started by software after the network disconnection of the terminal, the Wi-Fi hotspot name meets the requirement of a preset rule, and the rule is specified by a service center, for example: a fixed string of characters.
Step S603, all terminals in a normal networking state monitor surrounding Wi-Fi hotspots, and if finding that the hotspot name satisfies a rule formulated by the service center, send the hotspot name to the service center in a specific format message, and request the service center to return the Wi-Fi hotspot password, where the message includes the Wi-Fi hotspot name and a message identifier requesting the Wi-Fi hotspot password, for example:
{"type":"password","wifi-hotspot":"***"}。
step S604, the service center maintains the corresponding relation between the Wi-Fi hotspot names and the Wi-Fi hotspot passwords of all the terminals. And the service center analyzes all the messages reported by the terminal, and if the analyzed message type is a Wi-Fi hotspot password request message, the service center searches for a corresponding password according to the Wi-Fi hotspot name in the message and returns the password.
And step S605, the networking terminal uses the password returned by the service center to connect the Wi-Fi hotspot of the disconnected terminal.
Step S606, the network disconnection terminal monitors the Wi-Fi hotspot connection event and sends a network disconnection report message to the networking terminal after the connection is successful, wherein the message comprises: the unique identifier of the disconnected network terminal can be added with other additional information, such as: additional offline time, additional geographic location, and additional offline time and geographic location at the same time.
Step S607, the networking terminal forwards the network breaking report message sent by the network breaking terminal to the service center, and the networking terminal can add other additional information in the message sent by the network breaking terminal before forwarding.
Step S608, the service center analyzes all the messages reported by the terminal, if the analyzed message type is the network breaking report message, the unique identifier of the network breaking equipment is extracted from the message body and the equipment is further processed.
Step S609: and the service center replies the message for confirming the disconnection and the loss of the network to the networking terminal.
Step S610: and the networking terminal forwards the message for confirming the disconnection and the loss of the network replied by the service center to the disconnection terminal.
Step S611: the disconnected network terminal can implement one of the following behaviors according to actual conditions:
(1) the network-breaking terminal finishes the network-breaking and loss-of-connection reporting operation, and actively closes the Wi-Fi hotspot in order to reduce power consumption or avoid discovery of other equipment;
(2) the disconnected network terminal finishes the operation of reporting the disconnected network and the lost connection, but keeps the current connection with the networked terminal in order to keep the subsequent communication with the service center, and hides the Wi-Fi hot spot in order to avoid the increase of power consumption caused by the connection of other equipment;
(3) in order to avoid the network disconnection of the network disconnection terminal and the service center again caused by the network disconnection of the network connection terminal, the network disconnection terminal always keeps the opening state of the Wi-Fi hotspot and allows other devices to be connected, and the upper limit of the number of the connected terminals can be selectively set to avoid power consumption caused by excessive terminal connection.
Fig. 7 is a flowchart of a service center maintaining a terminal password and performing password update interaction with a terminal according to an alternative embodiment of the present invention, as shown in fig. 7, the flowchart may include the following processing steps:
step S701, the service center updates the password of the terminal, which may include but is not limited to one of the following ways:
in the first method, the terminal requests the service center to update the password, which may be triggered at regular time or by specific events, for example: triggering after the terminal is disconnected from the network and reconnected successfully;
and in the second mode, the service center triggers the operation of updating the terminal password at regular time.
Step S702, the service center generates a new password and issues the new password to the terminal, and the mapping relation between the terminal and the original password is not updated at the moment.
And step S703, the terminal updates the new password sent by the service center to the local, records the original password, reports the update result to the service center, and starts a timer to wait for the service center to reply.
Step S704, after receiving the successful password update information reported by the terminal, the service center establishes a mapping relationship between the new password and the terminal.
Step S705, after the service center successfully updates the mapping relationship, the service center sends a mapping relationship modification success confirmation to the terminal, and starts a timer to wait for the terminal to reply.
Step S706, if the terminal does not receive the modification reply of the service center within the timeout time range, the terminal restores the local password from the new password to the original password.
Step S707, if the terminal receives the modification reply from the service center within the timeout period, the terminal discards the record of the original password and sends a reply confirming the reception to the service center again.
Step S708, if the service center does not receive the terminal confirmation reply within the timeout time range, the service center restores the mapping relationship between the terminal and the new password to the mapping relationship between the terminal and the old password.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
In this embodiment, a device for reporting a network outage state is further provided, where the device is used to implement the foregoing embodiment and the preferred embodiments, and details of the description already made are omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 8 is a block diagram of a device for reporting a network outage state according to an embodiment of the present invention, and as shown in fig. 8, the device includes: the starting module 100 is configured to start a preset communication mode when it is determined that the first terminal is in the network disconnection state, where a communication identifier of the preset communication mode meets a preset rule, and the preset rule is used to enable a second terminal currently in the networking state to sense that the first terminal is currently in the network disconnection state, so that the network disconnection state of the first terminal is reported to the server through the second terminal.
In one embodiment, the preset rules include: a first portion, wherein the first portion is specified by the server.
In one embodiment, the preset rule further comprises one of: a second part, wherein the second part is identification information of the first terminal; the third part is a password with a preset communication function; the second part, the third part and the fourth part, wherein the fourth part is the update cycle of the password of the preset communication function.
In an embodiment, fig. 9 is a block diagram of a structure of a device for reporting a network outage state according to an alternative embodiment of the present invention, and as shown in fig. 9, the device includes, in addition to all modules shown in fig. 8, further: the monitoring module 102 is configured to monitor a connection request of the second terminal through a preset communication function; a sending module 104, configured to send a second message to the second terminal in response to the connection request, so that the second terminal reports the second message to the server, where the second message is used to indicate that the first terminal is currently in a network disconnection state, and the second message includes: identification information of the first terminal.
In an embodiment, the second message further comprises at least one of: the network outage time of the first terminal and the geographic position of the first terminal.
In one embodiment, as shown in fig. 9, the apparatus further comprises: a receiving module 106, configured to receive a third message from the second terminal, where the third message is used to indicate that the server knows that the first terminal is currently in a disconnected state; an execution module 108, configured to, in response to the third message, perform one of the following: closing a preset communication mode; keeping the communication connection with the second terminal and hiding the preset communication mode; keeping opening a preset communication mode; and keeping opening the preset communication mode and limiting the number of the terminals accessed through the preset communication mode.
In this embodiment, another apparatus for reporting a network outage state is further provided, and the apparatus is used to implement the foregoing embodiment and the preferred embodiments, and details of which have been already described are omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 10 is a block diagram of another structure of a device for reporting a network outage state according to an embodiment of the present invention, as shown in fig. 10, the device includes: the monitoring module 200 is configured to monitor whether the first terminal starts a preset communication mode; the determining module 202 is configured to determine that a communication identifier of a preset communication mode meets a preset rule when it is monitored that the first terminal starts the preset communication mode, where the preset rule is used for the second terminal to sense that the first terminal is in a network disconnection state and the second terminal is currently in a network connection state; the first reporting module 204 is configured to report the network outage status of the first terminal to the server.
In an embodiment, the determining module 202 is configured to determine that the communication identifier includes a first part and a second part of a preset rule, where the first part is specified by the server, and the second part is identification information of the first terminal.
In one embodiment, the first reporting module 204 includes: an analyzing unit (not shown in the figure) for analyzing the identification information of the first terminal from the communication identification; an encapsulating unit (not shown in the figure), configured to encapsulate the identifier information of the first terminal and the network disconnection message reporting identifier into a first message; a reporting unit (not shown in the figure) configured to report the first message to the server.
In one embodiment, the determining module 202 is configured to determine that the communication identifier includes a first part of the preset rule, where the first part is specified by the server.
In an embodiment, fig. 11 is a block diagram of a structure of another apparatus for reporting a network outage state according to an alternative embodiment of the present invention, and as shown in fig. 11, the apparatus includes, in addition to all modules shown in fig. 10, further: an encapsulating module 206, configured to encapsulate the communication identifier and the communication password message identifier into a second message; a second reporting module 208, configured to report the second message to the server; a first receiving module 210, configured to receive a communication password corresponding to a preset communication manner from a server; a sending module 212, configured to send a connection request to the first terminal by using the communication password; a second receiving module 214, configured to receive a third message from the first terminal after the connection is successfully established, where the third message is used to indicate that the first terminal is currently in a disconnected state, and the third message includes: identification information of the first terminal.
In an embodiment, the first reporting module 204 is configured to forward the third message to the server.
In one embodiment, as shown in fig. 11, the apparatus further comprises: a third receiving module 216, configured to receive a fourth message from the server, where the fourth message is used to indicate that the server knows that the first terminal is currently in a disconnected state; a forwarding module 218, configured to forward the fourth message to the first terminal.
In this embodiment, a further device for reporting a network outage state is further provided, where the device is used to implement the foregoing embodiment and the preferred embodiments, and details of the foregoing description are omitted for brevity. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 12 is a block diagram of a structure of another apparatus for reporting a network outage status according to an embodiment of the present invention, as shown in fig. 12, the apparatus includes: a first receiving module 300, configured to receive a first message reported by a second terminal that establishes communication with a first terminal, where the second terminal is currently in a networking state; the parsing module 302 is configured to parse the first message to obtain a first message type identifier and identifier information of the first terminal; the determining module 304 is configured to determine that the first terminal is in a network disconnection state according to the first message type identifier and the identifier information of the first terminal.
In one embodiment, the determining module 304 includes: a first determining unit (not shown in the figure), configured to determine, according to the first message type identifier, that the first message is a message reporting a network disconnection status; and a second determining unit (not shown in the figure) configured to determine that the first terminal is in the network disconnection state according to the identification information of the first terminal.
In an embodiment, fig. 13 is a block diagram of a structure of a device for reporting a network outage state according to an alternative embodiment of the present invention, and as shown in fig. 13, the device includes, in addition to all modules shown in fig. 12, further: a second receiving module 306, configured to receive a second message reported by a second terminal, where the second message includes: the second message type identifier and a communication identifier of a preset communication mode adopted by the first terminal; an obtaining module 308, configured to obtain, according to the second message type identifier and the communication identifier, a communication password corresponding to the communication identifier; the first feedback module 310 is configured to return a communication password to the second terminal, where the communication password is used to obtain the identification information of the first terminal.
In one embodiment, the obtaining module 308 includes: a third determining unit (not shown in the figure), configured to determine, according to the second message type identifier, that the second message is a message for acquiring the communication password; and an obtaining unit (not shown in the figure) for searching the corresponding communication password from the preset corresponding relationship according to the communication identifier.
In one embodiment, as shown in fig. 13, the apparatus further comprises: the issuing module 312 is configured to generate a first communication key and issue the first communication key to the first terminal; a third receiving module 314, configured to receive an update result reported by the first terminal, where the update result is obtained by the first terminal updating an existing local second communication key with the first communication key; an updating module 316, configured to update the mapping relationship between the identifier information of the first terminal and the second communication key to the mapping relationship between the identifier information of the first terminal and the first communication key if the updating result indicates that the updating is successful; a second feedback module 318, configured to return a third message to the first terminal, where the third message is used to indicate that the mapping relationship between the identifier information of the first terminal and the first communication key has been updated successfully; the restoring module 320 is configured to restore the mapping relationship between the identification information of the first terminal and the first communication key to the mapping relationship between the identification information of the first terminal and the second communication key if the confirmation reply from the first terminal is not received within the preset time range.
In one embodiment, as shown in fig. 13, the apparatus further comprises: the third feedback module 322 is configured to return a fourth message to the second terminal, where the fourth message is used to indicate that the server knows that the first terminal is currently in the offline state.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 3
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
In one embodiment, in the present embodiment, the storage medium may be configured to store a computer program for executing the following steps:
and S1, when the first terminal is determined to be in the disconnected state, starting a preset communication mode, wherein the communication identifier of the preset communication mode meets a preset rule, and the preset rule is used for enabling a second terminal currently in the networking state to sense that the first terminal is currently in the disconnected state, so that the disconnected state of the first terminal is reported to the server through the second terminal.
In an embodiment, the storage medium is further arranged to store a computer program for performing the steps of:
s1, monitoring whether the first terminal starts a preset communication mode;
s2, when it is monitored that the first terminal starts the preset communication mode, determining that the communication identifier of the preset communication mode meets a preset rule, wherein the preset rule is used for the second terminal to sense that the first terminal is in a network disconnection state currently and the second terminal is in a network connection state currently;
and S3, reporting the network disconnection state of the first terminal to a server.
In an embodiment, the storage medium is further arranged to store a computer program for performing the steps of:
s1, receiving a first message reported by a second terminal establishing communication with the first terminal, wherein the second terminal is currently in a networking state;
s2, analyzing the first message to obtain a first message type identifier and identifier information of the first terminal;
and S3, determining that the first terminal is in the disconnected state according to the first message type identifier and the identifier information of the first terminal.
In an embodiment, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Example 4
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
In an embodiment, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
In an embodiment, in this embodiment, the processor may be configured to execute the following steps by a computer program:
and S1, when the first terminal is determined to be in the disconnected state, starting a preset communication mode, wherein the communication identifier of the preset communication mode meets a preset rule, and the preset rule is used for enabling a second terminal currently in the networking state to sense that the first terminal is currently in the disconnected state, so that the disconnected state of the first terminal is reported to the server through the second terminal.
In an embodiment, in this embodiment, the processor may be further configured to execute the following steps by a computer program:
s1, monitoring whether the first terminal starts a preset communication mode;
s2, when it is monitored that the first terminal starts the preset communication mode, determining that the communication identifier of the preset communication mode meets a preset rule, wherein the preset rule is used for the second terminal to sense that the first terminal is in a network disconnection state currently and the second terminal is in a network connection state currently;
and S3, reporting the network disconnection state of the first terminal to a server.
In an embodiment, in this embodiment, the processor may be further configured to execute the following steps by a computer program:
s1, receiving a first message reported by a second terminal establishing communication with the first terminal, wherein the second terminal is currently in a networking state;
s2, analyzing the first message to obtain a first message type identifier and identifier information of the first terminal;
and S3, determining that the first terminal is in the disconnected state according to the first message type identifier and the identifier information of the first terminal.
In an embodiment, for a specific example in this embodiment, reference may be made to the examples described in the above embodiment and optional embodiments, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented in a general purpose computing device, centralized on a single computing device or distributed across a network of computing devices, and in one embodiment, may be implemented in program code executable by a computing device, such that the steps shown and described are performed by the computing device in storage and, in some cases, in an order other than that described herein, or as individual integrated circuit modules, or as a plurality or steps of individual integrated circuit modules. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.
Claims (28)
1. A method for reporting a network failure state is characterized by comprising the following steps:
and when the first terminal is determined to be in the network disconnection state, starting a preset communication mode, wherein the communication identifier of the preset communication mode meets a preset rule, and the preset rule is used for enabling a second terminal currently in the networking state to sense that the first terminal is currently in the network disconnection state, so that the network disconnection state of the first terminal is reported to a server through the second terminal.
2. The method of claim 1, wherein the preset rules comprise: a first portion, wherein the first portion is specified by the server.
3. The method of claim 2, wherein the preset rule further comprises one of:
a second part, wherein the second part is identification information of the first terminal;
the third part is a password of the preset communication function; or
The second part, the third part and the fourth part, wherein the fourth part is the update cycle of the password of the preset communication function.
4. The method of claim 2, further comprising, after the opening the predetermined communication mode:
monitoring a connection request of the second terminal through the preset communication function;
responding to the connection request, sending a first message to the second terminal, so that the second terminal reports the first message to a server, wherein the first message is used for indicating that the first terminal is currently in a disconnected state, and the first message includes: identification information of the first terminal.
5. The method of claim 4, wherein the first message further comprises at least one of: the network outage time of the first terminal and the geographic position of the first terminal.
6. The method of claim 4, further comprising, after the opening of the predetermined communication mode:
receiving a second message from the second terminal, wherein the second message is used for indicating that the server knows that the first terminal is currently in a disconnected state;
in response to the second message, performing one of:
closing the preset communication mode;
keeping the communication connection with the second terminal and hiding the preset communication mode;
keeping starting the preset communication mode;
and keeping opening the preset communication mode and limiting the number of the terminals accessed through the preset communication mode.
7. A method for reporting a network failure state is characterized by comprising the following steps:
monitoring whether a first terminal starts a preset communication mode or not;
when the first terminal starts the preset communication mode, determining that the communication identifier of the preset communication mode meets a preset rule, wherein the preset rule is used for a second terminal to sense that the first terminal is in a disconnected state currently and the second terminal is in a connected state currently;
and reporting the network disconnection state of the first terminal to a server.
8. The method of claim 7, wherein determining that the communication identifier satisfies the predetermined rule comprises:
and determining that the communication identifier comprises a first part and a second part of the preset rule, wherein the first part is designated by the server, and the second part is the identifier information of the first terminal.
9. The method of claim 8, wherein reporting the network outage status of the first terminal to the server comprises:
analyzing the identification information of the first terminal from the communication identification;
packaging the identification information of the first terminal and the network-breaking message reporting identification into a first message;
and reporting the first message to the server.
10. The method of claim 7, wherein determining that the communication identifier satisfies the predetermined rule comprises:
determining that the communication identifier comprises a first part of the preset rule, wherein the first part is specified by the server.
11. The method of claim 10, wherein before reporting the network outage status of the first terminal to the server, further comprising:
encapsulating the communication identifier and the communication password message identifier into a second message;
reporting the second message to the server;
receiving a communication password corresponding to the preset communication mode from the server;
sending a connection request to the first terminal by adopting the communication password;
after the connection is successfully established, receiving a third message from the first terminal, where the third message is used to indicate that the first terminal is currently in a disconnected state, and the third message includes: identification information of the first terminal.
12. The method of claim 11, wherein reporting the network outage status of the first terminal to the server comprises:
forwarding the third message to the server.
13. The method according to claim 7 or 11, wherein after reporting the network outage status of the first terminal to the server, the method further comprises:
receiving a fourth message from the server, wherein the fourth message is used for indicating that the server knows that the first terminal is currently in a disconnected state;
forwarding the fourth message to the first terminal.
14. A method for reporting a network failure state is characterized by comprising the following steps:
receiving a first message reported by a second terminal establishing communication with a first terminal, wherein the second terminal is currently in a networking state;
analyzing the first message to obtain a first message type identifier and identifier information of the first terminal;
and determining that the first terminal is in a disconnected state according to the first message type identifier and the identifier information of the first terminal.
15. The method of claim 14, wherein determining that the first terminal is in a disconnected state according to the first message type identifier and the identifier information of the first terminal comprises:
determining the first message as a message reporting a disconnected network state according to the first message type identifier;
and determining that the first terminal is in a disconnected state according to the identification information of the first terminal.
16. The method of claim 14, wherein before receiving the first message reported by the second terminal, further comprising:
receiving a second message reported by the second terminal, wherein the second message includes: a second message type identifier and a communication identifier of a preset communication mode adopted by the first terminal;
acquiring a communication password corresponding to the communication identifier according to the second message type identifier and the communication identifier;
and returning the communication password to the second terminal, wherein the communication password is used for acquiring the identification information of the first terminal.
17. The method of claim 16, wherein obtaining the communication password corresponding to the communication identifier according to the second message type identifier and the communication identifier comprises:
determining the second message as a message for acquiring a communication password according to the second message type identifier;
and searching a corresponding communication password from a preset corresponding relation according to the communication identifier.
18. The method of claim 14, wherein before receiving the first message reported by the second terminal, further comprising:
generating a first communication key and issuing the first communication key to the first terminal;
receiving an updating result reported by the first terminal, wherein the updating result is obtained by updating a local existing second communication key by the first terminal by using the first communication key;
if the updating result shows that the updating is successful, updating the mapping relation between the identification information of the first terminal and the second communication key into the mapping relation between the identification information of the first terminal and the first communication key;
returning a third message to the first terminal, wherein the third message is used for indicating that the mapping relation between the identification information of the first terminal and the first communication key is updated successfully;
and if the confirmation reply from the first terminal is not received within the preset time range, restoring the mapping relation between the identification information of the first terminal and the first communication key into the mapping relation between the identification information of the first terminal and the second communication key.
19. The method of claim 14, wherein after determining that the first terminal is in a network outage state according to the first message type identifier and the identifier information of the first terminal, further comprising:
and returning a fourth message to the second terminal, wherein the fourth message is used for indicating that the server knows that the first terminal is in the offline state currently.
20. A device for reporting a network disconnection state is characterized by comprising:
the starting module is used for starting a preset communication mode when the first terminal is determined to be in the network disconnection state, wherein the communication identifier of the preset communication mode meets a preset rule, and the preset rule is used for enabling a second terminal which is currently in the networking state to sense that the first terminal is currently in the network disconnection state, so that the network disconnection state of the first terminal is reported to a server through the second terminal.
21. A device for reporting a network disconnection state is characterized by comprising:
the monitoring module is used for monitoring whether the first terminal starts a preset communication mode or not;
the determining module is used for determining that a communication identifier of the preset communication mode meets a preset rule when the first terminal starts the preset communication mode, wherein the preset rule is used for a second terminal to sense that the first terminal is currently in a network disconnection state and the second terminal is currently in a network connection state;
and the first reporting module is used for reporting the network disconnection state of the first terminal to a server.
22. A device for reporting a network disconnection state is characterized by comprising:
a first receiving module, configured to receive a first message reported by a second terminal that establishes communication with a first terminal, where the second terminal is currently in a networking state,
the analysis module is used for analyzing the first message to obtain a first message type identifier and identifier information of the first terminal;
and the determining module is used for determining that the first terminal is in a disconnected state according to the first message type identifier and the identifier information of the first terminal.
23. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 6 when executed.
24. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 7 to 13 when executed.
25. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 14 to 19 when executed.
26. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 6.
27. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 7 to 13.
28. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 14 to 19.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811014357.XA CN110875857B (en) | 2018-08-31 | 2018-08-31 | Method, device and system for reporting disconnected network state |
PCT/CN2019/103873 WO2020043209A1 (en) | 2018-08-31 | 2019-08-30 | Disconnected network state reporting method and apparatus, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811014357.XA CN110875857B (en) | 2018-08-31 | 2018-08-31 | Method, device and system for reporting disconnected network state |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110875857A true CN110875857A (en) | 2020-03-10 |
CN110875857B CN110875857B (en) | 2023-03-07 |
Family
ID=69643414
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811014357.XA Active CN110875857B (en) | 2018-08-31 | 2018-08-31 | Method, device and system for reporting disconnected network state |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110875857B (en) |
WO (1) | WO2020043209A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112601270A (en) * | 2020-11-19 | 2021-04-02 | 广东沃科融合通讯有限公司 | Terminal wake-up control method and device, electronic equipment and storage medium |
CN112615733A (en) * | 2020-12-08 | 2021-04-06 | 广东沃科融合通讯有限公司 | Terminal fault judgment method and device, electronic equipment and storage medium |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112788576B (en) * | 2020-12-16 | 2022-12-02 | 青岛海尔科技有限公司 | Equipment offline processing method and system, storage medium and electronic device |
CN117041305B (en) * | 2023-10-10 | 2024-01-23 | 成都秦川物联网科技股份有限公司 | Offline data management method, device and medium for gas flowmeter based on Internet of things |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101431761A (en) * | 2007-11-09 | 2009-05-13 | 中国移动通信集团公司 | Network fault reporting method, equipment and system |
WO2014153770A1 (en) * | 2013-03-29 | 2014-10-02 | Broadcom Corporation | Method and apparatus for reestablishing communication with a network |
CN106817671A (en) * | 2017-02-14 | 2017-06-09 | 腾讯科技(深圳)有限公司 | A kind of networked information sharing method, first terminal and system |
JP2017224295A (en) * | 2017-06-08 | 2017-12-21 | 株式会社リコー | Client terminal, computer program, and information processing method |
CN108174400A (en) * | 2017-12-27 | 2018-06-15 | 瑞斯康达科技发展股份有限公司 | Data processing method and system, the equipment of a kind of terminal device |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103152374B (en) * | 2011-12-07 | 2016-08-10 | 华为终端有限公司 | Know the method and apparatus of terminal presence |
CN104836598B (en) * | 2014-02-10 | 2017-11-28 | 深圳中兴网信科技有限公司 | Method for processing business, apparatus and system based on near-field communication |
CN105337642B (en) * | 2014-06-17 | 2018-08-24 | 阿里巴巴集团控股有限公司 | A kind of offline terminal accesses the method and system of network data |
CN106793007B (en) * | 2016-12-05 | 2020-07-31 | 爱国者电子科技有限公司 | Interactive communication method and system of cloud and Bluetooth device and wireless router |
-
2018
- 2018-08-31 CN CN201811014357.XA patent/CN110875857B/en active Active
-
2019
- 2019-08-30 WO PCT/CN2019/103873 patent/WO2020043209A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101431761A (en) * | 2007-11-09 | 2009-05-13 | 中国移动通信集团公司 | Network fault reporting method, equipment and system |
WO2014153770A1 (en) * | 2013-03-29 | 2014-10-02 | Broadcom Corporation | Method and apparatus for reestablishing communication with a network |
CN106817671A (en) * | 2017-02-14 | 2017-06-09 | 腾讯科技(深圳)有限公司 | A kind of networked information sharing method, first terminal and system |
JP2017224295A (en) * | 2017-06-08 | 2017-12-21 | 株式会社リコー | Client terminal, computer program, and information processing method |
CN108174400A (en) * | 2017-12-27 | 2018-06-15 | 瑞斯康达科技发展股份有限公司 | Data processing method and system, the equipment of a kind of terminal device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112601270A (en) * | 2020-11-19 | 2021-04-02 | 广东沃科融合通讯有限公司 | Terminal wake-up control method and device, electronic equipment and storage medium |
CN112615733A (en) * | 2020-12-08 | 2021-04-06 | 广东沃科融合通讯有限公司 | Terminal fault judgment method and device, electronic equipment and storage medium |
CN112615733B (en) * | 2020-12-08 | 2023-04-18 | 广东沃科融合通讯有限公司 | Terminal fault judgment method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110875857B (en) | 2023-03-07 |
WO2020043209A1 (en) | 2020-03-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110875857B (en) | Method, device and system for reporting disconnected network state | |
CN1985470B (en) | System, network entities for configuration management of a dynamic host configuration protocol framework | |
JP2022502926A (en) | UE migration method, equipment, system, and storage medium | |
US20080104221A1 (en) | Method and system for simple network management protocol based data management | |
CN113453213B (en) | Authentication data synchronization method and device | |
CN112218342A (en) | Method, device and system for realizing core network sub-slice disaster tolerance | |
CN113132227A (en) | Method, device, computer equipment and storage medium for updating routing information | |
MX2010010616A (en) | Updating routing and outage information in a communications network. | |
US9699139B2 (en) | Communications system | |
WO2020043006A1 (en) | Terminal connection restoration method and apparatus | |
CN110913028B (en) | Method, device and system for processing virtual address | |
CN114143904B (en) | CPE management method based on 5G fusion network shunt | |
CN110635927B (en) | Node switching method, network node and network system | |
CN103501240B (en) | A kind of method of discovering device, apparatus and system | |
US20230164596A1 (en) | Alarm log management system and method during failure in o-ran | |
CN113824595B (en) | Link switching control method and device and gateway equipment | |
CN112751907B (en) | Information processing method, information processing apparatus, storage medium, and electronic apparatus | |
CN112104888B (en) | Method and system for grouping live broadcast users | |
CN111885601A (en) | Keep-alive processing method and device for Mesh equipment | |
CN115190168B (en) | Edge server management system and server cluster | |
US20240357674A1 (en) | Connection management | |
EP4451719A1 (en) | Connection management | |
CN113015155B (en) | eSIM server discovery method and device | |
CN111556485B (en) | Mobile wireless communication device for data-restricted communication comprising an iSIM and a counter | |
CN113660734B (en) | Connection method and device of network equipment, network equipment and 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |