CN111866107B - Mobile law enforcement instrument keep-alive method according to balance - Google Patents

Mobile law enforcement instrument keep-alive method according to balance Download PDF

Info

Publication number
CN111866107B
CN111866107B CN202010660565.8A CN202010660565A CN111866107B CN 111866107 B CN111866107 B CN 111866107B CN 202010660565 A CN202010660565 A CN 202010660565A CN 111866107 B CN111866107 B CN 111866107B
Authority
CN
China
Prior art keywords
keep
alive
law enforcement
comprehensive
dispatching platform
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.)
Active
Application number
CN202010660565.8A
Other languages
Chinese (zh)
Other versions
CN111866107A (en
Inventor
虞家骏
陈尚武
吴宣辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Xujian Science And Technology Co ltd
Original Assignee
Hangzhou Xujian Science And Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Xujian Science And Technology Co ltd filed Critical Hangzhou Xujian Science And Technology Co ltd
Priority to CN202010660565.8A priority Critical patent/CN111866107B/en
Publication of CN111866107A publication Critical patent/CN111866107A/en
Application granted granted Critical
Publication of CN111866107B publication Critical patent/CN111866107B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Abstract

The invention provides a method for keeping a mobile law enforcement instrument alive according to balance, which comprises the following steps: the time required by the comprehensive commanding and dispatching platform for processing one keep-alive request is s seconds, and the number of the keep-alive requests which can be processed by the comprehensive commanding and dispatching platform per second is 1/s; the minimum interval time of the mobile law enforcement instrument for sending the two keep-alive requests is n seconds, and the maximum interval time is m seconds; the comprehensive command and dispatching platform maintains a queue, and the queue records the number of mobile law enforcement instruments which are about to send keep-alive requests to the comprehensive command and dispatching platform at a certain moment; because the queue needs to frequently delete data at the head, add data at the tail and the query operation is sequential query, the queue is implemented in a linked list manner; compared with the common keep-alive method, the method of the invention removes the randomness and avoids the possibility of blockage. The method can control the time of the mobile law enforcement instrument sending the keep-alive request to the comprehensive commanding and dispatching platform.

Description

Mobile law enforcement instrument keep-alive method according to balance
Technical Field
The invention relates to the technical field of balanced keep-alive, in particular to a method for keeping a mobile law enforcement instrument alive according to balance.
Background
The comprehensive command and dispatching platform performs high-degree fusion on voice, video and GIS, and constructs a command and dispatching mode of 'peacetime and wartime combination', so that the demands of emergency training, emergency drilling, daily office, conference and consultation at ordinary times are met, and the requirements of emergency command, emergency rescue, emergency decision and the like during wartime can be met. The purposes of unified command and united action are achieved, effective support is provided for daily management and emergency treatment of industries such as government, civil defense, traffic and energy, and life and property safety of people is guaranteed to the maximum extent.
In the current society, mobile law enforcement instruments are used more and more frequently in the fields of public security, civil defense, security, emergency management and the like. With the development of internet technology, the requirement for converged communication is higher and higher, so that various large-quantity mobile law enforcement instruments can be connected under the same comprehensive command and dispatch platform. Because the keep-alive requests sent by the mobile law enforcement instruments to the comprehensive commanding and dispatching platform are random at present, when the number of the terminals is too large, a large number of mobile law enforcement instruments can send the keep-alive requests to the comprehensive commanding and dispatching platform at the same time. The platform typically has only one port to receive these requests, and the platform is blocked until the keep-alive requests are processed, which may cause problems such as disconnection, inoperability of the mobile enforcement device, unresponsiveness of operation, etc., which is very poor experience for the mobile enforcement device user. Therefore, the balanced keep-alive method is provided to remove randomness, distribute keep-alive time evenly and avoid the occurrence of blockage.
Disclosure of Invention
In view of the above, the invention provides a mobile law enforcement instrument, which removes randomness, distributes keep-alive time averagely and avoids the occurrence of blockage according to a balanced keep-alive method.
In order to achieve the purpose, the invention provides the following technical scheme:
the invention provides a method for keeping a mobile law enforcement instrument alive according to balance, which comprises the following steps:
step (1), supposing that p (such as 1000) mobile law enforcement instruments are connected with a certain comprehensive command and dispatching platform, and the time required by the comprehensive command and dispatching platform to process one keep-alive request is s (such as 0.01) seconds, the number of the keep-alive requests which can be processed by the comprehensive command and dispatching platform per second is (1/s) (such as 1/0.01, namely 100); the minimum interval time of the mobile law enforcement instrument sending the two keep-alive requests is n (such as 15) seconds, and the maximum interval time is m (such as 30) seconds;
step (2), the comprehensive commanding and dispatching platform maintains a queue, and the queue records the number of mobile law enforcement instruments which are about to send keep-alive requests to the comprehensive commanding and dispatching platform at a certain moment; because the queue needs to frequently delete data at the head, add data at the tail and the query operation is sequential query, the queue is implemented in a linked list manner;
step (3) when a mobile law enforcement instrument sends a keep-alive request to the comprehensive commanding and dispatching platform, the comprehensive commanding and dispatching platform processes the keep-alive request firstly;
step (4), traversing the linked list until the current time plus n (such as 15) seconds, if the number of the mobile law enforcement instruments which are about to send the keep-alive requests to the comprehensive command and dispatch platform at the time is more than or equal to 1/s (such as 100), continuing to inquire backwards until the time with the number less than 1/s (such as 100) is inquired, adding 1 to the number of the time, and adding the time as the time when the mobile law enforcement instruments send the keep-alive requests to the comprehensive command and dispatch platform next time into a keep-alive request response to send the keep-alive requests to the mobile law enforcement instruments; deleting data smaller than the current moment in the linked list traversing process; if the linked list reaches the end point, adding new time data until the current time plus m (such as 30) seconds; if the current time plus m (such as 30) seconds is reached, the time is added to a keep-alive request response and sent to the mobile law enforcement instrument as the time when the mobile law enforcement instrument sends the keep-alive request to the comprehensive commanding and dispatching platform next time, no matter whether the number of the keep-alive requests sent to the comprehensive commanding and dispatching platform at the time is more than 1/s (such as 100);
and after receiving the keep-alive request response, the mobile law enforcement instrument acquires the moment of sending the keep-alive request to the comprehensive command and dispatching platform next time, and sends the keep-alive request to the comprehensive command and dispatching platform again at the moment.
The keep-alive request is a request for keeping an active state, and the keep-alive response is a comprehensive command scheduling platform informing the mobile law enforcement instrument of receiving the keep-alive request and successfully processing the keep-alive request.
Compared with the prior art, the invention has the following beneficial effects:
1. compared with the common keep-alive method, the method of the invention removes the randomness and avoids the possibility of blockage.
2. The method can control the time of the mobile law enforcement instrument sending the keep-alive request to the comprehensive commanding and dispatching platform.
3. The method has good expandability, for example, can control different mobile law enforcement instruments to send the time interval of the keep-alive request to the comprehensive command scheduling platform, or distribute different keep-alive request time intervals according to different service scenes.
Drawings
FIG. 1 is a schematic diagram of a balanced keep-alive process between a plurality of terminals and an integrated commanding and scheduling platform in the invention;
the terminal 1, the terminal 2 and the terminal 3 refer to different mobile law enforcement instruments.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, the present invention provides a specific embodiment of a method for a mobile law enforcement instrument to keep alive in balance, which comprises the following steps:
step (1), assuming that 1000 mobile law enforcement instruments are connected with a certain comprehensive command and dispatching platform, and the time required for the comprehensive command and dispatching platform to process one keep-alive request is 0.01 second, the number of the keep-alive requests which can be processed by the comprehensive command and dispatching platform per second is 1/0.01, namely 100; the minimum interval time of the mobile law enforcement instrument for sending the two keep-alive requests is 15 seconds, and the maximum interval time is 30 seconds;
step (2), the comprehensive commanding and dispatching platform maintains a queue, and the queue records the number of mobile law enforcement instruments which are about to send keep-alive requests to the comprehensive commanding and dispatching platform at a certain moment; because the queue needs to frequently delete data at the head, add data at the tail, and the query operation is sequential query, the queue is implemented in a linked list manner;
step (3) when a mobile law enforcement instrument sends a keep-alive request to the comprehensive commanding and dispatching platform, the comprehensive commanding and dispatching platform processes the keep-alive request firstly;
step (4), traversing the linked list until the current moment is reached and 15 seconds are added, if the number of the mobile law enforcement instruments which are about to send the keep-alive requests to the comprehensive command and dispatching platform at the moment is more than or equal to 100, continuing to inquire backwards until the moment with the number less than 100 is inquired, adding 1 to the number of the moment, and adding the moment to the mobile law enforcement instrument as the moment when the mobile law enforcement instrument sends the keep-alive requests to the comprehensive command and dispatching platform next time into a keep-alive request response to send the keep-alive request response to the mobile law enforcement instrument; deleting data smaller than the current moment in the linked list traversing process; if the linked list reaches the end point, adding new moment data until the current moment plus 30 seconds; if the current moment plus 30 seconds is reached, the moment is used as the moment when the mobile law enforcement instrument sends the keep-alive requests to the comprehensive commanding and dispatching platform next time and is added to the keep-alive request response to be sent to the mobile law enforcement instrument no matter whether the number of the keep-alive requests sent to the comprehensive commanding and dispatching platform at the moment is more than 100;
and after receiving the keep-alive request response, the mobile law enforcement instrument acquires the moment of sending the keep-alive request to the comprehensive commanding and dispatching platform next time, and sends the keep-alive request to the comprehensive commanding and dispatching platform again at the moment.
The keep-alive request is a request for keeping an active state, and the keep-alive response is a comprehensive command scheduling platform informing the mobile law enforcement instrument of receiving the keep-alive request and successfully processing the keep-alive request.
1. Compared with the common keep-alive method, the method of the invention removes the randomness and avoids the possibility of blockage.
2. The method can control the time of the mobile law enforcement instrument sending the keep-alive request to the comprehensive commanding and dispatching platform.
3. The method has good expandability, for example, the time interval of sending the keep-alive request to the comprehensive command scheduling platform by different mobile law enforcement instruments can be controlled, or different keep-alive request time intervals are distributed according to different service scenes.

Claims (1)

1. A method for keeping a mobile law enforcement instrument alive according to balance is characterized by comprising the following steps:
step (1), supposing that p mobile law enforcement instruments are connected with a certain comprehensive commanding and dispatching platform, the time required for the comprehensive commanding and dispatching platform to process one keep-alive request is s seconds, and the number of the keep-alive requests which can be processed by the comprehensive commanding and dispatching platform per second is 1/s; the minimum interval time of the mobile law enforcement instrument sending the two keep-alive requests is n seconds, and the maximum interval time is m seconds;
step (2), the comprehensive command and dispatching platform maintains a queue, and the queue records the number of mobile law enforcement instruments which are about to send keep-alive requests to the comprehensive command and dispatching platform at a certain moment; because the queue needs to frequently delete data at the head, add data at the tail, and the query operation is sequential query, the queue is implemented in a linked list manner;
step (3) when a mobile law enforcement instrument sends a keep-alive request to the comprehensive commanding and dispatching platform, the comprehensive commanding and dispatching platform processes the keep-alive request;
step (4), traversing the linked list until the current moment is reached and n seconds are added, if the number of the mobile law enforcement instruments which are about to send the keep-alive request to the comprehensive commanding and dispatching platform at the moment is more than or equal to 1/s, continuing to inquire backwards until the moment with the number less than 1/s is inquired, adding 1 to the number of the moment, and adding the moment into a keep-alive request response as the moment when the mobile law enforcement instruments send the keep-alive request to the comprehensive commanding and dispatching platform next time to send the keep-alive request response to the mobile law enforcement instruments; deleting data smaller than the current moment in the process of traversing the linked list; if the linked list reaches the end point, adding new moment data until the current moment plus m seconds; if the current moment plus m seconds is reached, the moment is taken as the moment when the mobile law enforcement instrument sends the keep-alive request to the comprehensive commanding and dispatching platform next time and is added to the keep-alive request response to be sent to the mobile law enforcement instrument no matter whether the quantity of the keep-alive requests sent to the comprehensive commanding and dispatching platform at the moment is more than 1/s;
after receiving the keep-alive request response, the mobile law enforcement instrument acquires the moment of sending the keep-alive request to the comprehensive commanding and dispatching platform next time, and sends the keep-alive request to the comprehensive commanding and dispatching platform again at the moment;
the keep-alive request is a request for keeping an active state, and the keep-alive response is a comprehensive command scheduling platform informing the mobile law enforcement instrument of receiving the keep-alive request and successfully processing the keep-alive request.
CN202010660565.8A 2020-07-10 2020-07-10 Mobile law enforcement instrument keep-alive method according to balance Active CN111866107B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010660565.8A CN111866107B (en) 2020-07-10 2020-07-10 Mobile law enforcement instrument keep-alive method according to balance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010660565.8A CN111866107B (en) 2020-07-10 2020-07-10 Mobile law enforcement instrument keep-alive method according to balance

Publications (2)

Publication Number Publication Date
CN111866107A CN111866107A (en) 2020-10-30
CN111866107B true CN111866107B (en) 2023-01-03

Family

ID=73152682

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010660565.8A Active CN111866107B (en) 2020-07-10 2020-07-10 Mobile law enforcement instrument keep-alive method according to balance

Country Status (1)

Country Link
CN (1) CN111866107B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102340480A (en) * 2010-07-14 2012-02-01 杭州华三通信技术有限公司 Method for keeping alive between terminals and center server, center server and terminals thereof
CN103297461A (en) * 2012-02-28 2013-09-11 中国移动通信集团公司 Setting method of NAT conversation keep-alive time duration and client-side and server
CN104509033A (en) * 2012-03-27 2015-04-08 爱立信(中国)通信有限公司(中国) Shared keep-alive and failure detection mechanisms in distributed network
CN106789394A (en) * 2016-11-18 2017-05-31 上海斐讯数据通信技术有限公司 A kind of connection server keep Alive Packet control method long and system
CN107343293A (en) * 2016-04-29 2017-11-10 迈普通信技术股份有限公司 A kind of link keep-alive method and equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8375134B2 (en) * 2009-06-08 2013-02-12 Microsoft Corporation Determining an efficient keep-alive interval for a network connection
CN104412649B (en) * 2014-06-18 2018-07-13 华为技术有限公司 A kind of method of adjustment of heartbeat, device and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102340480A (en) * 2010-07-14 2012-02-01 杭州华三通信技术有限公司 Method for keeping alive between terminals and center server, center server and terminals thereof
CN103297461A (en) * 2012-02-28 2013-09-11 中国移动通信集团公司 Setting method of NAT conversation keep-alive time duration and client-side and server
CN104509033A (en) * 2012-03-27 2015-04-08 爱立信(中国)通信有限公司(中国) Shared keep-alive and failure detection mechanisms in distributed network
CN107343293A (en) * 2016-04-29 2017-11-10 迈普通信技术股份有限公司 A kind of link keep-alive method and equipment
CN106789394A (en) * 2016-11-18 2017-05-31 上海斐讯数据通信技术有限公司 A kind of connection server keep Alive Packet control method long and system

Also Published As

Publication number Publication date
CN111866107A (en) 2020-10-30

Similar Documents

Publication Publication Date Title
CN109547511B (en) WEB message real-time pushing method, server, client and system
CN105657860B (en) A kind of method and device improving data service response speed
CN107800901B (en) User call processing method, device, computer equipment and storage medium
CN102413072B (en) Instant message processing method in Web conference and treatment system
CN108064028A (en) A kind of implementation method of temporary group calling in digital clustering system
RU2608469C2 (en) Method and apparatus for high performance low latency real time notification delivery
CN113891114B (en) Transcoding task scheduling method and device
CN108650667A (en) Terminal scheduling method and apparatus
CN105812405B (en) A kind of method, apparatus and system handling message
CN106027380B (en) A kind of information push method and device
CN103051863A (en) Session issuing method and system
CN111541555A (en) Group chat optimization method and related product
CN110060124A (en) Order processing method, apparatus, storage medium and electronic equipment
CN104901865B (en) A kind of mobile terminal instant messaging signal synchronizing method based on global monotonic sequence number
CN103716230A (en) Message sending method, device and server
CN106302032A (en) A kind of point-to-multipoint poll means of communication
CN111866107B (en) Mobile law enforcement instrument keep-alive method according to balance
CN105207860A (en) Business acceleration system and method
CN103297937A (en) Method, system and device for achieving short message notification
CN104821889B (en) A kind of processing method and equipment of backup message
CN106789577A (en) A kind of method and system of automatic transmission wechat circle of friends
CN105471719A (en) Method for solving communication problems of chatting software under weak signals via cloud server storage technology
CN103051811A (en) Method and device for terminal information transfer
CN101695049A (en) Method and device for processing businesses in monitoring system
CN103581300A (en) Interactive conference system information on-line preservation method

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