Local storage method, equipment and medium for network video stream

文档序号:1802532 发布日期:2021-11-05 浏览:6次 中文

阅读说明:本技术 一种网络视频流本地存储方法、设备及介质 (Local storage method, equipment and medium for network video stream ) 是由 贾玉辉 季念星 于 2021-07-19 设计创作,主要内容包括:本申请公开了一种网络视频流本地存储方法、设备及介质。该方法包括:基于待处理视频流的数据长度,动态调整环形缓冲区的容量;将所述待处理视频流存储至所述环形缓冲区;从所述环形缓冲区中读取数据并写入到文件中;若所述文件的数据长度达到设定长度,则将后续读取的数据写入新的文件中;响应于结束录制所述待处理视频流的指示,将所述待处理视频流的各文件合成一个文件。该方式能够通过对网络视频流做平滑处理,从而实现在个人普通计算机上长时间稳定录制视频。(The application discloses a local storage method, equipment and medium for network video streams. The method comprises the following steps: dynamically adjusting the capacity of a ring buffer based on the data length of the video stream to be processed; storing the video stream to be processed into the ring buffer; reading data from the ring buffer and writing the data into a file; if the data length of the file reaches the set length, writing the subsequently read data into a new file; and responding to the instruction of finishing recording the video stream to be processed, and synthesizing the files of the video stream to be processed into one file. The method can realize the long-time stable recording of the video on the personal common computer by smoothing the network video stream.)

1. A method for locally storing a network video stream, the method comprising:

dynamically adjusting the capacity of a ring buffer based on the data length of the video stream to be processed;

storing the video stream to be processed into the ring buffer;

reading data from the ring buffer and writing the data into a file;

if the data length of the file reaches the set length, writing the subsequently read data into a new file;

and responding to the instruction of finishing recording the video stream to be processed, and synthesizing the files of the video stream to be processed into one file.

2. The method according to claim 1, wherein the dynamically adjusting the size of the ring buffer based on the data length of the video stream to be processed comprises:

comparing the data length of the video stream to be processed with the residual capacity of the ring buffer;

and if the data length of the video stream to be processed is greater than the residual capacity of the ring buffer, performing multiple-level capacity expansion on the capacity of the ring buffer.

3. The method of claim 1, wherein during the reading of data from the ring buffer, the method further comprises:

dynamically adjusting a time interval for reading data from the ring buffer.

4. The method of claim 3, wherein the dynamically adjusting the time interval for reading data from the ring buffer comprises:

identifying whether the data of the video stream to be processed is stored in the ring buffer or not every interval of the time interval;

when determining that the data of the video stream to be processed is not stored in the ring buffer for n times continuously, increasing the time interval of reading the data from the ring buffer for the next time, wherein n is a positive integer greater than or equal to 2;

and when the annular buffer zone has data and the capacity of the annular buffer zone reaches the set maximum value and the time interval for reading the data is greater than the preset interval lower limit, reducing the time interval for reading the data from the annular buffer zone.

5. The method of claim 1, wherein the indication to end recording the pending video stream comprises at least one of:

the capacity of the annular buffer zone after expansion is larger than the set maximum value;

the time interval for reading data from the annular buffer zone reaches a set maximum time interval, and the data of the video stream to be processed is not acquired;

a trigger operation to the end recording button is detected.

6. The method according to claim 5, wherein based on that the time interval for reading data from the ring buffer reaches a set maximum time interval and no data of the video stream to be processed is acquired after the recording is finished, the method further comprises:

responding to the triggering operation of a recording starting button;

if an available file for writing data exists currently, writing the data read from the ring buffer into the available file;

and if the available file does not exist currently, creating a new file, and writing the data read from the annular buffer area into the created file.

7. The method of claim 1, wherein the video recording and the local storage share a network stream.

8. The method of claim 1, wherein reading data from the ring buffer and writing to a file comprises:

and reading data from the annular buffer area, coding and decoding the read data, and writing the coded and decoded data into the file.

9. An electronic device, comprising:

a processor;

a memory for storing the processor-executable instructions;

wherein the processor is configured to execute the instructions to implement the network video stream local storage method of any of claims 1-8.

10. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a terminal of an electronic device, enable the electronic device to perform the network video stream local storage method of any one of claims 1-8.

Technical Field

The present application relates to the field of network video stream storage technologies, and in particular, to a method, a device, and a medium for locally storing a network video stream.

