CN110069448A - A kind of video index method and directory system of recording a video - Google Patents
A kind of video index method and directory system of recording a video Download PDFInfo
- Publication number
- CN110069448A CN110069448A CN201910179272.5A CN201910179272A CN110069448A CN 110069448 A CN110069448 A CN 110069448A CN 201910179272 A CN201910179272 A CN 201910179272A CN 110069448 A CN110069448 A CN 110069448A
- Authority
- CN
- China
- Prior art keywords
- recording
- video
- service device
- recording service
- index
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/13—File access structures, e.g. distributed indices
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/14—Details of searching files based on file metadata
- G06F16/148—File search processing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Library & Information Science (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
The present invention relates to Video data processing technology fields, provide a kind of video index method and directory system of recording a video.A kind of video index method, including the multiple main recording service devices of configuration, multiple main recording service devices are according to video recording situation write-in video recording index;Configuration one is described by the video recording index copy of multiple main recording service devices and to store from recording service device from recording service device;It is scanned for from recording service device according to query demand.It is avoided that single point blockage, and does not need central management server and handle multiple video recording indexes, so that breaking through video recording index collects bottleneck.The present invention also provides a kind of video recording directory systems.
Description
Technical field
The present invention relates to Video data processing technology field more particularly to a kind of video index method and video recording index systems
System.
Background technique
Traditional security protection video recording index collects, and is generally sent and is recorded a video toward multiple recording service devices using central management server
Search command, then by central management server processing, integration video recording index.The shortcomings that designing in this way is if single video recording clothes
Business device blocks, entire inquiry will obstruction, and it is directly proportional to recording service device quantity to inquire time-consuming and cpu resource occupancy, often
The index of secondary inquiry has repeated data, and central management server needs to reprocess data.It is calculated by 200 recording service devices,
Central management server needs to send video recording search instruction to all recording service devices, totally 200 instructions, when some video recording clothes
When business device blocks, entire inquiry will extend, and central management server needs to handle 200 video recording indexes, merge into primary
Query result causes inquiry time-consuming big, and CPU occupies high.
Summary of the invention
It is an object of the invention to overcome the above-mentioned prior art, a kind of video index method and rope of recording a video are provided
Draw system.
In order to solve the above technical problems, invention uses technical solution as described below.A kind of video index method, including
Multiple main recording service devices are configured, multiple main recording service devices are according to video recording situation write-in video recording index;
One is configured from recording service device, and the described video recording of multiple main recording service devices is indexed from recording service device is answered
It makes and stores;
It is scanned for from recording service device according to query demand.
Preferably, described to replicate video recording index from recording service device and using three threads complete work, be respectively two into
Dump thread, I/O thread and SQL thread processed, wherein binary dump thread operates on main recording service device, I/O thread and
SQL thread is operated in from recording service device.
Preferably, the duplication video recording index includes:
Main recording service device records binary log, prepares before submitting affairs completion data to update every time, main recording service
Device is according to the sequence of submission, and the logout that data are updated is into binary log;
The binary log of main recording service device is copied to the relaying log of oneself from recording service device;And
Event is read from relaying log from the SQL thread of recording service device, and is executed.
Preferably, the video index method further includes completing the duplication of video recording index simultaneously from recording service device described
After storage, whether verify data is synchronized.
A kind of video recording directory system, including central management server, multiple main recording service devices and one are from recording service
Device;Multiple main recording service devices configure a main Video data library;It is described to prepare one from video recording number from recording service device
According to library;
The main recording service device is used to that video recording index to be written according to video recording situation in the main Video data library of its configuration
In;
It is described for the video recording index copy of multiple main recording service devices and to be stored from recording service device to described from video recording
In database;
The central management server according to query demand in the recording service device for scanning for.
Preferably, the main recording service device be a writing server, it is described from recording service device be read-only server.
The beneficial effects of the present invention are:
It needs to send a plurality of search command in compared to the prior art, only needs to send in scheme provided by the present invention
One search command, is avoided that single point blockage, and does not need central management server and handle multiple video recording indexes, to break through
Video recording index collects bottleneck.
Specific embodiment
To make those skilled in the art that the purposes, technical schemes and advantages of invention be more clearly understood, below
Invention is further elaborated in conjunction with the embodiments.
Embodiment one
The present invention provides a kind of video index method, configures multiple main recording service devices, multiple main recording service devices
According to video recording situation write-in video recording index;Configuration one from recording service device, it is described from recording service device by multiple main video recordings clothes
The video recording index copy of business device simultaneously stores;It is scanned for from recording service device according to query demand.This method utilizes
One slave pattern of more masters of mysql realizes multi-source duplication, is in real time synchronized to the video recording index in multiple main recording service devices
From recording service device.It needs to send a plurality of search command in compared to the prior art, in scheme provided by the present invention only
A search command need to be sent, is avoided that single point blockage, and does not need central management server and handles multiple video recording indexes, from
And it breaks through video recording index and collects bottleneck.
Preferably, main recording service device is used as a writing server, from server as read-only server, writing server,
It realizes read and write abruption, improves database performance, the original multiple data sources of central management server have been become into single data
Source.
Preferably, described to replicate video recording index from recording service device and using three threads complete work, be respectively two into
Dump thread, I/O thread and SQL thread processed, wherein binary dump thread operates on main recording service device, I/O thread and
SQL thread is operated in from recording service device.
Preferably, the duplication video recording index includes:
(1) main recording service device records binary log, prepares before submitting affairs completion data to update every time, main video recording
Server is according to the sequence of submission, and the logout that data are updated is into binary log.
(2) binary log of main recording service device is copied to the relaying log of oneself from recording service device.Firstly,
Start an I/O thread from recording service device, which establishes connection to main recording service device, and on main recording service device
Start binary dump thread, I/O thread read master library binary dump thread send content, and by data copy to from
Recording service device is local, forms relaying log.
(3) event is read from relaying log from the SQL thread of recording service device, and executed.
Preferably, the video index method further includes completing the duplication of video recording index simultaneously from recording service device described
After storage, whether verify data is synchronized.
Specifically, main recording service device keeps the tracking changed to all databases, when master library changes the knot of database
When structure or content, a record is generated in its binary recording file.When being connected to main recording service device from recording service device
When, to the copy of main recording service device request binary file, then the event recorded in binary file is taken from video recording
It is executed one time in business device.Very simple is replicated to configure multi-source from recording service device, has currently assumed main recording service device
Master_1:10.82.13.1, Master_2:10.82.13.2, from recording service device Slave_1:10.82.13.3.It has
Body step are as follows:
(1) the creation duplication account on main recording service device, the I/O thread run from recording service device will create one
To the TCP/IP connection of main recording service device, it is therefore desirable to create a user in master library, and authorize permission.From recording service
The I/O thread of device will use this user to be connected to main recording service device and go to read its binary log:
In Master_1:grant replication slave on*.*to'repl'@' 10.82.13.3'
identified by password;
In Master_2:grant replication slave on*.*to'repl'@' 10.82.13.3'
identified by password;
(2) master library and standby library are configured, needs to open binary log in master library, and specify a unique server
File storage is also changed to table storage by ID.
(3) notice is connected to main recording service device and replicate data from recording service device, uses CHANGE MASTER TO
How sentence instruction is connected to main recording service device from recording service device and re-executes the event in its binary log:
In Slave_1:CHANGE MASTER TO MASTER_HOST='10.82.13.1', MASTER_USER='
repl',
MASTER_PASSWORD=password, MASTER_LOG_FILE='Master_1-bin.000001',
MASTER_LOG_POS=0FOR CHANNEL'Master_1';
CHANGE MASTER TO MASTER_HOST='10.82.13.2', MASTER_USER='repl',
MASTER_PASSWORD=password, MASTER_LOG_FILE='Master_1-bin.000001', MASTER_LOG_
POS=0FOR CHANNEL'Master_1';
MASTER_LOG_POS is the offset of log because from the beginning of log read, be set as 0.
Mysql order line starts to replicate using START SLAVE, can be used SHOW SLAVE STATUS G check the shape in standby library
State.
(4) whether verify data synchronizes, toward main recording service device Master_1 and Master_2 insertion video recording index, then
It is inquired to from recording service device Slave_1, sees if there is identical data.
Embodiment two
A kind of video recording directory system, including central management server, multiple main recording service devices and one are from recording service
Device;Multiple main recording service devices configure a main Video data library;It is described to prepare one from video recording number from recording service device
According to library;The main recording service device is used for will be in the main Video data library of its configuration of video recording index write-in according to video recording situation;Institute
It states and is used for the video recording index copy of multiple main recording service devices from recording service device and stores to described from Video data library;
The central management server according to query demand in the recording service device for scanning for.
Preferably, the main recording service device be a writing server, it is described from recording service device be read-only server.
The video recording directory system have the advantages that it is same as video index method provided in embodiment one, preferably
Scheme has been described in example 1, and details are not described herein.
A specific embodiment is provided below
The table structure of video recording index are as follows:
CREATE TABLE`filesinfo`(
`FileId`int(10)unsigned NOT NULL AUTO_INCREMENT,
`DevChan`int(10)unsigned NOT NULL DEFAULT'0',
`DevIP`bigint(20)unsigned NOT NULL DEFAULT'0',
`FileStartTime`int(10)unsigned NOT NULL DEFAULT'0',
`FileStopTime`int(10)unsigned NOT NULL DEFAULT'0',
`SliceStartTime`int(10)unsigned NOT NULL DEFAULT'0',
`SliceStopTime`int(10)unsigned NOT NULL DEFAULT'0',
`SliceOffset`int(10)unsigned NOT NULL DEFAULT'0',
`FileType`int(10)unsigned NOT NULL DEFAULT'0',
`FileStatus`int(10)unsigned NOT NULL DEFAULT'0',
`FileOffset`int(10)unsigned NOT NULL DEFAULT'0',
`FileFull`int(10)unsigned NOT NULL DEFAULT'0',
`DiskID`int(10)unsigned NOT NULL DEFAULT'0',
`DiskPath`varchar(200)NOT NULL DEFAULT”,
`NVRIP`bigint(20)unsigned NOT NULL DEFAULT'0',
`CamID`varchar(64)NOT NULL,
PRIMARY KEY(`FileId`),
KEY`DevInfoIndex`(`CamID`,`SliceStartTime`,`SliceStopTime`)
) ENGINE=InnoDB AUTO_INCREMENT=22DEFAULT CHARSET=latin1;
Assuming that having 200 recording service devices, then central management server will be searched to this 200 recording service device sendings
Rope order, if there is any one recording service device to block, entire inquiry will postpone, and central management server needs to consume
Expense CPU goes to wait, handles the query result for inquiring multiple recording service devices.Using this programme, all video recording indexes are all pooled to
One from recording service device, central management server only needs to inquire video recording index to from recording service device.
Claims (6)
1. a kind of video index method, it is characterised in that: the multiple main recording service devices of configuration, multiple main recording service device roots
According to video recording situation write-in video recording index;
Configuration one is described by the video recording index copy of multiple main recording service devices and to deposit from recording service device from recording service device
Storage;
It is scanned for from recording service device according to query demand.
2. video index method as described in claim 1, it is characterised in that: the index of recording a video that replicates from recording service device makes
Work is completed with three threads, is binary dump thread, I/O thread and SQL thread respectively, wherein binary dump thread
It operates on main recording service device, I/O thread and SQL thread are operated in from recording service device.
3. video index method as claimed in claim 2, it is characterised in that: the duplication video recording, which indexes, includes:
Main recording service device records binary log, prepares before submitting affairs completion data to update every time, main recording service device is pressed
According to the sequence of submission, the logout that data are updated is into binary log;
The binary log of main recording service device is copied to the relaying log of oneself from recording service device;And
Event is read from relaying log from the SQL thread of recording service device, and is executed.
4. video index method as described in any one of claims 1-3, it is characterised in that: further include described from recording service
After device completes the duplication of video recording index and storage, whether verify data is synchronized.
5. a kind of video recording directory system, it is characterised in that: including central management server, multiple main recording service devices and one from
Recording service device;Multiple main recording service devices configure a main Video data library;It is described to prepare one from recording service device
From Video data library;
The main recording service device is used for will be in the main Video data library of its configuration of video recording index write-in according to video recording situation;
It is described for the video recording index copy of multiple main recording service devices and to be stored from recording service device to described from Video data
In library;
The central management server according to query demand in the recording service device for scanning for.
6. video recording directory system as claimed in claim 5, it is characterised in that: the main recording service device is a writing server,
It is described from recording service device be read-only server.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910179272.5A CN110069448A (en) | 2019-03-11 | 2019-03-11 | A kind of video index method and directory system of recording a video |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910179272.5A CN110069448A (en) | 2019-03-11 | 2019-03-11 | A kind of video index method and directory system of recording a video |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110069448A true CN110069448A (en) | 2019-07-30 |
Family
ID=67365224
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910179272.5A Pending CN110069448A (en) | 2019-03-11 | 2019-03-11 | A kind of video index method and directory system of recording a video |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110069448A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111522880A (en) * | 2020-04-24 | 2020-08-11 | 桂林电子科技大学 | Method for improving data read-write performance based on mysql database cluster |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090265747A1 (en) * | 2008-03-17 | 2009-10-22 | Canada Anv Systems Inc. | Systems and methods for providing web based self serviced video monitoring and security features for systems comprising ip video terminals and servers |
CN106960007A (en) * | 2017-02-28 | 2017-07-18 | 北京京东尚科信息技术有限公司 | A kind of data-updating method, device and electronic equipment |
CN108089944A (en) * | 2017-12-08 | 2018-05-29 | 四川金英科技有限责任公司 | A kind of system to guarantee data integrity under the conditions of database failure |
-
2019
- 2019-03-11 CN CN201910179272.5A patent/CN110069448A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090265747A1 (en) * | 2008-03-17 | 2009-10-22 | Canada Anv Systems Inc. | Systems and methods for providing web based self serviced video monitoring and security features for systems comprising ip video terminals and servers |
CN106960007A (en) * | 2017-02-28 | 2017-07-18 | 北京京东尚科信息技术有限公司 | A kind of data-updating method, device and electronic equipment |
CN108089944A (en) * | 2017-12-08 | 2018-05-29 | 四川金英科技有限责任公司 | A kind of system to guarantee data integrity under the conditions of database failure |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111522880A (en) * | 2020-04-24 | 2020-08-11 | 桂林电子科技大学 | Method for improving data read-write performance based on mysql database cluster |
CN111522880B (en) * | 2020-04-24 | 2023-08-08 | 桂林电子科技大学 | Method for improving data read-write performance based on mysql database cluster |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108932282B (en) | Database migration method and device and storage medium | |
CN110502507B (en) | Management system, method, equipment and storage medium of distributed database | |
JP5254611B2 (en) | Metadata management for fixed content distributed data storage | |
US8224860B2 (en) | Database management system | |
US8838721B2 (en) | File sharing system and file sharing method | |
US8713046B2 (en) | Snapshot isolation support for distributed query processing in a shared disk database cluster | |
US20070288835A1 (en) | Apparatus, computer readable medium, data signal, and method for document management | |
US8756196B2 (en) | Propagating tables while preserving cyclic foreign key relationships | |
US20140172794A1 (en) | Replication Mechanisms for Database Environments | |
US20130110873A1 (en) | Method and system for data storage and management | |
US7698319B2 (en) | Database system management method, database system, database device, and backup program | |
CN101183377A (en) | High availability data-base cluster based on message middleware | |
US20110161281A1 (en) | Distributed Transaction Management in a Distributed Shared Disk Cluster Environment | |
JPH033259B2 (en) | ||
CN102110121A (en) | Method and system for processing data | |
US10296542B2 (en) | Integration database framework | |
AU2011345318A1 (en) | Methods and systems for performing cross store joins in a multi-tenant store | |
CN102033912A (en) | Distributed-type database access method and system | |
CN103067463A (en) | Centralized management system and centralized management method for user root permission | |
CN114756577A (en) | Processing method of multi-source heterogeneous data, computer equipment and storage medium | |
US20120284244A1 (en) | Transaction processing device, transaction processing method and transaction processing program | |
US20220035786A1 (en) | Distributed database management system with dynamically split b-tree indexes | |
KR100521742B1 (en) | Xml database duplicating apparatus for copying xml document to remote server without loss of structure and attribute information of xml document and method therefor | |
US9047354B2 (en) | Statement categorization and normalization | |
CN103365987A (en) | Clustered database system and data processing method based on shared-disk framework |
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 | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20230109 Address after: 518000 Yingfei Haocheng Science Park, Guansheng 5th Road, Luhu Community, Guanhu Street, Longhua District, Shenzhen, Guangdong 1515 Applicant after: Shenzhen Infineon Information Co.,Ltd. Address before: 518000 yingfeituo workshop, Guanlan high tech Industrial Park, Longhua New District, Shenzhen City, Guangdong Province Applicant before: SHENZHEN INFINOVA Ltd. |
|
TA01 | Transfer of patent application right |