CN113741814A - Data processing method, data processing device, computer readable storage medium and computer equipment - Google Patents

Data processing method, data processing device, computer readable storage medium and computer equipment Download PDF

Info

Publication number
CN113741814A
CN113741814A CN202110975557.7A CN202110975557A CN113741814A CN 113741814 A CN113741814 A CN 113741814A CN 202110975557 A CN202110975557 A CN 202110975557A CN 113741814 A CN113741814 A CN 113741814A
Authority
CN
China
Prior art keywords
audio
stored
video data
video
cloud
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110975557.7A
Other languages
Chinese (zh)
Inventor
陈杨钦
其他发明人请求不公开姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN202110975557.7A priority Critical patent/CN113741814A/en
Publication of CN113741814A publication Critical patent/CN113741814A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Abstract

The embodiment of the application discloses a data processing method, a data processing device, a computer readable storage medium and computer equipment, wherein audio and video data to be stored are acquired; detecting a remaining capacity of the local storage; when the residual capacity is not less than a preset threshold value, storing the audio and video data to be stored in a local memory; and when the residual capacity is smaller than a preset threshold value, storing the audio and video data which are not stored in the audio and video data to be stored to a cloud end. Therefore, the storage position of the audio and video data to be stored is automatically selected by detecting the residual capacity of the local memory, and when the residual capacity is smaller than the preset threshold value, the audio and video data which are not stored in the audio and video data to be stored are automatically stored to the cloud, so that the condition that the audio and video data to be stored are lost when the capacity of the local memory is insufficient is avoided, the data processing efficiency is improved, and the storage efficiency of the audio and video data is improved.

Description