Background

The monitoring and collecting images are transmitted to a remote device for storage in real time, and the method is a typical network video stream storage scene. Nowadays, local storage of network video streams becomes a new trend, and users can perform downstream services such as data analysis mining and the like based on the stored video streams.

In the related art, local storage of network video streams has been implemented. But because the network environment is complex and diverse and has great instability, errors can be caused when the network video stream is stored locally, and storage failure is caused.

Disclosure of Invention

The application aims to provide a local storage method, equipment and medium of a network video stream, which are used for solving the problem that storage fails due to errors in local storage of the network video stream caused by complex and various network environments and great instability.

In a first aspect, the present application provides a method for locally storing a network video stream, where the method includes:

dynamically adjusting the capacity of a ring buffer based on the data length of the video stream to be processed;

storing the video stream to be processed into the ring buffer;

reading data from the ring buffer and writing the data into a file;

if the data length of the file reaches the set length, writing the subsequently read data into a new file;

and responding to the instruction of finishing recording the video stream to be processed, and synthesizing the files of the video stream to be processed into one file.

In some embodiments, the dynamically adjusting the size of the ring buffer based on the data length of the video stream to be processed specifically includes:

comparing the data length of the video stream to be processed with the residual capacity of the ring buffer;

and if the data length of the video stream to be processed is greater than the residual capacity of the ring buffer, performing multiple-level capacity expansion on the capacity of the ring buffer.

In some embodiments, in the reading of data from the ring buffer, the method further comprises:

dynamically adjusting a time interval for reading data from the ring buffer.

In some embodiments, the dynamically adjusting the time interval for reading data from the ring buffer specifically includes:

identifying whether the data of the video stream to be processed is stored in the ring buffer or not every interval of the time interval;

when determining that the data of the video stream to be processed is not stored in the ring buffer for n times continuously, increasing the time interval of reading the data from the ring buffer for the next time, wherein n is a positive integer greater than or equal to 2;

and when the annular buffer zone has data and the capacity of the annular buffer zone reaches the set maximum value and the time interval for reading the data is greater than the preset interval lower limit, reducing the time interval for reading the data from the annular buffer zone.

In some embodiments, the indication to end recording the pending video stream comprises at least one of:

the capacity of the annular buffer zone after expansion is larger than the set maximum value;

the time interval for reading data from the annular buffer zone reaches a set maximum time interval, and the data of the video stream to be processed is not acquired;

a trigger operation to the end recording button is detected.

In some embodiments, based on that the time interval for reading data from the ring buffer reaches a set maximum time interval and no end recording of data of the video stream to be processed is acquired, the method further comprises:

responding to the triggering operation of a recording starting button;

if an available file for writing data exists currently, writing the data read from the ring buffer into the available file;

and if the available file does not exist currently, creating a new file, and writing the data read from the annular buffer area into the created file.

In some embodiments, video recording and local storage share a single network stream.

In some embodiments, the reading data from the ring buffer and writing to a file includes:

and reading data from the annular buffer area, coding and decoding the read data, and writing the coded and decoded data into the file.

In a second aspect, the present application provides an electronic device comprising:

a processor;

a memory for storing the processor-executable instructions;

wherein the processor is configured to execute the instructions to implement the network video stream local storage method according to any one of the first aspect.

In a third aspect, the present application provides a computer-readable storage medium, where instructions, when executed by a terminal of an electronic device, enable the electronic device to perform the network video stream local storage method according to any one of the first aspect.

In the embodiment of the application, the capacity of the ring buffer for storing the video stream data is dynamically adjusted, and the maximum value is set for the capacity of the ring buffer, so that the problem of memory overflow caused by network instability is solved. Meanwhile, the time interval for reading data from the annular buffer area is dynamically adjusted, and the recorded video file is stored in a segmented mode to solve the problem that the whole recorded file cannot be generated or the generated file is wrong due to the fact that a problem occurs in the last time period when a program runs idle for a long time and is recorded for a long time.

Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.

Fig. 1 is an application scenario diagram of network video stream storage according to an embodiment of the present application;

fig. 2 is a schematic diagram of a local storage method for a network video stream according to an embodiment of the present application;

FIG. 3 is a flow chart illustrating dynamic adjustment of ring buffer size according to an embodiment of the present disclosure;

