CN109255038B - Method, device and equipment for reading video file and computer storage medium - Google Patents

Method, device and equipment for reading video file and computer storage medium Download PDF

Info

Publication number
CN109255038B
CN109255038B CN201810896727.0A CN201810896727A CN109255038B CN 109255038 B CN109255038 B CN 109255038B CN 201810896727 A CN201810896727 A CN 201810896727A CN 109255038 B CN109255038 B CN 109255038B
Authority
CN
China
Prior art keywords
time period
user
restriction
item
directory entry
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
CN201810896727.0A
Other languages
Chinese (zh)
Other versions
CN109255038A (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 Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN201810896727.0A priority Critical patent/CN109255038B/en
Publication of CN109255038A publication Critical patent/CN109255038A/en
Application granted granted Critical
Publication of CN109255038B publication Critical patent/CN109255038B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses a method, a device and equipment for reading a video file and a computer storage medium, which can realize the function that the video file in a specific time period only allows a specific user to read, and improve the accuracy of the authority management of the video file. The method comprises the following steps: receiving a video file reading request carrying information of a first time period, wherein the video file reading request is used for indicating a first user to request to read a video file of the first time period; searching all stored directory entry indexes for a directory entry index having an intersection with the first time period in terms of time, wherein the directory entry index comprises a limit mark for indicating whether the video files are limited to be accessed or not; determining a time period which can be read by the first user in the first time period according to a limit mark included in the directory entry index; and outputting the video files of the time periods which can be read by the first user based on the determination result.

Description

Method, device and equipment for reading video file and computer storage medium
Technical Field
The present invention relates to the field of monitoring technologies, and in particular, to a method, an apparatus, and a device for reading a video file, and a computer storage medium.
Background
At present, camera equipment is generally available in public places, and the camera equipment is used for shooting videos and transmitting the videos to background monitoring equipment so as to store the videos in corresponding storage equipment, and when the videos shot before need to be checked, the corresponding videos are read again for checking. In the monitoring system, one camera device is connected with the background monitoring device through a video channel, and the video file is transmitted through the channel.
However, in the conventional monitoring system, security measures are usually provided to prevent anyone from viewing a shot video. For example, a user needs to log in a monitoring system through an account to verify whether the account has a right or not when the user wants to check a video, the check is allowed if the user has the right, and the check is prohibited if the user does not have the right. In the prior art, the authority is only roughly divided according to the channel, that is, the video of a specific channel can be checked by a specific account, so that the authority management of the video file is not precise at present, and the authority of the video file cannot be accurately controlled.
Disclosure of Invention
The embodiment of the invention provides a method for reading a video file, which can realize the function that the video file in a specific time period only allows a specific user to read, and improve the accuracy of the authority management of the video file.
In a first aspect, a method for reading a video file is provided, where the method includes:
receiving a video file reading request carrying information of a first time period, wherein the video file reading request is used for indicating a first user to request to read a video file of the first time period;
searching all stored directory entry indexes for a directory entry index having an intersection with the first time period in terms of time, wherein the directory entry index comprises a limit mark for indicating whether the video files are limited to be accessed or not;
determining a time period which can be read by the first user in the first time period according to a limit mark included in the directory entry index;
and outputting the video files of the time periods which can be read by the first user based on the determination result.
In the embodiment of the invention, when a user wants to read the video file for a period of time, the video file which can be read by the user in the period of time is determined, and then only the video file which can be read by the user is output, so that the video file can be subjected to authority management according to the time period, that is, the function that the video file in a specific time period only allows a specific user to read can be realized, and the accuracy of the authority management of the video file is improved.
Optionally, determining, according to a restriction flag included in the directory entry index, a time period that can be read by the first user in the first time period includes:
determining a directory entry index of which the access is limited by the limitation mark indicating the video file from the directory entry index;
searching at least one restriction item which is intersected with the time period indicated by the determined directory item index in time from the restriction file, wherein the restriction item comprises information of the time period of the restricted video file and information of the accessible users;
determining a time period that the first user can read according to the at least one restriction item.
In the embodiment of the invention, the time information of the limited video files and the information of the user allowed to access are stored in the limiting item, so that when the user reads the corresponding video files, whether the user has the authority or not can be determined according to the information of the limiting item, and the effect of carrying out authority management on the video files based on the time period is realized.
Optionally, the determining, according to the at least one restriction item, a time period that can be read by the first user includes:
determining an intersection of a time period indicated by the restriction item including the information of the first user in the at least one restriction item and the first time period as a time period which can be read by the first user.
Optionally, after determining an intersection between a time period indicated by a restriction item including information of the first user in the at least one restriction item and the first time period as a time period readable by the first user, the method further includes:
for one of the time periods in the intersection with the first time period, performing the following operations:
determining a starting key I frame according to the starting time of the one time period, and determining an ending I frame according to the ending time of the one time period;
and determining the video file between the starting I frame and the ending I frame as the video file which can be read by the first user.
Optionally, the method further includes:
receiving an adding request carrying information of a second time period, wherein the adding request is used for requesting to add a restriction item allowing at least one user to access the video files of the second time period;
determining whether a directory entry index matching the second time period exists in all stored directory entry indexes;
if the determination result is yes, setting a limit flag of the index of the directory entry matched with the second time period as access limit;
and generating a new limiting item based on the adding request, and storing the new limiting item in a video recording limiting file.
In the embodiment of the invention, a new restriction item can be added to perform access restriction on the video file in the time slot which is expected to be appointed, and the information of the user which can access the video file in the time slot is saved in the restriction item, so that a basis is provided for the subsequent authority management of the video file based on the time slot.
Optionally, the method further includes:
receiving a cancellation request carrying information of a third time period, wherein the cancellation request is used for requesting to cancel access restriction of the third time period;
determining whether a restriction item intersecting with the third time period in time is included in a restriction file;
and if so, canceling the access limitation to the video files corresponding to the intersection in the limitation items.
Optionally, the method further includes:
receiving a cancellation request carrying information of a third time period and information of a second user, wherein the cancellation request is used for requesting to cancel the permission of the second user for accessing the video file of the third time period;
determining whether a restriction item which is intersected with the third time period in time and contains information of the second user is included in a restriction file;
and if so, deleting the information of the second user in the restriction item according to the information of the third time period.
Optionally, deleting the information of the second user in the restriction item according to the information of the third time period, including:
determining, for each of the restriction items, whether the third time period includes all of the time periods restricted by the restriction item;
if the determination result is negative, splitting the limitation item into a limitation item limiting a fourth time period and a limitation item limiting a fifth time period, wherein the fourth time period is an intersection of the third time period and the time period limited by the limitation item, and the fifth time period is a difference set of the third time period and the time period limited by the limitation item;
and deleting the information of the second user in the restriction item restricting the fourth time period.
Optionally, after deleting the information of the second user in the restriction item restricting the fourth time period, the method further includes:
if the restriction item for restricting the fourth time period does not contain any user information, deleting the restriction item for restricting the fourth time period;
setting a restriction flag of the directory entry index whose indicated time period is within the fourth time period to not restrict access.
In a second aspect, an apparatus for reading a video file is provided, the apparatus comprising:
the device comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a video file reading request carrying information of a first time period, and the video file reading request is used for indicating a first user to request to read a video file of the first time period;
the searching unit is used for searching all directory entry indexes which are stored for directory entry indexes which have intersection with the first time period in terms of time, wherein the directory entry indexes comprise limiting marks used for indicating whether video files are limited to be accessed or not;
a determining unit, configured to determine, according to a restriction flag included in the directory entry index, a time period that can be read by the first user in the first time period;
and the execution unit is used for outputting the video files of the time period which can be read by the first user based on the determination result.
Optionally, the determining unit is specifically configured to:
determining a directory entry index of which the access is limited by the limitation mark indicating the video file from the directory entry index;
searching at least one restriction item which is intersected with the time period indicated by the determined directory item index in time from the restriction file, wherein the restriction item comprises information of the time period of the restricted video file and information of the accessible users;
determining a time period that the first user can read according to the at least one restriction item.
Optionally, the determining unit is specifically configured to:
determining an intersection of a time period indicated by the restriction item including the information of the first user in the at least one restriction item and the first time period as a time period which can be read by the first user.
Optionally, the determining unit is further specifically configured to:
for one of the time periods in the intersection with the first time period, performing the following operations:
determining a starting key I frame according to the starting time of the one time period, and determining an ending I frame according to the ending time of the one time period;
and determining the video file between the starting I frame and the ending I frame as the video file which can be read by the first user.
Alternatively to this, the first and second parts may,
the receiving unit is further configured to receive an addition request carrying information of a second time period, where the addition request is used to request to add a restriction item allowing at least one user to access the video file of the second time period;
the determining unit is further configured to determine whether a directory entry index matching the second time period exists in all stored directory entry indexes; and when the determination result is yes, setting a limit flag of the index of the directory entry matched with the second time period as access limit;
and the execution unit is further used for generating a new restriction item based on the addition request and storing the new restriction item in a video recording restriction file.
Alternatively to this, the first and second parts may,
the receiving unit is further configured to receive a cancellation request carrying information of a third time period, where the cancellation request is used to request to cancel access restriction on the third time period;
the determining unit is further configured to determine whether a restriction item intersecting with the third time period in terms of time is included in a restriction file;
and the execution unit is further configured to cancel the access restriction on the video files corresponding to the intersection in the restriction item when the determination result is yes.
Alternatively to this, the first and second parts may,
the receiving unit is further configured to receive a cancellation request carrying information of a third time period and information of a second user, where the cancellation request is used to request to cancel the permission of the second user to access the video file of the third time period;
the determining unit is further configured to determine whether a restriction item which is intersected with the third time period in time and contains information of the second user is included in a restriction file;
and the execution unit is further configured to delete the information of the second user in the restriction item according to the information of the third time period when the determination result is yes.
Optionally, the execution unit is specifically configured to:
determining, for each of the restriction items, whether the third time period includes all of the time periods restricted by the restriction item;
if the determination result is negative, splitting the limitation item into a limitation item limiting a fourth time period and a limitation item limiting a fifth time period, wherein the fourth time period is an intersection of the third time period and the time period limited by the limitation item, and the fifth time period is a difference set of the third time period and the time period limited by the limitation item;
and deleting the information of the second user in the restriction item restricting the fourth time period.
Optionally, the execution unit is specifically configured to:
if the restriction item for restricting the fourth time period does not contain any user information, deleting the restriction item for restricting the fourth time period;
setting a restriction flag of the directory entry index whose indicated time period is within the fourth time period to not restrict access.
In a third aspect, an apparatus for reading a video file is provided, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the first aspect.
In a fourth aspect, a computer storage medium is provided,
the computer storage medium stores computer instructions which, when executed on a computer, cause the computer to perform the method of the first aspect.
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 only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present invention;
FIG. 2 is a schematic diagram of a video storage structure according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a structure of a constraint file according to an embodiment of the present invention;
FIG. 4 is a flow chart illustrating adding a constraint term according to an embodiment of the present invention;
FIG. 5 is a flow chart illustrating a modification restriction item according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating search for a restricted term with an intersection according to an embodiment of the present invention;
FIG. 7 is a flow chart illustrating another modification restriction item according to an embodiment of the present invention;
FIG. 8 is a flowchart illustrating deletion of user information in a restricted item according to an embodiment of the present invention;
fig. 9 is a schematic flowchart of reading a video file according to an embodiment of the present invention;
fig. 10 is a schematic flowchart of determining a time period that can be read by a user according to an embodiment of the present invention;
FIG. 11 is a diagram illustrating a time period that can be read by a user according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of an apparatus for reading a video file according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of an apparatus for reading a video file according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in this document generally indicates that the preceding and following related objects are in an "or" relationship unless otherwise specified.
The technical background of the embodiments of the present invention is described below.
In the practical process, in order to prevent anyone from being able to view the shot video, security measures are usually set in the monitoring system. For example, a user needs to log in a monitoring system through an account to verify whether the account has a right or not when the user wants to check a video, the check is allowed if the user has the right, and the check is prohibited if the user does not have the right. In the prior art, the authority is only roughly divided according to the channel, that is, the video of a specific channel can be checked by a specific account, so that the authority management of the video file is not precise at present, and the authority of the video file cannot be accurately controlled.
In view of this, an embodiment of the present invention provides a method for reading a video file, where in the method, when a user wants to read a video file for a period of time, the video file that can be read by the user within the period of time is determined, and then only the video file that can be read by the user is output, so that the video file can be subjected to authority management according to the period of time, that is, a function that the video file in a specific period of time only allows a specific user to read the video file can be realized, and accuracy of authority management of the video file is improved.
Some simple descriptions are given below to application scenarios to which the technical solution of the embodiment of the present invention can be applied, and it should be noted that the application scenarios described below are only used for describing the embodiment of the present invention and are not limited. In the specific implementation process, the technical scheme provided by the embodiment of the invention can be flexibly applied according to actual needs.
Referring to fig. 1, the application scenario to which the technical solution in the embodiment of the present invention is applicable is shown, and in the scenario, the application scenario may include an image capturing apparatus 101, a server 102, a user apparatus 103, and a monitoring wall 104.
The camera 101 is installed in each public place, such as a mall, an intersection or a community, and shoots videos of the public place and transmits the videos to the server 102, and the server 102 stores the videos sent by the camera 101 and transmits the videos to the user equipment 103 or the monitoring wall 104 for viewing when the user equipment 103 or the monitoring wall 104 requests viewing. The user equipment 103 may be a mobile phone or a Personal Computer (PC), and a client may be installed in the user equipment 103, and the user may view the video stored in the server 102 through the client. In addition, the server 102 and the monitoring wall 104 may be the same device in practical applications, for example, the monitoring wall 104 may also receive and play the video transmitted by the image pickup device 101 in real time, and may store the video shot by the image pickup device 101 for subsequent playback.
Wherein, the above devices can communicate with each other through a network. The Network may be a wired Network or a Wireless Network, the Wireless Network may be, for example, a mobile cellular Network or a Wireless Local Area Network (WLAN), and of course, the Network may also be any other Network capable of performing communication, which is not limited in this embodiment of the present invention.
Before describing the technical solution of the embodiment of the present invention, a storage structure of the embodiment of the present invention is first introduced.
Fig. 2 is a schematic diagram of a video storage structure.
When storing the video, the method is divided into directory entry indexes and video files. The directory entry index is used to point to a video file for a period of time to assist in fast positioning of the video file, and may include a directory entry index header and a plurality of directory entries, such as directory entry 1 and directory entry 2 shown in fig. 2. Each directory entry further includes a start time, an end time, a file offset position, a file length, and a limit flag, where the start time and the end time are a start point and an end point of a time period of the video file pointed by the directory entry, the file offset position is used to indicate a position of the video file pointed by the directory entry, the file length is used to represent a size of the video file pointed by the directory entry, the limit flag is used to indicate whether the video file pointed by the directory entry is access-limited, the limit flag may be 0 or 1, for example, when the limit flag is 0, access is not limited, when the limit flag is 1, access is limited.
The video file may include a video file header, a key (I) frame index, and video data, where the I frame index is used to indicate a position of an I frame in the video file, and the I frame index may specifically include a plurality of I frame offset positions and a plurality of I frame times, such as I frame offset position 1 and I frame offset position 2 shown in fig. 2, and I frame time 1 and I frame time 2. The I frame offset position 1 is used for indicating the position of the first I frame, and the I frame time 1 is the time for recording the first I frame.
Please refer to fig. 3, which is a schematic diagram illustrating a structure of a constraint file.
Since the embodiment of the present invention may support that a specific user can only view a video in a specific time period, a description of specific limitation content is required, and therefore, a limitation file is added in the embodiment of the present invention. Specifically, in order to prevent interference between different channels in the restriction file in time, each channel may have its own corresponding restriction file.
Specifically, the restriction file may include a video recording restriction file header and a plurality of restriction items, and each restriction item includes information of a user who can access the video recording file for a time period restricted by the restriction item. Each restriction item may specifically include a start time, an end time, and user information, where the start time and the end time are a start point and an end point of a time period of the video file restricted by the restriction item, the user information is information of a user who can access the video file between the start time and the end time, and the user information may include information of one or more users. The user information may specifically include information such as a user name, an Identity (ID) of the user, and user rights. The user information included in each restriction item may set an upper limit, for example, information of at most 10 users may be stored in each restriction item.
To further illustrate the technical solutions provided by the embodiments of the present invention, the following detailed description is made with reference to the accompanying drawings and the specific embodiments.
The embodiment of the invention provides a method for reading a video file, which can comprise a limiting item adding and deleting process and a video file searching and reading process. Please refer to fig. 4, which is a flow chart illustrating the addition of the restriction term. In the embodiment of the present invention, each video channel has a corresponding restriction file, and in an actual operation, a user usually selects one video channel to perform a corresponding operation, so the restriction file of one channel is taken as an example in the embodiment of the present invention for description, which will not be described again in the following.
Step 401: an add request is received.
In the embodiment of the present invention, when access to the video files in the time period needs to be limited, a user may operate in the monitoring wall as shown in fig. 1, or operate in a client installed on user equipment, both of these two ways may provide an operable operation interface for the user, the user may input, in the operation interface, the second time period that needs to be limited and information of at least one user that can access the video files in the second time period, and further generate an addition request according to the information input by the user, where the addition request is used to request to add a limitation item that allows the at least one user to access the video files in the second time period.
Step 402: it is determined whether there is a directory entry index matching the second period of time among all the stored directory entry indexes.
In the embodiment of the present invention, when a video file is limited, a limit flag in a directory entry index corresponding to the video file needs to be set to limit access, so that it is necessary to determine whether a directory entry index matching a second time period exists in all stored directory entry indexes, in other words, it is necessary to determine which directory entry indexes need to be set.
Specifically, because each directory entry index includes the time period information of the video file pointed by the directory entry index, i.e., the start time and the end time shown in fig. 2, the directory entry index having an intersection with the second time period in terms of time can be determined from all directory entry indexes according to the time period information included in each directory entry index.
For example, if a video file is stored as a video file every 1 hour, a directory entry index is generated every 1 hour, for example, three directory entry indexes of the stored directory entry indexes are a first directory entry index, a second directory entry index and a third directory entry index, sequentially indicated time periods are 0:00 to 1:00, 1:00 to 2:00 and 2:00 to 3:00 respectively, and a second time period input by a user is 1:00 to 3:00, then the directory entry indexes having an intersection with the second time period in time are the second directory entry index and the third directory entry index; or, the second time period input by the user is 2:30 to 3:00, the directory entry index that intersects with the second time period in time is the third directory entry index.
Step 403: if the determination of step 402 is yes, then the restricted flag of the directory entry index matching the second time period is set to restrict access.
In the embodiment of the present invention, if directory entry indexes having intersection with the second time period in time have been found from all directory entry indexes, the restriction flag of the directory entry indexes may be set to restrict access, so that the video files pointed by the directory entry indexes are restricted from access. Specifically, the restriction flag of the directory entry index is set to restrict access, and specifically, the restriction flag may be set to 1.
Following the above example, if it is determined that the directory entry index that intersects with the second time period in terms of time includes the second directory entry index and the third directory entry index, the restriction flags of the second directory entry index and the third directory entry index are both set to 1, or if it is determined that the directory entry index that intersects with the second time period in terms of time is the third directory entry index, the restriction flags of the third directory entry index are both set to 1.
Step 404: a new restriction item is generated based on the addition request and stored in the restriction file.
In the embodiment of the present invention, when the restriction flag in the index of a directory entry is 1, it can only describe that there is a restricted time period in the time period information included in the directory entry, and does not indicate that all time periods in the time period information included in the directory entry are restricted, so in order to be able to distinguish which specific time periods are restricted from being accessed, it is further necessary to specifically describe by using the restriction entry in the restriction file. Step 404 and step 403 are not in a substantial order, and may be executed simultaneously, or step 404 may be executed before step 403, which is not limited in the embodiment of the present invention.
After determining the index of the directory entry that is temporally intersected with the second time period, a new restriction entry may be generated based on the intersection with the second time period and the information included in the add request. For example, the second time period is 2:00 to 4:00, the information of at least one user includes the information of user 1, and the intersection with the second time period is determined to be 2:00 to 3:00, then the start time included in the newly generated restriction item is 2:00, the end time is 3:00, and the user information is the information of user 1. In addition, whether the limit items which are the same as the time period that the limit items want to limit and the number of users does not reach the upper limit exist in the stored limit items can be searched, if yes, the information of the user 1 can be added to the searched limit item, and a new limit item does not need to be generated.
In the embodiment of the present invention, after the new restriction item is generated, the new restriction item may be stored in the restriction file, where the restriction items in the restriction file may be stored sequentially according to the generation time, or may be stored sequentially according to the start time of the restriction time period.
Step 405: if the determination result in step 402 is negative, the process ends.
In the embodiment of the present invention, after the restriction item is added, if it is desired to cancel the access restriction on the video for a period of time or cancel the access right item of a certain user, the content in the restriction item may also be modified, and a modification flow of the restriction item will be described below. Please refer to fig. 5, which is a flow chart illustrating a modification of the constraint term.
In the embodiment of the present invention, when it is desired to cancel access restriction on a video recording for a period of time or cancel an access right item of a certain user in a certain period of time, the user may also perform an operation in the monitoring wall as shown in fig. 1, or perform an operation in a client installed on user equipment, where information input by the user may include the following two cases:
(1) information of the third time period, and correspondingly, a cancellation request generated according to the input information is used for requesting to cancel the access restriction of the third time period;
(2) and correspondingly, a cancellation request generated according to the input information is used for requesting to cancel the authority of the second user for accessing the video file in the third time period.
The flow of modifying the restriction item will be described below for different cases, and the flow of modifying the restriction item for the above-described case 1 will be described first.
Step 501: a cancel request is received.
The cancellation request referred to herein includes only the information of the third time period, i.e., the cancellation request is for requesting cancellation of the access restriction to the third time period.
Step 502: it is determined whether a restriction item that intersects in time with the third time period is included in the restriction file.
In this embodiment of the present invention, after receiving the cancel request, it may be searched for whether there is a restriction item that intersects with the third time period in terms of time in the stored restriction file.
For example, please refer to fig. 6, where two restriction items in the restriction file are restriction item 1 and restriction item 2, a time period of restriction item 1 is 1: 00-3: 00, and a time period of restriction item 2 is 2: 00-4: 00, where a third time period carried in the cancellation request is 2: 00-4: 00, it may be determined that both restriction item 1 and restriction item 2 intersect with the third time period in terms of time.
Step 503: if the determination result in step 502 is yes, the access restriction of the video file intersecting the third time slot is cancelled.
In the embodiment of the present invention, after determining that the video file includes the restriction item intersecting with the third time period, that is, the video file corresponding to the time period of the intersection portion is restricted from being accessed, the access restriction on the video file intersecting with the third time period may be cancelled.
Specifically, following the example shown in fig. 6, for the restriction item 1, since the time period of the restriction is partially overlapped with the third time period in terms of time, that is, a time period of 2:00 to 3:00, the restriction item 1 may be split into two restriction items, that is, the restriction item with the time period of 1:00 to 2:00 and the restriction item with the time period of 2:00 to 3:00, and the restriction item with the time period of 2:00 to 3:00 is deleted, and the restriction item with the time period of 1:00 to 2:00 is continuously retained. For the restriction item 2, the time period of the restriction completely coincides in time with the third time period, then the restriction item 2 can be deleted directly.
In the embodiment of the present invention, for the deleted restriction item, it is further required to determine whether there is a directory item index whose indicated time period is within the time period limited by the deleted restriction item, if so, because the access restriction has been completely cancelled for the video files within the time period indicated by the directory item index, the restriction flag of the directory item index needs to be set to 0, and the directory item index whose remaining indicated time period is not completely within the third time period does not need to be operated.
Step 504: if the determination result in step 502 is negative, the process ends.
Referring to fig. 7, the flow of modifying the restriction item in the above case 2 will be described.
Step 701: a cancel request is received.
The cancel request includes information of the third time period and information of the second user, that is, the cancel request is used to request to cancel the right of the second user to access the video recording file of the third time period.
Step 702: it is determined whether a restriction item that intersects in time with the third time period is included in the restriction file.
Step 702 is the same as the process executed in step 502, so that reference may be made to the description of step 502 for this part, which is not described herein again.
Step 703: if the determination result in step 702 is yes, it is determined whether a restriction item including information of the second user exists in the restriction items intersecting with the third time period.
In the embodiment of the present invention, if the cancellation request further includes the information of the second user, that is, only the right of the second user in the third time period needs to be cancelled, and the rights of other users except the second user do not need to be cancelled, it is further determined whether a restriction item including the information of the second user exists in a restriction item intersecting with the third time period, and then only the restriction item including the information of the second user needs to be operated.
Following the example shown in fig. 6, after determining that the restriction item 1 and the restriction item 2 are obtained, it is further determined whether the restriction item 1 and the restriction item 2 include information of the second user, and if the restriction item 1 and the restriction item 2 both include information of the second user, it is finally determined that the restriction item 1 and the restriction item 2 are obtained.
Step 704: and if the determination result in the step 703 is yes, deleting the information of the second user in the restriction item according to the information of the third time period.
In the embodiment of the invention, as only the authority of the second user needs to be cancelled, only the information of the second user in the determined restriction item needs to be deleted.
Specifically, please refer to fig. 8, deleting the information of the second user in the restriction items according to the information of the third time period may include the following steps, which are specifically described below by taking one of the restriction items as an example.
Step 7041: it is determined whether the third time period includes all the time periods limited by the limitation item.
Step 7042: if the determination result in the step 7041 is negative, the limitation item is split into a limitation item limiting a fourth time period and a limitation item limiting a fifth time period, where the fourth time period is an intersection of the third time period and a time period limited by the limitation item, and the fifth time period is a difference set between the third time period and the time period limited by the limitation item.
For a restriction item, if the time period limited by the restriction item is not all located in the third time period, that is, the limited time period partially coincides with the third time period, the second user still needs the ownership item for the non-coinciding part, and the coinciding part needs to delete the right of the second user, the restriction item needs to be split into a restriction item limiting a fourth time period and a restriction item limiting a fifth time period, where the fourth time period is an intersection of the third time period and the time period limited by the restriction item, and the fifth time period is a difference set of the third time period and the time period limited by the restriction item.
Continuing with the above, what results is an example of constraint term 1 and constraint term 2. For the restriction item 1, since the time period of the restriction item partially overlaps with the third time period in terms of time, namely, the time period of 2: 00-3: 00, and the right item of the second user in the time period of 1: 00-2: 00 is not cancelled, in order to keep the right item of the second user in the time period of 1: 00-2: 00, the restriction item 1 may be split into the restriction item with the restriction time period of 1: 00-2: 00 and the restriction item with the restriction time period of 2: 00-3: 00. For constraint item 2, the time period of its constraint completely coincides in time with the third time period, then no splitting is required.
Step 7043: and deleting the information of the second user in the restriction item restricting the fourth time period.
For example, in the restriction item 1, for the restriction item after splitting, the information of the second user in the restriction item with the restriction time period of 2: 00-3: 00 is deleted, and for the restriction item with the restriction time period of 1: 00-2: 00, no operation is required.
Step 7044: if the determination of step 7041 is yes, then the information of the second user in the restriction item is deleted.
For a restriction item, if the time period restricted by the restriction item is all located in the third time period, that is, the restricted time period completely coincides with the third time period, only the information of the second user in the restriction item needs to be deleted. For example, the restriction item 2 shown in fig. 6, the time period of the restriction completely coincides with the third time period in time, and then the information of the second user in the restriction item 2 may be deleted directly.
Step 705: and after the information of the second user is determined to be deleted, whether the information of other users is included in the determined restriction item is determined.
In the embodiment of the present invention, if the information of the second user in the restriction item is deleted, and if the restriction item does not include any user information, the video file restricted by the restriction item is not accessible by anyone, which is obviously not reasonable, and therefore, after the information of the second user in the restriction item is deleted, it may be determined whether each restriction item obtained by the above determination further includes information of other users.
For example, after deleting the information of the second user in the restriction item with the restriction time period of 2: 00-3: 00, determining whether the information of other users is included in the restriction item with the restriction time period of 2: 00-3: 00; or, after deleting the information of the second user in the restriction item 2, determining whether the information of other users is included in the restriction item 2.
Step 706: if the determination of step 705 is negative, the restriction item that does not include any user information is deleted.
For the restriction item which does not include any user information, the restriction item can be deleted to avoid the situation that the video file restricted by the restriction item is not accessible to anyone.
Step 707: it is determined whether there is a directory entry index indicating a time period within the time period limited by the deleted restriction entry.
Step 708: if the determination of step 707 is yes, the restriction flag of the directory entry index whose indicated time period is within the time period restricted by the deleted restriction entry is set to not restrict access.
In the embodiment of the present invention, for a deleted restriction item, it is further required to determine whether there is a directory item index whose indicated time period is within the time period limited by the deleted restriction item, if so, because the access restriction has been completely cancelled for the video files within the time period indicated by the directory item index, it is required to set the restriction flag of the directory item index to be access-unrestricted, that is, the value of the restriction flag is set to 0, and the directory item index whose remaining indicated time period is not completely within the third time period does not need to be operated.
Step 709: if the determination result of step 702 is no, or the determination result of step 703 is no, or the determination result of step 705 is yes, or the determination result of step 707 is no, the flow ends.
In the embodiment of the present invention, after the permission setting, in the process of reading the video file, the permission setting may be applied to the permission, please refer to fig. 9, which is a schematic flow diagram of reading the video file.
Step 901: and receiving a video file reading request.
In the embodiment of the present invention, when a user wants to read a video file for a period of time, the user may also operate in a monitoring wall as shown in fig. 1, or operate in a client installed on user equipment, because the user is operating and usually logs in an account of his or her own or other person authorized to log in, the user only needs to input a first period of the video file that the user wants to read, and then a video file reading request may be generated based on information input by the user, where the video file reading request indicates that the first user requests to read the video file for the first period of time, and the first user refers to an account that the user logs in when the first period of time is input.
Step 902: searching all stored directory entry indexes for a directory entry index having an intersection with the first time period in time.
In the embodiment of the invention, when the video is stored, in order to conveniently search the video file, the video file in the time period which is desired to be checked can be found by searching the directory entry indexes, so that the directory entry indexes which have intersection with the first time period in terms of time can be searched in all the stored directory entry indexes. Specifically, each directory entry index includes time period information of the video file pointed by the directory entry index, that is, the start time and the end time shown in fig. 2, so that a directory entry index having an intersection with the first time period in time can be determined from all directory entry indexes according to the time period information included in each directory entry index.
For example, if a video file is stored as a video file every 1 hour, a directory entry index is generated every 1 hour, for example, three directory entry indexes of the stored directory entry indexes are a first directory entry index, a second directory entry index and a third directory entry index, sequentially indicated time periods are 0:00 to 1:00, 1:00 to 2:00 and 2:00 to 3:00 respectively, and a first time period input by a user is 1:00 to 3:00, then the directory entry indexes having an intersection with the first time period in time are the second directory entry index and the third directory entry index; or, the first time period of the user input is 2:30 to 3:00, the directory entry index having an intersection with the first time period in time is the third directory entry index.
Step 903: the time period that the first user can read in the first time period is determined according to the limit flag included in the directory entry index.
Because the access of the video files in some time periods is limited, and the access of the video files in some time periods may not be limited, when a user wants to read the video files, it is necessary to determine whether the access of the video files that the user wants to read is limited, so that whether the user needs to determine whether the user has the right to read the video files in the following process or not can be known. As shown in the storage structure diagram of fig. 2, each directory entry index includes a restriction flag, and then it may be determined whether the video file corresponding to the searched directory entry index is restricted according to the restriction flag, so as to determine an actual time period that can be read by the first user from the first time period.
Specifically, referring to fig. 10, determining a time period that can be read by the first user in the first time period according to the limit flag included in the directory entry index may specifically include the following steps:
step 9031: and determining the limited mark as the index of the directory entry with limited access from the index of the directory entry.
In the embodiment of the present invention, it is necessary to know which video files corresponding to directory entry indexes in the searched directory entry indexes intersected with the first time period are restricted from being accessed, and therefore, according to the restriction flag included in the directory entry indexes, the directory entry index whose restriction flag is restricted from being accessed, that is, the directory entry index whose restriction flag is 1, is determined from the directory entry indexes.
Of course, in the searched directory entry index intersecting with the first time period, if the restriction flag of some directory entry indexes is 0, that is, access is not restricted, the video file corresponding to the directory entry index may be directly determined as the video file accessible by the first user.
Step 9032: and searching at least one restriction item which has intersection with the time period indicated by the determined directory item index in time from the restriction file.
In the embodiment of the present invention, the restriction item includes information of the restricted time period and information of a user who can access the video file of the time period, and in order to know the time period that the first user can access, it is necessary to find a corresponding restriction item from the restriction file, and then determine whether the restriction item includes the information of the first user.
Specifically, after the directory entry index intersecting with the first time period is obtained by searching and the directory entry index with the limitation flag of 1 is obtained by screening, one or more limitation entries intersecting with the time period information may be searched from the limitation file according to the time period information of the video file pointed by the directory entry indexes.
For example, for the directory entry indexes with the limitation flag of 1 obtained by screening, if the time period information included in one directory entry index is 2: 00-4: 00, then a limitation entry intersecting with the time period of 2: 00-4: 00 needs to be searched from the limitation file, for example, two limitation entries with an intersection threshold are found in the limitation file, which are a limitation entry limiting the time period of 2: 30-3: 00 and a limitation entry limiting the time period of 3: 00-4: 00, respectively, then it can be seen that the time period of 2: 00-2: 30 is substantially without any limitation entry, the video files in the time period of 2: 00-2: 30 are not limited to be accessed, the video files in the time period of 2: 00-2: 30 are video files that can be read by the first user, and for the time period of 2: 30-4: 00, it is necessary to specifically determine whether or not the information of the first user is included therein according to the restriction item.
Step 9033: and determining the intersection of the time period indicated by the restriction item including the information of the first user in the at least one restriction item and the first time period as the time period which can be read by the first user.
In the embodiment of the invention, according to the restriction item, if the restriction item includes the user information, the user can access the video file in the time period limited by the restriction item, otherwise, the user can access the video file in the time period limited by the restriction item. Therefore, after the at least one restriction item is searched, the restriction items including the information of the first user can be filtered out, and the intersection between the time period indicated by the restriction items and the first time period is determined as the time period which can be read by the first user.
In the embodiment of the present invention, the time period that can be read by the first user may substantially include the following three parts:
(1) searching the directory entry index which has intersection with the first time period, wherein the limit mark of the directory entry index is 0, and the intersection of the first time period and the directory entry index is the time period which can be read by the first user;
(2) searching a directory entry index which has intersection with the first time period, wherein the limitation flag of the directory entry index is 1, but the limitation entry which has intersection with the time period indicated by the directory entry index does not limit the whole time period of the directory entry index, so that the unlimited time period in the directory entry index is also the time period which can be read by the first user;
(3) and searching a directory entry index which has an intersection with the first time period, wherein the limit sign of the directory entry index is 1, finding a limit entry which has an intersection with the time period indicated by the directory entry index, and the limit entry comprises the information of the first user, so that the intersection of the first time period and the limit entry in time is also a time period which can be read by the first user.
Illustratively, referring to fig. 11, the first time period carried in the video file reading request is 1:00 to 3:30, three directory entry indexes that intersect with the first time period in time are found in the stored directory entry indexes, namely directory entry index 1 to directory entry index 3, where there is a partial intersection between directory entry index 3 and the first time period, namely 3:00 to 3:30 shown in fig. 11, and the restriction flag of directory entry index 3 is 0, then the time period of 3:00 to 3:30 is not restricted from access, and this time period is a time period that can be read by the first user and corresponds to the first part.
The time period information included in the directory entry index 1 and the directory entry index 2 is completely located in the first time period, and the limit flags of the directory entry index 1 and the directory entry index 2 are 1, so for the directory entry index 1 and the directory entry index 2, the corresponding limit entries need to be queried to further determine the time period that the first user can read. Then further, one restriction entry intersecting directory entry index 1 and directory entry index 2, i.e., the restriction entry with the restriction time period of 1:30 ~ 3:00 shown in fig. 11, is found in the restriction file. The partial time period of the directory entry index 1 is within the time period limited by the limitation entry, namely, 1: 30-2: 00, and since the partial time period is not within the time period limited by the limitation entry, namely, the partial time period is not limited to access, the partial time period is also a time period which can be read by the first user and corresponds to the second part.
If the determination result is yes, the whole time period of the directory entry index 2 is a time period which can be read by the first user and corresponds to the third part; if the determination result is negative, the first user is not readable for the whole time period of the directory entry index 2.
Step 904: according to the time period which can be read by the first user, determining a starting I frame and an ending I frame from the video file, and determining the video file between the starting I frame and the ending I frame as the video file which can be read by the first user.
Based on the time period that can be read by the user, the time period may include one or more time periods, and the start I frame and the end I frame in the video file may be found according to the start time and the end time of each time period, so that the video file between the start I frame and the end I frame is determined as the video file that can be read by the first user. For example, if the time period that the user can read is 2:00 to 3:00, the I frame corresponding to 2:00 may be searched in the video file and determined as the starting I frame and the I frame corresponding to 3:00 may be determined as the ending I frame, and then the video file between the I frame corresponding to 2:00 and the I frame corresponding to 3:00 is the video file that the first user can read.
Step 905: and outputting the video file which can be read by the first user.
In the embodiment of the present invention, the video file that can be read by the first user may be output through the monitoring wall shown in fig. 1 or the user device of the user. Specifically, one output mode is to play the video file that can be read by the first user on the monitoring wall or the user equipment of the user, so that the user can check the video file, and the other output mode is to display the information of the video file that can be read by the user on the monitoring wall or the user equipment of the user, so that the user can know the video file that can be checked in the first time period, and certainly, the user can also operate the information of the displayed video file to play the video file.
In summary, in the embodiment of the present invention, when a user wants to read a video file for a period of time, the video file that can be read by the user in the period of time is determined, and then only the video file that can be read by the user is output, so that the video file can be subjected to rights management according to the period of time, that is, a function that the video file in a specific period of time only allows a specific user to read the video file can be realized, and the accuracy of rights management of the video file is improved.
Referring to fig. 12, based on the same inventive concept, an embodiment of the present invention provides an apparatus for reading a video file, including:
a receiving unit 1201, configured to receive a video file reading request carrying information of a first time period, where the video file reading request is used to indicate a first user to request to read a video file of the first time period;
a searching unit 1202, configured to search all directory entry indexes stored for a directory entry index having an intersection with the first time period in terms of time, where the directory entry index includes a restriction flag indicating whether the video file is restricted from being accessed;
a determining unit 1203, configured to determine, according to a restriction flag included in the directory entry index, a time period that can be read by a first user in a first time period;
an execution unit 1204 is configured to output, based on the determination result, a video recording file of a time period that can be read by the first user.
Optionally, the determining unit 1203 is specifically configured to:
determining a directory entry index of which the access is limited by the limitation mark indicating the video file from the directory entry index;
searching at least one restriction item which is intersected with the time period indicated by the determined directory item index in time from the restriction file, wherein the restriction item comprises information of the time period of the restricted video file and information of the accessible users;
the time period that the first user can read is determined according to the at least one restriction item.
Optionally, the determining unit 1203 is specifically configured to:
and determining the intersection of the time period indicated by the restriction item including the information of the first user in the at least one restriction item and the first time period as the time period which can be read by the first user.
Optionally, the determining unit 1203 is further specifically configured to:
for one of the time periods in the intersection with the first time period, performing the following operations:
determining a starting key I frame according to the starting time of one of the time periods, and determining an ending I frame according to the ending time of one of the time periods;
and determining the video file between the starting I frame and the ending I frame as the video file which can be read by the first user.
Alternatively to this, the first and second parts may,
the receiving unit 1201 is further configured to receive an addition request carrying information of a second time period, where the addition request is used to request to add a restriction item allowing at least one user to access the video file of the second time period;
a determining unit 1203, further configured to determine whether there is a directory entry index matching the second time period in all stored directory entry indexes; and when the determination result is yes, setting a limit flag of the directory entry index matched with the second time period as access limit;
the execution unit 1204 is further configured to generate a new restriction item based on the addition request, and store the new restriction item in the video recording restriction file.
Alternatively to this, the first and second parts may,
the receiving unit 1201 is further configured to receive a cancellation request carrying information of a third time period, where the cancellation request is used to request to cancel access restriction on the third time period;
a determining unit 1203, configured to determine whether a restriction item intersecting with the third time period in terms of time is included in the restriction file;
the execution unit 1204 is further configured to cancel, if the determination result is yes, the access restriction on the video files corresponding to the intersection in the restriction item.
Alternatively to this, the first and second parts may,
the receiving unit 1201 is further configured to receive a cancel request carrying information of a third time period and information of a second user, where the cancel request is used to request to cancel an authority of the second user to access the video file of the third time period;
a determining unit 1203, configured to determine whether a restriction item that is intersected with the third time period in terms of time and contains information of the second user is included in the restriction file;
the execution unit 1204 is further configured to delete the information of the second user in the restriction item according to the information of the third time period when the determination result is yes.
Optionally, the execution unit 1204 is specifically configured to:
determining, for each of the restriction items, whether the third time period includes all of the time periods restricted by the restriction item;
if the determination result is negative, splitting the limitation item into a limitation item limiting a fourth time period and a limitation item limiting a fifth time period, wherein the fourth time period is an intersection of the third time period and the time period limited by the limitation item, and the fifth time period is a difference set of the third time period and the time period limited by the limitation item;
and deleting the information of the second user in the restriction item restricting the fourth time period.
Optionally, the execution unit 1204 is specifically configured to:
if the restriction item for restricting the fourth time period is determined not to include any user information, deleting the restriction item for restricting the fourth time period;
and setting the limit flag of the index of the directory entry with the indicated time period located in the fourth time period as access unlimited.
The apparatus for reading a video file shown in fig. 12 may be configured to execute the method provided in the embodiment shown in fig. 4 to 11, and therefore, for functions and the like that can be realized by each functional module of the device, reference may be made to the description of the embodiment shown in fig. 4 to 11, which is not repeated.
Referring to fig. 13, based on the same inventive concept, an embodiment of the present invention provides an apparatus for reading a video file, which may include a memory 1301 and a processor 1302.
The memory 1301 is used for storing computer programs executed by the processor 1302. The memory 1301 may mainly include a storage program area and a storage data area, where the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created from use of the apparatus that reads the video file, and the like. The processor 1302 may be a Central Processing Unit (CPU), a digital processing unit, or the like. The specific connection medium between the memory 1301 and the processor 1302 is not limited in the embodiments of the present invention. In fig. 13, the memory 1301 and the processor 1302 are connected through a bus 1303, the bus 1303 is shown by a thick line in fig. 13, and the connection manner between other components is only schematically illustrated and is not limited. The bus 1303 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 13, but this is not intended to represent only one bus or type of bus.
The memory 1301 may be a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 1301 may also be a non-volatile memory (non-volatile memory) such as, but not limited to, a read-only memory (rom), a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD), or the memory 1301 may be any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Memory 1301 may be a combination of the above.
A processor 1302, configured to execute the method for reading the video file according to the embodiments shown in fig. 4 to fig. 11 when calling the computer program stored in the memory 1301.
The embodiment of the invention also provides a computer storage medium, which stores computer-executable instructions required to be executed by the processor, and comprises a program required to be executed by the processor.
In some possible embodiments, aspects of the method for reading a video file provided by the present invention may also be implemented in the form of a program product, which includes program code for causing a computer device to execute the steps in the method for reading a video file according to various exemplary embodiments of the present invention described above in this specification when the program product runs on the computer device, for example, the computer device may execute the method for reading a video file provided by the embodiments shown in fig. 4 to fig. 11.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product of the method for reading a video file of an embodiment of the present invention may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a computing device. However, the program product of the present invention is not limited in this regard and, in the present document, a 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.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a 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 readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects 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, C + + or the like 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 computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device over any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., over the internet using an internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more of the units described above may be embodied in one unit, according to embodiments of the invention. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
Moreover, while the operations of the method of the invention are depicted in the drawings in a particular order, this does not require or imply that the operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (12)