Data processing method, data processing device, computer readable storage medium and computer equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a data processing method, an apparatus, a storage medium, and a computer device.
Background
When a user uses the camera product, the audio and video data recorded by the camera product need to be stored for subsequent watching.
In the storage process of the audio and video data, a user needs to manually select a storage position, and when the storage capacity of the storage position is full, the recorded audio and video data may be lost, which brings bad experience to the user and reduces the storage efficiency of the audio and video data.
Disclosure of Invention
The embodiment of the application provides a data processing method, a data processing device, a computer readable storage medium and computer equipment. The data processing efficiency can be improved, and the storage efficiency of the audio and video data is further improved.
A method of data processing, comprising:
collecting audio and video data to be stored;
detecting a remaining capacity of the local storage;
when the residual capacity is not less than a preset threshold value, storing the audio and video data to be stored in a local memory;
and when the residual capacity is smaller than a preset threshold value, storing audio and video data which are not stored in the audio and video data to be stored to a cloud end.
Correspondingly, an embodiment of the present application provides a data processing apparatus, including:
the acquisition unit is used for acquiring audio and video data to be stored;
a detection unit for detecting a remaining capacity of the local storage;
the first storage unit is used for storing the audio and video data to be stored in a local storage when the residual capacity is not less than a preset threshold value;
and the second storage unit is used for storing audio and video data which are not stored in the audio and video data to be stored to a cloud end when the residual capacity is smaller than a preset threshold value.
In one embodiment, the first storage unit includes:
the first storage subunit is used for storing the first audio and video sub-data of the preset storage space into the local storage and stopping the local storage;
and the second storage subunit is used for storing the remaining second audio/video sub-data to the cloud.
In an embodiment, the data processing apparatus further includes:
the first receiving unit is used for receiving a playing request aiming at the audio and video data to be stored;
the first acquisition unit is used for acquiring first audio and video subdata stored in a local memory and playing the first audio and video subdata;
and the cache unit is used for receiving and caching the second audio and video subdata stored in the cloud, and playing the cached second audio and video subdata when the playing of the first audio and video subdata is finished.
In one embodiment, the second storage unit includes:
the dividing subunit is used for dividing the audio and video data which is not stored in the audio and video data to be stored into at least two sections of target audio and video subdata according to a preset condition;
and the third storage subunit is used for respectively storing the target audio and video sub-data to a cloud.
In an embodiment, the data processing apparatus further includes:
the second receiving unit is used for receiving the playing request aiming at the audio and video data to be stored;
the second acquisition unit is used for acquiring the audio and video data to be stored, which is stored by the cloud, when the fact that the audio and video data to be stored are not stored in the local memory is detected;
and the playing unit is used for playing each section of target audio and video sub-data in the audio and video data to be stored according to the time sequence.
In one embodiment, the second storage unit includes:
the query subunit is used for querying the available cloud storage service associated with the local storage;
the first obtaining subunit is used for obtaining an access certificate corresponding to the available cloud storage service when the available cloud storage service is inquired;
and the fourth storage subunit is used for storing the audio and video data which are not stored in the audio and video data to be stored to the cloud according to the access certificate.
In an embodiment, the data processing apparatus further includes:
the searching unit is used for searching the activatable target cloud storage service when the available cloud storage service is not searched;
the system comprises a sending unit, a storage unit and a processing unit, wherein the sending unit is used for sending an activation request to a server to activate a target cloud storage service when the target cloud storage service which can be activated is found;
and the third storage unit is used for receiving a target access certificate corresponding to the activation request and storing the audio and video data which are not stored to a cloud terminal through the target access certificate.
In addition, a computer-readable storage medium is provided, where the computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to perform the steps in any one of the data processing methods provided in the embodiments of the present application.
In addition, the embodiment of the present application further provides a computer device, which includes a processor and a memory, where the memory stores an application program, and the processor is configured to run the application program in the memory to implement the data processing method provided in the embodiment of the present application.
Embodiments of the present application also provide a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, so that the computer device executes the steps in the data processing method provided by the embodiment of the application.
The embodiment of the application acquires audio and video data to be stored; detecting a remaining capacity of the local storage; when the residual capacity is not less than a preset threshold value, storing the audio and video data to be stored in a local memory; and when the residual capacity is smaller than a preset threshold value, storing the audio and video data which are not stored in the audio and video data to be stored to a cloud end. Therefore, the storage position of the audio and video data to be stored is automatically selected by detecting the residual capacity of the local memory, and when the residual capacity is smaller than the preset threshold value, the audio and video data which are not stored in the audio and video data to be stored are automatically stored to the cloud, so that the condition that the audio and video data to be stored are lost when the capacity of the local memory is insufficient is avoided, the data processing efficiency is improved, and the storage efficiency of the audio and video data is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description 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 a schematic view of an implementation scenario of a data processing method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a data processing method according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a computer device provided in an embodiment of the present application.
Detailed Description
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, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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.
The embodiment of the application provides a data processing method, a data processing device, a computer readable storage medium and computer equipment. The data processing apparatus may be integrated into a computer device, and the computer device may be a server or a terminal.
Referring to fig. 1, for example, a data processing apparatus is integrated in a computer device, and fig. 1 is a schematic view of an implementation environment scene of a data processing method provided in an embodiment of the present application, where the data processing method includes a server a and a terminal B, where the server a may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Network acceleration service (CDN), and a big data and artificial intelligence platform.
The terminal B may be various computer devices capable of performing data processing, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, and a monitoring device, but is not limited thereto. The terminal B can collect audio and video data to be stored; detecting a remaining capacity of the local storage; when the residual capacity is not less than a preset threshold value, storing the audio and video data to be stored in a local memory; and when the residual capacity is smaller than a preset threshold value, storing the audio and video data which are not stored in the audio and video data to be stored to a cloud end.
The terminal B and the server a may be directly or indirectly connected through wired or wireless communication, and the server a may receive data uploaded by the terminal B to perform corresponding data processing operations, which is not limited herein.
It should be noted that the schematic diagram of the implementation environment scenario of the data processing method shown in fig. 1 is only an example, and the implementation environment scenario of the data processing method described in the embodiment of the present application is for more clearly explaining the technical solution of the embodiment of the present application, and does not constitute a limitation to the technical solution provided by the embodiment of the present application. As will be appreciated by those skilled in the art, with the evolution of data processing and the emergence of new business scenarios, the technical solutions provided in the present application are equally applicable to similar technical problems.
The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
The present embodiment will be described from the perspective of a data processing apparatus, which may be specifically integrated in a computer device, and the computer device may be a terminal, and the present application is not limited herein.
Referring to fig. 2, fig. 2 is a schematic flow chart of a data processing method according to an embodiment of the present disclosure. The data processing method comprises the following steps:
in step 101, audio/video data to be stored is collected.
Most of the camera products in the market support storing audio and video data in a cloud, and in the using process, a user needs to manually set the cloud storage, and when a video is played, the user needs to manually select to play the audio and video data stored in a Secure Digital Memory Card (SD Card for short) or stored in the cloud. In the existing storage scheme, the audio and video data are stored in the cloud by default, unnecessary cloud storage space is occupied by the way that the audio and video data are stored in the cloud by default, a user needs to pay extra high cloud storage cost, and meanwhile, the audio and video data are influenced by network speed in the playing process, so that the fluency and the image quality effect of the audio and video are influenced, and the watching experience of the user is reduced; the method is characterized in that the audio and video data are stored in the SD card but limited by the storage capacity of the SD card, and after the storage capacity of the SD card is full, if the audio and video data are recorded again, when the recorded audio and video data are stored, the audio and video data are likely to fail to be stored due to the fact that the capacity of the SD card is insufficient and a user does not manually switch other storage schemes, so that video monitoring content is lost, and irreparable loss is brought to the user. In addition, in the existing scheme, the user needs to manually set in the storage process and the playing process of the audio and video data, so that the operation cost of the user is increased, and the user experience is reduced.
Therefore, the embodiment of the application provides a data processing method, by integrating the capacity of the SD card and the capability of cloud service, the most suitable audio/video storage scheme is automatically provided for the user, when the capacity of the SD card is full, the SD card is automatically switched to cloud storage, and when playing audio/video, the user does not need to manually switch a playing source, and the audio/video data of local storage and cloud storage is automatically spliced and played, so that the operation cost of the user is reduced, the storage efficiency of the audio/video data is improved, and the user experience is further improved. The data processing method provided by the present application is described in detail below.
Firstly, audio and video data to be stored is collected, specifically, the audio and video data to be stored can be collected in real time through a camera, or the collected audio and video data to be stored can also be collected, and the audio and video data can comprise audio data and video data.
In step 102, the remaining capacity of the local memory is detected.
The remaining capacity may be a difference between a total capacity of the local storage and a used capacity in the local storage, for example, assuming that the total capacity of the local storage is 800 Megabytes (MB), and the used capacity in the local storage is 200 megabytes, the remaining capacity in the local storage is 600 megabytes.
Specifically, the collected audio and video data to be stored can be preferentially stored in a local storage through setting, so that the condition that the audio and video data are lost due to storage failure of the audio and video data when the local storage capacity is insufficient can be avoided, the residual capacity of the local storage can be detected when the audio and video data to be stored are stored, and the storage scheme of the audio and video data to be stored can be automatically adjusted according to the residual capacity of the local storage. The local storage may be an SD card, or may be other local storage devices, which is not limited herein.
In step 103, when the remaining capacity is not less than the preset threshold, storing the audio/video data to be stored in the local memory.
The preset threshold value can be a preset critical value, and when the residual capacity of the local memory is not less than the critical value, the audio and video data to be stored can be stored in the local memory so as to improve the storage efficiency of the audio and video data. Specifically, the preset threshold may be 0, that is, when the remaining capacity of the local memory is greater than 0, the audio/video data to be stored may be stored in the local memory, the preset threshold may also be 100 megabytes, and when the remaining capacity of the local memory is greater than 100 megabytes, the audio/video data to be stored may be stored in the local memory, and so on.
In one embodiment, in order to improve the smoothness of audio/video playing, the audio/video data to be stored can be divided into two parts, which are respectively stored in the local part and the cloud end, when the audio/video data needs to be played, the audio/video data stored in the front part of the local part can be played firstly, the audio/video data stored in the rear part of the cloud end can be obtained at the same time, and loading and caching are carried out, after the audio/video data stored in the cloud end is cached, the cached audio/video data can be played continuously after the audio/video data in the front part is played, so that the smoothness of audio/video playing is improved, the blockage of audio/video playing when the network state is poor is reduced, meanwhile, the storage space of a local memory and the cloud end service is prevented from being rapidly consumed in a separate storage mode, and the storage efficiency of the audio/video data is improved, and then user experience is improved.
Specifically, the audio/video data to be stored may include first audio/video sub-data and second audio/video sub-data, where the first audio/video sub-data may be audio/video data stored in a local memory in the audio/video data to be stored, the second audio/video sub-data may be data stored in a cloud in the audio/video data to be stored, an acquisition time of the first audio/video sub-data is faster than that of the second audio/video sub-data, that is, the first audio/video sub-data is audio/video data of a front portion in the audio/video data to be stored, and the second audio/video sub-data is audio/video data of a rear portion in the audio/video data to be stored. The first audio and video subdata of the preset storage space can be stored in the local storage, when the first audio and video subdata of the preset storage space is stored, the local storage of the audio and video data to be stored can be stopped, and then the remaining second audio and video subdata in the audio and video data to be stored can be stored to the cloud. The preset storage space may be set to 100 megabytes or 200 megabytes, and may be specifically set according to actual situations.
In an embodiment, the preset storage space may be determined according to the size of the audio/video data to be stored, for example, if the audio/video data to be stored is 500 megabytes, the preset storage space may be set to 50 megabytes, and when the audio/video data to be stored is 900 megabytes, the preset storage space may be set to 90 megabytes, and the specific determination rule is not limited herein.
In one embodiment, the size of the preset storage space can be adjusted in real time according to the size of the audio/video data to be stored, which is acquired in real time.
In an embodiment, the preset storage space may be determined according to a size of the remaining capacity of the local storage, for example, assuming that the remaining capacity of the local storage is 2GB, the preset storage space may be set to 100 megabytes, when the remaining capacity of the local storage is 10GB, the preset storage space may be set to 500 megabytes, and the like, and the specific determination rule is not limited herein.
In an embodiment, the preset storage space may be determined according to a current network state, for example, when the network state is good, the preset storage space may be set to be 100 megabytes, when the network state is poor, the preset storage space may be set to be 500 megabytes, and the like, and a specific determination rule is not limited herein, so that the audio and video data stored in the cloud is adjusted according to the network state.
In an embodiment, when a play request for the to-be-stored audio/video data is received, first audio/video subdata stored in a local memory may be acquired and played, meanwhile, second audio/video subdata stored in a cloud is acquired and requested from the cloud, and then the second audio/video subdata stored in the cloud may be received and cached.
In step 104, when the remaining capacity is smaller than a preset threshold, storing the audio/video data not stored in the audio/video data to be stored to the cloud.
When the residual capacity of the local memory is smaller than the preset threshold, the local memory cannot efficiently and continuously store the audio and video data to be stored, so that the audio and video data which are not stored in the audio and video data to be stored can be stored to the cloud.
In an embodiment, in order to play the audio and video as soon as possible when the audio and video data is played, when the audio and video data to be stored is stored, the audio and video data which is not stored in the audio and video data to be stored is divided into at least two sections of target audio and video subdata according to a preset condition, and then the target audio and video subdata is respectively stored to a cloud. When the audio and video data to be stored needs to be played, the target audio and video subdata with the most advanced acquisition time can be loaded according to the acquisition time sequence, and then the loaded target audio and video subdata is played, so that the playing speed of the audio and video data is increased, and the data processing efficiency is improved.
Specifically, a playing request for the audio/video data to be stored can be received, whether the audio/video data to be stored exists in the local memory is detected, when it is detected that the audio/video data to be stored is not stored in the local memory, the audio/video data to be stored in the cloud is obtained, each section of target audio/video subdata in the audio/video data to be stored is loaded according to the collected time sequence, and each section of target audio/video subdata which is loaded is played.
The number of the audio/video data which is not stored and is divided into the target audio/video sub-data may be determined according to an actual situation, for example, may be determined according to the quality of a network state, may also be determined according to the experience of a technician, and may also be set by a user, which is not limited herein.
In an embodiment, a user can select recording time to play corresponding audio and video data through a client, specifically, when the audio and video data to be stored is stored, Metadata corresponding to the audio and video data to be stored can be stored to a cloud, where the Metadata (Metadata), also called intermediary data and relay data, is data (data about data) describing data, mainly information describing data attributes (property), and is used to support functions such as indicating a storage location, history data, resource search, file recording, and the like. Metadata is an electronic catalog, and in order to achieve the purpose of creating a catalog, the contents or features of data must be described and collected, so as to achieve the purpose of assisting data retrieval. Therefore, information such as recording start time, storage position and the like of the audio and video data to be stored can be obtained through metadata corresponding to the audio and video data to be stored, and the recording start time can be the acquisition start time and the acquisition stop time of the audio and video data to be stored.
Furthermore, when a play request carrying a target recording start time triggered by a User is received, target metadata corresponding to the target recording start time is requested to a cloud server through the target recording start time, and then the target metadata issued by the cloud server can be received, and a play timeline is spliced in a corresponding User Interface (UI for short) according to the target metadata, meanwhile, the server can determine a storage position of audio and video data to be played corresponding to the target metadata, and obtain first target audio and video data stored in a local memory and second target audio and video data stored in the cloud according to the storage position, wherein the first target audio and video data and the second target audio and video data form audio and video data to be played, and the first target audio and video data and the second target audio and video data form audio and video data to be played according to the recording start times of the first target audio and video data and the second target audio and video data And sequencing the frequency data and the second target audio and video data according to the sequence to obtain the sequenced audio and video data to be played, and then sending the sequenced audio and video data to be played to the terminal. And then the terminal can receive the audio and video data to be played and play the audio and video data to be played according to the playing time line, so that the audio and video data at different storage positions can be spliced and played, a user does not need to manually switch a playing source to play the audio and video, only needs to select the time to be watched in the client, and further can receive the audio and video data corresponding to the time to be played in a forward connection manner.
In an embodiment, the data processing method may be performed by a terminal, which may be an internet of things device, when the remaining capacity of the local memory is less than a preset threshold, the internet of things device may query whether there is an associated available cloud storage service, when the available cloud storage service is inquired, the access certificate corresponding to the available cloud storage service is acquired, specifically, the Internet of Things equipment can use a hypertext Transfer Protocol over secure transaction Layer (HTTPS) with an X.509 certificate to request an authentication and authorization module of the Internet of Things (IOT) to apply for an access certificate (STS Token) of KVS (KVS) service, when the access certificate is received, the existence of the associated available cloud storage service is indicated, and further storing the audio and video data which are not stored in the audio and video data to be stored to a cloud terminal through the access certificate.
In an embodiment, when the available cloud storage service is not queried, an activatable target cloud storage service may be searched, where the target cloud storage service may be a free trial cloud storage service, for example, a 7-day free experience cloud storage service, and when the activatable target cloud storage service is found, an activation request is sent to a server to activate the target cloud storage service, a target access credential corresponding to the activation request is received, and the audio and video data that is not stored is stored to a cloud through the target access credential. For example, a free cloud storage service can be applied and activated through the IOT authentication and authorization module, the IOT can issue the access credential to the internet of things device, and then the internet of things device can access an Application Programming Interface (API for short) of KVS by carrying the access credential, and perform signature processing on an access storage address, and then upload audio and video data to be stored to a corresponding storage address to realize cloud storage.
When the available target cloud storage service is not found, the message pushed by the server can be received to the client associated with the Internet of things equipment, so that the user is reminded to store the audio and video data which are not stored.
In an embodiment, the data processing method provided by the embodiment of the present application may be executed by a terminal, the terminal may be a monitoring device, the local storage may be a secure digital card, and specifically, the monitoring device may acquire audio and video data to be stored by calling a camera, and may detect a remaining capacity of the local secure digital card in real time in a storage process; when the residual capacity is not less than the preset threshold value, the audio and video data to be stored are stored in the local secure digital card, and when the residual capacity of the secure digital card is detected to be less than the preset threshold value, the audio and video data which are not stored in the audio and video data to be stored can be stored in the cloud. Therefore, the condition that the audio and video data to be stored are lost when the residual capacity of the local secure digital card is insufficient is avoided, the storage efficiency of the audio and video data is improved, and the user experience of a monitoring device user is improved.
In an embodiment, when the monitoring device monitors, in some scenes, continuous long-time non-target image frames may appear, for example, an unmanned night scene, and audio and video data acquired in such scenes has little effect and significance, and a large amount of storage space may be occupied when the audio and video data is stored. Therefore, when a preset object is detected, the collection of the audio and video data can be automatically started, and the audio and video data are uploaded to the cloud for storage, wherein the preset object can be a special human figure, an animal, a vehicle and other objects.
As can be seen from the above, in the embodiment of the application, the audio and video data to be stored are acquired; detecting a remaining capacity of the local storage; when the residual capacity is not less than a preset threshold value, storing the audio and video data to be stored in a local memory; and when the residual capacity is smaller than a preset threshold value, storing the audio and video data which are not stored in the audio and video data to be stored to a cloud end. Therefore, the storage position of the audio and video data to be stored is automatically selected by detecting the residual capacity of the local memory, and when the residual capacity is smaller than the preset threshold value, the audio and video data which are not stored in the audio and video data to be stored are automatically stored to the cloud, so that the condition that the audio and video data to be stored are lost when the capacity of the local memory is insufficient is avoided, the data processing efficiency is improved, and the storage efficiency of the audio and video data is improved.
In order to better implement the above method, an embodiment of the present invention further provides a data processing apparatus, which may be integrated in a computer device, and the computer device may be a terminal.
For example, as shown in fig. 3, for a schematic structural diagram of a data processing apparatus provided in an embodiment of the present application, the data processing apparatus may include an acquisition unit 201, a detection unit 202, a first storage unit 203, and a second storage unit 204, as follows:
the acquisition unit 201 is used for acquiring audio and video data to be stored;
a detection unit 202 for detecting a remaining capacity of the local memory;
the first storage unit 203 is used for storing the audio and video data to be stored in the local storage when the remaining capacity is not less than a preset threshold;
the second storage unit 204 is configured to store, to the cloud, audio and video data that is not stored in the audio and video data to be stored when the remaining capacity is smaller than a preset threshold.
In one embodiment, the first storage unit 203 includes:
the first storage subunit is used for storing the first audio and video sub-data of the preset storage space into the local storage and stopping the local storage;
and the second storage subunit is used for storing the remaining second audio/video sub-data to the cloud.
In one embodiment, the data processing apparatus further includes:
the first receiving unit is used for receiving a playing request aiming at the audio and video data to be stored;
the first acquisition unit is used for acquiring first audio and video subdata stored in the local memory and playing the first audio and video subdata;
and the cache unit is used for receiving and caching the second audio and video subdata stored in the cloud, and playing the cached second audio and video subdata when the playing of the first audio and video subdata is finished.
In one embodiment, the second storage unit 204 includes:
the dividing subunit is used for dividing the audio and video data which is not stored in the audio and video data to be stored into at least two sections of target audio and video subdata according to a preset condition;
and the third storage subunit is used for respectively storing the target audio and video subdata to the cloud.
In one embodiment, the data processing apparatus further includes:
the second receiving unit is used for receiving the playing request aiming at the audio and video data to be stored;
the second acquisition unit is used for acquiring the audio and video data to be stored, which is stored by the cloud, when the fact that the audio and video data to be stored is not stored in the local memory is detected;
and the playing unit is used for playing each section of target audio and video sub-data in the audio and video data to be stored according to the time sequence.
In one embodiment, the second storage unit 204 includes:
the query subunit is used for querying the available cloud storage service associated with the local storage;
the first obtaining subunit is used for obtaining an access certificate corresponding to the available cloud storage service when the available cloud storage service is inquired;
and the fourth storage subunit is used for storing the audio and video data which are not stored in the audio and video data to be stored to the cloud according to the access certificate.
In one embodiment, the data processing apparatus further includes:
the searching unit is used for searching the activatable target cloud storage service when the available cloud storage service is not searched;
the sending unit is used for sending an activation request to the server to activate the target cloud storage service when the target cloud storage service which can be activated is found;
and the third storage unit is used for receiving a target access certificate corresponding to the activation request and storing the audio and video data which are not stored to the cloud end through the target access certificate.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
As can be seen from the above, in the embodiment of the present application, the acquisition unit 201 acquires audio/video data to be stored; the detection unit 202 detects the remaining capacity of the local memory; when the residual capacity is not less than a preset threshold value, the first storage unit 203 stores the audio/video data to be stored in a local memory; when the remaining capacity is smaller than a preset threshold, the second storage unit 204 stores the audio/video data not stored in the audio/video data to be stored to the cloud. Therefore, the storage position of the audio and video data to be stored is automatically selected by detecting the residual capacity of the local memory, and when the residual capacity is smaller than the preset threshold value, the audio and video data which are not stored in the audio and video data to be stored are automatically stored to the cloud, so that the condition that the audio and video data to be stored are lost when the capacity of the local memory is insufficient is avoided, the data processing efficiency is improved, and the storage efficiency of the audio and video data is improved.
An embodiment of the present application further provides a computer device, as shown in fig. 4, which shows a schematic structural diagram of a computer device according to an embodiment of the present application, where the computer device may be a terminal, and specifically:
the computer device may include components such as a processor 301 of one or more processing cores, memory 302 of one or more computer-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 4 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. Wherein:
the processor 301 is a control center of the computer device, connects various parts of the entire computer device by various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 302 and calling data stored in the memory 302, thereby monitoring the computer device as a whole. Optionally, processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 301.
The memory 302 may be used to store software programs and modules, and the processor 301 executes various functional applications and data processing by operating the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 302 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.
The computer device further includes a power supply 303 for supplying power to the various components, and preferably, the power supply 303 may be logically connected to the processor 301 through a power management system, so as to manage charging, discharging, and power consumption management functions through the power management system. The power supply 303 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The computer device may also include an input unit 304, the input unit 304 being operable to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the computer device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 301 in the computer device loads the executable file corresponding to the process of one or more application programs into the memory 302 according to the following instructions, and the processor 301 runs the application programs stored in the memory 302, thereby implementing various functions as follows:
collecting audio and video data to be stored; detecting a remaining capacity of the local storage; when the residual capacity is not less than a preset threshold value, storing the audio and video data to be stored in a local memory; and when the residual capacity is smaller than a preset threshold value, storing the audio and video data which are not stored in the audio and video data to be stored to a cloud end.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein. It should be noted that the computer device provided in the embodiment of the present application and the data processing method in the foregoing embodiment belong to the same concept, and specific implementation processes thereof are described in the foregoing method embodiment and are not described herein again.
As can be seen from the above, in the embodiment of the application, the audio and video data to be stored are acquired; detecting a remaining capacity of the local storage; when the residual capacity is not less than a preset threshold value, storing the audio and video data to be stored in a local memory; and when the residual capacity is smaller than a preset threshold value, storing the audio and video data which are not stored in the audio and video data to be stored to a cloud end. Therefore, the storage position of the audio and video data to be stored is automatically selected by detecting the residual capacity of the local memory, and when the residual capacity is smaller than the preset threshold value, the audio and video data which are not stored in the audio and video data to be stored are automatically stored to the cloud, so that the condition that the audio and video data to be stored are lost when the capacity of the local memory is insufficient is avoided, the data processing efficiency is improved, and the storage efficiency of the audio and video data is improved.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any data processing method provided by the embodiments of the present application. For example, the instructions may perform the steps of:
collecting audio and video data to be stored; detecting a remaining capacity of the local storage; when the residual capacity is not less than a preset threshold value, storing the audio and video data to be stored in a local memory; and when the residual capacity is smaller than a preset threshold value, storing the audio and video data which are not stored in the audio and video data to be stored to a cloud end.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the computer-readable storage medium can execute the steps in any data processing method provided in the embodiments of the present application, the beneficial effects that can be achieved by any data processing method provided in the embodiments of the present application can be achieved, which are detailed in the foregoing embodiments and will not be described again here.
According to an aspect of the application, there is provided, among other things, a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations provided by the embodiments described above.
The data processing method, the data processing apparatus, the computer-readable storage medium, and the computer device provided in the embodiments of the present application are described in detail above, and a specific example is applied in the present application to explain the principles and embodiments of the present application, and the description of the above embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A data processing method, comprising:
collecting audio and video data to be stored;
detecting a remaining capacity of the local storage;
when the residual capacity is not less than a preset threshold value, storing the audio and video data to be stored in a local memory;
and when the residual capacity is smaller than a preset threshold value, storing audio and video data which are not stored in the audio and video data to be stored to a cloud end.
2. The data processing method of claim 1, wherein the audio/video data to be stored includes first audio/video sub-data and second audio/video sub-data, and the storing the audio/video data to be stored in a local memory includes:
storing the first audio/video subdata of the preset storage space into a local storage, and stopping local storage;
and storing the remaining second audio/video sub-data to the cloud.
3. The data processing method of claim 2, wherein the method further comprises:
receiving a playing request aiming at the audio and video data to be stored;
acquiring first audio and video subdata stored in a local memory, and playing the first audio and video subdata;
and receiving and caching second audio and video subdata stored in the cloud, and playing the cached second audio and video subdata when the playing of the first audio and video subdata is finished.
4. The data processing method of claim 1, wherein storing the audio/video data not stored in the audio/video data to be stored to a cloud comprises:
dividing the audio and video data which are not stored in the audio and video data to be stored into at least two sections of target audio and video subdata according to a preset condition;
and respectively storing the target audio and video subdata to a cloud terminal.
5. The data processing method of any of claim 4, wherein the method further comprises:
receiving a playing request aiming at the audio and video data to be stored;
when the fact that the audio and video data to be stored are not stored in the local memory is detected, the audio and video data to be stored and stored in the cloud are obtained;
and playing each section of target audio and video sub-data in the audio and video data to be stored according to the time sequence.
6. The data processing method according to any one of claims 1 to 5, wherein the storing, to a cloud, the audio/video data that is not stored in the audio/video data to be stored includes:
querying available cloud storage services associated with the local storage;
when available cloud storage service is inquired, acquiring an access certificate corresponding to the available cloud storage service;
and storing the audio and video data which are not stored in the audio and video data to be stored to a cloud terminal according to the access certificate.
7. The data processing method of claim 6, wherein the method further comprises:
searching for an activatable target cloud storage service when the available cloud storage service is not searched;
when the target cloud storage service which can be activated is found, an activation request is sent to a server to activate the target cloud storage service;
and receiving a target access certificate corresponding to the activation request, and storing the audio and video data which are not stored to a cloud terminal through the target access certificate.
8. A data processing apparatus, comprising:
the acquisition unit is used for acquiring audio and video data to be stored;
a detection unit for detecting a remaining capacity of the local storage;
the first storage unit is used for storing the audio and video data to be stored in a local storage when the residual capacity is not less than a preset threshold value;
and the second storage unit is used for storing audio and video data which are not stored in the audio and video data to be stored to a cloud end when the residual capacity is smaller than a preset threshold value.
9. A storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the data processing method according to any one of claims 1 to 7.
10. A computer device comprising a memory and a processor; the memory stores an application program, and the processor is configured to execute the application program in the memory to perform the steps of the data processing method according to any one of claims 1 to 7.
CN202110975557.7A 2021-08-24 2021-08-24 Data processing method, data processing device, computer readable storage medium and computer equipment Pending CN113741814A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110975557.7A CN113741814A (en) 2021-08-24 2021-08-24 Data processing method, data processing device, computer readable storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110975557.7A CN113741814A (en) 2021-08-24 2021-08-24 Data processing method, data processing device, computer readable storage medium and computer equipment