FIG. 4 is a flowchart illustrating a process for dynamically adjusting a time interval for reading data from a ring buffer according to an embodiment of the present application;

FIG. 5 is a flowchart illustrating a ring buffer storing a video stream according to an embodiment of the present application;

FIG. 6 is a flowchart illustrating a process from reading a video stream to generating a final file according to an embodiment of the present application;

fig. 7 is a schematic view of an electronic device provided in an embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. The embodiments described are some, but not all embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

In order to solve the problem that storage fails due to errors in local storage of network video streams caused by complex and various network environments and great instability, the inventor conducts research and analysis on the reasons of the errors. When the memory overflow and the long-time recording are analyzed, the problem occurs in the last time period, so that the whole recording file cannot be generated, and the local storage of the network video stream is often failed. In view of this, embodiments of the present application provide a method, device, and medium for local storage of a network video stream. The method for storing the network video stream locally provided by the present application will be described below with reference to an embodiment.

The inventive concept of the present application can be summarized as follows: the method comprises the steps that a ring buffer area is adopted, and the capacity of the ring buffer area is dynamically adjusted based on the data length of a video stream to be processed; the video stream to be processed is then stored to a ring buffer. By adopting the method, the capacity of the ring buffer can be expanded, so that the problem of memory overflow caused by sudden increase of flow is avoided, and the whole computer system can run more stably. When writing in the local, reading data from the annular buffer area and writing the data into a file, monitoring the size of the file, and if the data length of the file reaches a set length, writing the subsequently read data into a new file; when the recording is finished, each file of the video stream to be processed can be synthesized into one file. By adopting the method, the file can be stored in a segmented manner, so that the risk of file generation failure is reduced, and the reliability of local storage of the network video stream is improved.

In addition, in the embodiment of the application, when the flow is small, the idle running of the program is long when the time interval for reading data from the ring buffer is dynamically adjusted in the process of writing the file, so that the computer resource is saved.

After the main inventive concepts of the embodiments of the present application are introduced, some simple descriptions are provided below for application scenarios to which the technical solutions of the embodiments of the present application can be applied, and it should be noted that the application scenarios described below are only used for describing the embodiments of the present application and are not limited. In specific implementation, the technical scheme provided by the embodiment of the application can be flexibly applied according to actual needs.

Reference is made to fig. 1, which is a diagram illustrating an application scenario of network video stream storage according to an embodiment of the present application. The application scene graph comprises the acquisition device 101, the terminal device 102 and a file 103 stored in the terminal device 102. The acquisition device 101 and the terminal device 102 are connected via a wireless or wired network, and the terminal device 102 includes but is not limited to a desktop computer, a mobile computer, a tablet computer, a smart phone, a smart television and other electronic devices. The capturing device 101 is a device for capturing a video stream, such as a video camera, a still camera, a monitor, etc.

Of course, the method provided in the embodiment of the present application is not limited to the application scenario shown in fig. 1, and may also be used in other possible application scenarios, and the embodiment of the present application is not limited. The functions that can be implemented by each device in the application scenario shown in fig. 1 will be described in the following method embodiments, and will not be described in detail herein.

The capture device 101 provides the network video stream to the terminal device 102, and the terminal device 102 stores the network video stream locally. In the storage process, if necessary, for example, the network video stream needs to be converted into a format suitable for storage, the terminal device 102 performs video coding and decoding on the acquired data of the network video stream to obtain a byte stream, and finally stores the generated byte stream into the file 103, thereby completing the whole process of local storage of the network video stream.

Fig. 2 is a schematic diagram of a local storage method for a network video stream according to an embodiment of the present application. As shown in fig. 2, the method comprises the steps of:

first, a ring buffer can be applied, and when a pending video stream is transmitted to the network and needs to be stored, the capacity of the ring buffer can be dynamically adjusted in step 201 based on the data length of the pending video stream.

Specifically, the data length of the video stream to be processed may be understood as the number of bytes included in the network video stream transmitted this time.

In some embodiments, when the video stream is stored in the ring buffer, it is determined whether the ring buffer has enough space, and then the capacity of the ring buffer is dynamically adjusted according to the determination result. To facilitate understanding of the method of dynamically adjusting the size of the ring buffer, the following is further described with reference to fig. 3. As shown in fig. 3, a schematic flow chart of dynamically adjusting the size of a ring buffer according to an embodiment of the present application includes the following steps:

in step 301, the remaining capacity of the ring buffer is obtained.

In step 302, the data length of the video stream to be processed is compared with the remaining capacity of the ring buffer, and if the data length of the video stream to be processed is greater than the remaining capacity of the ring buffer, step 303 is executed, and if the data length of the video stream to be processed is not greater than the remaining capacity of the ring buffer, step 304 is executed.

In step 303, the capacity of the ring buffer is expanded by multiple levels.

In another embodiment, the capacity expansion may be performed in other manners, which are all applicable to the embodiment of the present application, for example, the capacity expansion is performed according to a specified capacity, such as 500M (MB, mega) per time.

In step 304, the video stream to be processed is stored in a ring buffer.

Of course, in other embodiments, if the remaining capacity of the ring buffer is much larger than the data length of the video stream to be processed, appropriate capacity reduction may also be performed on the ring buffer to release some buffer space resources.

During implementation, the capacity of the ring buffer can be adjusted according to the requirement. Optionally, in order to avoid that the capacity of the ring buffer is always expanded under an extreme condition, which results in the memory exhaustion of the terminal, thereby affecting the stable operation of the whole computer system. In the embodiment of the present application, the maximum value of the capacity of the ring buffer can be set. When the total capacity of the ring buffer reaches the maximum value of the capacity, an error is reported, the processing of the video stream is finished, and then the recording is restarted.

Based on the foregoing description, the capacity of the ring buffer can be reasonably adjusted according to the data length of the video stream to be processed, so that it can be ensured that there is enough buffer space to accommodate the video stream to be processed, and it is ensured that the data of the video stream to be processed can be successfully read from the ring buffer subsequently. The video stream to be processed is then stored in a ring buffer in step 202.

Step 203: data is read from the ring buffer and written to a file.

In some embodiments, in order to reduce resource consumption caused by idle running of the program, in the process of reading data of the video stream from the ring buffer, the resource utilization rate may be improved by dynamically adjusting the time interval of reading the data of the video stream from the ring buffer in the embodiments of the present application. Specifically, as shown in fig. 4, a schematic flow chart of dynamically adjusting a time interval for reading data from a ring buffer according to an embodiment of the present application includes the following steps:

in step 401, video stream data is read from a ring buffer.

In step 402, it is determined whether the ring buffer is empty and the number of consecutive empty times exceeds a set threshold.

In step 403, if the ring buffer has no video stream data n times (for example, 10 times, which may be set as required) in succession, the time interval for reading data from the ring buffer next time is increased, where n is a positive integer greater than or equal to 2. Wherein the increasing may be implemented to double the time interval for reading the data.

In step 404, if there is video stream data and the occupied space reaches the set threshold, the call interval is decreased. Wherein the reduced manner may be implemented to halve the time interval for reading the data.

Of course, in order to further reduce resource consumption caused by idle running, the maximum time interval for reading data may also be set in the embodiment of the present application. In practice, if the time interval for reading data from the ring buffer is increased, the increased time interval is compared with the maximum time interval. If the increased time interval is less than or equal to the maximum time interval, initiating next call according to the time interval, namely reading data from the ring buffer area; if the increased time interval is greater than the maximum time interval, it can be shown that no network video stream needs to be stored temporarily, the recording can be finished first, and when a new network video stream is transmitted, the recording is pulled up again.

If no data exists, the recording is finished when the maximum time interval is reached. When a new network video stream is transmitted, if an available file for writing data is available at present, writing the data read from the annular buffer area into the available file; and if no available file exists at present, a file is newly created, and the data read from the annular buffer area is written into the newly created file to restart the recording.

In some embodiments, the network video stream formats are diverse, some formats being suitable for storage and some formats being unsuitable for storage. For a format unsuitable for storage, in the embodiment of the present application, after data is read from the ring buffer, the read data may be encoded and decoded and then written into a file.

Specifically, as for the encoding format of the network Video stream, some are suitable for streaming transmission, such as rtmp (Real Time Messaging Protocol) format, http-flv (Hyper Text Transfer Protocol-Flash Video, hypertext Transfer Protocol-streaming media format), and some are suitable for storing files, such as MP4, assuming that the network Video stream is in http-flV format and is finally stored as a file in MP4 format, the http-flV stream is decoded to obtain metadata, audio data, Video data, and the like, and then the obtained metadata, audio data, and Video data are recoded according to the standard format of MP4 and written into the file.