1. A method for reading a video file, the method comprising:
receiving a video file reading request carrying information of a first time period, wherein the video file reading request is used for indicating a first user to request to read a video file of the first time period;
searching all stored directory entry indexes for a directory entry index having an intersection with the first time period in terms of time, wherein the directory entry index comprises a limit mark for indicating whether the video files are limited to be accessed or not;
determining a time period which can be read by the first user in the first time period according to a limit mark included in the directory entry index;
and outputting the video files of the time periods which can be read by the first user based on the determination result.
2. The method of claim 1, wherein determining a time period during which the first user can read during the first time period based on a restriction flag included in the directory entry index comprises:
determining a directory entry index of which the access is limited by the limitation mark indicating the video file from the directory entry index;
searching at least one restriction item which is intersected with the time period indicated by the determined directory item index in time from the restriction file, wherein the restriction item comprises information of the time period of the restricted video file and information of the accessible users;
determining a time period that the first user can read according to the at least one restriction item.
3. The method of claim 2, wherein said determining a period of time that the first user can read based on the at least one restriction item comprises:
determining an intersection of a time period indicated by the restriction item including the information of the first user in the at least one restriction item and the first time period as a time period which can be read by the first user.
4. The method of claim 3, wherein after determining an intersection between a time period indicated by the restriction item including information of the first user in the at least one restriction item and the first time period as a time period readable by the first user, the method further comprises:
for one of the time periods in the intersection with the first time period, performing the following operations:
determining a starting key I frame according to the starting time of the one time period, and determining an ending I frame according to the ending time of the one time period;
and determining the video file between the starting I frame and the ending I frame as the video file which can be read by the first user.
5. The method of claim 1, wherein the method further comprises:
receiving an adding request carrying information of a second time period, wherein the adding request is used for requesting to add a restriction item allowing at least one user to access the video files of the second time period;
determining whether a directory entry index matching the second time period exists in all stored directory entry indexes;
if the determination result is yes, setting a limit flag of the index of the directory entry matched with the second time period as access limit;
and generating a new limiting item based on the adding request, and storing the new limiting item in a video recording limiting file.
6. The method of claim 1, wherein the method further comprises:
receiving a cancellation request carrying information of a third time period, wherein the cancellation request is used for requesting to cancel access restriction of the third time period;
determining whether a restriction item intersecting with the third time period in time is included in a restriction file;
and if so, canceling the access limitation to the video files corresponding to the intersection in the limitation items.
7. The method of claim 1, wherein the method further comprises:
receiving a cancellation request carrying information of a third time period and information of a second user, wherein the cancellation request is used for requesting to cancel the permission of the second user for accessing the video file of the third time period;
determining whether a restriction item which is intersected with the third time period in time and contains information of the second user is included in a restriction file;
and if so, deleting the information of the second user in the restriction item according to the information of the third time period.
8. The method of claim 7, wherein deleting the information of the second user in the restriction item according to the information of the third time period comprises:
determining, for each of the restriction items, whether the third time period includes all of the time periods restricted by the restriction item;
if the determination result is negative, splitting the limitation item into a limitation item limiting a fourth time period and a limitation item limiting a fifth time period, wherein the fourth time period is an intersection of the third time period and the time period limited by the limitation item, and the fifth time period is a difference set of the third time period and the time period limited by the limitation item;
and deleting the information of the second user in the restriction item restricting the fourth time period.
9. The method of claim 8, wherein after deleting the information of the second user in the restriction item restricting the fourth period of time, the method further comprises:
if the restriction item for restricting the fourth time period does not contain any user information, deleting the restriction item for restricting the fourth time period;
setting a restriction flag of the directory entry index whose indicated time period is within the fourth time period to not restrict access.
10. An apparatus for reading a video file, the apparatus comprising:
the device comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a video file reading request carrying information of a first time period, and the video file reading request is used for indicating a first user to request to read a video file of the first time period;
the searching unit is used for searching all directory entry indexes which are stored for directory entry indexes which have intersection with the first time period in terms of time, wherein the directory entry indexes comprise limiting marks used for indicating whether video files are limited to be accessed or not;
a determining unit, configured to determine, according to a restriction flag included in the directory entry index, a time period that can be read by the first user in the first time period;
and the execution unit is used for outputting the video files of the time period which can be read by the first user based on the determination result.
11. An apparatus for reading a video file, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 7.
12. A computer storage medium, characterized in that:
the computer storage medium stores computer instructions that, when executed on a computer, cause the computer to perform the method of any of claims 1-9.
CN201810896727.0A 2018-08-08 2018-08-08 Method, device and equipment for reading video file and computer storage medium Active CN109255038B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810896727.0A CN109255038B (en) 2018-08-08 2018-08-08 Method, device and equipment for reading video file and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810896727.0A CN109255038B (en) 2018-08-08 2018-08-08 Method, device and equipment for reading video file and computer storage medium