Publications (1)

Publication Number Publication Date
CN113741814A true CN113741814A (en) 2021-12-03

Family

ID=78732500

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110975557.7A Pending CN113741814A (en) 2021-08-24 2021-08-24 Data processing method, data processing device, computer readable storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN113741814A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114371815A (en) * 2021-12-13 2022-04-19 浙江大华技术股份有限公司 Data storage method, device and system

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101621524A (en) * 2009-07-29 2010-01-06 深圳市五巨科技有限公司 System and method for receiving and playing video data on mobile terminal
CN103237054A (en) * 2013-03-28 2013-08-07 东莞宇龙通信科技有限公司 Photo/video storage method and system, and mobile terminal
CN104052770A (en) * 2013-03-13 2014-09-17 鸿富锦精密工业(深圳)有限公司 Storage space expansion system and method
CN105681714A (en) * 2016-02-26 2016-06-15 北京金山安全软件有限公司 Video shooting method and device and electronic equipment
CN106462362A (en) * 2014-06-24 2017-02-22 谷歌公司 Storing content items
CN106817621A (en) * 2016-12-21 2017-06-09 北京奇虎科技有限公司 Mobile terminal and its video backup and playing method and device
CN106909315A (en) * 2015-12-23 2017-06-30 三星电子株式会社 File management method and electronic installation
CN107888636A (en) * 2016-09-30 2018-04-06 杭州海康威视数字技术股份有限公司 Data processing method and system based on cloud storage
CN109842781A (en) * 2017-11-29 2019-06-04 杭州海康威视系统技术有限公司 Monitor video playback method, device, system, media server and storage medium
CN111770309A (en) * 2020-06-24 2020-10-13 浙江大华技术股份有限公司 Video uploading method and device, electronic equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101621524A (en) * 2009-07-29 2010-01-06 深圳市五巨科技有限公司 System and method for receiving and playing video data on mobile terminal
CN104052770A (en) * 2013-03-13 2014-09-17 鸿富锦精密工业(深圳)有限公司 Storage space expansion system and method
CN103237054A (en) * 2013-03-28 2013-08-07 东莞宇龙通信科技有限公司 Photo/video storage method and system, and mobile terminal
CN106462362A (en) * 2014-06-24 2017-02-22 谷歌公司 Storing content items
CN106909315A (en) * 2015-12-23 2017-06-30 三星电子株式会社 File management method and electronic installation
CN105681714A (en) * 2016-02-26 2016-06-15 北京金山安全软件有限公司 Video shooting method and device and electronic equipment
CN107888636A (en) * 2016-09-30 2018-04-06 杭州海康威视数字技术股份有限公司 Data processing method and system based on cloud storage
CN106817621A (en) * 2016-12-21 2017-06-09 北京奇虎科技有限公司 Mobile terminal and its video backup and playing method and device
CN109842781A (en) * 2017-11-29 2019-06-04 杭州海康威视系统技术有限公司 Monitor video playback method, device, system, media server and storage medium
CN111770309A (en) * 2020-06-24 2020-10-13 浙江大华技术股份有限公司 Video uploading method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114371815A (en) * 2021-12-13 2022-04-19 浙江大华技术股份有限公司 Data storage method, device and system

