CN114205404B - Media stream holding method, device, electronic equipment and storage medium - Google Patents

Media stream holding method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114205404B
CN114205404B CN202010900539.8A CN202010900539A CN114205404B CN 114205404 B CN114205404 B CN 114205404B CN 202010900539 A CN202010900539 A CN 202010900539A CN 114205404 B CN114205404 B CN 114205404B
Authority
CN
China
Prior art keywords
keep
alive
takeover
equipment
target security
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
CN202010900539.8A
Other languages
Chinese (zh)
Other versions
CN114205404A (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.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies 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 Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN202010900539.8A priority Critical patent/CN114205404B/en
Publication of CN114205404A publication Critical patent/CN114205404A/en
Application granted granted Critical
Publication of CN114205404B publication Critical patent/CN114205404B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/14Session management
    • H04L67/142Managing session states for stateless protocols; Signalling session states; State transitions; Keeping-state mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Hardware Redundancy (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a media stream holding method, a device, electronic equipment and a storage medium. The method comprises the following steps: determining whether the keep-alive parameters of the target security device are successfully migrated to a pre-deployed takeover device in response to a current keep-alive request message received from the target security device; if the migration is determined to be successful, a current keep-alive response message carrying the IP address information of the takeover device is sent to the target security device so as to indicate the target security device to send a next keep-alive request message to the takeover device next time; and controlling the takeover device to process the next keep-alive request message so as to ensure that the media stream service of the target security device is not interrupted. By adopting the scheme, when various restarting management equipment operations are executed, the uninterrupted processing of the keep-alive request of the accessed security equipment can be ensured, and the dependence relationship exists between the signaling and the media stream combined with the national standard networking selection, so that the uninterrupted monitoring of the media stream service can be realized.

Description

Media stream holding method, device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a media stream holding method, a device, electronic equipment and a storage medium.
Background
In the security field scene, the rapid development of networking platforms is promoted after the national standard networking is supported, the number of the point positions of the devices such as the networking access front-end IPC is increased, and the operations such as upgrading and replacing bad parts of the management devices are generally required due to requirements. However, the above operation can stop the service running on the management device, which results in that the signaling of the devices such as IPC cannot be processed, and the devices such as IPC are offline, which results in that all monitoring media services such as storing and hard-reading live on-wall are interrupted, and the influence on users is great.
Disclosure of Invention
The embodiment of the invention provides a media stream holding method, a device, electronic equipment and a storage medium, which are used for realizing uninterrupted media stream service during the operations of upgrading management equipment, replacing equipment bad parts and the like.
In a first aspect, an embodiment of the present invention provides a media stream holding method, which is executed by a management device, where the method includes:
determining whether the keep-alive parameters of the target security device are successfully migrated to a pre-deployed takeover device in response to a current keep-alive request message received from the target security device;
if the migration is determined to be successful, a current keep-alive response message carrying the IP address information of the takeover device is sent to the target security device so as to indicate the target security device to send a next keep-alive request message to the takeover device next time;
and controlling the takeover device to process the next keep-alive request message so as to ensure that the media stream service of the target security device is not interrupted.
In a second aspect, an embodiment of the present invention further provides a media stream holding apparatus configured to a management device, where the apparatus includes:
the parameter monitoring module is used for responding to the current keep-alive request message received from the target security equipment and determining whether the keep-alive parameters of the target security equipment are successfully migrated to the pre-deployed takeover equipment;
the keep-alive processing module is used for sending a current keep-alive response message carrying the IP address information of the takeover device to the target security device if the migration is determined to be successful, so as to indicate the target security device to send a next keep-alive request message to the takeover device next time;
and the equipment control module is used for controlling the takeover equipment to process the next keep-alive request message so as to ensure that the media stream service of the target security equipment is not interrupted.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
a storage means for storing one or more programs;
the one or more programs are executed by the one or more processors to cause the one or more processors to implement the media stream holding method as provided in any of the embodiments of the present invention.
In a fourth aspect, there is also provided in an embodiment of the present invention a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method for preserving a media stream as provided in any of the embodiments of the present invention.
The embodiment of the invention provides a media stream maintaining method, when a management device receives a current keep-alive request message sent by a target security device, the management device can judge whether keep-alive parameters required by the target security device are successfully migrated to a takeover device; if the migration is successful, the management device transmits the IP address of the takeover device to the target security device through the current keep-alive response message, and the target security device next turns to the takeover device to transmit the next keep-alive request message, and the control takeover device responds to the next keep-alive request message transmitted by the target security device instead of the management platform. By adopting the scheme, the response of the keep-alive request is realized by migrating the keep-alive main body from the management equipment to the takeover equipment, so that uninterrupted processing of the keep-alive request of the accessed security equipment can be ensured when various operations (such as service upgrading, bad part replacement and the like) of restarting the management equipment are executed, dependency relationship exists between signaling and media streams combined with national standard networking selection, and the uninterrupted monitoring of media stream service can be realized.
The foregoing summary is merely an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more fully understood, and in order that the same or additional objects, features and advantages of the present invention may be more fully understood.
Drawings
Other features, objects and advantages of the present invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 is a flow chart of a method for maintaining a media stream provided in an embodiment of the present invention;
fig. 2 is a schematic networking diagram between a management device and a security device according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of keep-alive migration of security devices provided in an embodiment of the present invention;
FIG. 4 is a schematic diagram of a keep-alive response message provided in an embodiment of the invention;
FIG. 5 is a flow chart of another media stream maintenance method provided in an embodiment of the present invention;
FIG. 6 is a schematic diagram of migration of keep-alive parameters provided in an embodiment of the invention;
FIG. 7 is a schematic diagram of a takeover device and a management device in establishing a monitoring registration relationship according to an embodiment of the present invention;
FIG. 8 is a block diagram of a media stream holding apparatus provided in an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently, or at the same time. Furthermore, the order of the operations may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Fig. 1 is a flowchart of a media stream holding method according to an embodiment of the present invention. The technical scheme of the embodiment can be suitable for the situation of continuously maintaining the media stream of the security equipment. The method may be performed by a media stream holding device, which may be implemented in software and/or hardware and integrated on any electronic equipment with network communication capabilities. For example, the electronic device may be a management device deployed in each security device and configured to access the network by using a national standard protocol. As shown in fig. 1, the media stream holding method in this embodiment may include the following steps:
s110, responding to the current keep-alive request message received from the target security device, and determining whether the keep-alive parameters of the target security device are successfully migrated to the pre-deployed takeover device.
In this embodiment, fig. 2 is a schematic diagram of networking between a management device and a security device according to an embodiment of the present invention. Referring to fig. 2, comprising: the system comprises a plurality of security devices (such as IPC devices and the like) and management devices, wherein the plurality of security devices adopt national standard protocols to access the management devices in a networking mode. The networking characteristics illustrated in fig. 2 above may be analyzed from the following dimensions: national standard networking and protocol interfacing, signaling and media stream separation management, SIP protocol foundation, and other dimensions. For the national standard networking and protocol interfacing, the signaling and media streams of the national standard networking have a dependency relationship, and when the signaling processing is abnormal (such as registration and keep-alive timeout failure), the media streams are released; for the separation management of signaling and media streams, the management device and the security device respectively process the signaling and the media streams with maximum capability, and the signaling and the media streams are not interfered with each other under normal conditions. For the SIP protocol base, the value of the Contact header field filled in the keep-alive response message may be modified in substitution.
In this embodiment, referring to fig. 2, on the basis of a simple networking architecture between a management device and a security device, a takeover device for implementing a keep-alive parameter migration process is added to the scheme of the present application, so as to obtain a new networking architecture as shown in fig. 2. The hardware index of the takeover device needs to be guaranteed to be at least the same as the CPU and memory index of the management device. On the basis of the networking architecture, when the management equipment needs to be restarted by service upgrading or bad part replacement and other operations, keep-alive parameters required by the security equipment can be gradually migrated to the pre-deployed takeover equipment so as to temporarily replace the management equipment by the takeover equipment to perform national standard signaling interaction processing with each security equipment.
In this embodiment, fig. 3 is a schematic diagram of keep-alive migration of security equipment provided in the embodiment of the present invention. Referring to fig. 3, at least some security devices may continue to send keep-alive request messages, here denoted as current keep-alive request messages, to the management device while the management platform migrates keep-alive parameters of each security device to the hosting device. For example, the security device may periodically (e.g., using a preset time interval as a periodic condition) send a Message keep-alive request Message to the management device based on the SIP protocol, so that the management device performs keep-alive processing, so that the security device does not go offline. At this time, the management device may determine whether the keep-alive parameters of the target security device have been migrated to the pre-deployed takeover device at present in response to the received current keep-alive request message. Among other keep-alive parameters, the following are included, but are not limited to: the device code and keep-alive remaining timeout time of the security device.
And S120, if the keep-alive parameters of the target security equipment are determined to be successfully migrated, the current keep-alive response message carrying the IP address information of the takeover equipment is sent to the target security equipment, so that the target security equipment is indicated to send a next keep-alive request message to the takeover equipment next time.
In this embodiment, referring to fig. 3, the management device may process the current keep-alive request message sent by the target security device, and send a corresponding current keep-alive response message to the target security device, so as to implement keep-alive operation of the target security device, and avoid offline of the target security device. Wherein the current keep-alive response message can be determined in a 200OK message format in the SIP protocol. Meanwhile, as the keep-alive parameters of the target security equipment are successfully migrated to the takeover equipment, and the management equipment is about to perform operations such as service upgrading or bad part replacement, the IP address information of the takeover equipment capable of carrying out keep-alive instead of the management equipment can be carried in the current keep-alive response message sent to the target security equipment.
In this embodiment, referring to fig. 3, after receiving a current keep-alive response message corresponding to a current keep-alive request message sent by a management device, a target security device (e.g., IPC device) may determine whether the received current keep-alive message carries IP address information of a takeover device. If the IP address information of the takeover device is carried, the IP address information of the takeover device carried in the current keep-alive response message can be used as a destination of the next keep-alive request message sent by the target security device, and then the next keep-alive request message is periodically sent to the takeover device so as to realize the keep-alive of the target security device by adopting the takeover device. If the IP address information of the takeover device is not carried, the next keep-alive request message is continuously sent to the management device periodically, and keep-alive is continuously carried out through the management device.
In this embodiment, referring to fig. 3, if it is determined that the keep-alive parameters of the target security device are not successfully migrated to the pre-deployed takeover device, a current keep-alive response message that does not carry the IP address information of the takeover device is sent to the target security device, and the destination of the next keep-alive request message sent by the target security device is kept as the management device, until the management device successfully migrates the keep-alive parameters of the target security device to the pre-deployed takeover device, the destination of the next keep-alive request message sent by the target security device is changed.
In an alternative of this embodiment, fig. 4 is a schematic structural diagram of a keep-alive response message provided in an embodiment of the invention. Referring to fig. 3 and 4, sending a current keep-alive response message carrying IP address information of the takeover device to the target security device may include the following steps A1-A3:
and A1, generating an initial keep-alive response message corresponding to the received current keep-alive request message.
And A2, replacing the value of the Contact header field in the initial keep-alive response message with the IP address of the takeover device and the device code to obtain the current keep-alive response message carrying the IP address information.
And step A3, sending a current keep-alive response message carrying the IP address of the takeover device to the target security device.
In this embodiment, referring to fig. 3 and 4, for the current keep-alive request message sent by the target security device to the management device, the management device may generate corresponding initial keep-alive response information. Considering that the keep-alive parameters of the target security device have been successfully migrated to the takeover device, the target security device may choose to subsequently send a keep-alive request message to the takeover device for keep-alive. Therefore, the initial keep-alive response message cannot be simply sent to the target security keep-alive to achieve the keep-alive purpose, and the initial keep-alive response message needs to be changed to obtain the current keep-alive response message carrying the IP address information. Thus, the current keep-alive request message can be used for responding to the current keep-alive request message for keep-alive, and meanwhile, the device IP address adopted by the target security device for follow-up keep-alive is specified.
S130, controlling the pre-deployed takeover device to process the next keep-alive request message sent by the target security device so as to ensure that the media stream service of the target security device is not interrupted.
In this embodiment, referring to fig. 3, after the management device sends the current keep-alive response message carrying the IP address information of the takeover device to the target security device, the keep-alive of the target security device may be controlled to migrate from the management device to the takeover device, and the next keep-alive request message sent by the target security device is processed by the takeover device, and the next keep-alive response message is returned. In this way, the target security device can be turned to the take-over device to keep alive (that is, the take-over device processes the subsequent keep-alive request message sent by the target security device to make a keep-alive response), so that the signaling state is kept, and because the signaling and media streams between the management device and the security device are separately managed, if the signaling state is kept all the time, the target security device can be kept alive all the time, and the uninterrupted media stream service can be ensured.
By adopting the scheme, the keep-alive request response is realized by migrating the keep-alive main body from the management equipment to the takeover equipment, so that uninterrupted processing of the keep-alive request of the accessed security equipment can be ensured when various operations (such as service upgrading, bad part replacement and the like) of restarting the management equipment are executed, dependency relationship exists between the signaling and the media stream selected by combining with the national standard networking, and the monitoring of the media stream service can be realized without interruption.
On the basis of the above embodiment, optionally, the media stream holding method in this embodiment may further include the following operations: and stopping the keep-alive interaction with each security device after the keep-alive parameters of all security devices associated with the management device are monitored to migrate to the pre-deployed takeover device.
In this embodiment, referring to fig. 2 and fig. 3, after the management device migrates keep-alive parameters of all IPC security devices to the takeover device, the management device may suspend keep-alive interaction operations with each security device, and the management device performs operations such as operation and maintenance service upgrade, bad part replacement, and the like, so that the media stream service is not affected.
Fig. 5 is a flowchart of another media stream holding method provided in the embodiment of the present invention, where the technical solution of the present embodiment is further optimized based on the foregoing embodiment, and the technical solution of the present embodiment may be combined with each alternative solution in one or more foregoing embodiments. As shown in fig. 5, the media stream holding method provided in the embodiment of the present application may include the following steps:
s510, determining the security equipment to be migrated and the keep-alive parameters of the security equipment to be migrated, wherein the security equipment to be migrated and the keep-alive parameters of the security equipment to be migrated meet parameter migration conditions; wherein the keep-alive parameters include: the device encodes and keeps alive remaining timeout time.
In this embodiment, fig. 6 is a schematic diagram of migration of keep-alive parameters according to an embodiment of the invention. Referring to fig. 6, after the management device successfully registers with the takeover device, the takeover device has made keep-alive parameter migration preparation work. The number of security devices of the national standard networking to which the management device is connected is huge, and the security devices need to be periodically kept alive after the successful registration between the security devices such as IPC and the management device is considered, so that the security devices are prevented from being disconnected. For this reason, it is necessary to determine the security device to be migrated that satisfies the parameter migration condition from at least two security devices associated with the management device, so as to perform keep-alive parameter migration with respect to the security device to be migrated that satisfies the parameter migration condition.
In this embodiment, if the keep-alive remaining timeout time (kpparetime) of the security device is smaller than a preset keep-alive fixed value, the security device may be offline due to no timely keep-alive, so only the security device with the keep-alive remaining timeout time greater than the preset keep-alive fixed value satisfies the parameter migration condition. Optionally, determining the security device to be migrated that meets the parameter migration condition may include the following operations: and screening the security equipment to be migrated, which meets the parameter migration condition, from at least two security equipment associated with the management equipment according to the remaining timeout time of the keep-alive of each security equipment.
S520, the keep-alive parameters of the security equipment to be migrated are carried in the Notify message in a converging mode, and the Notify message carrying the keep-alive parameters is pushed to the takeover equipment to complete migration of at least part of the keep-alive parameters.
In this embodiment, the keep-alive parameters of the security device to be migrated, which conform to the keep-alive remaining timeout period, may be aggregated according to the number of preset parameter aggregation strips, for example, according to 10 keep-alive parameters, which are aggregated once. Furthermore, the keep-alive parameters of the security equipment to be migrated, which are converged by a preset number, are carried through the Notify message based on the SIP protocol, and then the Notify message carrying the keep-alive parameters is pushed to the takeover equipment, so that the migration work of the keep-alive parameters is realized.
In this embodiment, in addition to aggregating keep-alive parameters of the security device to be migrated, parameters required by a media monitoring service of the security device to be migrated are synchronously aggregated, for example, parameters required by the media monitoring service include, but are not limited to, the following: the service type of the media stream of the security device, the address and the port of the receiving and transmitting media stream for subsequent flow control and other parameters. Table 1 shows the case of synchronous aggregation of keep-alive parameters and parameters required for the media monitoring service.
Table 1 Convergence indication of keep-alive parameters and parameters required for media monitoring services
S530, in response to the current keep-alive request message received from the target security device, determining whether the keep-alive parameters of the target security device are successfully migrated to the pre-deployed takeover device.
S540, if the migration is determined to be successful, the current keep-alive response message carrying the IP address information of the takeover device is sent to the target security device, so as to indicate the target security device to send the next keep-alive request message to the takeover device next time.
S550, the takeover device is controlled to process the next keep-alive request message so that the media stream service of the target security device is not interrupted.
By adopting the scheme, keep-alive parameters required by security equipment can be gradually transferred to the takeover equipment, response of the keep-alive request is realized by transferring a keep-alive main body from management equipment to the takeover equipment, uninterrupted processing of the keep-alive request of the accessed security equipment can be ensured when various operations (such as service upgrading, bad part replacement and the like) of restarting the management equipment are executed, dependency relationship exists between signaling and media streams selected by combining national standard networking, and uninterrupted monitoring of media stream service can be realized.
In an alternative scheme of the embodiment, before determining whether the keep-alive parameters of the target security device are successfully migrated to the pre-deployed takeover device, the method may further include the following steps B1-B2:
and B1, transmitting a Register registration request message carrying authentication information of the management equipment to the pre-deployed takeover equipment so as to initiate registration operation to the takeover equipment again.
And step B2, receiving a registration response message which is sent by the takeover equipment and passes authentication, and establishing a monitoring registration relationship between the management equipment and the takeover equipment.
In this embodiment, fig. 7 is a schematic diagram of a connection device and a management device in establishing a monitoring registration relationship according to an embodiment of the present invention. Referring to fig. 7, the management apparatus initiates a registration request to the migration device through a Sip protocol-based Register registration request message; the takeover device returns 401 an Unauthorized (Unauthorized) response message to the management device asking the management device to initiate registration again carrying an authentication message (typically a user name, password); the management device carries authentication information and sends a Register registration request message to the takeover device again to initiate registration; the takeover device passes the authentication and returns a 200OK response message to the management device.
In this embodiment, optionally, the 200OK carries an timeout period expire=t, where T represents time consumed from the migration of the data of the security device to be migrated to the startup of the live signaling of the security device, that is, a period of time when the management device cannot provide services to the outside. Wherein T depends on the management device abnormal migration demand time, which can be determined from the measured value. If the management device does not respond back, the takeover device can still provide service to the outside.
In an alternative solution of this embodiment, after the keep-alive request message of the security device is migrated to the takeover device in the forward direction for keep-alive, the takeover device determines whether the migration timeout T is reached. And if the migration timeout T is reached at fixed time, starting reverse migration, returning application layer data such as the keep-alive parameters of the security equipment and parameters required by the media monitoring service and the like in the takeover equipment to the management equipment, and returning keep-alive signaling such as the keep-alive request message and the like of the security equipment to the management equipment, namely returning the service in the takeover equipment to the management equipment. If the timing does not reach the migration timeout T, the migration timeout T is kept unchanged.
It should be noted that, when the management device cannot respond to the reverse migration request initiated by the takeover device, for example, the management device delays the reverse migration operation according to 2 sns until the management device can normally respond in the process of operation, maintenance, upgrade and bad part replacement.
By adopting the scheme of the embodiment, the monitoring registration relationship is established between the management equipment and the takeover equipment by constructing the takeover equipment, and then the monitoring media service is ensured not to be interrupted by forward migration and back migration of application layer data (such as keep-alive parameters, parameters required by the media monitoring service and the like) and keep-alive signaling (such as keep-alive request messages) of national standard IPC.
Fig. 8 is a block diagram of a media stream holding apparatus according to an embodiment of the present invention. The technical scheme of the embodiment can be suitable for the situation of continuously maintaining the media stream of the security equipment. The apparatus may be implemented in software and/or hardware and integrated on any electronic device having network communication capabilities. For example, the electronic device may be a management device deployed in each security device and configured to access the network by using a national standard protocol.
As shown in fig. 8, the media stream holding apparatus in this embodiment may include the following: a parameter monitoring module 810, a keep-alive processing module 820, and a device control module 830. Wherein:
a parameter monitoring module 810, configured to determine, in response to a current keep-alive request message received from a target security device, whether a keep-alive parameter of the target security device is successfully migrated to a pre-deployed takeover device;
the keep-alive processing module 820 is configured to send, if it is determined that the migration is successful, a current keep-alive response message carrying IP address information of the takeover device to the target security device, so as to instruct the target security device to send a next keep-alive request message to the takeover device next time;
and the device control module 830 is configured to control the takeover device to process the next keep-alive request message, so that the media stream service of the target security device is not interrupted.
On the basis of the above embodiment, optionally, the apparatus further includes:
the security equipment determining module is used for determining security equipment to be migrated which meets parameter migration conditions and keep-alive parameters of the security equipment to be migrated; wherein the keep-alive parameters include: device encoding and keep-alive remaining timeout time;
the keep-alive parameter migration module is used for converging and bearing keep-alive parameters of the security equipment to be migrated into the Notify message and pushing the Notify message bearing the keep-alive parameters to the takeover equipment so as to complete migration of at least part of the keep-alive parameters.
Based on the above embodiment, optionally, the security device determining module 810 includes:
and screening the security equipment to be migrated, which meets the parameter migration conditions, from the security equipment associated with the management equipment according to the remaining timeout time of the keep-alive of each security equipment.
Based on the above embodiments, optionally, keep-alive processing module 820 includes:
generating an initial keep-alive response message corresponding to the received current keep-alive request message;
replacing the value of the Contact header field in the initial keep-alive response message with the IP address and the device code of the takeover device to obtain the current keep-alive response message;
and sending the current keep-alive response message to the target security equipment.
On the basis of the above embodiment, optionally, the apparatus further includes:
an authentication registration request module, configured to send a Register registration request message carrying authentication information to which the management device belongs to a pre-deployed takeover device, so as to initiate a registration operation to the takeover device again;
and the registration relation determining module is used for receiving the registration response message which is sent by the takeover equipment and passes the authentication, and establishing a monitoring registration relation between the management equipment and the takeover equipment.
On the basis of the above embodiment, optionally, the apparatus further includes:
and stopping the keep-alive interaction with each security device after the keep-alive parameters of all security devices associated with the management device are monitored to migrate to the pre-deployed takeover device.
The media stream holding device provided in the embodiment of the present invention can execute the media stream holding method provided in any embodiment of the present invention, and has the corresponding functions and beneficial effects of executing the media stream holding method, and the detailed process refers to the related operations of the media stream holding method in the foregoing embodiment.
Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 9, an electronic device provided in an embodiment of the present invention includes: one or more processors 910 and storage 920; the number of processors 910 in the electronic device may be one or more, one processor 910 being illustrated in fig. 9; storage 920 is used to store one or more programs; the one or more programs are executed by the one or more processors 910 to cause the one or more processors 910 to implement a media stream holding method according to any of the embodiments of the present invention.
The electronic device may further include: an input device 930, and an output device 940.
The processor 910, the storage 920, the input 930, and the output 940 in the electronic device may be connected by a bus or other means, for example in fig. 9.
The storage 920 in the electronic device is used as a computer readable storage medium, and may be used to store one or more programs, which may be software programs, computer executable programs, and modules, such as program instructions/modules corresponding to the media stream holding method provided in the embodiments of the present invention. The processor 910 executes various functional applications of the electronic device and data processing by running software programs, instructions and modules stored in the storage 920, i.e., implements the media stream holding method in the above-described method embodiment.
Storage 920 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for a function; the storage data area may store data created according to the use of the electronic device, etc. In addition, storage 920 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, storage 920 may further include memory remotely located relative to processor 910, which may be connected to the device 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 input device 930 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the electronic device. The output device 940 may include a display device such as a display screen.
And, when one or more programs included in the above-described electronic device are executed by the one or more processors 910, the programs perform the following operations:
determining whether the keep-alive parameters of the target security device are successfully migrated to a pre-deployed takeover device in response to a current keep-alive request message received from the target security device;
if the migration is determined to be successful, a current keep-alive response message carrying the IP address information of the takeover device is sent to the target security device so as to indicate the target security device to send a next keep-alive request message to the takeover device next time;
and controlling the takeover device to process the next keep-alive request message so as to ensure that the media stream service of the target security device is not interrupted.
Of course, those skilled in the art will appreciate that the program(s) may also perform the associated operations of the media stream holding method provided in any of the embodiments of the present invention when the program(s) included in the electronic device are executed by the processor(s) 910.
In an embodiment of the present invention, there is provided a computer-readable medium having stored thereon a computer program for executing a media stream holding method when executed by a processor, the method comprising:
determining whether the keep-alive parameters of the target security device are successfully migrated to a pre-deployed takeover device in response to a current keep-alive request message received from the target security device;
if the migration is determined to be successful, a current keep-alive response message carrying the IP address information of the takeover device is sent to the target security device so as to indicate the target security device to send a next keep-alive request message to the takeover device next time;
and controlling the takeover device to process the next keep-alive request message so as to ensure that the media stream service of the target security device is not interrupted.
In the alternative, the program may be further configured to perform the media stream holding method provided in any of the embodiments of the present invention when executed by a processor.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access Memory (Random Access Memory, RAM), a Read-Only Memory (ROM), an erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), a flash Memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. A computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to: electromagnetic signals, optical signals, or any suitable combination of the preceding. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, radio frequency (RadioFrequency, RF), and the like, or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (10)

1. A media stream maintenance method, performed by a management device, the method comprising:
determining whether the keep-alive parameters of the target security device are successfully migrated to a pre-deployed takeover device in response to a current keep-alive request message received from the target security device;
if the migration is determined to be successful, a current keep-alive response message carrying the IP address information of the takeover device is sent to the target security device so as to indicate the target security device to send a next keep-alive request message to the takeover device next time;
controlling the takeover device to process the next keep-alive request message so as to ensure that the media stream service of the target security device is not interrupted;
wherein the method comprises the following steps: determining security equipment to be migrated which meets parameter migration conditions, and keeping alive parameters of the security equipment to be migrated; wherein the keep-alive parameters include: the device encodes and keeps alive remaining timeout time.
2. The method according to claim 1, wherein the method further comprises:
and converging and bearing the keep-alive parameters of the security equipment to be migrated into the Notify message, and pushing the Notify message bearing the keep-alive parameters to the takeover equipment so as to complete the migration of at least part of the keep-alive parameters.
3. The method of claim 1, wherein determining to-be-migrated security device satisfying parameter migration conditions comprises:
and screening the security equipment to be migrated, which meets the parameter migration conditions, from the security equipment associated with the management equipment according to the remaining timeout time of the keep-alive of each security equipment.
4. The method of claim 1, wherein sending the current keep-alive response message carrying the takeover device IP address information to the target security device comprises:
generating an initial keep-alive response message corresponding to the received current keep-alive request message;
replacing the value of the Contact header field in the initial keep-alive response message with the IP address and the device code of the takeover device to obtain the current keep-alive response message;
and sending the current keep-alive response message to the target security equipment.
5. The method of claim 1, further comprising, prior to determining whether the keep-alive parameters of the target security device were successfully migrated to the pre-deployed takeover device:
transmitting a Register registration request message carrying authentication information of the management device to a pre-deployed takeover device so as to initiate registration operation to the takeover device again;
and receiving a registration response message which is sent by the takeover device and passes authentication, and establishing a monitoring registration relationship between the management device and the takeover device.
6. The method according to claim 1, wherein the method further comprises:
and stopping the keep-alive interaction with each security device after the keep-alive parameters of all security devices associated with the management device are monitored to migrate to the pre-deployed takeover device.
7. A media stream holding apparatus, configured to a management device, the apparatus comprising:
the parameter monitoring module is used for responding to the current keep-alive request message received from the target security equipment and determining whether the keep-alive parameters of the target security equipment are successfully migrated to the pre-deployed takeover equipment;
the keep-alive processing module is used for sending a current keep-alive response message carrying the IP address information of the takeover device to the target security device if the migration is determined to be successful, so as to indicate the target security device to send a next keep-alive request message to the takeover device next time;
the device control module is used for controlling the takeover device to process the next keep-alive request message so as to ensure that the media stream service of the target security device is not interrupted;
wherein the apparatus further comprises:
the security equipment determining module is used for determining security equipment to be migrated which meets parameter migration conditions and keep-alive parameters of the security equipment to be migrated; wherein the keep-alive parameters include: the device encodes and keeps alive remaining timeout time.
8. The apparatus of claim 7, wherein the keep-alive processing module comprises:
generating an initial keep-alive response message corresponding to the received current keep-alive request message;
replacing the value of the Contact header field in the initial keep-alive response message with the IP address and the device code of the takeover device to obtain the current keep-alive response message;
and sending the current keep-alive response message to the target security equipment.
9. An electronic device, comprising:
one or more processors;
a storage means for storing one or more programs;
when executed by the one or more processors, causes the one or more processors to implement the media stream maintenance method of any of claims 1-6.
10. A computer readable storage medium having stored thereon a computer program, characterized in that the program, when executed by a processor, implements the media stream holding method of any of claims 1-6.
CN202010900539.8A 2020-08-31 2020-08-31 Media stream holding method, device, electronic equipment and storage medium Active CN114205404B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010900539.8A CN114205404B (en) 2020-08-31 2020-08-31 Media stream holding method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010900539.8A CN114205404B (en) 2020-08-31 2020-08-31 Media stream holding method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114205404A CN114205404A (en) 2022-03-18
CN114205404B true CN114205404B (en) 2024-03-29

Family

ID=80644305

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010900539.8A Active CN114205404B (en) 2020-08-31 2020-08-31 Media stream holding method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114205404B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106304071A (en) * 2016-08-15 2017-01-04 迈普通信技术股份有限公司 A kind of network access verifying method, access authentication equipment and certificate server
CN111163040A (en) * 2018-11-08 2020-05-15 浙江宇视科技有限公司 Renegotiated session reestablishment method and device
CN111356017A (en) * 2018-12-24 2020-06-30 浙江宇视科技有限公司 Video monitoring network equipment keep-alive method and device
CN111385134A (en) * 2018-12-30 2020-07-07 浙江宇视科技有限公司 Access device dynamic migration method and device access platform

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106304071A (en) * 2016-08-15 2017-01-04 迈普通信技术股份有限公司 A kind of network access verifying method, access authentication equipment and certificate server
CN111163040A (en) * 2018-11-08 2020-05-15 浙江宇视科技有限公司 Renegotiated session reestablishment method and device
CN111356017A (en) * 2018-12-24 2020-06-30 浙江宇视科技有限公司 Video monitoring network equipment keep-alive method and device
CN111385134A (en) * 2018-12-30 2020-07-07 浙江宇视科技有限公司 Access device dynamic migration method and device access platform

Also Published As

Publication number Publication date
CN114205404A (en) 2022-03-18

Similar Documents

Publication Publication Date Title
AU2021266341B2 (en) Session processing method, device, and system
JP5113684B2 (en) Access gateway device control method and communication system
JP2017184259A (en) Method for flow control under cooperation environment and communication with reliability
CN115486053A (en) Method and apparatus for managing information related to edge computing services
CN116048538B (en) Service grid deployment method and device for DPU
WO2021057526A1 (en) Disaster recovery method for gateway device, and communication device
US11658870B2 (en) Method and apparatus for restoring network device to factory defaults, and network device
US11983522B2 (en) Edge-based intelligence for over the air update
US11589273B2 (en) Context placement in the mobile communications network
WO2024103943A1 (en) Service processing method and apparatus, storage medium, and device
CN114205404B (en) Media stream holding method, device, electronic equipment and storage medium
CN115801642B (en) RDMA communication management module, method, equipment and medium based on state control
CN113300894A (en) Equipment hot switching method, electronic equipment and storage medium
US20150142909A1 (en) Method, apparatus and computer program product for managing storage system
CN116192863B (en) Micro-service flow processing method, DPU service grid deployment method and system
US20220303261A1 (en) Methods and apparatus for lightweight machine to machine communication
CN114143569B (en) Webpage recording and live broadcasting method and system
US9608914B2 (en) Information processing apparatus and information processing method
JP2019040579A (en) Message push system, client device and message push method therefor
US20220272156A1 (en) AUTOMATICALLY SCALING A NUMBER OF DEPLOYED APPLICATION DELIVERY CONTROLLERS (ADCs) IN A DIGITAL NETWORK
CN114553936A (en) Connection method, connection device, electronic equipment and computer-readable storage medium
WO2021014419A1 (en) Controlling a destination of network traffic
US9372728B2 (en) System and method for agent networks
CN114727324B (en) Network disaster recovery processing method and device, storage medium and electronic equipment
US12052175B2 (en) Controlling a destination of network traffic

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