CN114356674B - Card opening method, card opening device and computer readable storage medium - Google Patents
Card opening method, card opening device and computer readable storage mediumInfo
- Publication number
- CN114356674B CN114356674B CN202111677770.6A CN202111677770A CN114356674B CN 114356674 B CN114356674 B CN 114356674B CN 202111677770 A CN202111677770 A CN 202111677770A CN 114356674 B CN114356674 B CN 114356674B
- Authority
- CN
- China
- Prior art keywords
- card
- image data
- sub
- mother
- opening
- 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
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
The application provides a card opening method, a card opening device and a computer readable storage medium, and belongs to the technical field of communication. The card opening method includes the steps of obtaining card opening data in a mother card and writing the card opening data into a daughter card, obtaining mirror image data of a file system of the mother card and writing the mirror image data into the daughter card, establishing the file system by the daughter card according to the mirror image data, and after the daughter card is powered off and restarted, performing read-write comparison test on the daughter card according to the mirror image data to judge whether the daughter card is normal or not. Compared with the existing card opening method, the card opening method has the problems of labor cost waste, poor compatibility and low efficiency, can efficiently and quickly realize card opening of the storage equipment, can perform card opening test to judge whether the sub card is normal, does not need personnel to follow up in the whole process, can adapt to card opening of various storage cards, and has good compatibility.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a card opening method, a card opening device, and a computer readable storage medium.
Background
At present, the card opening operation is mainly to connect the storage device to the PC end, and the card opening of the storage device is realized by using manpower and software on the PC end. The problem that this brings is that needs personnel to keep pace with the PC card opening progress to constantly advance the flow of opening the card, has the waste in the aspect of the manpower. On the other hand, the off-line card opening device is available, but the device is usually a special device and can only be used for opening a card of a specific type of memory, cannot be compatible with the memory of a plurality of types, and needs to be independently and additionally tested after opening the card to judge whether the card opening is normal or not, so that the operation is complicated. Therefore, there is a need to design a method for conveniently and efficiently opening a card.
Disclosure of Invention
Accordingly, the present application is directed to a card opening method, a card opening device and a computer readable storage medium, which can solve the problems of waste of labor cost, poor compatibility and low efficiency of the existing card opening method.
The technical scheme adopted by the invention for solving the technical problems is as follows:
the first aspect of the invention provides a card opening method, which comprises the following steps:
acquiring card opening data in a mother card and writing the card opening data into a daughter card;
Obtaining mirror image data of a file system of the mother card, writing the mirror image data into the daughter card, and establishing the file system by the daughter card according to the mirror image data;
And after the sub-card is powered off and restarted, performing read-write comparison test on the sub-card according to the mirror image data to judge whether the sub-card is normal or not.
In some embodiments, the card opening data includes a card opening program and firmware.
In some embodiments, the obtaining the card opening data in the mother card and writing the card opening data into the daughter card further comprises:
acquiring a card opening program in a mother card, and writing the card opening program into a daughter card;
The sub-card runs the card opening program, scans the storage area of the sub-card, and establishes a mapping summary table in the sub-card based on scanned information;
and when the scanning of the daughter card is completed, acquiring firmware from the mother card and writing the firmware into the daughter card.
In some embodiments, performing a read-write comparison test on the daughter card according to the mirror data to determine whether the daughter card is normal further includes:
acquiring first mirror image data of a file system in the mother card;
acquiring second mirror image data of a file system in the sub-card;
and performing exclusive or comparison on the first image data and the second image data, if the first image data and the second image data are the same, indicating that the sub-card is normally opened, and if the first image data and the second image data are different, opening the sub-card again.
In some embodiments, the first mirrored data is located at a first location of a file system in the mother card and the second mirrored data is located at a second location of a file system in the daughter card, the first location corresponding to the second location.
In some embodiments, before the step of obtaining the card opening data in the mother card and writing the card opening data into the daughter card, the method further comprises:
Respectively sending an inquiry signal to the mother card and the daughter card;
the mother card returns a confirmation signal according to the inquiry signal, and the connection and the identity of the mother card are indicated;
the sub-card returns a confirmation signal according to the inquiry signal, and the connection and the identity of the sub-card are indicated;
and checking whether the sub-card has a mapping summary table, and if not, opening the sub-card.
In some embodiments, the method further comprises screening the quality of the daughter card.
In some embodiments, the filtering good blocks of the daughter card includes:
reading the second mirror image data written into the file system of the sub card;
And determining whether the read second mirror image data of the file system is correct or not through an ECC check circuit, classifying the unstable good block into a bad block if the read second mirror image data of the file system is incorrect, and then writing the second mirror image data of the file system into other good blocks again.
In some embodiments, the obtaining the firmware from the mother card and writing the firmware into the daughter card specifically includes controlling writing the firmware into a memory block of a front section of the mapping table.
The second aspect of the present invention also provides a card opening device, where the card opening method is used by the device, and the device includes a main control chip, a mother card interface and at least one daughter card interface connected to the main control chip, where the mother card interface is used for inserting a mother card, and the daughter card interface is used for inserting a daughter card;
The mother card comprises a first control chip and a first storage chip, the daughter card comprises a second control chip and a second storage chip, and when the mother card interface and the daughter card interface are respectively inserted with the mother card and the daughter card, the main control chip respectively performs communication interaction with the first control chip of the mother card and the second control chip of the daughter card and reads and writes data information of the control card under the condition of power on;
and the test unit is used for carrying out read-write comparison test on the daughter card according to the mirror image data of the file system in the mother card so as to judge whether the daughter card is normal or not.
In some embodiments, the main control chip is integrated with an SRAM static random access memory, the first memory chip of the mother card stores firmware, a card opening program, and a file system, and the second memory chip of the daughter card is used for storing a mapping table from the mother card to the daughter card, and mapping a memory block according to the mapping table.
In some embodiments, the apparatus further comprises a power interface for connecting with an external power source to supply power.
The application also provides a computer readable storage medium comprising a processor, a computer readable storage medium and a computer program stored on said computer readable storage medium, which when executed by the processor, implements the steps of the method as described above.
The card opening method, the card opening device and the computer readable storage medium provided by the embodiment of the application are characterized in that card opening data in a mother card are obtained and written into a daughter card, mirror image data of a file system of the mother card are obtained and written into the daughter card, the daughter card establishes the file system according to the mirror image data, and after the daughter card is powered off and restarted, read-write comparison test is carried out on the daughter card according to the mirror image data to judge whether the daughter card is normal or not. Compared with the existing card opening method, the card opening method has the problems of labor cost waste, poor compatibility and low efficiency, can efficiently and quickly realize card opening of the storage equipment, can perform card opening test to judge whether the sub card is normal, does not need personnel to follow up in the whole process, can adapt to card opening of various storage cards, and has good compatibility.
Drawings
FIG. 1 is a block diagram of a first embodiment of a card opening device according to an embodiment of the present invention;
FIG. 2 is a block diagram of a second embodiment of a card opening device according to an embodiment of the present invention;
FIG. 3 is a block diagram of a third embodiment of a card opening device according to an embodiment of the present invention;
Fig. 4 is a schematic diagram of a bottom structure of a mother card related to a card opening device according to an embodiment of the present invention;
fig. 5 is a schematic view of a bottom structure of a daughter card related to a card opening device according to an embodiment of the present invention;
fig. 6 is a block division structure diagram of system file data of a mother card related to an opening device according to an embodiment of the present invention;
FIG. 7 is a flowchart of a method for opening a card according to a first embodiment of the present invention;
FIG. 8 is a flowchart of a method for opening a card according to a second embodiment of the present invention;
FIG. 9 is a flowchart of a third embodiment of a method for opening a card according to an embodiment of the present invention;
Fig. 10 is a flowchart of a method according to a fourth embodiment of the card opening method according to the present invention.
Detailed Description
In order to make the technical problems, technical schemes and beneficial effects to be solved more clear and obvious, the invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present invention, and have no specific meaning per se. Thus, "module," "component," or "unit" may be used in combination.
The terminal may be implemented in various forms. For example, the terminals described in the present invention may include mobile terminals such as a mobile phone, a tablet computer, a notebook computer, a palm computer, a Personal digital assistant (Personal DIGITAL ASSISTANT, PDA), a Portable media player (Portable MEDIA PLAYER, PMP), a navigation device, a wearable device, a smart bracelet, a pedometer, and the like, as well as fixed terminals such as a digital TV, a desktop computer, and the like.
The following description will be given taking a mobile terminal as an example, and those skilled in the art will understand that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for a moving purpose.
Embodiment one:
the application provides a card opening device which can be used for opening a card of a storage device quickly and conveniently. Referring to fig. 1 to 6, the card opening device includes a main control chip 10, a mother card interface 11 and at least one daughter card interface 12 respectively connected to the main control chip 10, and a test unit 13 connected to the main control chip, wherein the mother card interface 11 is used for inserting a mother card 20, and the daughter card interface 12 is used for inserting a daughter card 30.
The mother card 20 includes a first control chip 21 and a first memory chip 22, the daughter card 30 includes a second control chip 31 and a second memory chip 32, and when the mother card 20 and the daughter card 30 are respectively inserted into the mother card interface 11 and the daughter card interface 12, the main control chip 10 performs communication interaction with the first control chip 21 of the mother card 20 and the second control chip 31 of the daughter card 30, and controls reading and writing of card data information under the condition of power on.
In one embodiment, the main control chip 10 has an SRAM integrated therein for loading programs. The main control chip 10 is respectively connected with a mother card interface 11 and a daughter card interface 12, the mother card interface 11 is used for inserting the mother card 20, the daughter card interface 12 is used for inserting the daughter card 30, and the daughter card 30 and the mother card 20 are the same type of storage devices.
Referring to fig. 4 and 6, in one embodiment, the first memory core 21 of the mother card 20 stores firmware, a card opening program, and file system data.
Specifically, the main control chip 10 collects file system data in the mother card 20 to form first image data of the mother card file system, where the first image data includes data of a partition of blocks corresponding to each block.
The file system data of the mother card 20 refers to a method and a data structure of the first control chip 21 for defining files in the first memory chip 22, that is, a method for organizing files on the first memory chip 21, and the executed functions include managing and scheduling a memory space of the files, providing a logical structure, a physical structure and a memory method of the files, realizing mapping from a mark to an actual address of the files, realizing control operation and access operation of the files, realizing sharing of file information, providing reliable file confidentiality and protection measures, providing security measures of the files, and the like. When firmware is installed on the file system, the various processes of the system file are thereby started.
The main control chip 10 collects file system data in the mother card, and the first image data forming the mother card file system includes data of the partitions of the blocks corresponding to each block. The division of the blocks may be divided into an MBR area, a DBR area, a FAT area, a DIR area, and a DATA area.
The MBR area (Main Boot Record area) contains a series of parameters of a memory and a section of Boot program, wherein the Main function of the Boot program is to detect whether the total table is normal or not and Boot an operating system on a partition with an activation flag after the hardware completes self-checking, and give control to the Boot program. The MBR area is generated by the partition program, but is not dependent on firmware.
The DBR section (Dos Boot Record) is the first block that the operating system can access and includes a Boot loader and a BPB (Bios Parameter Block present partition parameter Record table). The main task of the boot program is to judge whether the front-end file of the root directory of the local area is the boot file of the firmware after the MBR gives the control right of the system to the boot program, if so, the file is read into the memory, and the control right is given to the file. The BPB parameter block records important parameters such as a start sector, an end sector, a file storage format, a hard disk medium descriptor, a root directory size, a FAT number, a size of an allocation unit and the like of the partition. DBR is generated by a high-level formatting program.
The FAT area (File Allocation Table file allocation table) is used to indicate the linked storage relationship of files in the storage chip, and to record the storage locations that have been occupied and the storage locations that indicate the subsequent content. Because of the importance of FAT for file management, there is a backup of FAT, i.e., a same FAT is built up behind the original FAT. All items in the initially formed FAT are designated as "unoccupied", but if there is a local corruption in the memory chip, the formatter detects the location of the corruption, marks the corresponding item as the corruption, and no longer stores the file in that location at a later time.
The DIR area (Directory root Directory area) immediately follows the second FAT table, and records a start unit of each file (Directory) under the root Directory, an attribute of the file, and the like. When the file is located, the operating system can know the specific position and size of the file in the hard disk by combining the FAT table according to the starting unit in the DIR.
The DATA area is used to store DATA and occupies most of the DATA space on the hard disk.
In one embodiment, the second memory chip 32 of the daughter card 30 is configured to store a mapping table mapped from the mother card 20 to the daughter card 30 and a file system established according to mirror data of the file system of the mother card, and the daughter card maps the memory block according to the mapping table.
In one embodiment, both the daughter card 30 and the mother card 20 are shown having interfaces through which mating with an external interface may be accomplished so as to enable response to external instructions and corresponding operations.
The test unit 13 is configured to perform a read-write comparison test on the daughter card according to the mirror image data of the file system in the mother card, so as to determine whether the daughter card is normal.
Specifically, the method includes the steps of obtaining first image data of a file system in the mother card 20, obtaining second image data of the file system in the daughter card 30, performing exclusive or comparison on the first image data and the second image data, if the first image data and the second image data are the same, indicating that the daughter card is normally opened, and if the first image data and the second image data are different, restarting the opening of the daughter card.
The first mirror image data is located at a first position of a file system in the mother card, the second mirror image data is located at a second position of the file system in the daughter card, and the first position corresponds to the second position.
In this embodiment, since the buffer capacity of the main control chip is limited, the entire file system cannot be written completely, so that the mirror image data of the file systems of the mother card and the daughter card are obtained in sections and compared, and since the file systems of the mother card and the daughter card are the same at this time, the first position of the first mirror image data file in the file system of the mother card is the same as the second position of the second mirror image data file in the file system of the daughter card.
The device further comprises a power interface 14, the power interface 14 being adapted to be connected to an external power source for powering the components.
After the card opening device is powered on, and if the mother card 20 and the daughter card 30 are respectively placed in the mother card interface 11 and the daughter card interface 12, the main control chip 10 is respectively connected with the first control chip 21 of the mother card 20 and the second control chip 31 of the daughter card 30, after the main control chip 10 is powered on, the main control chip 10 respectively sends an inquiry signal to the mother card 20 and the daughter card 30, the first control chip 21 of the mother card 20 returns a confirmation signal according to the inquiry signal to indicate the connection and the identity of the mother card, and the second control chip 32 of the daughter card 30 returns a confirmation signal to indicate the connection and the identity of the daughter card.
After the main control chip 10 is connected to the mother card 20 and the daughter card 30, the main control chip 10 checks whether the mapping summary table exists in each daughter card 30, and if the mapping summary table does not exist, the writing of the card opening information to the daughter card 30 is controlled.
Specifically, the main control chip 10 reads the card opening program in the mother card 20 and writes the card opening program into the daughter card 30, and the second control chip 31 of the daughter card 30 runs the card opening program and controls to scan the second memory chip 32 in the daughter card 30, and based on the scanned information, creates a total table as a mapping total table for mapping the memory blocks in the second memory chip and testing and screening the quality of the daughter cards.
After the scanning is completed, firmware is obtained from the mother card 20 and written into the daughter card 30. Specifically, the daughter card 30 sends an instruction to the main control chip 10, and the main control chip 10 controls the reading of the firmware from the mother card 20 and the writing of the firmware into the daughter card 30 according to the instruction. Based on the scanned information, the firmware is written at the starting point of the mapping table, namely, the firmware is placed in a front storage block in the mapping table, so that the firmware is directly read from the beginning of the mapping table.
Specifically, the screening the good blocks of the daughter card includes:
reading the second mirror image data written into the file system of the sub card;
And determining whether the read second image data of the file system is correct or not through an ECC check circuit, classifying the unstable good block into a bad block if the read second image data of the file system is incorrect, and then writing the image data of the file system into other good blocks again.
In the embodiment of the present application, the number of the sub-card interfaces 12 may be one or more, and when the number of the sub-card interfaces 12 is plural, writing of the card opening information to the plurality of sub-cards 30 may be simultaneously implemented.
According to the card opening device, when a mother card 20 is inserted into the mother card interface 11 and a daughter card 30 is inserted into the daughter card interface 12 by arranging a main control chip 10, a mother card interface 11 and at least one daughter card interface 12 and a test unit 13 which are respectively connected with the main control chip 10, the main control chip 10 respectively performs communication interaction with a first control chip 21 of the mother card 20 and a second control chip 31 of the daughter card 30 and controls reading and writing of card data information, and a test unit performs read-write comparison test on the daughter card according to mirror image data of a file system in the mother card so as to judge whether the daughter card is normal. Compared with the existing card opening device, the card opening device has the problems of labor cost waste, poor compatibility and low efficiency, the card opening device can efficiently and quickly realize card opening of storage equipment, and the power-off restarting opener can automatically test whether the card opening is normal or not, does not need personnel to follow up in the whole process, saves labor cost, can adapt to the card opening of various storage cards, and has good compatibility.
The number of the sub-card interfaces 12 in the embodiment of the application can be multiple, and when a plurality of storage devices are required to be opened, the opening can be simultaneously performed, so that the batch opening efficiency can be greatly improved.
Embodiment two:
an embodiment of the present application provides a card opening method, which is applied to the card opening device described above, referring to fig. 7 to 10, and specifically includes the following steps:
S101, acquiring card opening data in a mother card and writing the card opening data into a daughter card;
Specifically, the card opening data comprises a card opening program and firmware, and the card opening program is written in the mother card in advance; reading a card opening program in the mother card through a main control chip, and controlling the card opening program in the mother card to enter a daughter card;
s102, acquiring mirror image data of a file system of the mother card, and writing the mirror image data into the daughter card, wherein the daughter card establishes the file system according to the mirror image data;
And S103, after the sub-card is powered off and restarted, performing read-write comparison test on the sub-card according to the mirror image data to judge whether the sub-card is normal or not.
Specifically, the read-write comparison test is performed on the daughter card according to the mirror image data to determine whether the daughter card is normal or not, which includes the following steps:
S1031, obtaining first mirror image data of a file system in the mother card;
s1032, obtaining second mirror image data of the file system in the sub-card;
S1033, performing exclusive or comparison on the first image data and the second image data, if the first image data and the second image data are the same, indicating that the sub-card is normally opened, and if the first image data and the second image data are different, opening the sub-card again.
The first mirror image data is located at a first position of a file system in the mother card, the second mirror image data is located at a second position of the file system in the daughter card, and the first position corresponds to the second position.
In the embodiment of the application, the buffer capacity of the main control chip is limited, and the whole file system cannot be completely written, so that the mirror image data of the file systems of the mother card and the daughter card are obtained in a segmented mode and compared, and the file systems of the mother card and the daughter card are the same at the moment, so that the position of the first mirror image data file in the file system of the mother card is the same as the position of the second mirror image data file in the file system of the daughter card.
In an embodiment, the obtaining the card opening data in the mother card and writing the card opening data into the daughter card further includes:
acquiring a card opening program in a mother card, and writing the card opening program into a daughter card;
The sub-card runs the card opening program, scans the storage area of the sub-card, and establishes a mapping summary table in the sub-card based on scanned information;
and when the scanning of the daughter card is completed, acquiring firmware from the mother card and writing the firmware into the daughter card.
In an embodiment, before the main control chip reads the card opening program in the mother card, the method further includes the steps of:
S201, respectively sending an inquiry signal to a mother card and a daughter card;
specifically, the main control chip is used for respectively sending an inquiry signal to the mother card and the daughter card;
S202, the mother card returns a confirmation signal according to the query signal to indicate the connection and the identity of the mother card;
specifically, the first control chip of the mother card returns a confirmation signal according to the inquiry signal, and the connection and the identity of the mother card are indicated;
s203, the sub-card returns a confirmation signal according to the query signal to indicate the connection and the identity of the sub-card;
Specifically, the second control chip of the sub-card returns a confirmation signal according to the query signal to indicate the connection and the identity of the sub-card;
s204, checking whether the sub-card has a mapping summary table, and if not, opening the sub-card.
Specifically, the main control chip checks whether a mapping table exists in the sub-card, and if the mapping table does not exist, the main control chip controls the sub-card to execute the card opening steps of S101-S103.
In an embodiment, the obtaining the mirror image data of the file system of the mother card and writing the mirror image data into the daughter card specifically includes:
The main control chip controls the mirror image file data of the file system data of the mother card to be written into the daughter card, wherein the file system data of the mother card refers to a method and a data structure of a first control chip for definitely storing files in the chip, namely a method for organizing the files on the first storage chip. When firmware is installed on the file system, various processes of the system file are controlled to be started.
The master control chip collects file system data in the mother card to form mirror image data of the file system of the mother card, wherein the mirror image data of the file system comprises data of blocks corresponding to each block. The division of the blocks may be divided into an MBR area, a DBR area, a FAT area, a DIR area, and a DATA area.
Specifically, the MBR area (Main Boot Record area) includes a series of parameters of the memory and a section of Boot program, wherein the Boot program mainly serves to detect whether the summary is normal or not and Boot the operating system on the partition with the activation flag after the hardware completes self-checking, and gives control to the Boot program. The MBR area is generated by the partition program, but is not dependent on firmware.
The DBR section (Dos Boot Record) is the first block that the operating system can access and includes a Boot loader and a BPB (Bios Parameter Block present partition parameter Record table). The main task of the boot program is to judge whether the front-end file of the root directory of the local area is the boot file of the firmware after the MBR gives the control right of the system to the boot program, if so, the file is read into the memory, and the control right is given to the file. The BPB parameter block records important parameters such as a start sector, an end sector, a file storage format, a hard disk medium descriptor, a root directory size, a FAT number, a size of an allocation unit and the like of the partition. DBR is generated by a high-level formatting program.
The FAT area (File Allocation Table file allocation table) is used to indicate the linked storage relationship of files in the storage chip, and to record the storage locations that have been occupied and the storage locations that indicate the subsequent content. Because of the importance of FAT for file management, there is a backup of FAT, i.e., a same FAT is built up behind the original FAT. All items in the initially formed FAT are designated as "unoccupied", but if there is a local corruption in the memory chip, the formatter detects the location of the corruption, marks the corresponding item as the corruption, and no longer stores the file in that location at a later time.
The DIR area (Directory root Directory area) immediately follows the second FAT table, and records a start unit of each file (Directory) under the root Directory, an attribute of the file, and the like. When the file is located, the operating system can know the specific position and size of the file in the hard disk by combining the FAT table according to the starting unit in the DIR.
The DATA area is used to store DATA and occupies most of the DATA space on the hard disk.
In one embodiment, the method further comprises S104, screening good blocks of the daughter card.
Specifically, the screening of the good blocks of the daughter card includes:
reading the second mirror image data written into the file system of the sub card;
and determining whether the read second mirror image data of the system file is correct or not through an ECC check circuit, classifying the unstable good block into a bad block if the read second mirror image data of the system file is incorrect, and then writing the second mirror image data of the file system into other good blocks again.
Specifically, after the main control chip writes the mirror image data of the file system in the mother card into the daughter card, the daughter card establishes the file system according to the mirror image data, and the file system data in the mother card and the file system data in the daughter card are identical, so that the mirror image data of the identical file system data can be used for read-write test. The above partitions can show that the file system is used for dividing the blocks and fixedly writing the data, and basically the file system represents a binary file of 0/1 at the bottom layer, so that the main control chip reads out the first mirror image data of the file system in the mother card, reads out the second mirror image data of the sub-card file system, and then carries out exclusive-or comparison on the first mirror image data and the second mirror image data to judge whether the card is opened successfully.
The main control chip obtains the mirror image data of the file system of the mother card and writes the mirror image data into the daughter card, the daughter card establishes the file system according to the mirror image data, please refer to fig. 4 and 5, it can be seen that the file system divides the whole memory area of the mother card into areas, such as a data memory area, a card data area (including firmware and card opening program), a mapping table area and a block area, corresponding data is written in each area, and because the daughter card establishes the file system according to the mirror image data of the mother card, the data information and the memory area corresponding to the mother card are distributed in the storage area of the daughter card. The DATA storage area occupies 93% -97% of the system storage area of the daughter card, in which case DATA is not stored in all blocks, but it will be understood that DATA storage is 0/1 mode, and in a block without DATA itself, the block is filled with 0's in its entirety to represent no DATA. Therefore, the read-out of the 0-filled block in the mother card and the daughter card can be also subjected to a comparison test.
When the main control chip writes the mirror image data of the file system into the sub-card, the good blocks of the sub-card can be screened, as in fig. 4 and 5, the bad blocks of "x" are identified, and the good blocks of "v" are identified. The method specifically comprises the steps of performing complete writing and reading in a sub-card, correspondingly writing first mirror image data of a mother card system file into the good sub-card by a main control chip in the process of transmitting the first mirror image data of the mother card system file to the sub-card, reading out the sub-card file system and obtaining second mirror image data of the sub-card file system, determining whether the read second mirror image data of the sub-card file system is correct or not by an ECC check circuit in a bottom layer, classifying the unstable good sub-card file system into bad sub-card if the read second mirror image data of the sub-card file system is incorrect, and writing the data into other good sub-card file systems again.
The card opening method comprises the steps of obtaining card opening data in a mother card and writing the card opening data into a sub card, obtaining mirror image data of a file system of the mother card and writing the mirror image data into the sub card, establishing the file system by the sub card according to the mirror image data, and then performing read-write comparison test on the sub card according to the mirror image data after the sub card is powered off and restarted so as to judge whether the sub card is normal. Compared with the existing card opening method, the card opening method has the problems of labor cost waste, poor compatibility and low efficiency, can be used for efficiently and quickly opening the card of the storage device, does not need personnel to follow up in the whole process, can be suitable for opening various storage cards, and has good compatibility.
The card opening method provided by the embodiment of the application can simultaneously realize card opening of a plurality of storage devices, and can greatly improve the batch card opening efficiency.
Embodiment III:
According to an embodiment of the present invention, a computer readable storage medium is provided, on which a computer program is stored, where the computer program when executed by a processor implements the steps in the card opening method, and specific steps are described in the first embodiment and are not repeated herein.
The memory in this embodiment can be used to store software programs as well as various data. The memory may mainly include a storage program area which may store an operating system, an application program required for at least one function, etc., and a storage data area which may store data created according to the use of the mobile phone, etc. In addition, the memory 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.
According to an example of the present embodiment, all or part of the flow in the method of the above embodiment may be implemented by a computer program to instruct related hardware, where the program may be stored in a computer readable storage medium, such as a storage medium of a computer system, and the program may be stored in the storage medium of the computer system and executed by at least one processor in the computer system, to implement the flow including the embodiments of the methods as described above. The storage medium includes, but is not limited to, magnetic disks, flash disks, optical disks, read-Only Memory (ROM), and the like.
It should be noted that, in this document, 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 one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.
Claims (8)
1. A method of opening a card, the method comprising:
acquiring a card opening program in a mother card, writing the card opening program into a sub-card, running the card opening program by the sub-card, scanning a storage area of the sub-card, and establishing a mapping summary table in the sub-card based on scanned information;
After the sub-card is scanned, firmware is obtained from the mother card and written into the sub-card, mirror image data of a file system of the mother card is obtained, second mirror image data of the file system written into the sub-card is read, whether the read second mirror image data of the file system is correct or not is determined through an ECC check circuit, if not, good blocks are classified as bad blocks, mirror image data of the file system of the mother card is written into other good blocks again, the sub-card establishes the file system according to the mirror image data, wherein a second memory chip of the sub-card is used for storing a mapping total table mapped from the mother card to the sub-card and the file system established according to the mirror image data of the file system of the mother card, and the sub-card maps a memory block according to the mapping total table;
after the sub card is powered off and restarted, first mirror image data of a file system in the mother card is obtained, and second mirror image data of the file system in the sub card is obtained;
segmenting the first image data and the second image data, performing exclusive or comparison on the segmented first image data and the segmented second image data, if the segmented first image data and the segmented second image data are identical, indicating that the sub card is normally opened, and if the segmented first image data and the segmented second image data are different, opening the sub card again.
2. The card opening method according to claim 1, wherein the first image data is located at a first location of a file system in the mother card, the second image data is located at a second location of a file system in the daughter card, and the first location corresponds to the second location.
3. The card opening method according to claim 1, further comprising, before the step of acquiring card opening data in the mother card and writing the card opening data into the daughter card:
Respectively sending an inquiry signal to the mother card and the daughter card;
the mother card returns a confirmation signal according to the inquiry signal, and the connection and the identity of the mother card are indicated;
the sub-card returns a confirmation signal according to the inquiry signal, and the connection and the identity of the sub-card are indicated;
and checking whether the sub-card has a mapping summary table, and if not, opening the sub-card.
4. The method of claim 1, wherein the step of obtaining the firmware from the mother card and writing the firmware to the daughter card comprises writing the firmware to a memory block in a front section of the mapping table.
5. A card opening device, characterized in that the card opening method of any one of claims 1 to 4 is used for opening a card, the device comprises a main control chip, a main card interface and at least one sub card interface which are respectively connected with the main control chip, and a test unit connected with the main control chip, wherein the main card interface is used for inserting a main card, and the sub card interface is used for inserting a sub card;
The mother card comprises a first control chip and a first storage chip, the daughter card comprises a second control chip and a second storage chip, and when the mother card interface and the daughter card interface are respectively inserted with the mother card and the daughter card, the main control chip respectively performs communication interaction with the first control chip of the mother card and the second control chip of the daughter card and reads and writes data information of the control card under the condition of power on;
and the test unit is used for carrying out read-write comparison test on the daughter card according to the mirror image data of the file system in the mother card so as to judge whether the daughter card is normal or not.
6. The card opening device according to claim 5, wherein the main control chip is integrated with an SRAM static random access memory, the first memory chip of the mother card is stored with firmware, a card opening program and a file system, and the second memory chip of the daughter card is used for storing a mapping table mapped from the mother card to the daughter card, and mapping the memory block according to the mapping table.
7. The card opening device of any one of claims 5 or 6, further comprising a power interface for connecting to an external power source for supplying power.
8. A computer readable storage medium comprising a processor, a computer readable storage medium and a computer program stored on the computer readable storage medium, which when executed by the processor, performs the steps of the method according to any one of claims 1 to 4.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111677770.6A CN114356674B (en) | 2021-12-31 | 2021-12-31 | Card opening method, card opening device and computer readable storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111677770.6A CN114356674B (en) | 2021-12-31 | 2021-12-31 | Card opening method, card opening device and computer readable storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN114356674A CN114356674A (en) | 2022-04-15 |
| CN114356674B true CN114356674B (en) | 2025-09-09 |
Family
ID=81105293
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202111677770.6A Active CN114356674B (en) | 2021-12-31 | 2021-12-31 | Card opening method, card opening device and computer readable storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114356674B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115599297A (en) * | 2022-09-30 | 2023-01-13 | 深圳市德明利技术股份有限公司(Cn) | Mass production method, system and electronic device of solid-state storage device |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103237252A (en) * | 2013-03-22 | 2013-08-07 | 深圳市九洲电器有限公司 | Method and device for burning set-top box storage chips |
| CN105629148A (en) * | 2014-10-28 | 2016-06-01 | 国际商业机器公司 | Method and device of testing a plurality of modules in test circuit |
| CN109119124A (en) * | 2018-08-27 | 2019-01-01 | 湖南国科微电子股份有限公司 | The production method and solid state hard disk of solid state hard disk |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2003241970A (en) * | 2002-02-04 | 2003-08-29 | Jungsoft Co Ltd | Hard disk protection system through blocking of disk and its method |
| CN101571808B (en) * | 2009-05-26 | 2013-09-25 | 东信和平科技股份有限公司 | Method for improving production efficiency of telecommunication smart card |
| TWI454912B (en) * | 2012-01-06 | 2014-10-01 | Phison Electronics Corp | Data processing method, memory controller and memory storage device |
| CN113535241B (en) * | 2020-04-21 | 2024-05-03 | 中兴通讯股份有限公司 | Diskless starting method, diskless starting device, terminal equipment and storage medium |
-
2021
- 2021-12-31 CN CN202111677770.6A patent/CN114356674B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103237252A (en) * | 2013-03-22 | 2013-08-07 | 深圳市九洲电器有限公司 | Method and device for burning set-top box storage chips |
| CN105629148A (en) * | 2014-10-28 | 2016-06-01 | 国际商业机器公司 | Method and device of testing a plurality of modules in test circuit |
| CN109119124A (en) * | 2018-08-27 | 2019-01-01 | 湖南国科微电子股份有限公司 | The production method and solid state hard disk of solid state hard disk |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114356674A (en) | 2022-04-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20230138736A1 (en) | Cluster file system-based data backup method and apparatus, and readable storage medium | |
| US7526675B2 (en) | Software recovery method for flash media with defective formatting | |
| EP2189894B1 (en) | Archiving data on memory cards | |
| CN101706822B (en) | Method and device for improving speed of mounting journal file system | |
| US20170139813A1 (en) | Method and device for checking influence of deleting cache file, and mobile terminal | |
| CN101582084B (en) | Method and device for data storage | |
| US20180210784A1 (en) | Metadata Recovery Method and Apparatus | |
| US8265919B1 (en) | Emulating a peripheral mass storage device with a portable device | |
| CN114356674B (en) | Card opening method, card opening device and computer readable storage medium | |
| CN111831224B (en) | Method, system and equipment for erasing residual space of exFAT partition file | |
| US20110004719A1 (en) | Memory Element | |
| CN112181275B (en) | A data processor and a data processing method | |
| US8595426B2 (en) | Handling commands within a write-once read-many storage device configuration | |
| CN109857519A (en) | The processing method and relevant apparatus of virtual disk | |
| CN116884470B (en) | Storage product testing method and system, electronic equipment and storage medium | |
| CN114168074A (en) | Mirror image storage method, device, storage medium and electronic equipment | |
| US8769182B1 (en) | Virtual tape library with the ability to perform multiple, simultaneous reads of a single virtual tape | |
| CN111651177A (en) | Android platform-based number writing method and device and computer readable medium | |
| EP2800329A1 (en) | Wireless communication terminal and method for securely running industry software | |
| CN111143302A (en) | Method and device for tracking Office document content change | |
| CN107168767B (en) | Data processing method and device of storage equipment | |
| US20070057956A1 (en) | Method, apparatus, and computer program product for implementing self-modeling computer systems componentry | |
| CN115794497B (en) | SSD (solid State disk) drop-down solution method and device, readable storage medium and electronic equipment | |
| CN114217737B (en) | Data storage processing method, data storage processing circuit and electronic device | |
| CN117193637A (en) | VPD information refreshing method and device, electronic equipment and storage medium |
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 |