Similar Documents

Publication Publication Date Title
US10552384B2 (en) Synchronizing media files available from multiple sources
EP2120165B1 (en) Systems and methods for space management in file systems
EP2897060B1 (en) Subtitle processing method, device and system, and storage medium
CN112153470B (en) Video playing method and device, computer equipment and storage medium
CN105786539B (en) File downloading method and device
CN111831618A (en) Data writing method, data reading method, device, equipment and storage medium
CN107317860B (en) Preloading method and device for theme detail page and electronic equipment
CN113741814A (en) Data processing method, data processing device, computer readable storage medium and computer equipment
CN111031117B (en) Multimedia file downloading method and related device
CN106899630B (en) Thumbnail display method and device for pictures in network disk
CN114579368B (en) Backup management method for continuous data protection, computer equipment and storage medium
CN111193940B (en) Audio playing method and device, computer equipment and computer readable storage medium
CN106302617B (en) Data processing method and device applied to computing device
CN114115623A (en) Information display method and device and information transmission method and device
CN106257461B (en) Data storage method and device
CN114205632A (en) Video preview method and device, electronic equipment and computer readable storage medium
CN111913918A (en) File storage method and device and electronic equipment
CN105812894A (en) Video file processing method and device based on intelligent terminal
CN112153478A (en) Video processing method and video playing method
CN113890872B (en) Data set uploading method and device, electronic equipment and storage medium
CN117171419B (en) Content processing method, device, electronic apparatus, storage medium, and program product
CN117255332B (en) Bluetooth connection control method and device, storage medium and electronic equipment
CN114125509B (en) Video playing method and device, electronic equipment and storage medium
CN113810737B (en) Video processing method and device, electronic equipment and storage medium
CN113765886B (en) Multimedia playing method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination