CN107562766B - Data file writing method, device and system - Google Patents

Data file writing method, device and system Download PDF

Info

Publication number
CN107562766B
CN107562766B CN201610523058.3A CN201610523058A CN107562766B CN 107562766 B CN107562766 B CN 107562766B CN 201610523058 A CN201610523058 A CN 201610523058A CN 107562766 B CN107562766 B CN 107562766B
Authority
CN
China
Prior art keywords
memory card
data
information
test
writing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610523058.3A
Other languages
Chinese (zh)
Other versions
CN107562766A (en
Inventor
杨秀秀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201610523058.3A priority Critical patent/CN107562766B/en
Publication of CN107562766A publication Critical patent/CN107562766A/en
Application granted granted Critical
Publication of CN107562766B publication Critical patent/CN107562766B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Television Signal Processing For Recording (AREA)

Abstract

The embodiment of the invention provides a data file writing method, a device and a system. The method comprises the following steps: receiving a formatting instruction aiming at a first memory card, wherein the instruction comprises first type information of a network camera; acquiring first capacity information of a first memory card; acquiring a plurality of first data files and first address information from a formatting information database according to first type information and first capacity information, wherein the plurality of data files corresponding to each type of information and each type of capacity information stored in the formatting information database and the address information corresponding to each data file are determined according to a plurality of memory cards with different capacities after being formatted by different types of network cameras; and respectively writing the plurality of first data files into corresponding addresses of the first memory card according to the first address information. Compared with the prior art, the memory card formatting operation is very convenient, the time consumed during formatting is shorter, and the formatting efficiency is higher.

Description

Data file writing method, device and system
Technical Field
The invention relates to the technical field of security monitoring, in particular to a data file writing method, device and system.
Background
With the development of security monitoring technology, the application of the network camera is more and more extensive. The network camera is a new generation camera produced by combining the traditional camera and the network technology, can transmit images to the other end of the earth through a network, and a viewer at the other end of the earth can monitor the images only through a standard network browser without using any professional software.
Generally, a user can store the recorded contents of the network camera by using a memory card, but since the file system after factory formatting of the memory card is generally a file system of FAT32, exFAT or NTFS format for WINDOWS users, while the file system used by the network camera is a dedicated file system, the file system corresponding to each type of network camera is different, and the file system dedicated to the network camera cannot be compatible with the file system of FAT32, exFAT or NTFS format at all, the user must format the memory card by using the network camera so that the file system in the memory card matches the file system dedicated to the network camera before the user stores the recorded contents by using the memory card.
When the memory card is formatted, the network camera determines a first data file in the file system of the network camera, creates a file which is the same as the first data file in the memory card according to the first data file, then determines a second data file in the file system of the network camera, creates a file which is the same as the second data file in the memory card according to the second data file, and the subsequent formatting operation is repeated. It can be seen that the network camera needs to create files in the memory card one by one according to each data file in its own file system, so the formatting operation of the memory card needs to take a long time, and how to improve the formatting efficiency of the memory card is an urgent problem to be solved.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, and a system for writing a data file to improve formatting efficiency of a memory card.
In one aspect, an embodiment of the present invention provides a data file writing method, which is applied to an electronic device, and the method includes the following steps:
receiving a formatting instruction aiming at a first memory card, wherein the formatting instruction comprises first type information of a network camera;
acquiring first capacity information of the first memory card;
acquiring a plurality of first data files and first address information corresponding to the first data files from a formatting information database according to the first type information and the first capacity information, wherein the plurality of data files corresponding to each type information and each type capacity information stored in the formatting information database and the address information corresponding to each data file are determined according to a plurality of memory cards with different capacities after being formatted by different types of network cameras;
and respectively writing the plurality of first data files into corresponding addresses of the first memory card according to the first address information.
Optionally, the method further includes:
performing performance test on different types of network cameras in advance to obtain performance test results of the various types of network cameras when the first memory card is used in different modes;
generating a test data table according to the performance test result;
and writing the test data table into the first memory card.
Optionally, in the above method, the test data table includes: the maximum video recording code rate of various types of network cameras when the first memory card is used in different modes.
Optionally, in the above method, the test data table includes: and the optimal video recording code rate of various types of network cameras when the first memory card is used in different modes.
Optionally, in the method, before the obtaining the first capacity information of the first memory card, the method further includes:
writing the test firmware data into the first memory card;
performing performance test on the first memory card through the test firmware data to detect whether hardware in the first memory card can work normally;
if yes, writing the target firmware data into the first memory card so that the target firmware data replaces the test firmware data.
On the other hand, an embodiment of the present invention further provides a data file writing device, which is applied to an electronic device, and the device includes:
the device comprises a formatting instruction receiving module, a format instruction receiving module and a format instruction processing module, wherein the formatting instruction receiving module is used for receiving a formatting instruction aiming at a first memory card, and the formatting instruction comprises first type information of a network camera;
a first capacity information acquiring module, configured to acquire first capacity information of the first memory card;
a format information obtaining module, configured to obtain, according to the first type information and the first capacity information, a plurality of first data files and first address information corresponding to each of the first data files from a format information database, where the plurality of data files and the address information corresponding to each of the data files corresponding to each type of information and each type of capacity information stored in the format information database are determined according to a plurality of memory cards with different capacities formatted by different types of network cameras;
and the first data file writing module is used for respectively writing the plurality of first data files into corresponding addresses of the first memory card according to the first address information.
Optionally, the apparatus further comprises:
the performance testing module is used for testing the performance of different types of network cameras in advance so as to obtain the performance testing result of the various types of network cameras when the first memory card is used in different modes;
the test data table generating module is used for generating a test data table according to the performance test result;
and the test data table writing module is used for writing the test data table into the first memory card.
Optionally, in the above apparatus, the test data table includes: the maximum video recording code rate of various types of network cameras when the first memory card is used in different modes.
Optionally, in the above apparatus, the test data table includes: and the optimal video recording code rate of various types of network cameras when the first memory card is used in different modes.
Optionally, the apparatus further comprises:
the test firmware data writing module is used for writing the test firmware data into the first memory card;
the performance testing module is used for carrying out performance testing on the first memory card through the test firmware data so as to detect whether hardware in the first memory card can normally work;
and the target firmware data writing module is used for writing the target firmware data into the first memory card under the condition that hardware in the first memory card can work normally so as to enable the target firmware data to replace the test firmware data.
In another aspect, an embodiment of the present invention further provides a data file writing system, including: the electronic equipment comprises electronic equipment and a first memory card connected to the electronic equipment; wherein the content of the first and second substances,
the electronic equipment is used for receiving a formatting instruction aiming at a first memory card, wherein the formatting instruction comprises first type information of a network camera, acquiring first capacity information of the first memory card, acquiring a plurality of first data files and first address information corresponding to the first data files from a formatting information database according to the first type information and the first capacity information, and respectively writing the first data files into corresponding addresses of the first memory card according to the first address information, wherein the first type information and the plurality of data files corresponding to each type of capacity information stored in the formatting information database and the address information corresponding to the data files are determined according to a plurality of memory cards with different capacities after being formatted by different types of network cameras;
the first memory card is used for storing a plurality of first data files written by the electronic equipment.
Optionally, the system further includes: a first network camera; wherein the content of the first and second substances,
the electronic equipment is also used for testing the performance of different types of network cameras in advance to obtain the performance test result of the various types of network cameras when using the first memory card in different modes, generating a test data table according to the performance test result and writing the test data table into the first memory card;
the first memory card is further used for storing the test data table written by the electronic equipment;
the first network camera is used for acquiring a performance test result in the current mode corresponding to the type information of the first network camera from the test data table and acquiring video image data according to the performance test result of the first network camera.
Alternatively, in the above-described system,
the test data table comprises: maximum video recording code rate when various types of network cameras use the first memory card in different modes;
the first network camera is specifically configured to acquire, from the test data table, a maximum video recording code rate corresponding to type information of the first network camera when the first memory card is used in a current mode, and acquire video image data at a code rate not greater than the maximum video recording code rate.
Alternatively, in the above-described system,
the test data table comprises: the optimal video recording code rate when various types of network cameras use the first memory card in different modes;
the first network camera is specifically configured to acquire an optimal video recording code rate corresponding to the type information of the first network camera in the test data table when the first memory card is used in the current mode, and acquire video image data at the optimal video recording code rate.
The embodiment of the invention provides a data file writing method, a device and a system. The data file writing method comprises the following steps: receiving a formatting instruction aiming at a first memory card, wherein the formatting instruction comprises first type information of a network camera; acquiring first capacity information of a first memory card; acquiring a plurality of first data files and first address information corresponding to the first data files from a formatting information database according to first type information and first capacity information, wherein the first type information, the plurality of data files corresponding to each type of capacity information and the address information corresponding to each data file stored in the formatting information database are determined according to a plurality of memory cards with different capacities after being formatted by different types of network cameras; and respectively writing the plurality of first data files into corresponding addresses of the first memory card according to the first address information. The electronic equipment stores data files and corresponding address information required by formatting of memory cards with various capacities, so that the electronic equipment can directly write the data files into the memory cards to be formatted according to the address information, and the formatting operation of the memory cards can be completed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of a data file writing method according to an embodiment of the present invention;
fig. 2 is a block diagram of a data file writing apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
The embodiment of the data file writing method comprises the following steps:
referring to fig. 1, a flowchart of a data file writing method according to an embodiment of the present invention is shown. As shown in fig. 1, the method can be applied to an electronic device, and includes the following steps:
step S101, receiving a format instruction aiming at a first memory card, wherein the format instruction comprises first type information of a network camera.
It is emphasized that the "first memory card" herein may be any type of memory card to be formatted, and the "first" of the "first memory card" does not set any limit to the specific type of memory card. Similarly, the "first type information" here may be type information corresponding to any type of network camera, and the "first" of the "first type information" does not set any limit to the specific type of network camera.
It should be noted that, since the network cameras are of multiple types and the file systems corresponding to the various types of network cameras are different, when the first memory card is formatted by the electronic device, the operator needs to notify the electronic device through the first type information in the formatting command, and specifically wants to make the file system in the first memory card consistent with the file system in which type of network camera is used.
In step S102, first capacity information of the first memory card is acquired.
It should be emphasized that the "first capacity information" herein is the capacity information corresponding to the first memory card, that is, the first capacity information is used exclusively for representing the capacity information of the first memory card, and the "first" of the "first capacity information" does not set any limit to the specific kind of the capacity information. Specifically, the capacity of the first memory card may be 8G, 16G, 32G, or the like.
In this embodiment, the first memory card may be a solid-state memory card (a card using a solid-state memory such as Nand Flash as a storage medium), such as a TF card, a Micro SD card, an eMMC card, or the like, and of course, the first memory card may also be another type of memory card, which may be determined specifically according to an actual situation, and the specific type of the first memory card is not limited in this embodiment.
It should be noted that the file system generated by formatting the memory card has a very close relationship with the capacity information of the memory card. Specifically, when a plurality of memory cards having substantially the same attribute information are formatted by using the same network camera, the file systems generated in the formatted memory cards differ from each other as long as the capacity information of the memory cards differs. Therefore, when formatting the first memory card, the electronic device needs to know the type information of the network camera and the capacity information of the memory card, so that the subsequent step S103 can be continued.
Step S103, according to the first type information and the first capacity information, acquiring a plurality of first data files and first address information corresponding to the first data files from a formatting information database, wherein the plurality of data files corresponding to each type information and each capacity information stored in the formatting information database and the address information corresponding to each data file are determined according to a plurality of memory cards with different capacities formatted by different types of network cameras.
It should be emphasized that the "first data file" and the "first address information" herein refer to all data files determined by the first type information and the first capacity information at the same time and address information corresponding to each data file, the "first" of the "first data file" does not refer to a certain type of data file of all data files determined by the first type information and the first capacity information at the same time, and similarly, the "first" of the "first address information" does not refer to a certain type of address information of a plurality of address information corresponding to a plurality of first data files.
In order to obtain the formatting information database, various memory cards with different capacities can be formatted in advance through different types of network cameras, so that the file system in each memory card can be formatted into a file system dedicated to the corresponding network camera. Next, the electronic device may process each formatted memory card to obtain a plurality of data files in a file system of each memory card and address information corresponding to each data file, and then store the obtained plurality of data files, the address information corresponding to each data file, and capacity information of the memory card, and a mapping relationship between the type information of the network camera and the data files and address information in a formatting information database. That is, the electronic device only needs to know the capacity information of the first memory card and the file system corresponding to the network camera of which type the user wants to format the file system in the first memory card, and the electronic device can obtain, according to the information, a plurality of first data files corresponding to the information and first address information corresponding to each first data file from the formatting information database, where the plurality of first data files and the first address information corresponding to each first data file constitute all data required for the electronic device to format the first memory card.
Step S104, according to the first address information, writing the plurality of first data files into corresponding addresses of the first memory card respectively.
In step S103, the electronic device has already obtained all the data required for formatting the first memory card, so the electronic device only needs to write the plurality of first data files into the corresponding addresses of the first memory card according to the first address information in the data, and the formatting operation of the first memory card can be completed.
Preferably, the electronic device may sequentially write the plurality of first data files into the corresponding addresses of the first memory card in the order from small to large, so that the writing efficiency of the data files is higher.
The following describes the data file writing method in detail with a specific example.
After the first type information of the network camera and the first capacity information of the first memory card are acquired, the electronic device may search a plurality of first data files and corresponding first address information corresponding to the first type information and the first capacity information from the formatted information database, where the plurality of first data files and corresponding first address information searched by the electronic device may be as shown in the following table.
Figure BDA0001039197770000081
Assuming that the first memory card is a memory card with a capacity of 16G, it can be seen from the above table that the number of data files corresponding to the 16G memory card is three, that is, the number of the first data files is three, and the number of the first data files is FileBBE, FileIn00 and FileStart, respectively, where the starting write address of the FileBBE data file is 0x3846D000, the ending write address is 0x3846DC000, the starting write address of the FileIn00 data file is 0xE175C000, the ending write address is 0xE1760000, the starting write address of the FileStart data file is 0, and the ending write address is 0x 10000.
When a specific write operation is performed, the electronic device may first write the FileStart data file into the first memory card, and make a start write address of the FileStart data file in the first memory card be 0 and an end write address be 0x10000, then the electronic device may write the FileIn00 data file into the first memory card, and make a start write address of the FileIn00 data file in the first memory card be 0xE175C000 and an end write address of the FileBBE data file in the first memory card be 0xE1760000, and finally, the electronic device may write the FileBBE data file into the first memory card, and make a start write address of the FileBBE data file in the first memory card be 0x3846D000 and an end write address of the FileBBE data file in the first memory card be 0xE1760000, so that the format operation of the first memory card is completed, that is the electronic device formats the file system in the first memory card into a file system dedicated to the network camera.
The electronic equipment stores data files and corresponding address information required by formatting of the memory cards with various capacities, so that the electronic equipment can complete formatting operation of the memory cards by directly writing the data files into corresponding addresses of the memory cards to be formatted according to the address information.
The data file writing method may be performed before shipment of the first memory card, or may be performed after shipment of the first memory card. If the method is implemented before the first memory card leaves the factory, the first memory card can complete formatting operation before leaving the factory, and for a user, when the memory card formatted by the electronic device is inserted into the network camera of the corresponding type, the user does not need to input an instruction for performing formatting operation on the memory card to the network camera in a manual mode, and the user can directly use the memory card to store video graphic data, so that better use experience is brought to the user.
Generally, when the same type of memory card is inserted into different types of network cameras for storing video graphics data, because the hardware architecture and software scheme adopted by the different types of network cameras are different, when a certain type of memory card is used, a part of the network cameras may support a maximum video recording rate of 16 Mbit/sec, and other network cameras may support only a maximum video recording rate of 4 Mbit/sec.
During actual video recording, a memory card with the same capacity may be inserted into a network camera supporting different video recording code rates for use, and if the video recording code rate configured by the memory card is not well matched with the video recording code rate of the network camera, for example, the code rate configured by the memory card is 3 Mbit/sec, and the current video recording code rate of the network camera is 4 Mbit/sec, at this time, the memory card cannot store all video graphic data acquired by the network camera, which may cause a problem that a part of the video graphic data acquired by the network camera is lost or the network camera is jammed in the system. In order to enable the memory card to be better matched with the network camera to solve the above problem, in an embodiment of the present invention, the data file writing method may further include:
the method comprises the steps that performance tests are carried out on different types of network cameras in advance to obtain performance test results of the various types of network cameras when the first memory card is used in different modes;
generating a test data table according to the performance test result;
and writing the test data table into the first memory card.
In this embodiment, the modes of the network camera may include: a mobile spying support mode, a border crossing spying support mode, a regional spying support mode, and the like. In order to obtain the performance test table, a plurality of different types of network cameras which may use the first memory card can be found first, and then the electronic device is used to obtain performance test results of the types of network cameras when using the first memory card in different modes, so as to obtain relevant test parameters of the types of network cameras when using the first memory card in different modes, for example, the maximum video recording code rate of the types of network cameras when using the first memory card in different modes or the optimal video recording code rate of the types of network cameras when using the first memory card in different modes, so as to generate a test data table according to the parameters, and write the test data table into the first memory card.
Thus, when the first memory card is inserted into the first network camera to store the video image data collected by the first network camera, the first network camera searches the performance test result in the current mode corresponding to the type information of the first network camera from the test data table stored in the first memory card, and collects the video image data according to the performance test result in the current mode, for example, the first network camera can obtain the maximum video recording code rate corresponding to the type information of the first network camera when the first memory card is used in the current mode from the test data table, and collect the video image data at the code rate not greater than the maximum video recording code rate, so as to prevent the network camera from having problems of data loss or system blockage, or the first network camera can obtain the optimal code rate corresponding to the type information of the first network camera when the first memory card is used in the current mode from the test data table, and the video image data is acquired at the optimal video recording code rate, so that the acquisition effect of the video image data can be better ensured.
The above process is described in detail below by taking the test data table as an example of the case shown in the following table.
Figure BDA0001039197770000101
Assuming that the first memory card is a solid-state memory card having a model number of ZBCE1001, the first network camera has a model number of ABCD1000, and the current mode of the first network camera is a mobile spy support mode, when the solid memory card is inserted into the first network camera, the first network camera can know that the optimal video recording code rate is 3 Mbit/second and the maximum video recording code rate is 8 Mbit/second when the first network camera uses the solid memory card under the current mode according to the test data table, at the moment, the first network camera can collect video graphic data at the code rate which is not more than 8 Mbit/second so as to prevent the system jamming or data loss caused by the too fast video recording code rate, or the first network camera can also collect video graphic data at a code rate of 3 Mbit/second so as to achieve the optimal video graphic data collection effect. The current mode of the network camera may be configured in advance, that is, one network camera supports one mode, or different modes may be set in the network device for different areas, and the network camera determines the corresponding mode according to the image of the area currently acquired by the network camera.
It should be emphasized that, in addition to the maximum video recording code rate or the optimum code rate when the first memory card is used by various types of network cameras in different modes, the test data table may also include some other types of test parameters, which may be determined according to actual situations, and this embodiment is not limited in any way.
In the above embodiment, before acquiring the first capacity information of the first memory card, the method may further include:
writing the test firmware data into the first memory card;
testing the performance of the first memory card through the test firmware data to detect whether hardware in the first memory card can work normally;
if yes, writing the target firmware data into the first memory card so that the target firmware data replaces the test firmware data.
Generally, the firmware data is a program written in the erasable read only memory EROM, the erasable programmable read only memory EEPROM or the Flash chip, and is software data that serves as the most basic and bottom layer work in the operating system, and the determination operation of the firmware data is easily implemented by those skilled in the art, and those skilled in the art can easily obtain the test firmware data and the target firmware data corresponding to the first memory card according to the prior art. In this embodiment, the electronic device may write the test firmware data into the first memory card, after the test firmware data is written, the test firmware data may detect connectivity of the first memory card, and the test firmware data may also scan a bad block in the first memory card, if the connectivity of the first memory card is detected to be good and the first memory card does not have the bad block, it is indicated that hardware of the first memory card is normally available, and at this time, only the target firmware data needs to be written into the first memory card, so that the target firmware data replaces the test firmware data, and the network camera may normally operate. Next, each network camera can successfully format the corresponding inserted memory card only by powering up the memory card again.
In summary, in the embodiment, the formatting operation of the memory card is very convenient to implement, and the time consumed in the formatting process is also short, so the formatting efficiency is high.
Data file write device embodiment:
referring to fig. 2, a block diagram of a data file writing apparatus according to an embodiment of the present invention is shown. As shown in fig. 2, the apparatus may be applied to an electronic device, and the apparatus includes:
a formatting instruction receiving module 21, configured to receive a formatting instruction for the first memory card, where the formatting instruction includes first type information of the network camera;
a first capacity information acquiring module 22 configured to acquire first capacity information of the first memory card;
a format information obtaining module 23, configured to obtain, according to the first type information and the first capacity information, a plurality of first data files and first address information corresponding to each first data file from a format information database, where each type of information stored in the format information database, the plurality of data files corresponding to each type of capacity information, and the address information corresponding to each data file are determined according to a plurality of memory cards with different capacities formatted by different types of webcams;
the first data file writing module 24 is configured to write the plurality of first data files into corresponding addresses of the first memory card according to the first address information.
Since the data file writing method has the technical effects, the device based on the method also has corresponding technical effects, which are not described herein again.
Optionally, the apparatus further comprises:
the performance testing module is used for testing the performance of the network cameras of different types in advance so as to obtain the performance testing result of the network cameras of various types when the first memory card is used in different modes;
the test data table generating module is used for generating a test data table according to the performance test result;
and the test data table writing module is used for writing the test data table into the first memory card.
Optionally, in the apparatus, the test data table includes: the maximum video recording code rate of various types of network cameras when the first memory card is used in different modes.
Optionally, in the apparatus, the test data table includes: the best video recording code rate when the first memory card is used by various types of network cameras in different modes.
Optionally, the apparatus further comprises:
the test firmware data writing module is used for writing the test firmware data into the first memory card;
the performance testing module is used for carrying out performance testing on the first memory card through testing firmware data so as to detect whether hardware in the first memory card can work normally;
and the target firmware data writing module is used for writing the target firmware data into the first memory card under the condition that the hardware in the first memory card can work normally so as to enable the target firmware data to replace the test firmware data.
In summary, in the embodiment, the formatting operation of the memory card is very convenient to implement, and the time consumed in the formatting process is also short, so the formatting efficiency is high.
Data file writing system:
the embodiment of the invention also provides a data file writing system. The data file writing system includes: the electronic device includes an electronic device and a first memory card connected to the electronic device. The electronic equipment is used for receiving a formatting instruction aiming at a first memory card, wherein the formatting instruction comprises first type information of a network camera, acquiring first capacity information of the first memory card, acquiring a plurality of first data files and first address information corresponding to the first data files from a formatting information database according to the first type information and the first capacity information, and respectively writing the plurality of first data files into corresponding addresses of the first memory card according to the first address information, wherein the plurality of data files and the address information corresponding to the data files, which are stored in the formatting information database and correspond to each type information and each type capacity information, are determined according to a plurality of memory cards with different capacities after being formatted by different types of network cameras; the first memory card is used for storing a plurality of first data files written by the electronic equipment.
Since the electronic device stores the data files and corresponding address information required by the memory cards with various capacities during formatting, the electronic device can directly write the data files into the memory card to be formatted once or several times according to the address information to complete the formatting operation of the memory card.
Optionally, the data file writing system further includes: a first network camera. The electronic equipment is also used for carrying out performance test on different types of network cameras in advance so as to obtain performance test results of the various types of network cameras when the first memory card is used in different modes, generating a test data table according to the performance test results, and writing the test data table into the first memory card; the first memory card is also used for storing a test data table written by the electronic equipment; the first network camera is used for acquiring a performance test result corresponding to the type information of the first network camera in the current mode from the test data table and acquiring video image data according to the performance test result of the first network camera.
It should be emphasized that the "first webcam" herein may be any type of webcam, and the "first" of the "first webcam" does not set any limit to the specific type of webcam.
In a specific implementation manner of the embodiment of the present invention, the test data table may include: the method comprises the steps that the first network camera is used for acquiring the maximum video code rate corresponding to the type information of the first network camera when the first memory card is used in the current mode from a test data table, and acquiring video image data at the code rate not larger than the maximum video code rate, so that the problems of video image data loss or system blockage and the like caused by the fact that the video code rate of the first network camera is larger than the code rate configured by the first memory card can be well avoided.
In another specific implementation manner of the embodiment of the present invention, the test data table may include: the first network camera is specifically used for acquiring the optimal video recording code rate corresponding to the type information of the first network camera when the first memory card is used in the current mode from the test data table, and acquiring video image data according to the optimal video recording code rate, so that the data acquisition effect can be better ensured.
In summary, in the embodiment, the formatting operation of the memory card is very convenient to implement, and the time consumed in the formatting process is also short, so the formatting efficiency is high.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (14)

1. A data file writing method, applied to an electronic device, the method comprising the steps of:
receiving a formatting instruction aiming at a first memory card, wherein the formatting instruction comprises first type information of a network camera;
acquiring first capacity information of the first memory card;
acquiring a plurality of first data files and first address information corresponding to the first data files from a formatting information database according to the first type information and the first capacity information, wherein the plurality of data files corresponding to each type information and each type capacity information stored in the formatting information database and the address information corresponding to each data file are determined according to a plurality of memory cards with different capacities after being formatted by different types of network cameras;
and respectively writing the plurality of first data files into corresponding addresses of the first memory card according to the first address information.
2. The method of claim 1, wherein the method further comprises:
performing performance test on different types of network cameras in advance to obtain performance test results of the various types of network cameras when the first memory card is used in different modes;
generating a test data table according to the performance test result;
and writing the test data table into the first memory card.
3. The method of claim 2, wherein the test data table includes: the maximum video recording code rate of various types of network cameras when the first memory card is used in different modes.
4. The method of claim 2, wherein the test data table includes: and the optimal video recording code rate of various types of network cameras when the first memory card is used in different modes.
5. The method of claim 1, wherein prior to the obtaining the first capacity information of the first memory card, the method further comprises:
writing the test firmware data into the first memory card;
performing performance test on the first memory card through the test firmware data to detect whether hardware in the first memory card can work normally;
if yes, writing the target firmware data into the first memory card so that the target firmware data replaces the test firmware data.
6. A data file writing apparatus, for use in an electronic device, the apparatus comprising:
the device comprises a formatting instruction receiving module, a format instruction receiving module and a format instruction processing module, wherein the formatting instruction receiving module is used for receiving a formatting instruction aiming at a first memory card, and the formatting instruction comprises first type information of a network camera;
a first capacity information acquiring module, configured to acquire first capacity information of the first memory card;
a format information obtaining module, configured to obtain, according to the first type information and the first capacity information, a plurality of first data files and first address information corresponding to each of the first data files from a format information database, where the plurality of data files and the address information corresponding to each of the data files corresponding to each type of information and each type of capacity information stored in the format information database are determined according to a plurality of memory cards with different capacities formatted by different types of network cameras;
and the first data file writing module is used for respectively writing the plurality of first data files into corresponding addresses of the first memory card according to the first address information.
7. The apparatus of claim 6, wherein the apparatus further comprises:
the performance testing module is used for testing the performance of different types of network cameras in advance so as to obtain the performance testing result of the various types of network cameras when the first memory card is used in different modes;
the test data table generating module is used for generating a test data table according to the performance test result;
and the test data table writing module is used for writing the test data table into the first memory card.
8. The apparatus of claim 7, wherein the test data table comprises: the maximum video recording code rate of various types of network cameras when the first memory card is used in different modes.
9. The apparatus of claim 7, wherein the test data table comprises: and the optimal video recording code rate of various types of network cameras when the first memory card is used in different modes.
10. The apparatus of claim 6, wherein the apparatus further comprises:
the test firmware data writing module is used for writing the test firmware data into the first memory card;
the performance testing module is used for carrying out performance testing on the first memory card through the test firmware data so as to detect whether hardware in the first memory card can normally work;
and the target firmware data writing module is used for writing the target firmware data into the first memory card under the condition that hardware in the first memory card can work normally so as to enable the target firmware data to replace the test firmware data.
11. A data file writing system, comprising: the electronic equipment comprises electronic equipment and a first memory card connected to the electronic equipment; wherein the content of the first and second substances,
the electronic equipment is used for receiving a formatting instruction aiming at a first memory card, wherein the formatting instruction comprises first type information of a network camera, acquiring first capacity information of the first memory card, acquiring a plurality of first data files and first address information corresponding to the first data files from a formatting information database according to the first type information and the first capacity information, and respectively writing the first data files into corresponding addresses of the first memory card according to the first address information, wherein the first type information and the plurality of data files corresponding to each type of capacity information stored in the formatting information database and the address information corresponding to the data files are determined according to a plurality of memory cards with different capacities after being formatted by different types of network cameras;
the first memory card is used for storing a plurality of first data files written by the electronic equipment.
12. The system of claim 11, further comprising: a first network camera; wherein the content of the first and second substances,
the electronic equipment is also used for testing the performance of different types of network cameras in advance to obtain the performance test result of the various types of network cameras when using the first memory card in different modes, generating a test data table according to the performance test result and writing the test data table into the first memory card;
the first memory card is further used for storing the test data table written by the electronic equipment;
the first network camera is used for acquiring a performance test result in the current mode corresponding to the type information of the first network camera from the test data table and acquiring video image data according to the performance test result of the first network camera.
13. The system of claim 12,
the test data table comprises: maximum video recording code rate when various types of network cameras use the first memory card in different modes;
the first network camera is specifically configured to acquire, from the test data table, a maximum video recording code rate corresponding to type information of the first network camera when the first memory card is used in a current mode, and acquire video image data at a code rate not greater than the maximum video recording code rate.
14. The system of claim 12,
the test data table comprises: the optimal video recording code rate when various types of network cameras use the first memory card in different modes;
the first network camera is specifically configured to acquire an optimal video recording code rate corresponding to the type information of the first network camera in the test data table when the first memory card is used in the current mode, and acquire video image data at the optimal video recording code rate.
CN201610523058.3A 2016-07-01 2016-07-01 Data file writing method, device and system Active CN107562766B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610523058.3A CN107562766B (en) 2016-07-01 2016-07-01 Data file writing method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610523058.3A CN107562766B (en) 2016-07-01 2016-07-01 Data file writing method, device and system

Publications (2)

Publication Number Publication Date
CN107562766A CN107562766A (en) 2018-01-09
CN107562766B true CN107562766B (en) 2020-11-27

Family

ID=60969437

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610523058.3A Active CN107562766B (en) 2016-07-01 2016-07-01 Data file writing method, device and system

Country Status (1)

Country Link
CN (1) CN107562766B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825697B (en) * 2019-11-07 2022-12-20 珠海研果科技有限公司 Method and apparatus for formatting a storage device
CN111610427A (en) * 2020-04-15 2020-09-01 广东乐心医疗电子股份有限公司 Finished product testing method, circuit board testing method and device
CN114245052B (en) * 2021-12-28 2024-04-16 浙江大华技术股份有限公司 Video data storage method and device, storage medium and electronic device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100385413C (en) * 2004-11-05 2008-04-30 义隆电子股份有限公司 Flash memory formatting method
TW200812342A (en) * 2006-08-29 2008-03-01 Inventec Corp Resource storage processing system and method
JP2009244962A (en) * 2008-03-28 2009-10-22 Toshiba Corp Memory system
US20100036858A1 (en) * 2008-08-06 2010-02-11 Microsoft Corporation Meta file system - transparently managing storage using multiple file systems
CN102508784B (en) * 2011-11-02 2015-01-07 杭州海康威视数字技术股份有限公司 Data storage method of flash memory card in video monitoring equipment, and system thereof

Also Published As

Publication number Publication date
CN107562766A (en) 2018-01-09

Similar Documents

Publication Publication Date Title
US7526675B2 (en) Software recovery method for flash media with defective formatting
JP5055853B2 (en) File management apparatus and electronic device
CN105208267B (en) The recognition methods and system of USB camera and USB camera
CN107562766B (en) Data file writing method, device and system
CN103559276A (en) Method and device for clearing useless files
CN104169913A (en) A picture display method and device and a terminal device
JP2013178765A (en) Mechanical setting system and method
CN103799997A (en) Physiological monitoring parameter recording method and system based on image recognition
CN113518187B (en) Video editing method and device
US7289977B2 (en) Image file apparatus and method
CN101196895B (en) Electronic photo frame with automatic backup function and its automatic backup method
CN1812530B (en) Display control apparatus and method
CN101334990A (en) Information display apparatus, display system, and information display method
CN105528443A (en) Application management method and device and electronic equipment
US20080215799A1 (en) Control Chip of Adapter Interconnecting Pc and Flash Memory Medium and Method of Enabling the Control Chip to Program the Flash Memory Medium to be Accessible by the Pc
CN106815126A (en) A kind of universal document system log recording method and device
CN103970521A (en) Icon generative system and icon generative method
US20080282138A1 (en) Methods and systems for multimedia object association to digital paper spatial diagrams
US20050027926A1 (en) Data storage method
JP5381133B2 (en) Playback device, imaging device, and program
JP2009217588A (en) Filing system, electronic camera, file access method, and program
CN117095466B (en) Image recognition-based job submitting method, device, medium and computing equipment
JP4183263B2 (en) Image display apparatus and control method thereof
JP4504956B2 (en) Image storage system and image storage method
TWI650656B (en) Method of searching an image file in a computer system, related image file searching device, and related computer system

Legal Events

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