CN112947973A - Configuration updating method and device of middleware service program and electronic equipment - Google Patents
Configuration updating method and device of middleware service program and electronic equipment Download PDFInfo
- Publication number
- CN112947973A CN112947973A CN202110379785.8A CN202110379785A CN112947973A CN 112947973 A CN112947973 A CN 112947973A CN 202110379785 A CN202110379785 A CN 202110379785A CN 112947973 A CN112947973 A CN 112947973A
- Authority
- CN
- China
- Prior art keywords
- configuration information
- updated
- configuration
- memory
- monitoring device
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
- H04L41/082—Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0823—Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
- H04L41/0836—Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability to enhance reliability, e.g. reduce downtime
-
- 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/14—Session management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/163—In-band adaptation of TCP data exchange; In-band control procedures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/45—Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
- H04N21/458—Scheduling content for creating a personalised stream, e.g. by combining a locally stored advertisement with an incoming stream; Updating operations, e.g. for OS modules ; time-related management operations
- H04N21/4586—Content update operation triggered locally, e.g. by comparing the version of software modules in a DVB carousel to the version stored locally
Abstract
The invention provides a configuration updating method and device of a middleware service program and electronic equipment, belongs to the technical field of video monitoring, and solves the problems that a video is lost and a client cannot watch a real-time video within a period of time in the existing configuration updating mode. The method comprises the following steps: receiving configuration information to be updated; comparing the configuration information to be updated with the original configuration information in the memory, and determining target monitoring equipment needing configuration change; changing the TCP connection state of each target monitoring device; and replacing the original configuration information in the memory with the configuration information to be updated.
Description
Technical Field
The invention relates to the technical field of video monitoring, in particular to a configuration updating method and device of a middleware service program and electronic equipment.
Background
The middleware service program mainly realizes the access of the equipment of different manufacturers, and then stores and forwards the video streams of the equipment of different manufacturers after secondary encapsulation. The video storage is to store the video data in the form of a file or directly in the form of binary data in the hard disk of the server where the middleware service program is located. The video forwarding is to forward the video data to a client requesting to watch the video through a middleware service program, and the client displaying the video comprises a user computer or a television wall display screen and the like.
The middleware service program can control which monitoring devices are required to be stored and forwarded currently through the configuration file information, and in the process of storing and forwarding the videos by the middleware service program, if some monitoring devices are required to be added or deleted or video parameters of the existing monitoring devices are required to be modified, the current configuration information needs to be updated. The current program logic is that after the configuration information of the middleware service program is updated, the middleware service program needs to be restarted, so that reloading of the updated configuration information can be completed, and updating of a video storage and forwarding strategy is further completed. This may cause the loss of the video of all the monitoring devices associated with the middleware server during the period of restarting the middleware service program, and may also cause the user to be unable to view the real-time video of the monitoring devices associated with the middleware server through the client during the period of time. Therefore, the existing configuration updating mode has the problems that the video is lost and the client cannot watch the real-time video within a period of time.
Disclosure of Invention
The invention aims to provide a configuration updating method and device of a middleware service program and electronic equipment, and solves the problems that a video is lost and a client cannot watch a real-time video within a period of time in the existing configuration updating mode.
In a first aspect, the present invention provides a method for updating configuration of a middleware service program, including:
receiving configuration information to be updated;
comparing the configuration information to be updated with the original configuration information in the memory, and determining target monitoring equipment needing configuration change;
changing the TCP connection state of each target monitoring device;
and replacing the original configuration information in the memory with the configuration information to be updated.
Further, the step of receiving the configuration information to be updated includes:
creating a temporary file;
receiving configuration information to be updated, and storing the configuration information to be updated to the temporary file;
and after the updated configuration information is received, overwriting the temporary file into the configuration file.
Further, the target monitoring device includes a monitoring device that needs to be added or a monitoring device that needs to be deleted.
Further, the step of changing the TCP connection status of each target monitoring device includes:
establishing TCP connection with each monitoring device to be added, and verifying a login account;
or
The TCP connection of each monitoring device that needs to be deleted is disconnected.
Further, the step of comparing the configuration information to be updated with the original configuration information in the memory includes:
and comparing the configuration information to be updated with the original configuration information in the memory by using the read-write lock.
In a second aspect, the present invention further provides a device for updating configuration of a middleware service program, including:
the receiving module is used for receiving the configuration information to be updated;
the comparison module is used for comparing the configuration information to be updated with the original configuration information in the memory and determining the target monitoring equipment needing configuration change;
the configuration module is used for changing the TCP connection state of each target monitoring device;
and the updating module is used for replacing the original configuration information in the memory with the configuration information to be updated.
In a third aspect, the present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program operable on the processor, and the processor implements the steps of the above method when executing the computer program.
In a fourth aspect, the invention also provides a computer readable storage medium having stored thereon machine executable instructions which, when invoked and executed by a processor, cause the processor to execute the method.
The configuration updating method of the middleware service program provided by the invention comprises the steps of firstly receiving configuration information to be updated, then comparing the configuration information to be updated with original configuration information in a memory, determining target monitoring equipment needing to be configured in a changing mode, changing the TCP connection state of each target monitoring equipment, and finally replacing the original configuration information in the memory with the configuration information to be updated. In the configuration updating process, only the target monitoring equipment needing configuration change is subjected to TCP connection state change, so that the middleware server does not need to be restarted, and the monitoring equipment needing configuration change can keep real-time smoothness of video signals, so that the video of the monitoring equipment associated with the middleware server cannot be lost, and a user can normally check the real-time video of the monitoring equipment associated with the middleware server through the client in the period of time, thereby solving the problems that the video is lost and the client cannot watch the real-time video in the period of time in the existing configuration updating mode.
Accordingly, the configuration updating device of the middleware service program, the electronic device and the computer-readable storage medium provided by the embodiment of the invention also have the technical effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a configuration updating method for a middleware service program according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a configuration updating apparatus for a middleware service program according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. 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.
The terms "comprising" and "having," and any variations thereof, as referred to in embodiments of the present invention, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The embodiment of the invention provides a configuration updating method of a middleware service program, which is applied to a monitoring equipment system, wherein the middleware service program is used for managing a plurality of monitoring equipment, and the monitoring equipment system is also provided with a client program used for controlling the middleware service program. As shown in fig. 1, the method comprises the steps of:
s1: configuration information to be updated is received.
The user can initiate configuration update by using the client program, modify the relevant configuration parameters of the middleware service program through the client page, and add, modify or delete the configuration information of the relevant monitoring equipment according to the current requirements through the visual interface.
The client program sends an instruction to the middleware service program to inform the middleware service program of starting to update the configuration information, at the moment, the client program sends a configuration file name to the middleware service program, and the middleware service program receiving the instruction creates a temporary file according to the file name for storing the updated configuration information.
The client program sends the updated configuration information to the middleware service program, the client program can determine whether to send the configuration information to the middleware service program at one time or send the configuration information to the middleware service program for multiple times according to the amount of the configuration information, and after receiving the configuration information to be updated, the middleware service program stores the configuration information to be updated to a temporary file.
The client program sends an instruction to the middleware service program to inform the middleware service program that the sending of the configuration information is finished, the middleware service program confirms that the receiving of the configuration information to be updated is finished after receiving the instruction, then the content in the temporary file is written into the configuration file appointed by the client in a covering mode, and the configuration information in the memory is prepared and then updated.
S2: and comparing the configuration information to be updated with the original configuration information in the memory, and determining the target monitoring equipment needing configuration change.
Specifically, the read-write lock may be utilized to compare the configuration information to be updated with the original configuration information in the memory. Under the condition of multithread parallel execution task, if one thread occupies the mutex lock, other threads can be blocked no matter write operation or read operation is carried out on the locked data, and corresponding read-write operation can be carried out on the locked data only after the thread occupying the lock releases the lock. In the embodiment, the mutual exclusion lock is changed into the read-write lock, so that when one thread only wants to read data, the thread can use the read lock to lock the data, and thus, other threads do not need to wait because of the influence of the lock when the other threads want to read the data, and if the data is written, the write lock needs to be used, and in this case, the data needs to be waited, namely, if the read-write lock is used, the time for the operation of only reading the data under the condition of multithreading is saved compared with the previous mutual exclusion lock, and the efficiency is improved.
Through the comparison process, the middleware service program can count the target monitoring equipment needing to be changed and configured, and form a monitoring equipment list needing to be added and a monitoring equipment list needing to be deleted. Sometimes only monitoring devices that need to be added or only monitoring devices that need to be deleted are possible.
S3: change the TCP (Transmission Control Protocol) connection status of each target monitoring device.
And for the monitoring equipment to be added, establishing TCP connection with each monitoring equipment to be added, and completing the login of the equipment after the authentication of the user name and the password so as to realize the authentication of the login account.
And for the monitoring equipment needing to be deleted, disconnecting the TCP connection of each monitoring equipment needing to be deleted, and simultaneously clearing the corresponding monitoring equipment information from the memory.
For the monitoring device without changing the configuration information, the middleware service program does not perform any operation on the monitoring device, and the current state of the monitoring device is kept unchanged.
S4: and replacing the original configuration information in the memory with the configuration information to be updated.
In this embodiment, a delayed release mechanism is used to update configuration information, where delayed release refers to that, when a data resource needs to be released, data that needs to be released is cached in a linked list, and then a thread is started to traverse the cache linked list to release corresponding data.
The configuration updating method for the middleware service program provided by the embodiment of the invention comprises the steps of firstly receiving configuration information to be updated, then comparing the configuration information to be updated with original configuration information in a memory, determining target monitoring equipment needing configuration change, changing the TCP connection state of each target monitoring equipment, and finally replacing the original configuration information in the memory with the configuration information to be updated. In the configuration updating process, only the target monitoring equipment needing configuration change is subjected to TCP connection state change, so that the middleware server does not need to be restarted, and the monitoring equipment needing configuration change can keep real-time smoothness of video signals, so that the video of the monitoring equipment associated with the middleware server cannot be lost, and a user can normally check the real-time video of the monitoring equipment associated with the middleware server through the client in the period of time, thereby solving the problems that the video is lost and the client cannot watch the real-time video in the period of time in the existing configuration updating mode.
In addition, the embodiment of the invention does not change the logic of the original client for updating the configuration information, completes the optimization of the configuration updating under the condition that the client program is not sensed, and realizes the compatibility of the new client program and the old client program.
As shown in fig. 2, an embodiment of the present invention further provides a device for updating configuration of a middleware service program, including:
a receiving module 1, configured to receive configuration information to be updated;
the comparison module 2 is used for comparing the configuration information to be updated with the original configuration information in the memory and determining the target monitoring equipment needing configuration change;
the configuration module 3 is used for changing the TCP connection state of each target monitoring device;
and the updating module 4 is used for replacing the original configuration information in the memory with the configuration information to be updated.
The embodiment of the present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program that can be run on the processor, and the processor implements the steps of the method provided in the above embodiment when executing the computer program.
In accordance with the above method, embodiments of the present invention also provide a computer readable storage medium storing machine executable instructions, which when invoked and executed by a processor, cause the processor to perform the steps of the above method.
The apparatus provided by the embodiment of the present invention may be specific hardware on the device, or software or firmware installed on the device, etc. The device provided by the embodiment of the present invention has the same implementation principle and technical effect as the method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the method embodiments without reference to the device embodiments. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the foregoing systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
For another example, the division of the unit is only one division of logical functions, and there may be other divisions in actual implementation, and for another example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; and the modifications, changes or substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention. Are intended to be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (8)
1. A configuration updating method for a middleware service program is characterized by comprising the following steps:
receiving configuration information to be updated;
comparing the configuration information to be updated with the original configuration information in the memory, and determining target monitoring equipment needing configuration change;
changing the TCP connection state of each target monitoring device;
and replacing the original configuration information in the memory with the configuration information to be updated.
2. The method of claim 1, wherein the step of receiving the configuration information to be updated comprises:
creating a temporary file;
receiving configuration information to be updated, and storing the configuration information to be updated to the temporary file;
and after the updated configuration information is received, overwriting the temporary file into the configuration file.
3. The method of claim 1, wherein the target monitoring device comprises a monitoring device that needs to be added or a monitoring device that needs to be deleted.
4. The method of claim 3, wherein the step of altering the TCP connection status of each target monitoring device comprises:
establishing TCP connection with each monitoring device to be added, and verifying a login account;
or
The TCP connection of each monitoring device that needs to be deleted is disconnected.
5. The method of claim 1, wherein comparing the configuration information to be updated with the configuration information existing in the memory comprises:
and comparing the configuration information to be updated with the original configuration information in the memory by using the read-write lock.
6. A configuration update apparatus for a middleware server, comprising:
the receiving module is used for receiving the configuration information to be updated;
the comparison module is used for comparing the configuration information to be updated with the original configuration information in the memory and determining the target monitoring equipment needing configuration change;
the configuration module is used for changing the TCP connection state of each target monitoring device;
and the updating module is used for replacing the original configuration information in the memory with the configuration information to be updated.
7. An electronic device comprising a memory and a processor, wherein the memory stores a computer program operable on the processor, and wherein the processor implements the steps of the method of any of claims 1 to 5 when executing the computer program.
8. A computer readable storage medium having stored thereon machine executable instructions which, when invoked and executed by a processor, cause the processor to execute the method of any of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110379785.8A CN112947973A (en) | 2021-04-08 | 2021-04-08 | Configuration updating method and device of middleware service program and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110379785.8A CN112947973A (en) | 2021-04-08 | 2021-04-08 | Configuration updating method and device of middleware service program and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112947973A true CN112947973A (en) | 2021-06-11 |
Family
ID=76231282
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110379785.8A Pending CN112947973A (en) | 2021-04-08 | 2021-04-08 | Configuration updating method and device of middleware service program and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112947973A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113473098A (en) * | 2021-08-20 | 2021-10-01 | 海信电子科技(武汉)有限公司 | Display apparatus and display method |
CN115086397A (en) * | 2022-06-10 | 2022-09-20 | 中国银行股份有限公司 | TCP connection management method and system |
CN115567392A (en) * | 2022-10-10 | 2023-01-03 | 浙江保融科技股份有限公司 | Automatic deployment and upgrade method for customer internal business system |
-
2021
- 2021-04-08 CN CN202110379785.8A patent/CN112947973A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113473098A (en) * | 2021-08-20 | 2021-10-01 | 海信电子科技(武汉)有限公司 | Display apparatus and display method |
CN113473098B (en) * | 2021-08-20 | 2023-03-24 | Vidaa(荷兰)国际控股有限公司 | Display apparatus and display method |
CN115086397A (en) * | 2022-06-10 | 2022-09-20 | 中国银行股份有限公司 | TCP connection management method and system |
CN115567392A (en) * | 2022-10-10 | 2023-01-03 | 浙江保融科技股份有限公司 | Automatic deployment and upgrade method for customer internal business system |
CN115567392B (en) * | 2022-10-10 | 2023-08-15 | 浙江保融科技股份有限公司 | Automatic deployment upgrading method for customer internal service system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112947973A (en) | Configuration updating method and device of middleware service program and electronic equipment | |
US20170139778A1 (en) | Relay apparatus, relay method, and computer program product | |
US8239662B1 (en) | Network based operating system across devices | |
US10601901B2 (en) | Methods, systems, and media for stored content distribution and access | |
US8694597B1 (en) | Mobile device group-based data sharing | |
US20170139824A1 (en) | Memory management and image display for mobile devices | |
US20150012913A1 (en) | Application management apparatus, application management system, application management method, and non-transitory computer readable medium | |
EP2897368B1 (en) | Interactive personal/internet protocol television subscription system, and subscription plan management method and device | |
US20130132340A1 (en) | File synchronization method, electronic device and synchronization system | |
CN109725950B (en) | Method, device and storage medium for realizing single-instance operation of client | |
US20170220779A1 (en) | License management system | |
US8918795B2 (en) | Handling and reporting of object state transitions on a multiprocess architecture | |
CN106357703B (en) | Cluster switching method and device | |
US9652307B1 (en) | Event system for a distributed fabric | |
WO2019148955A1 (en) | User login control method, smart television, and storage apparatus | |
CN113342507B (en) | Distributed lock service realization method and device and computer equipment | |
RU2643429C2 (en) | Management method of synchronization of files (options), electronic device (options) and computer-readable medium | |
US10674188B2 (en) | Playback apparatus, method of controlling playback apparatus, playback method and server apparatus | |
CN113986936A (en) | Data processing method and device, electronic equipment and storage medium | |
CN112835916A (en) | API interface-based service processing method and device and computer-readable storage medium | |
FR3003365A1 (en) | METHOD AND DEVICE FOR MANAGING SOFTWARE UPDATES OF A SET OF EQUIPMENT OF A SYSTEM SUCH AS A SYSTEM OF AN AIRCRAFT | |
CN111756784A (en) | Session method, session device, computer equipment and medium | |
CN110704157B (en) | Application starting method, related device and medium | |
US8424002B2 (en) | Method, system and program of outputting information | |
CN104636086A (en) | HA storage device and HA state managing 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 |