CN107809494B - Message delay pushing method and system thereof - Google Patents
Message delay pushing method and system thereof Download PDFInfo
- Publication number
- CN107809494B CN107809494B CN201711341404.7A CN201711341404A CN107809494B CN 107809494 B CN107809494 B CN 107809494B CN 201711341404 A CN201711341404 A CN 201711341404A CN 107809494 B CN107809494 B CN 107809494B
- Authority
- CN
- China
- Prior art keywords
- equipment
- state
- line
- current state
- judging whether
- 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.)
- Expired - Fee Related
Links
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/55—Push-based network services
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
- Telephonic Communication Services (AREA)
Abstract
The invention relates to a message delay pushing method and a system thereof, wherein the method comprises the steps of obtaining an initial state of equipment; detecting the action state of the equipment, and judging whether the action state of the equipment is consistent with the initial state; if not, generating and temporarily storing information; judging whether the current state of the equipment meets a set condition; if yes, pushing the temporarily stored information. If the current state of the equipment is consistent with the initial state or the current state of the equipment does not meet the set conditions, the method enters an ending step, and the cached information is pushed by judging the state change condition and the time interval of the equipment under the condition that both the state change condition and the time interval meet the set conditions, otherwise, the information is cached and is not pushed, so that the message pushing disturbance to a user can be reduced under the condition that the network shakes, and the product experience of the user is improved; the confidence of the user in the product instructions may also be increased.
Description
Technical Field
The invention relates to the technical field of Internet of things, in particular to a message delay pushing method and a message delay pushing system.
Background
With the progress of social technology and the pursuit of people for higher living quality, more and more intelligent devices are used by people in families, such as an intelligent door lock, an intelligent camera (IPC), an intelligent switch and the like, the devices are connected to the cloud end through a network, and then people can control the devices through an App of a mobile terminal, such as unlocking, watching videos, opening or closing the switch and the like.
The App of the mobile terminal displays the status of these devices, whether they are online or offline. If the mobile terminal is on line, the user can control the equipment, and if the equipment is in an off-line state (such as poor network, power failure or failure of the equipment), the cloud end can push an off-line message of the equipment to the App of the mobile terminal to remind the user so as to facilitate the user to process in time.
According to the prior art, when equipment logs in a cloud end and is on line, the cloud end pushes an equipment on-line message to an App of a mobile terminal to inform the App of the mobile terminal that the equipment is on line; when the cloud finds that the mobile terminal is offline, the cloud can also push an offline message of the device to the App of the mobile terminal, and the App of the mobile terminal can display the state of the device to be offline, namely the cloud completely notifies the online and offline message of the device to the App of the mobile terminal in real time. When the equipment is restarted or the communication connection between the equipment and the cloud is interrupted, the equipment tries to reestablish the connection with the cloud again, corresponding login and identity authentication processes are carried out, and after the equipment succeeds, the equipment keeps heartbeat with the cloud, so that the online state of the equipment is maintained.
The real-time on-line/off-line message of the device is pushed to the user, and the user may receive the messages of the device off-line and the device on-line in a short time (for example, no more than 10 seconds), which may cause unnecessary disturbance to the user on one hand, and cause the user to generate suspicion and unnecessary misunderstanding and trouble to the service quality of the cloud or the quality of the product itself on the other hand.
Therefore, it is necessary to design a message delay pushing method, which can reduce message pushing disturbance to the user and improve product experience of the user when the network shakes; the confidence of the user in the product instructions may also be increased.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a message delay pushing method and a system thereof.
In order to achieve the purpose, the invention adopts the following technical scheme: a message delay pushing method, the method comprising:
acquiring an initial state of equipment;
detecting the action state of the equipment, and judging whether the action state of the equipment is consistent with the initial state;
if not, generating and temporarily storing information;
judging whether the current state of the equipment meets a set condition;
if the set conditions are met, pushing the temporarily stored information.
And if the current state of the equipment is consistent with the initial state or the current state of the equipment does not meet the set conditions, entering an end step.
The further technical scheme is as follows: the step of judging whether the current state of the equipment meets the set conditions comprises the following specific steps:
judging whether the current state of the equipment changes or not;
if not, judging whether the time is in the set time;
if the current state of the equipment is not within the set time, the current state of the equipment meets the set conditions;
if the current state of the equipment is within the set time, continuing to wait, and returning to the step of judging whether the current state of the equipment is changed;
if the current state of the equipment does not meet the set conditions, the equipment is judged to be in a normal state.
The further technical scheme is as follows: and judging whether the current state of the equipment changes, specifically judging whether the current state of the equipment is consistent with the initial state of the equipment, if so, judging that the current state of the equipment does not change, and if not, judging that the current state of the equipment changes.
The invention also provides a message delay pushing system, which comprises an initial state acquisition unit, an action state judgment unit, a message generation unit, a current state judgment unit and a pushing unit;
the initial state acquisition unit is used for acquiring an initial state of equipment;
the action state judging unit is used for detecting the action state of the equipment and judging whether the action state of the equipment is consistent with the initial state;
the message generating unit is used for generating and temporarily storing information if the information is inconsistent with the information;
the current state judging unit is used for judging whether the current state of the equipment meets the set conditions;
and the pushing unit is used for pushing the temporarily stored information if the set conditions are met.
The further technical scheme is as follows: the current state judging unit comprises a change judging module and a time judging module;
the change judging module is used for judging whether the current state of the equipment changes; if the current state of the equipment does not meet the set conditions, judging whether the current state of the equipment is changed or not;
the time judging module is used for judging whether the time is within the set time if the time is not changed; and if the current state of the equipment is not within the set time, the current state of the equipment meets the set conditions.
Compared with the prior art, the invention has the beneficial effects that: according to the message delay pushing method, by judging the state change condition and the time interval of the equipment, the cached information is pushed under the condition that both the state change condition and the time interval meet the set conditions, otherwise, the information is cached and is not pushed, so that the message pushing disturbance to a user can be reduced under the condition that a network shakes, and the product experience of the user is improved; the confidence of the user in the product instructions may also be increased.
The invention is further described below with reference to the accompanying drawings and specific embodiments.
Drawings
Fig. 1 is a flowchart of a message delay pushing method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a process of determining whether a current state of a device meets a set condition according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating that the device login is successfully online and not offline within a predetermined time according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating that the device logs on successfully online and goes offline again within a set time according to an embodiment of the present invention;
fig. 5 is a block diagram of a message delay pushing system according to an embodiment of the present invention;
fig. 6 is a block diagram of a current state determining unit according to an embodiment of the present invention.
Detailed Description
In order to more fully understand the technical content of the present invention, the technical solution of the present invention will be further described and illustrated with reference to the following specific embodiments, but not limited thereto.
As shown in specific embodiments of fig. 1 to 6, the message delay pushing method provided in this embodiment can be applied to intelligent devices in the field of internet of things, such as an intelligent door lock, an intelligent IPC, an intelligent switch, and the like, and the cloud needs to push online messages and offline messages of the devices to the App end of the mobile terminal in time, so that a user can know online and offline states of the devices.
As shown in fig. 1, the present embodiment provides a message delay pushing method, which includes:
s1, acquiring an initial state of the equipment;
s2, detecting the action state of the equipment, and judging whether the action state of the equipment is consistent with the initial state;
s3, if not, generating and temporarily storing information;
s4, judging whether the current state of the equipment meets the set conditions;
and S5, if the set conditions are met, pushing the temporarily stored information.
And if the current state of the equipment is consistent with the initial state or the current state of the equipment does not meet the set conditions, entering an end step.
For the above step S1, specifically, the real online/offline status of the device is saved in the cloud (denoted as a1 status), that is, the initial status of the device is recorded, where the initial status may be the status of the latest device recorded in the cloud history, or may be set manually according to the status of the device, and in a general default case, the initial status is the status of the latest device recorded in the cloud history.
For the above steps S2 and S3, specifically, when the device logs in to the cloud or is disconnected from the cloud, the online/offline state of the device in the system changes (denoted as a2 state), and at this time, the cloud does not immediately push an online or offline message to the App of the mobile terminal in real time, but rather suspends the message in the system. And temporarily storing the messages pushed to the user in the system, and flexibly pushing according to the configured time.
Further, in some embodiments, the step of determining whether the current state of the device satisfies the set condition in the step of S4 includes the following specific steps:
s41, judging whether the current state of the equipment changes or not;
s42, if not, judging whether the time is in the set time;
s43, if the current state of the equipment is not within the set time, the current state of the equipment meets the set conditions;
s44, if the current state is in the set time, continuing waiting, and returning to the step of judging whether the current state of the equipment changes;
and S45, if the current state of the equipment is changed, the current state of the equipment does not meet the set conditions.
The step S4 described above solves the problem that when the network condition is abnormal or jitters, the device repeatedly goes online and offline in a short time (for example, within one minute), and the cloud frequently pushes the online and offline messages of the device to the user, which causes harassment and trouble to the user.
The step S41 is a step of determining whether the current state of the device changes, specifically, determining whether the current state of the device is consistent with the initial state of the device, if so, the current state of the device does not change, and if not, the current state of the device changes.
The message is temporarily buffered in the system, the buffering time limit may be configured according to an actual situation, for example, one minute, when the buffering time elapses, the state of the device still does not change, that is, the state is still the a2 state, for example, no offline after online, or no online after offline, and then the buffering message is pushed to the mobile terminal APP to notify the device of the online or offline information. If the device performs offline/online operation again within the suspension time due to the fact that the network is unstable, the online state of the device changes again (recorded as the A3 state, which is the same as the A1 state), the state of the device returns to the initial state, and the cloud end cannot push the online/offline information of the device to the mobile terminal APP, so that disturbance to the user is avoided.
In some embodiments, because the cloud has the message push suspension time, the cloud does not push the device state to the mobile terminal APP in real time, and the device state of the mobile terminal APP may be inaccurate; if in this period, the user goes to the control equipment through mobile terminal APP, if mobile terminal APP display device is online, but actual equipment is offline, the cloud can return the error that equipment has been offline and can not be controlled to mobile terminal APP, if mobile terminal APP display device is offline, but actual equipment is online, then normal business logic is walked.
Because the probability of network jitter is very small, the probability of the user operating the device is smaller when the network jitter occurs, so the method can not hurt the experience of the user, can shield the interference of the network jitter on the message pushing of the user, and can not frequently push the online and offline messages of the device at least in the message suspension time.
According to the message delay pushing method, by judging the state change condition and the time interval of the equipment, the cached information is pushed under the condition that both the state change condition and the time interval meet the set conditions, otherwise, the information is cached and is not pushed, so that the message pushing harassment to a user can be reduced under the condition that a network shakes, and the product experience of the user is improved; the confidence of the user in the product instructions may also be increased.
As shown in fig. 5, the present embodiment also provides a message delay pushing system, which includes an initial state acquiring unit 1, an action state judging unit 2, a message generating unit 3, a current state judging unit 4, and a pushing unit 5.
An initial state acquiring unit 1 for acquiring an initial state of the device.
And an action state judging unit 2 for detecting the action state of the equipment and judging whether the action state of the equipment is consistent with the initial state.
And the message generating unit 3 is used for generating and temporarily storing the information if the information is inconsistent with the information.
And a current state judging unit 4, configured to judge whether the current state of the device satisfies a set condition.
And the pushing unit 5 is used for pushing the temporarily stored information if the set conditions are met.
For the initial state obtaining unit 1, specifically, the real online/offline state of the cloud storage device (denoted as a1 state) is recorded, that is, the initial state of the device is recorded, where the initial state may be the last state of the device recorded in the cloud history, or may be set manually according to the state of the device, and in a general default case, the initial state is the last state of the device recorded in the cloud history.
Specifically, for the operation state determination unit 2 and the message generation unit 3, when the device logs in the cloud or is disconnected from the cloud, the online/offline state of the device in the system changes (denoted as a2 state), and at this time, the cloud does not immediately push the online or offline message to the App of the mobile terminal in real time, but rather suspends the message in the system. And temporarily storing the messages pushed to the user in the system, and flexibly pushing according to the configured time.
Furthermore, in some embodiments, the current state determining unit 4 includes a change determining module 41 and a time determining module 42.
A change judging module 41, configured to judge whether a current state of the device changes; if the current state of the equipment does not meet the set conditions, the equipment is judged to be in a normal state.
A time judgment module 42, configured to judge whether the time is within a set time if the time is not changed; and if the current state of the equipment is not within the set time, the current state of the equipment meets the set conditions.
For the current state judgment unit 4, the problem that when the network condition is abnormal or jitters, the device repeatedly goes online and offline in a short time (for example, within one minute) and the cloud frequently pushes online and offline messages of the device to the user, which causes disturbance and trouble to the user is solved.
For the change determining module 41, the step of determining whether the current state of the device changes is specifically to determine whether the current state of the device is consistent with the initial state of the device, if so, the current state of the device is not changed, and if not, the current state of the device is changed.
The message is temporarily buffered in the system, the buffering time limit may be configured according to an actual situation, for example, one minute, when the buffering time elapses, the state of the device still does not change, that is, the state is still the a2 state, for example, no offline after online, or no online after offline, and then the buffering message is pushed to the mobile terminal APP to notify the device of the online or offline information. If the device performs offline/online operation again within the suspension time due to the fact that the network is unstable, the online state of the device changes again (recorded as the A3 state, which is the same as the A1 state), the state of the device returns to the initial state, and the cloud end cannot push the online/offline information of the device to the mobile terminal APP, so that disturbance to the user is avoided.
In some embodiments, because the cloud has the message push suspension time, the cloud does not push the device state to the mobile terminal APP in real time, and the device state of the mobile terminal APP may be inaccurate; if in this period, the user goes to the control equipment through mobile terminal APP, if mobile terminal APP display device is online, but actual equipment is offline, the cloud can return the error that equipment has been offline and can not be controlled to mobile terminal APP, if mobile terminal APP display device is offline, but actual equipment is online, then normal business logic is walked.
Because the probability of network jitter is very small, the probability of the user operating the device is smaller when the network jitter occurs, so the method can not hurt the experience of the user, can shield the interference of the network jitter on the message pushing of the user, and can not frequently push the online and offline messages of the device at least in the message suspension time.
According to the message delay pushing system, by judging the state change condition and the time interval of the equipment, the cached information is pushed under the condition that both the state change condition and the time interval meet the set conditions, otherwise, the information is cached and is not pushed, so that the message pushing harassment to a user can be reduced under the condition that a network shakes, and the product experience of the user is improved; the confidence of the user in the product instructions may also be increased.
The technical contents of the present invention are further illustrated by the examples only for the convenience of the reader, but the embodiments of the present invention are not limited thereto, and any technical extension or re-creation based on the present invention is protected by the present invention. The protection scope of the invention is subject to the claims.
Claims (2)
1. A message delay pushing method, the method comprising:
acquiring an initial state of equipment;
detecting the action state of the equipment, and judging whether the action state of the equipment is consistent with the initial state;
if not, generating and temporarily storing information;
judging whether the current state of the equipment meets a set condition;
if the set conditions are met, pushing the temporarily stored information;
if the current state of the equipment is consistent with the initial state or the current state of the equipment does not meet the set conditions, entering an ending step;
the step of judging whether the current state of the equipment meets the set conditions comprises the following specific steps:
judging whether the current state of the equipment changes or not;
if not, judging whether the time is in the set time;
if the current state of the equipment is not within the set time, the current state of the equipment meets the set conditions;
if the current state of the equipment is within the set time, continuing to wait, and returning to the step of judging whether the current state of the equipment is changed;
if the current state of the equipment does not meet the set conditions, judging whether the current state of the equipment is changed or not;
judging whether the current state of the equipment changes, specifically judging whether the current state of the equipment is consistent with the initial state of the equipment, if so, the current state of the equipment is not changed, and if not, the current state of the equipment is changed;
the method comprises the steps of temporarily buffering a message in a system, wherein the buffering time limit can be one minute, when the buffering time passes, the state of the equipment still does not change, namely, the state of the equipment which is still on-line/off-line can change, the equipment is not off-line after being on-line, or the equipment is not on-line after being off-line, then the buffering message is pushed to a mobile terminal APP, the information of the equipment which is on-line or off-line is notified, if the equipment is off-line/on-line due to unstable network in the buffering time, the on-line state of the equipment changes, the state of the equipment returns to the initial state, and the cloud end can not push the equipment on-line and off-line to the mobile terminal APP.
2. The message delay pushing system is characterized by comprising an initial state acquisition unit, an action state judgment unit, a message generation unit, a current state judgment unit and a pushing unit;
the initial state acquisition unit is used for acquiring an initial state of equipment;
the action state judging unit is used for detecting the action state of the equipment and judging whether the action state of the equipment is consistent with the initial state;
the message generating unit is used for generating and temporarily storing information if the information is inconsistent with the information;
the current state judging unit is used for judging whether the current state of the equipment meets the set conditions;
the pushing unit is used for pushing the temporarily stored information if the set conditions are met;
the current state judging unit comprises a change judging module and a time judging module;
the change judging module is used for judging whether the current state of the equipment changes; if the current state of the equipment does not meet the set conditions, judging whether the current state of the equipment is changed or not;
the time judging module is used for judging whether the time is within the set time if the time is not changed; if the current state of the equipment is not within the set time, the current state of the equipment meets the set conditions;
the method comprises the steps of temporarily buffering a message in a system, wherein the buffering time limit can be one minute, when the buffering time passes, the state of the equipment still does not change, namely, the state of the equipment which is still on-line/off-line can change, the equipment is not off-line after being on-line, or the equipment is not on-line after being off-line, then the buffering message is pushed to a mobile terminal APP, the information of the equipment which is on-line or off-line is notified, if the equipment is off-line/on-line due to unstable network in the buffering time, the on-line state of the equipment changes, the state of the equipment returns to the initial state, and the cloud end can not push the equipment on-line and off-line to the mobile terminal APP.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711341404.7A CN107809494B (en) | 2017-12-14 | 2017-12-14 | Message delay pushing method and system thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711341404.7A CN107809494B (en) | 2017-12-14 | 2017-12-14 | Message delay pushing method and system thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107809494A CN107809494A (en) | 2018-03-16 |
CN107809494B true CN107809494B (en) | 2021-01-26 |
Family
ID=61579439
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711341404.7A Expired - Fee Related CN107809494B (en) | 2017-12-14 | 2017-12-14 | Message delay pushing method and system thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107809494B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114071175B (en) * | 2021-11-16 | 2023-07-25 | 上海哔哩哔哩科技有限公司 | Method and system for aligning internal memory of message |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7398096B2 (en) * | 2004-12-03 | 2008-07-08 | Motorola, Inc. | System and method for delay reduction via automatic target packet transmission |
CN104506416B (en) * | 2014-12-17 | 2017-11-28 | 东软集团股份有限公司 | A kind of method, apparatus and system for realizing the stable push of message |
CN105245692A (en) * | 2015-08-31 | 2016-01-13 | 深圳市金立通信设备有限公司 | Message prompting method and terminal |
CN105303133A (en) * | 2015-09-06 | 2016-02-03 | 北京自在科技有限责任公司 | Method reducing interference to users due to false-report of Bluetooth anti-loss device |
CN105915608A (en) * | 2016-04-19 | 2016-08-31 | 上海卓易科技股份有限公司 | Online and offline notification system and method for communication among equipment |
-
2017
- 2017-12-14 CN CN201711341404.7A patent/CN107809494B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN107809494A (en) | 2018-03-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9826055B2 (en) | Method, server, user terminal, and system for pushing notification message | |
CN104125141B (en) | A kind of method for pushing of notification message, server and system | |
WO2022001751A1 (en) | Virtual cloud desktop monitoring method, client and server, and storage medium | |
CN109040295B (en) | Method and device for determining abnormal disconnection, terminal and storage medium | |
CN106100869A (en) | Household appliance, fault pushing method, fault processing method, device and system | |
CN107809494B (en) | Message delay pushing method and system thereof | |
EP2961204B1 (en) | Method and device for implementing instant messaging in place of a mobile user equipment | |
CN108924485B (en) | Client real-time video stream interrupt processing method and system and monitoring system | |
CN113037846A (en) | Data reporting method and device, electronic equipment and computer readable storage medium | |
WO2016200979A1 (en) | Session processing in instant messaging | |
CN109495375B (en) | MQTT message processing method and device, electronic equipment and storage medium | |
CN103001822A (en) | Network anomaly handling method and device | |
CN103096253A (en) | System and method preventing incoming call request or message request from being lost | |
CN117369533A (en) | Vehicle control method, device and equipment for serious weak network | |
CN104640084B (en) | A kind of method and system that associated person information is set to other mobile terminals | |
CN107819508B (en) | Link fault detection and recovery method based on EPON home gateway | |
CN106412965A (en) | Method, network-surfing terminal, and system for automatic off-line realization | |
CN103517250B (en) | The method and apparatus abnormal for handling application proxy client | |
US10299311B2 (en) | System and method for ensuring continuous communication between a user device and an emergency dispatcher unit | |
CN105007143A (en) | Call preservation and recovery method and system | |
CN102487459A (en) | Monitoring method for web television system and device thereof | |
CN112584329A (en) | Terminal relay control method and device, electronic equipment and storage medium | |
CN115190052A (en) | Long connection management method, system and control unit | |
US10110737B2 (en) | Intelligent options in redial screens of communication devices | |
KR20150084540A (en) | Apparatus and method for controling traffic of an electronic device |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20210126 Termination date: 20211214 |