Publications (2)

Publication Number Publication Date
CN109255038A CN109255038A (en) 2019-01-22
CN109255038B true CN109255038B (en) 2021-02-02

Family

ID=65049181

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810896727.0A Active CN109255038B (en) 2018-08-08 2018-08-08 Method, device and equipment for reading video file and computer storage medium

Country Status (1)

Country Link
CN (1) CN109255038B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1893634A (en) * 2005-07-07 2007-01-10 汤姆森许可贸易公司 Controlling digital rights of the 'play n times' type for a digital audio and/or video content
CN104064203A (en) * 2014-06-26 2014-09-24 广东互维科技有限公司 Video retrieval positioning method
CN104572762A (en) * 2013-10-24 2015-04-29 杭州海康威视数字技术股份有限公司 Method and device for deleting and recovering video files
CN105262999A (en) * 2015-10-16 2016-01-20 山西晶科光电材料有限公司 Intelligent video analysis management system for sapphire production and method thereof
CN106777315A (en) * 2016-12-29 2017-05-31 杭州斯码特电子科技有限公司 One kind regards detection cable system
CN108174132A (en) * 2016-12-07 2018-06-15 杭州海康威视数字技术股份有限公司 The back method and device of video file

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8260789B2 (en) * 2010-04-01 2012-09-04 Microsoft Corporation System and method for authority value obtained by defining ranking functions related to weight and confidence value
CN104572764A (en) * 2013-10-26 2015-04-29 西安群丰电子信息科技有限公司 Multi-channel video data reading and writing method
CN103702053B (en) * 2014-01-16 2017-05-10 深圳英飞拓科技股份有限公司 Video storage and search method and system as well as monitoring system
CN104394380A (en) * 2014-12-09 2015-03-04 浙江省公众信息产业有限公司 Video monitoring management system and playback method of video monitoring record
CN105975513A (en) * 2016-04-27 2016-09-28 天脉聚源(北京)传媒科技有限公司 Method and apparatus for setting identifiers of video resources in batches
CN106330886B (en) * 2016-08-18 2020-05-26 浙江大华技术股份有限公司 Method and equipment for protecting video privacy in remote monitoring
US9646172B1 (en) * 2016-11-15 2017-05-09 Envieta Systems LLC Data storage system for securely storing data records
CN106791549A (en) * 2016-11-21 2017-05-31 建荣半导体(深圳)有限公司 A kind of videotape storage means, system and drive recorder

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1893634A (en) * 2005-07-07 2007-01-10 汤姆森许可贸易公司 Controlling digital rights of the 'play n times' type for a digital audio and/or video content
CN104572762A (en) * 2013-10-24 2015-04-29 杭州海康威视数字技术股份有限公司 Method and device for deleting and recovering video files
CN104064203A (en) * 2014-06-26 2014-09-24 广东互维科技有限公司 Video retrieval positioning method
CN105262999A (en) * 2015-10-16 2016-01-20 山西晶科光电材料有限公司 Intelligent video analysis management system for sapphire production and method thereof
CN108174132A (en) * 2016-12-07 2018-06-15 杭州海康威视数字技术股份有限公司 The back method and device of video file
CN106777315A (en) * 2016-12-29 2017-05-31 杭州斯码特电子科技有限公司 One kind regards detection cable system