In the embodiment of the application, in order to avoid storage failure caused by long-time recording, the file can be generated in a fragment storage mode. If the data length of the file reaches the set length, the data to be read subsequently is written into a new file in step 204.

In some embodiments, the set length is configured by the user as desired. For example, a video stream of 5.5G size needs to be stored, the user can set the set length to 1G.

Optionally, in the process of storing the file, the data length written in each file is accumulated to obtain the size of the current file, and if the size of the current file exceeds the set length, the file is closed, and a new file is opened to continue writing. For example, the video stream obtained from the ring buffer is encoded and decoded and then stored into the file a. if the file a reaches the set size, a new file B is opened, the file B reaches the set size, and then a file C is opened until all the files to be stored are stored into the file. Finally, in step 205, in response to the instruction to finish recording the pending video stream, the files of the pending video stream are combined into one file.

Optionally, the instruction to end recording the to-be-processed video stream includes at least one of the following:

1) as described above, when the capacity of the circular buffer after expansion is large, it will occupy more memory, and the recording can be finished to release the memory resource. Therefore, the instruction for finishing recording the video stream to be processed can be implemented that the capacity of the expanded annular buffer is larger than the set maximum value, and a plurality of files of the same network video stream can be combined in time based on the instruction.

2) As described above, when the time interval for reading data from the ring buffer reaches the set maximum time interval and data of the video stream to be processed is not acquired, the program may run idle for a long time, and recording may be finished, so as to save computer resources. Thus, the indication of ending recording the pending video stream may be implemented as the time interval for reading data from the ring buffer reaches the set maximum time interval and data of the pending video stream is not acquired.

3) When the triggering operation of the recording ending button is detected, the recording can be ended. Thus, the indication to end recording the pending video stream may be implemented as detecting a trigger operation to the end recording button.

In some embodiments, the files of the video stream to be processed are combined into one file. For example, the files A, B, C obtained in the example of step 204 are merged into one file D, which is the final generated file.

In the embodiment of the application, the video recording and the local storage share one network stream, so that the storage processing after the stream is pulled again is avoided, and the simultaneous storage of multiple video streams is conveniently realized. For example, assuming that the total bandwidth of the PC is 10M, each path of monitoring occupies 2M of bandwidth, and at most 5 paths of monitoring can be pulled, if recording and pulling one path of stream, although the processing is much simpler, in this case, at most 2 paths of monitoring can be opened simultaneously due to the limitation of the total bandwidth. Therefore, the video monitoring device and the local storage use one path of network flow, namely the original data pulled is copied to be stored locally, and path-taking video flow storage can be achieved conveniently.

To facilitate understanding of the local storage method of the network video stream in the embodiment of the present application, taking the capture device 101 as an example for video monitoring, as shown in fig. 5, a schematic flow chart of storing the video stream in the ring buffer provided in the embodiment of the present application is shown.

As shown in fig. 5, storing the video stream obtained by video surveillance into the ring buffer requires the following steps:

step 501: the recording is initiated.

In this embodiment of the present application, in order to implement video recording and storage to share one video stream, in step 502: the video stream pulled by the video surveillance is copied.

Step 503: the length of the video stream in step 502 is compared to the maximum video stream length. If the video stream length is greater than the maximum video stream length, go to step 504; if the video stream length is smaller than or equal to the maximum video stream length, step 505 is executed.

Step 504: and carrying out fragment processing on the pulled video stream of the duplicate video monitoring. Here, the fragmentation processing means that the local terminal performs fragmentation.

Step 505: the acquired video stream is ready to be stored in a ring buffer.

Step 506: the size of the video stream is compared with the remaining capacity of the ring buffer to determine whether the ring buffer has sufficient space. If the space of the ring buffer is not enough, go to step 507; if the space of the ring buffer is sufficient, step 509 is performed.

Step 507: and multiplying the capacity of the current buffer area.

Step 508: and judging whether the capacity of the expanded ring buffer area exceeds the set maximum value. If not, go to step 509; if the maximum value is exceeded, step 510 is executed to wait for the recording to be restarted next time.

Step 509: the video stream is stored in a ring buffer.

Step 510: and reporting an error and finishing recording.

Fig. 6 is a flowchart illustrating a process from reading a video stream to generating a final file according to an embodiment of the present application. Specifically, as shown in fig. 6, the following steps are required from reading data from the ring buffer to generating the final file:

step 601: data is read from the ring buffer.

Step 602: and judging whether the ring buffer area is empty and the number of times of continuous empty exceeds a set threshold value. If yes, go to step 603 and step 604; if not, go directly to step 605.

Step 603: the interval of the calling time is doubled.

Step 604: and judging whether the doubled time is larger than the maximum time interval. If the doubled time is greater than the maximum time interval, go to step 611; if the doubled time is less than or equal to the maximum time interval, go to step 610.

Step 605: and reading data to perform video coding and decoding to obtain byte streams.

Step 606: the byte stream is written to the current file.

Step 607: and judging whether the size of the current file exceeds the maximum value. If the maximum value is exceeded, go to step 608; if not, go to step 609.

Step 608: and closing the current file and writing a new file.

Step 609: and judging whether the recording is finished or not. If the video path recording has not been finished, execute step 610; if the recording is finished, step 611 is executed.

Step 610: the next call is initiated according to the time interval.

Step 611: and finishing recording, combining all current files and generating the last file.

With reference to fig. 5 and fig. 6, a complete description of the embodiments of the present application is given by taking video monitoring as an example.

Optionally, the file is stored in segments, so that the risk of file generation failure can be reduced.

Specifically, the file is stored in a fixed-size partition. The fixed size is a threshold of the set file size. For example: each file is stored according to the size of 1G, if the file size exceeds 1G, a new file is created, the file size generated by recording a video stream in one hour is 1G according to the current speed, if the file is not stored according to a fixed size, a problem (such as browser crash and exit and the like) occurs after the video stream is continuously recorded for 10 hours and 10 minutes, the video stream in 10 hours and 10 minutes can be stored unsuccessfully, if the file is stored according to the size division, 10 files of 1G are generated at present, and the file cannot be normally generated only in the last 10 minutes, so that the influence is small.

The electronic device 130 according to this embodiment of the present application is described below with reference to fig. 7. The electronic device 130 shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.

As shown in fig. 7, the electronic device 130 is represented in the form of a general electronic device. The components of the electronic device 130 may include, but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 that connects the various system components (including the memory 132 and the processor 131).

Bus 133 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.

The memory 132 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)1321 and/or cache memory 1322, and may further include Read Only Memory (ROM) 1323.

Memory 132 may also include a program/utility 1325 having a set (at least one) of program modules 1324, such program modules 1324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.

The electronic device 130 may also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), with one or more devices that enable a user to interact with the electronic device 130, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 130 to communicate with one or more other electronic devices. Such communication may occur via input/output (I/O) interfaces 135. Also, the electronic device 130 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 136. As shown, network adapter 136 communicates with other modules for electronic device 130 over bus 133. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.

In an exemplary embodiment, a computer-readable storage medium comprising instructions, such as the memory 132 comprising instructions, executable by the processor 131 to perform the network video stream local storage method described above is also provided. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

In an exemplary embodiment, a computer program product is also provided, comprising a computer program which, when executed by the processor 131, implements any of the network video stream local storage methods as provided herein.

In an exemplary embodiment, various aspects of a network video stream local storage method provided by the present application may also be implemented in the form of a program product, which includes program code for causing a computer device to perform the steps of the network video stream local storage method according to various exemplary embodiments of the present application described above in this specification when the program product is run on the computer device.

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 for the network video stream local storage method of the embodiment of the present application may employ a portable compact disc read only memory (CD-ROM) and include program codes, and may be run on an electronic device. However, the program product of the present application is not limited thereto, and in this 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 many 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 of the present application 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 consumer electronic device, partly on the consumer electronic device, as a stand-alone software package, partly on the consumer electronic device and partly on a remote electronic device, or entirely on the remote electronic device or server. In the case of remote electronic devices, the remote electronic devices may be connected to the consumer electronic device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external electronic device (e.g., through 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 units described above may be embodied in one unit, according to embodiments of the application. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.

Further, while the operations of the methods of the present application are depicted in the drawings in a particular order, this does not require or imply that these 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.

The embodiments provided in the present application are only a few examples of the general concept of the present application, and do not limit the scope of the present application. Any other embodiments extended according to the scheme of the present application without inventive efforts will be within the scope of protection of the present application for a person skilled in the art.

As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application 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 application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. 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.

It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种短播视频处理方法、装置及设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类