A Continuous Indexing Method and Device for Completing Missing Video Files
By establishing an index information table and generating a supplementary registration task request, the problem of missing video files when the network is unstable or the storage server is offline is solved, and continuous indexing and supplementary registration of video files is realized, improving the user experience.
Patent Information
- Application Number
- CN202310708598.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-15
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2043-06-15
AI Technical Summary
In the prior art, when the network is unstable or the storage server is offline, the video recording files are easily lost, resulting in discontinuous recording and complex re-recording process, which affects the user experience.
By establishing an index information table, extracting the index information of the recording file, determining the missing recording file, and generating a supplementary recording task request, using the video data of the target electronic device for supplementary recording, ensuring the continuity of the recording file and simplifying the operation process.
It realizes continuous indexing and supplementary recording of video files, improves user experience, ensures the integrity and continuity of video files, and simplifies the operation process.
Smart Images

Figure CN116842215B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of audio and video processing, and particularly to a continuous indexing method and device for completing missing video files in a video recording. Background Art
[0002] The network is not always reliable. When a network failure occurs and the audio and video data of the front-end device cannot be transmitted to the central storage management server, it will lead to the serious consequence of the loss of video recordings in the platform center. Similarly, when the central storage server goes offline, it will also cause the data of the front-end device not to be stored in the central storage server, resulting in discontinuous and incomplete central video recordings.
[0003] In the prior art, generally no processing is done for the above-mentioned situation of missing video recordings. Occasionally, corresponding solutions focus on completing the supplementary recording of the missing video data. For example, the missing video data is obtained from other terminals that may store video data, such as the device body storage or other storage servers, but the continuity problem between the supplementary recorded video file data and the original video file data is not considered. Or a database is used to record video file information, but additional operations or frequent requests are required to ensure the continuous playback of the video file and the supplementary recorded file, thereby affecting the operation experience. Summary of the Invention
[0004] To solve the problem of missing video files mentioned above, embodiments of this application provide a continuous indexing method and device for completing missing video files in a video recording. The technical solution is as follows:
[0005] In a first aspect, embodiments of this specification provide a continuous indexing method for completing missing video files in a video recording, including:
[0006] Obtaining the nth audio and video data based on an electronic device, and converting the nth audio and video data into the nth video file; where n is a positive integer greater than 1;
[0007] Extracting at least four types of index information from the nth video file, and updating the index information table according to at least four types of index information of the nth video file; where at least four types of index information include upper file handle identification information, lower file handle identification information, time information, and electronic device identification information; the index information table includes at least one video file and at least four types of index information corresponding to the video file;
[0008] Determining respectively in the updated index information table the mth video file with the lower file handle identification information being empty and the (m + 1)th video file with the upper file handle identification information being empty, and obtaining the supplementary recording time period according to the time information of the mth video file and the time information of the (m + 1)th video file; where m is a positive integer and m is less than n;
[0009] Determine the target electronic device according to the electronic device identification information of the m-th video file and the electronic device identification information of the (m + 1)-th video file, and generate a supplementary recording task request according to the video data of the target electronic device during the supplementary recording time period.
[0010] In an alternative solution of the first aspect, the at least four types of index information further include the current file handle identification information;
[0011] Extract at least four types of index information from the n-th video file, and update the index information table according to the at least four types of index information of the n-th video file, including:
[0012] Based on the positions corresponding to the at least four types of index information of the (n - 1)-th video file in the index information table, add the at least four types of index information of the n-th video file to the index information table; wherein, the lower file handle identification information of the n-th video file is empty, and the upper file handle identification information of the n-th video file is the current file handle identification information of the (n - 1)-th video file;
[0013] Update the lower file handle identification information of the (n - 1)-th video file to the current file handle identification information of the n-th video file.
[0014] In another alternative solution of the first aspect, the time information includes the video start time and the video end time;
[0015] Obtain the supplementary recording time period according to the time information of the m-th video file and the time information of the (m + 1)-th video file, including:
[0016] Determine the supplementary recording time period according to the video end time of the m-th video file and the video start time of the (m + 1)-th video file
[0017] In another alternative solution of the first aspect, generating a supplementary recording task request according to the video data of the target electronic device during the supplementary recording time period includes:
[0018] When no video data corresponding to the supplementary recording time period is detected on the target electronic device, perform an update process on the supplementary recording time period, and generate a first supplementary recording task request according to the updated supplementary recording time period; wherein, in the updated supplementary recording time period, the video end time of the m-th video file is consistent with the video start time of the (m + 1)-th video file;
[0019] When video data corresponding to the supplementary recording time period is detected on the target electronic device, generate a second supplementary recording task request according to the video data corresponding to the supplementary recording time period, and obtain the video data corresponding to the supplementary recording time period on the target electronic device based on the second supplementary recording task request;
[0020] When partial video data in the video data corresponding to the supplementary recording time period is detected on the target electronic device, a third supplementary recording task request is generated according to the updated supplementary recording time period; wherein, the start time of the time period corresponding to the partial video data is greater than or equal to the video end time of the m-th video file, and the end time of the time period corresponding to the partial video data is less than or equal to the video start time of the (m + 1)-th video file;
[0021] Based on the third supplementary recording task request, partial video data is obtained on the target electronic device.
[0022] In another alternative solution of the first aspect, after generating a supplementary recording task request according to the video data of the target electronic device within the supplementary recording time period, it further includes:
[0023] When the supplementary recording task request is the first supplementary recording task request, in the index information table, update the lower file handle identification information of the m-th video file to the current file handle identification information of the (m + 1)-th video file, and update the upper file handle identification information of the (m + 1)-th video file to the current file handle identification information of the m-th video file;
[0024] When the supplementary recording task request is the second supplementary recording task request, convert the video data corresponding to the supplementary recording time period into a video file; or
[0025] When the supplementary recording task request is the third supplementary recording task request, convert the partial video data into a video file;
[0026] Extract at least four types of index information from the video file, and update the index information table according to the at least four types of index information of the video file.
[0027] In another alternative solution of the first aspect, after generating a supplementary recording task request according to the video data of the target electronic device within the supplementary recording time period, it further includes:
[0028] When receiving a request for obtaining a video file, determine a video time period according to the request for obtaining the video file;
[0029] Based on the start time of the video time period, find a first video file in the updated index information table, and generate a target video file according to the first video file; wherein, the start time of the video time period is greater than or equal to the video start time of the first video file, and the start time of the video time period is less than the video end time of the first video file.
[0030] In another alternative solution of the first aspect, generating a target video file according to the first video file includes:
[0031] Determine a second video file based on the lower file handle identification information of the first video file;
[0032] When it is detected that the end time of the video recording period is greater than or equal to the start time of the second video file and the end time of the video recording period is less than the end time of the second video file, the first video file and the second video file are used as target video files.
[0033] In a second aspect, an embodiment of the present application provides a continuous indexing device for missing video file completion, including:
[0034] A first processing module, configured to obtain the nth audio-visual data based on an electronic device and convert the nth audio-visual data into the nth video file; where n is a positive integer greater than 1;
[0035] A second processing module, configured to extract at least four types of indexing information from the nth video file and update an indexing information table according to the at least four types of indexing information of the nth video file; where the at least four types of indexing information include upper file handle identification information, lower file handle identification information, time information, and electronic device identification information; the indexing information table includes at least one video file and at least four types of indexing information corresponding to the video file;
[0036] A third processing module, configured to respectively determine the mth video file with an empty lower file handle identification information and the (m + 1)th video file with an empty upper file handle identification information in the updated indexing information table, and obtain a supplementary recording period according to the time information of the mth video file and the time information of the (m + 1)th video file; where m is a positive integer and m is less than n;
[0037] A fourth processing module, configured to determine a target electronic device according to the electronic device identification information of the mth video file and the electronic device identification information of the (m + 1)th video file, and generate a supplementary recording task request according to the video data of the target electronic device during the supplementary recording period.
[0038] In a third aspect, an embodiment of the present application further provides a continuous indexing device for missing video file completion, including a processor and a memory;
[0039] The processor is connected to the memory;
[0040] The memory is used to store executable program code;
[0041] The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the continuous indexing method for missing video file completion provided in the first aspect or any implementation manner of the first aspect of the embodiments of the present application.
[0042] Fourthly, an embodiment of the present application provides a computer storage medium storing a computer program including program instructions which, when executed by a processor, can implement the continuous indexing method for missing video file completion provided by the first aspect or any implementation manner of the first aspect in the embodiments of the present application.
[0043] The beneficial effects brought by the technical solutions provided by some embodiments of this specification at least include:
[0044] During the indexing process of video file completion, audio and video data is obtained based on an electronic device and converted into corresponding video files; at least four types of indexing information are extracted from the video files, and the indexing information table is updated based on at least four types of indexing information of the video files; two corresponding video files with empty lower file handle identification information and empty upper file handle identification information are determined through the updated indexing information table, and the supplementary recording time period is obtained based on the time information of these two corresponding video files; the target electronic device is determined based on the electronic device identification information of the video file, and a supplementary recording task request is generated based on the video data of the target electronic device during the supplementary recording time period. By establishing and updating the indexing information table of the video file, the characteristics of the file handle information are utilized to achieve the continuous indexing of the current video file and the supplementary recording video file, and the related request operations are not cumbersome, improving the user experience. Description of the Drawings
[0045] To more clearly illustrate the technical solutions in the embodiments of the present application, the accompanying drawings required for the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.
[0046] Figure 1 It is the overall flowchart of a continuous indexing method for missing video file completion provided by an embodiment of the present application;
[0047] Figure 2 It is the structural schematic diagram of a continuous indexing device for missing video file completion provided by an embodiment of the present application;
[0048] Figure 3 It is another structural schematic diagram of a continuous indexing device for missing video file completion provided by an embodiment of the present application. Detailed Embodiments
[0049] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application.
[0050] In the following description, the terms "first" and "second" are for descriptive purposes only and should not be construed as indicating or implying relative importance. The following description provides multiple embodiments of the present application. Different embodiments can be replaced or combined, so the present application can also be considered to include all possible combinations of the same and / or different embodiments described. Thus, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then the present application should also be considered to include embodiments containing one or more of all other possible combinations of A, B, C, and D, even though such embodiments may not be explicitly recited in the following content.
[0051] The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes can be made to the functions and arrangements of the described elements without departing from the scope of the present application. Various processes or components can be appropriately omitted, substituted, or added to each example. For example, the described methods can be performed in a different order than described, and various steps can be added, omitted, or combined. In addition, the features described in some examples can be combined into other examples.
[0052] Please refer to Figure 1 , Figure 1 which shows the overall flowchart of a continuous indexing method for missing video file completion provided by an embodiment of the present application.
[0053] As Figure 1 shown, the continuous indexing method for missing video file completion can at least include the following steps:
[0054] Step 101, obtain the nth audio-visual data based on an electronic device and convert the nth audio-visual data into the nth video file.
[0055] In an embodiment of the present application, the continuous indexing method for missing video file completion can be but is not limited to being applied to a storage server, which can establish connections with multiple electronic devices to obtain the audio-visual data sent by these multiple electronic devices. It can be understood that the storage server can complete the supplementary recording of video by establishing an index information table and achieve the continuity in time between reading the video file and the supplementary recording file.
[0056] Wherein, n is a positive integer greater than 1, only used for counting and identifying different video files.
[0057] Specifically, when the network and the video storage server are operating normally, the storage server continuously obtains audio-visual data from the front-end electronic devices and converts these audio-visual data into video files. The conversion method can be but is not limited to digital-to-analog conversion, etc.
[0058] Step 102: Extract at least four types of index information from the nth video file, and update the index information table according to the at least four types of index information of the nth video file.
[0059] Specifically, after the storage server converts the acquired audio-visual data into corresponding video files, these video files will be stored in the video file system of the server. The video file system can store, but is not limited to, the video files corresponding to the audio-visual data sent by one or more electronic devices. Then, for each stored video file, it is necessary to establish the index information corresponding to the video file. The necessary information included in the index information are: the lower file handle identification information, the upper file handle identification information, the time information, as well as the number, IP address, port, username, user access password, etc. of the electronic device to which the video belongs. Other non-necessary information such as file name, file length, file type, etc. can also be included. Among them, the file handle identification information is the unique identification information through which the corresponding file can be retrieved.
[0060] After that, the storage server will establish and update the index information table by realizing the connection between video files through the relevant information in the above index information, including but not limited to the lower file handle identification information, the upper file handle identification information, etc.
[0061] As an option in the embodiment of the present application, the at least four types of index information further include the current file handle identification information;
[0062] Extracting at least four types of index information from the nth video file and updating the index information table according to the at least four types of index information of the nth video file includes:
[0063] Based on the positions corresponding to the at least four types of index information of the (n - 1)th video file in the index information table, add the at least four types of index information of the nth video file to the index information table; wherein, the lower file handle identification information of the nth video file is empty, and the upper file handle identification information of the nth video file is the current file handle identification information of the (n - 1)th video file;
[0064] Update the lower file handle identification information of the (n - 1)th video file to the current file handle identification information of the nth video file.
[0065] Specifically, the upper file handle identification information and the lower file handle identification information of the first written file are both empty, and the remaining index information is filled according to the real information of the video file, and n files are written in sequence. Among them, if the (n - 1)-th file and the n-th file are time-continuous, then update the upper file handle identification information of the n-th file to the current file handle identification information of the (n - 1)-th file, and update the lower file handle identification information of the (n - 1)-th file to the current file handle identification information of the n-th file; if the (n - 1)-th file and the n-th file are not time-continuous, then the lower file handle identification information of the (n - 1)-th file and the upper file handle identification information of the n-th file are both empty. Thus, the video file index information table under the ideal process is established.
[0066] Here, the index information table as shown below can be referred to:
[0067]
[0068] In this index information table, the index information corresponding to the n-th file can but is not limited to include: file creation time, video start time, video end time, current video file handle, previous video file handle, next video file handle. Among them, file 2 is the next video file that is time-continuous with file 1. In the index information corresponding to file 2, the previous video file handle can be updated to the current video file handle in the index information corresponding to file 1, and the next video file handle in the index information corresponding to file 1 can be updated to the current video file handle in the index information corresponding to file 2. And so on, until the n-th file.
[0069] It can be understood that the embodiments of the present application show the correlation between video files through the handle identification information.
[0070] Step 103: In the updated index information table, respectively determine the m-th video file with the lower file handle identification information being empty and the (m + 1)-th video file with the upper file handle identification information being empty, and obtain the supplementary recording time period according to the time information of the m-th video file and the time information of the (m + 1)-th video file.
[0071] Among them, m is a positive integer, m is less than n, and is only used to identify different video files.
[0072] Specifically, to ensure the integrity of the recorded video in the video file system, it is necessary to periodically retrieve the video files. Through the video file index information table established in step 102, find the corresponding video files in the video file index information table where the file handle identification information is empty, and record them as the m-th video file. The subsequent consecutive video files of this video file do not exist, that is, the file handle identification information of the next video file of the m-th video file is empty. Continue to retrieve the video file system index information table backward, and find the corresponding video file where the upper file handle in the index information of the first video file is empty, and record it as the (m + 1)-th video file.
[0073] Thereafter, according to the relevant time information in the index information of the m-th and (m + 1)-th video files, including but not limited to the start time and end time of the video file, obtain the supplementary recording time period of the video file that needs to be supplemented.
[0074] As another option in the embodiment of the present application, the time information includes the video start time and the video end time;
[0075] Obtaining the supplementary recording time period according to the time information of the m-th video file and the time information of the (m + 1)-th video file includes:
[0076] Determine the supplementary recording time period according to the end time of the m-th video file and the start time of the (m + 1)-th video file.
[0077] Specifically, assume that the end time of the video file corresponding to the index information of the m-th video file is T1. At this time, the start time of the time period that needs to be supplemented is determined and defined as T1; assume that the start time of the video file corresponding to the index information of the (m + 1)-th video file is T2. At this time, the end time of the time period that needs to be supplemented is determined and defined as T2; thus far, the time period that needs to be supplemented is from T1 to T2.
[0078] Step 104: Determine the target electronic device according to the electronic device identification information of the m-th video file and the electronic device identification information of the (m + 1)-th video file, and generate a supplementary recording task request according to the video data of the target electronic device during the supplementary recording time period.
[0079] Specifically, referring to an embodiment as described above, assume that when the supplementary recording time period of the current video file is obtained as [T1, T2], the storage server can simultaneously obtain the identification information of the electronic device to which the video files missing in the current video file system belong, including the number, IP address, port, username, and user access password of the electronic device to which the video belongs. Thereafter, the storage server uses the above information to access the target electronic device and query the integrity of the video files stored on the electronic device during the supplementary recording time period, and updates the query result to the current supplementary recording task request. The target electronic device is the electronic device used to obtain the supplementary recording video data.
[0080] As another alternative of the embodiment of the present application, generating a supplementary recording task request according to the video data of the target electronic device during the supplementary recording time period includes:
[0081] When no video data corresponding to the supplementary recording time period is detected on the target electronic device, perform an update process on the supplementary recording time period, and generate a first supplementary recording task request according to the updated supplementary recording time period; wherein, in the updated supplementary recording time period, the video end time of the mth video file is the same as the video start time of the (m + 1)th video file;
[0082] When video data corresponding to the supplementary recording time period is detected on the target electronic device, generate a second supplementary recording task request according to the video data corresponding to the supplementary recording time period, and obtain the video data corresponding to the supplementary recording time period on the target electronic device based on the second supplementary recording task request;
[0083] When partial video data corresponding to the supplementary recording time period is detected on the target electronic device, generate a third supplementary recording task request according to the updated supplementary recording time period; wherein, the start time of the time period corresponding to the partial video data is greater than or equal to the video end time of the mth video file, and the end time of the time period corresponding to the partial video data is less than or equal to the video start time of the (m + 1)th video file;
[0084] Obtain partial video data on the target electronic device based on the third supplementary recording task request.
[0085] Specifically, referring to an embodiment as described above, assume that the supplementary recording time period of the current video file is [T1, T2]. When the query result shows that there is no video data during the supplementary recording time period stored on the target electronic device, the length of the video data that actually needs to be supplemented is 0 at this time. The storage server updates the supplementary recording time period in the original supplementary recording task request so that its supplementary recording end time T2 is the same as the supplementary recording start time T1. Thereafter, the storage server generates a first supplementary recording task request according to the updated supplementary recording time period. The first supplementary recording task request can be understood as a no-supplementary recording task request.
[0086] When the query result shows that there is complete video data during the supplementary recording period in the storage of the target electronic device, the original supplementary recording task request does not need to be updated at this time, and the original supplementary recording task request is the second supplementary recording task request. The storage server obtains the video data corresponding to the supplementary recording period on the target electronic device based on the second supplementary recording task request. Among them, the second supplementary recording task request can be understood as a supplementary recording task request with complete supplementary recording video data.
[0087] When the query result shows that there is partial video data during the supplementary recording period in the storage of the target electronic device. Assume that the start time of the video in the video query result at the target electronic device end is T3, the end time is T4, and T3 is greater than or equal to T1, and T4 is less than or equal to T2. At this time, the storage server updates the supplementary recording period in the original supplementary recording task request, making T1 consistent with T3 and T2 consistent with T4, generates a third supplementary recording task request, and obtains partial video data during the supplementary recording period on the target electronic device based on the third supplementary recording task request. Among them, the third supplementary recording task request can be understood as a supplementary recording task request with only partial supplementary recording video data.
[0088] As another option of the embodiment of the present application, after generating a supplementary recording task request according to the video data of the target electronic device during the supplementary recording period, it further includes:
[0089] When the supplementary recording task request is the first supplementary recording task request, in the index information table, update the lower file handle identification information of the m-th video file to the current file handle identification information of the (m + 1)-th video file, and update the upper file handle identification information of the (m + 1)-th video file to the current file handle identification information of the m-th video file;
[0090] When the supplementary recording task request is the second supplementary recording task request, convert the video data corresponding to the supplementary recording period into a video file; or
[0091] When the supplementary recording task request is the third supplementary recording task request, convert the partial video data into a video file;
[0092] Extract at least four types of index information from the video file, and update the index information table according to at least four types of index information of the video file.
[0093] Specifically, referring to an embodiment described above, assume that the supplementary recording period is [T1, T2], the specified period is [T3, T4], and T3 is greater than or equal to T1, and T4 is less than or equal to T2. The method for updating the video file system index information table is as follows:
[0094] When the supplementary recording task request is the first supplementary recording task request, no supplementary recording file is generated. At this time, update the "next file handle identification information" variable in the index information of the previous video file with continuous supplementary recording time period, so that it points to the handle of the next video file with continuous supplementary recording time period; secondly, update the "previous file handle identification information" variable in the index information of the next video file in the supplementary recording time period, so that it points to the handle of the previous video file with continuous supplementary recording time period. In this way, the video file system can continue to search for subsequent video files even at the discontinuous recording time of the video file index record;
[0095] When the supplementary recording task request is the second supplementary recording task request or the third supplementary recording task request, several supplementary recording files are generated. The newly generated several supplementary recording files establish new supplementary recording file index information according to the standard video file generation index method, as described in step 102; for the index information of the first supplementary recording video file and the last supplementary recording video file among the newly generated several supplementary recording files and the original video files with continuous supplementary recording time period, update the index information of the previous video file with continuous supplementary recording time period, and update the index information of the next video file with continuous supplementary recording time period. This can ensure that the video file system is continuous in time between the video file index information and the supplementary recording video file index information, and can continuously access the supplementary recording video file data after the video file data.
[0096] As another option of the embodiment of the present application, after generating a supplementary recording task request according to the video data of the target electronic device within the supplementary recording time period, it further includes:
[0097] When receiving a request for obtaining a video file, determine the video time period according to the request for obtaining the video file;
[0098] Based on the start time of the video time period, find the first video file in the updated index information table, and generate a target video file according to the first video file; wherein, the start time of the video time period is greater than or equal to the video start time of the first video file, and the start time of the video time period is less than the video end time of the first video file.
[0099] Specifically, record the video start time of the video file as T5, and with the help of the video file system index information table, find the video file or supplementary recording file record that satisfies that the start time of the video time period is greater than or equal to T5 and the start time of the video time period is less than T5. Since the time in the video file system is continuously increasing, there is only one video or supplementary recording file record that meets the conditions, and this video file is the first video file. And generate a target video file according to the first video file.
[0100] As another option of the embodiment of the present application, generating a target video file according to the first video file includes:
[0101] Determine a second video file based on the lower file handle identification information of the first video file;
[0102] When it is detected that the end time of the video recording period is greater than or equal to the start time of the second video file and the end time of the video recording period is less than the end time of the second video file, the first video file and the second video file are used as target video files.
[0103] Specifically, the end time of the recorded video file is T6. After retrieving the first video file, in sequence according to the video file index information recorded in the video file index information table, after reading the current video file, obtain the upper file handle identification information in the video file index information corresponding to the current video file, and locate the next video file or supplementary recorded video file pointed to by the lower file handle identification information. Determine whether the playback stop condition is satisfied in the video file index information: start time ≤ T6 < end time. If the condition is satisfied, this file is the last video file of the video recording period; if not, continuously repeat this retrieval process until the playback stop condition is satisfied.
[0104] Please refer to Figure 2 , Figure 2 which shows a schematic structural diagram of a continuous indexing device for missing complement of video files provided by an embodiment of the present application.
[0105] As Figure 2 shown, the continuous indexing device for missing complement of video files may at least include a first processing module 201, a second processing module 202, a third processing module 203, and a fourth processing module 204, where:
[0106] The first processing module 201 is configured to obtain the nth audio-video data based on an electronic device and convert the nth audio-video data into the nth video file; where n is a positive integer greater than 1;
[0107] The second processing module 202 is configured to extract at least four types of index information from the nth video file and update the index information table according to the at least four types of index information of the nth video file; where the at least four types of index information include upper file handle identification information, lower file handle identification information, time information, and electronic device identification information; the index information table includes at least one video file and at least four types of index information corresponding to the video file;
[0108] The third processing module 203 is configured to respectively determine the m-th video file with an empty lower file handle identification information and the (m + 1)-th video file with an empty upper file handle identification information in the index information table after the update process, and obtain the supplementary recording time period according to the time information of the m-th video file and the time information of the (m + 1)-th video file; where m is a positive integer and m is less than n;
[0109] The fourth processing module 204 is configured to determine the target electronic device according to the electronic device identification information of the m-th video file and the electronic device identification information of the (m + 1)-th video file, and generate a supplementary recording task request according to the video data of the target electronic device during the supplementary recording time period.
[0110] In some possible embodiments, the at least four types of index information further include the current file handle identification information;
[0111] The second processing module 202 is specifically configured to:
[0112] Based on the positions corresponding to the at least four types of index information of the (n - 1)-th video file in the index information table, add the at least four types of index information of the n-th video file to the index information table; where the lower file handle identification information of the n-th video file is empty, and the upper file handle identification information of the n-th video file is the current file handle identification information of the (n - 1)-th video file;
[0113] Update the lower file handle identification information of the (n - 1)-th video file to the current file handle identification information of the n-th video file.
[0114] In some possible embodiments, the time information includes the video start time and the video end time;
[0115] The third processing module 203 is specifically configured to:
[0116] Determine the supplementary recording time period according to the video end time of the m-th video file and the video start time of the (m + 1)-th video file
[0117] In some possible embodiments, generating a supplementary recording task request according to the video data of the target electronic device during the supplementary recording time period includes:
[0118] The fourth processing module 204 is specifically configured to:
[0119] When no video data corresponding to the supplementary recording time period is detected on the target electronic device, perform an update process on the supplementary recording time period, and generate a first supplementary recording task request according to the updated supplementary recording time period; where in the updated supplementary recording time period, the video end time of the m-th video file is consistent with the video start time of the (m + 1)-th video file;
[0120] When video data corresponding to the supplementary recording time period is detected on the target electronic device, a second supplementary recording task request is generated based on the video data corresponding to the supplementary recording time period, and the video data corresponding to the supplementary recording time period is obtained on the target electronic device based on the second supplementary recording task request;
[0121] When partial video data in the video data corresponding to the supplementary recording time period is detected on the target electronic device, and a third supplementary recording task request is generated according to the updated supplementary recording time period; wherein, the start time of the time period corresponding to the partial video data is greater than or equal to the video end time of the m-th video file, and the end time of the time period corresponding to the partial video data is less than or equal to the video start time of the (m + 1)-th video file;
[0122] Based on the third supplementary recording task request, partial video data is obtained on the target electronic device.
[0123] In some possible embodiments, after generating a supplementary recording task request according to the video data of the target electronic device during the supplementary recording time period, it further includes:
[0124] The fourth processing module 204 is specifically configured to:
[0125] When the supplementary recording task request is the first supplementary recording task request, update the lower file handle identification information of the m-th video file to the current file handle identification information of the (m + 1)-th video file in the index information table, and update the upper file handle identification information of the (m + 1)-th video file to the current file handle identification information of the m-th video file;
[0126] When the supplementary recording task request is the second supplementary recording task request, convert the video data corresponding to the supplementary recording time period into a video file; or
[0127] When the supplementary recording task request is the third supplementary recording task request, convert the partial video data into a video file;
[0128] Extract at least four types of index information from the video file, and update the index information table according to the at least four types of index information of the video file.
[0129] In some possible embodiments, after generating a supplementary recording task request according to the video data of the target electronic device during the supplementary recording time period, it further includes:
[0130] The fourth processing module 204 is specifically configured to:
[0131] When receiving a request for obtaining a video file, determine the video time period according to the request for obtaining the video file;
[0132] Based on the start time of the video recording period, the first video file is found in the updated index information table, and a target video file is generated according to the first video file; wherein, the start time of the video recording period is greater than or equal to the start time of the video recording of the first video file, and the start time of the video recording period is less than the end time of the video recording of the first video file.
[0133] In some possible embodiments, generating a target video file according to the first video file includes:
[0134] The fourth processing module 204 is specifically configured to:
[0135] Determine a second video file based on the next file handle identification information of the first video file;
[0136] When it is detected that the end time of the video recording period is greater than or equal to the start time of the video recording of the second video file, and the end time of the video recording period is less than the end time of the video recording of the second video file, the first video file and the second video file are used as the target video file.
[0137] Please refer to Figure 3 , Figure 3 which shows a schematic structural diagram of another continuous index device for missing video file completion provided by an embodiment of the present application.
[0138] As Figure 3 shown, the electronic device 300 may include at least one processor 301, at least one network interface 304, a user interface 303, a memory 305, and at least one communication bus 302.
[0139] Among them, the communication bus 302 can be used to realize the connection and communication of the above-mentioned various components.
[0140] Among them, the user interface 303 may include buttons, and the optional user interface may further include a standard wired interface and a wireless interface.
[0141] Among them, the network interface 304 may but is not limited to include a Bluetooth module, an NFC module, a Wi-Fi module, etc.
[0142] Among them, the processor 301 may include one or more processing cores. The processor 301 connects various parts within the entire electronic device 300 through various interfaces and lines, and executes various functions of the electronic device 300 and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 305, and by calling data stored in the memory 305. Optionally, the processor 301 may be implemented in at least one hardware form of DSP, FPGA, or PLA. The processor 301 may integrate one or a combination of several of CPU, GPU, and modem, etc. Among them, the CPU mainly processes the operating system, user interface, application programs, etc.; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communication. It can be understood that the above modem may not be integrated into the processor 301 and may be implemented separately by a chip.
[0143] Among them, the memory 305 may include RAM and may also include ROM. Optionally, the memory 305 includes a non-transitory computer-readable medium. The memory 305 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 305 may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing the operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above method embodiments, etc.; the data storage area may store data involved in the above method embodiments. Optionally, the memory 305 may also be at least one storage device located far from the aforementioned processor 301. As Figure 3 shown, the memory 305, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a continuous index application for filling in missing video files.
[0144] Specifically, the processor 301 may be used to call the continuous index application for filling in missing video files stored in the memory 305 and specifically perform the following operations:
[0145] Based on the electronic device, obtain the nth audio-visual data and convert the nth audio-visual data into the nth video file; where n is a positive integer greater than 1;
[0146] Extract at least four types of index information from the nth video file, and update the index information table according to the at least four types of index information of the nth video file; where the at least four types of index information include upper file handle identification information, lower file handle identification information, time information, and electronic device identification information; the index information table includes at least one video file and at least four types of index information corresponding to the video file;
[0147] In the updated index information table, respectively determine the m-th video file with an empty lower file handle identification information and the (m + 1)-th video file with an empty upper file handle identification information, and obtain the supplementary recording time period according to the time information of the m-th video file and the time information of the (m + 1)-th video file; where m is a positive integer and m is less than n.
[0148] Determine the target electronic device according to the electronic device identification information of the m-th video file and the electronic device identification information of the (m + 1)-th video file, and generate a supplementary recording task request according to the video data of the target electronic device during the supplementary recording time period.
[0149] This application also provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps of the above method are implemented. Among them, the computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
[0150] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be adopted in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0151] In the above embodiments, the descriptions of each embodiment have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0152] In several embodiments provided by this application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some service interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical or other form.
[0153] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or distributed across multiple network units. Some or all of these units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0154] In addition, each functional unit in the various embodiments of this application can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0155] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned memory includes: USB flash drives, read-only memory (ROM), random access memory (RAM), external hard drives, magnetic disks, or optical discs, etc., which can store program codes.
[0156] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program. This program can be stored in a computer-readable memory, and the memory can include: flash drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs, etc.
[0157] The above are only exemplary embodiments of the present disclosure and should not be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made in accordance with the teachings of the present disclosure still fall within the scope covered by the present disclosure. After considering the specification and practicing the present disclosure, those skilled in the art will readily think of other embodiments of the present disclosure. This application aims to cover any variations, uses, or adaptive changes of the present disclosure, which follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not recorded in the present disclosure. The specification and embodiments are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A continuous indexing method for missing complement of video files, characterized in that, Including: Obtaining the nth audio - video data based on an electronic device and converting the nth audio - video data into the nth video recording file; where n is a positive integer greater than 1; Extracting at least four types of index information from the nth video recording file and performing an update process on an index information table according to the at least four types of index information of the nth video recording file; where the at least four types of index information include upper file handle identification information, lower file handle identification information, time information, and electronic device identification information; the index information table includes at least one video recording file and the at least four types of index information corresponding to the video recording file; Determining respectively the mth video recording file with the lower file handle identification information being empty and the (m + 1)th video recording file with the upper file handle identification information being empty in the index information table after the update process, and obtaining a supplementary recording time period according to the time information of the mth video recording file and the time information of the (m + 1)th video recording file; where m is a positive integer and m is less than n; Determining a target electronic device according to the electronic device identification information of the mth video recording file and the electronic device identification information of the (m + 1)th video recording file, and generating a supplementary recording task request according to the video recording data of the target electronic device during the supplementary recording time period.
2. The method according to claim 1, wherein The at least four types of index information further include current file handle identification information; The extracting at least four types of index information from the nth video recording file and performing an update process on the index information table according to the at least four types of index information of the nth video recording file includes: Based on the positions corresponding to the at least four types of index information of the (n - 1)th video recording file in the index information table, adding the at least four types of index information of the nth video recording file to the index information table; where the lower file handle identification information of the nth video recording file is empty, and the upper file handle identification information of the nth video recording file is the current file handle identification information of the (n - 1)th video recording file; Updating the lower file handle identification information of the (n - 1)th video recording file to the current file handle identification information of the nth video recording file.
3. The method according to claim 2, wherein The time information includes a video recording start time and a video recording end time; The obtaining a supplementary recording time period according to the time information of the mth video recording file and the time information of the (m + 1)th video recording file includes: Determining a supplementary recording time period according to the video recording end time of the mth video recording file and the video recording start time of the (m + 1)th video recording file.
4. The method according to claim 3, wherein The generating a supplementary recording task request according to the video recording data of the target electronic device during the supplementary recording time period includes: When no video recording data corresponding to the supplementary recording time period is detected on the target electronic device, performing an update process on the supplementary recording time period, and generating a first supplementary recording task request according to the updated supplementary recording time period; where in the updated supplementary recording time period, the video recording end time of the mth video recording file is consistent with the video recording start time of the (m + 1)th video recording file; When video data corresponding to the supplementary recording time period is detected on the target electronic device, a second supplementary recording task request is generated according to the video data corresponding to the supplementary recording time period, and the video data corresponding to the supplementary recording time period is obtained on the target electronic device based on the second supplementary recording task request; When partial video data among the video data corresponding to the supplementary recording time period is detected on the target electronic device, the supplementary recording time period is updated according to the time period corresponding to the partial video data, and a third supplementary recording task request is generated according to the updated supplementary recording time period; wherein, the start time of the time period corresponding to the partial video data is greater than or equal to the video end time of the m-th video file, and the end time of the time period corresponding to the partial video data is less than or equal to the video start time of the (m + 1)-th video file; The partial video data is obtained on the target electronic device based on the third supplementary recording task request.
5. The method according to claim 4, wherein After generating a supplementary recording task request according to the video data of the target electronic device within the supplementary recording time period, it further includes: When the supplementary recording task request is a first supplementary recording task request, in the index information table, the next file handle identification information of the m-th video file is updated to the current file handle identification information of the (m + 1)-th video file, and the previous file handle identification information of the (m + 1)-th video file is updated to the current file handle identification information of the m-th video file; When the supplementary recording task request is a second supplementary recording task request, the video data corresponding to the supplementary recording time period is converted into a video file; or When the supplementary recording task request is a third supplementary recording task request, the partial video data is converted into a video file; At least four types of index information are extracted from the video file, and the index information table is updated according to the at least four types of index information of the video file.
6. The method according to claim 4, wherein After generating a supplementary recording task request according to the video data of the target electronic device within the supplementary recording time period, it further includes: When a request for obtaining a video file is received, a video time period is determined according to the request for obtaining the video file; Based on the start time of the video time period, a first video file is found in the updated index information table, and a target video file is generated according to the first video file; wherein, the start time of the video time period is greater than or equal to the video start time of the first video file, and the start time of the video time period is less than the video end time of the first video file.
7. The method according to claim 6, characterized in that, The generating a target video file according to the first video file includes: Determining a second video file based on the next file handle identification information of the first video file; When it is detected that the end time of the video time period is greater than or equal to the video start time of the second video file and the end time of the video time period is less than the video end time of the second video file, the first video file and the second video file are used as the target video file.
8. A continuous indexing device for missing complement of video files, characterized in that, Includes: The first processing module is configured to obtain the nth audio-video data based on an electronic device and convert the nth audio-video data into the nth video recording file; where n is a positive integer greater than 1; The second processing module is configured to extract at least four types of index information from the nth video recording file and update an index information table according to the at least four types of index information of the nth video recording file; where the at least four types of index information include upper file handle identification information, lower file handle identification information, time information, and electronic device identification information; the index information table includes at least one video recording file and at least four types of index information corresponding to the video recording file; The third processing module is configured to respectively determine the mth video recording file with the lower file handle identification information being empty and the (m + 1)th video recording file with the upper file handle identification information being empty in the index information table after the update processing, and obtain a supplementary recording time period according to the time information of the mth video recording file and the time information of the (m + 1)th video recording file; where m is a positive integer and m is less than n; The fourth processing module is configured to determine a target electronic device according to the electronic device identification information of the mth video recording file and the electronic device identification information of the (m + 1)th video recording file, and generate a supplementary recording task request according to the video recording data of the target electronic device during the supplementary recording time period.
9. A continuous indexing device for missing complement of video files, characterized in that, It includes a processor and a memory; The processor is connected to the memory; The memory is configured to store executable program code; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the steps of the method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, Instructions are stored in the computer-readable storage medium, and when the instructions run on a computer or a processor, the computer or the processor is caused to execute the steps of the method according to any one of claims 1-7.
Citation Information
Patent Citations
Delaration information additional recording method and device, electronic equipment, medium and program product
CN114240391A
Video data additional recording method and device, electronic device and storage medium
CN116193137A