Also Published As

Publication number Publication date
CN109255038A (en) 2019-01-22

Similar Documents

Publication Publication Date Title
KR101605156B1 (en) Device, method, and computer for providing file deleting service
US20180343110A1 (en) Method and System for Implementing Scaling and Distribution of Blockchains without Ledger Limitations
US9864736B2 (en) Information processing apparatus, control method, and recording medium
KR101802100B1 (en) Generating and providing an authorization indication in relation to a media content item
KR20090006167A (en) Permission-based document server
US8290152B2 (en) Management system for web service developer keys
CA2977025A1 (en) Automated integration of video evidence with data records
US10021050B2 (en) Secure conversation and document binder
US11063922B2 (en) Virtual content repository
US20190238320A1 (en) Citation and attribution management methods and systems
CA3045675A1 (en) System and method for decentralized digital structured data storage, management, and authentication using blockchain
US9626410B2 (en) Vertically partitioned databases
CA2857566C (en) Digital publication monitoring by geo-location
US9940476B2 (en) Selective exposure of document tags for search, access, and feed based on user groups
EP2846541A1 (en) Video monitoring system and method for reducing pan-tilt control delay
CN109635558B (en) Access control method, device and system
CN109255038B (en) Method, device and equipment for reading video file and computer storage medium
US9916459B2 (en) Photograph metadata encryption
JP6343983B2 (en) Virtual memory gate system
US10162488B1 (en) Browser-based media scan
US20180107809A1 (en) Video file attribution
US20170111344A1 (en) Mobile itinerant software agent carrying itinerary and data within
CN114386113A (en) Read-write control method, device and equipment for mobile storage equipment and storage medium
US11768923B2 (en) Media transactions consent management
CN113742663B (en) Watermark file acquisition method and device and electronic equipment

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