Card opening method, card opening device and computer-readable storage medium

By transmitting card activation data and mirror data between the mother card and the daughter card, the problems of manpower waste and poor compatibility in the existing card activation method are solved, and an efficient and automated storage device card activation process is realized. It is applicable to a variety of storage cards and improves card activation efficiency.

CN114356674BActive Publication Date: 2025-09-09HOSIN GLOBAL ELECTRONICS CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111677770.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-09-09
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

Existing card activation methods have problems such as wasted labor costs, poor compatibility, and low efficiency. In particular, offline card activation equipment is not compatible with multiple types of memory and requires cumbersome individual testing after activation.

Method used

By obtaining the card activation data and file system mirror data from the mother card, writing them into the daughter card to establish a file system, and performing a read-write comparison test after power off and restart, it is determined whether the daughter card is normal. The main control chip is used to communicate and interact with the mother card and daughter card to achieve an efficient and compatible card activation process.

Benefits of technology

It realizes efficient and fast card activation for storage devices, automatically tests whether the sub-cards are normal, saves labor costs, adapts to a variety of memory cards, has good compatibility, and improves the efficiency of batch card activation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114356674B_ABST
    Figure CN114356674B_ABST
Patent Text Reader

Abstract

The present invention provides a card activation method, a card activation device, and a computer-readable storage medium, which belong to the field of communication technology. The card activation method described in the present application obtains the card activation data in the mother card and writes the card activation data into the daughter card; obtains the mirror data of the file system of the mother card and writes it into the daughter card, and the daughter card establishes a file system according to the mirror data; then after the daughter card is powered off and restarted, a read-write comparison test is performed on the daughter card according to the mirror data to determine whether the daughter card is normal. Compared with the existing card activation method, which has the problems of waste of labor costs, poor compatibility, and low efficiency, the card activation method described in the present application can realize the card activation of the storage device efficiently and quickly and can perform a card activation test to determine whether the daughter card is normal. No personnel follow-up is required throughout the process, and it can adapt to the activation of various storage cards and has good compatibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a card opening method, a card opening device and a computer-readable storage medium. Background Art

[0002] Currently, card activation primarily involves connecting a storage device to a PC and utilizing manual labor and PC-based software to activate the storage device. This creates a problem by requiring personnel to continuously monitor the PC activation progress to continuously advance the activation process, resulting in a waste of manpower. On the other hand, offline card activation devices are now available, but these devices are typically specialized and can only be used to activate specific types of storage devices, not compatible with a wide range of storage devices. Furthermore, after activation, separate testing is required to determine if the card activation is normal, which is quite cumbersome. Therefore, there is an urgent need to design a convenient and efficient card activation method. Summary of the Invention

[0003] In view of this, the purpose of the present invention is to provide a card activation method, a card activation device and a computer-readable storage medium, aiming to solve the problems of waste of manpower costs, poor compatibility and low efficiency in the existing card activation methods. This application provides a convenient and efficient card activation solution.

[0004] The technical solutions adopted by the present invention to solve the above technical problems are as follows:

[0005] A first aspect of the present invention provides a card activation method, comprising the following steps:

[0006] Obtaining card activation data from the master card and writing the card activation data into the daughter card;

[0007] Obtaining mirror data of the file system of the mother card and writing it into the daughter card, wherein the daughter card establishes a file system according to the mirror data;

[0008] After the daughter card is powered off and restarted, a read-write comparison test is performed on the daughter card according to the mirror data to determine whether the daughter card is normal.

[0009] In some embodiments, the card activation data includes a card activation program and firmware.

[0010] In some embodiments, obtaining the card activation data from the mother card and writing the card activation data into the daughter card further includes:

[0011] Obtain the card activation program from the mother card and write the card activation program into the daughter card;

[0012] The daughter card runs the card activation program and scans the storage area of ​​the daughter card, and establishes a mapping table in the daughter card based on the scanned information;

[0013] When the daughter card scan is completed, the firmware is obtained from the mother card and written into the daughter card.

[0014] 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:

[0015] Acquire first image data of the file system in the mother card;

[0016] Acquire second mirror data of the file system in the daughter card;

[0017] The first mirror data and the second mirror data are XOR-compared. If the two are the same, it indicates that the sub-card is activated normally; if they are different, the sub-card is activated again.

[0018] In some embodiments, the first mirror data is located at a first location of the file system in the mother card, and the second mirror data is located at a second location of the file system in the daughter card, and the first location corresponds to the second location.

[0019] In some embodiments, before the step of obtaining the card activation data from the mother card and writing the card activation data into the daughter card, the method further includes:

[0020] sending inquiry signals to the mother card and the daughter card respectively;

[0021] The mother card returns a confirmation signal according to the inquiry signal, indicating the connection and the mother card identity;

[0022] The daughter card returns a confirmation signal according to the inquiry signal, indicating the connection and daughter card identity;

[0023] Check whether the sub-card has a mapping table. If not, activate the sub-card.

[0024] In some embodiments, the method further includes: screening the quality of the daughter cards.

[0025] In some embodiments, screening good blocks of the daughter card includes:

[0026] Reading the second mirror image data of the file system written into the daughter card;

[0027] The ECC check circuit is used to determine whether the read second mirror data of the file system is correct. If not, the unstable good block is classified as a bad block, and the second mirror data of the file system is rewritten into other good blocks.

[0028] In some embodiments, obtaining the firmware from the mother card and writing it into the daughter card specifically includes: controlling the firmware to be written into a storage block at the front end of the mapping table.

[0029] A second aspect of the present invention further provides a card opening device, which utilizes the aforementioned card opening method. The device includes a main control chip, a mother card interface and at least one daughter card interface respectively connected to the main control chip, and a test unit connected to the main control chip, wherein the mother card interface is used to insert a mother card, and the daughter card interface is used to insert a daughter card.

[0030] The mother card includes a first control chip and a first memory chip, and the daughter card includes a second control chip and a second memory chip. When the mother card and the daughter card are inserted into the mother card interface and the daughter card interface, respectively, when powered on, the main control chip communicates and interacts with the first control chip of the mother card and the second control chip of the daughter card, respectively, and controls the reading and writing of card data information;

[0031] The testing unit is used to perform a read-write comparison test on the daughter card according to the mirror data of the file system in the mother card to determine whether the daughter card is normal.

[0032] In some embodiments, the main control chip is integrated with an SRAM static random access memory; the first storage chip of the mother card stores firmware, card activation program and file system; the second storage chip of the daughter card is used to store a mapping table from the mother card to the daughter card, and map storage blocks according to the mapping table.

[0033] In some embodiments, the device further includes a power interface, which is used to connect to an external power source to provide power.

[0034] The present application also provides a computer-readable storage medium, comprising a processor, a computer-readable storage medium, and a computer program stored on the computer-readable storage medium, wherein the computer program implements the steps in the above-described method when executed by the processor.

[0035] The card activation method, card activation device, and computer-readable storage medium provided in the embodiments of the present invention are as follows: the card activation method of the embodiment of the present application obtains the card activation data from the mother card and writes the card activation data into the daughter card; obtains the mirror data of the file system of the mother card and writes it into the daughter card, and the daughter card establishes a file system based on the mirror data; then, after the daughter card is powered off and restarted, a read-write comparison test is performed on the daughter card based on the mirror data to determine whether the daughter card is normal. Compared with the existing card activation methods that have the problems of wasteful labor costs, poor compatibility, and low efficiency, the card activation method of the present application can efficiently and quickly realize the card activation of the storage device and can perform a card activation test to determine whether the daughter card is normal. No personnel follow-up is required throughout the process, and it can adapt to the activation of various storage cards and has good compatibility. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 This is a structural block diagram of a first embodiment of a card opening device according to an embodiment of the present invention;

[0037] Figure 2 This is a structural block diagram of a second embodiment of a card opening device according to an embodiment of the present invention;

[0038] Figure 3 This is a structural block diagram of a third embodiment of a card opening device according to an embodiment of the present invention;

[0039] Figure 4 This is a schematic diagram of the underlying structure of a mother card involved in a card opening device according to an embodiment of the present invention;

[0040] Figure 5 A schematic diagram of the underlying structure of a sub-card involved in a card opening device according to an embodiment of the present invention;

[0041] Figure 6 A schematic diagram of a block division structure of system file data of a mother card involved in a card opening device according to an embodiment of the present invention;

[0042] Figure 7 This is a method flow chart of a first embodiment of a card activation method according to an embodiment of the present invention;

[0043] Figure 8 This is a method flow chart of a second embodiment of a card activation method according to an embodiment of the present invention;

[0044] Figure 9 This is a method flow chart of a third embodiment of a card activation method according to an embodiment of the present invention;

[0045] Figure 10 This is a method flow chart of a fourth embodiment of a card activation method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0046] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention clearer and more understandable, the present 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 only used to explain the present invention and are not intended to limit the present invention.

[0047] In the subsequent description, suffixes such as "module," "component," or "unit" used to represent elements are only used to facilitate the description of the present invention and have no specific meaning. Therefore, "module," "component," or "unit" can be used interchangeably.

[0048] The terminal can be implemented in various forms. For example, the terminal described in the present invention may include mobile terminals such as mobile phones, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., as well as fixed terminals such as digital TVs and desktop computers.

[0049] The following description will be made by taking a mobile terminal as an example. It will be understood by those skilled in the art that, in addition to components specifically used for mobile purposes, the configuration according to the embodiments of the present invention can also be applied to fixed type terminals.

[0050] Example 1:

[0051] The present invention provides a card opening device that can quickly and conveniently open a storage device. Figures 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; the mother card interface 11 is used to insert the mother card 20, and the daughter card interface 12 is used to insert the daughter card 30.

[0052] The mother card 20 includes a first control chip 21 and a first storage chip 22, and the daughter card 30 includes a second control chip 31 and a second storage chip 32. 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, when power is turned on, the main control chip 10 communicates and interacts with the first control chip 21 of the mother card 20 and the second control chip 31 of the daughter card 30 and controls the reading and writing of card data information.

[0053] In one embodiment, the main control chip 10 integrates SRAM static random access memory for loading programs. The main control chip 10 is connected to a mother card interface 11 and a daughter card interface 12. The mother card interface 11 is used to insert a mother card 20, and the daughter card interface 12 is used to insert a daughter card 30. The daughter card 30 and the mother card 20 are the same type of storage device.

[0054] See also Figure 4 and Figure 6 In one embodiment, the first storage core 21 of the mother card 20 stores firmware, card activation program and file system data.

[0055] Specifically, the main control chip 10 collects file system data in the mother card 20 to form first mirror data of the mother card file system. The first mirror data includes block division and data corresponding to each block.

[0056] The file system data on the mother card 20 refers to the method and data structure used by the first control chip 21 to identify files in the first storage chip 22, specifically the method for organizing files on the first storage chip 21. Its functions include managing and allocating file storage space, providing a logical and physical file structure, and storage methods; mapping file identifiers to physical addresses, enabling file control and access operations, enabling file information sharing, and providing reliable file confidentiality and protection measures, thereby ensuring file security. Once the firmware is mounted on this file system, various processes within the system file are initiated.

[0057] The main control chip 10 collects the file system data in the mother card to form the first mirror data of the mother card file system, including the block division and the data corresponding to each block. The block division can be divided into MBR area, DBR area, FAT area, DIR area and DATA area.

[0058] The MBR (Main Boot Record) contains a series of memory parameters and a boot program. The boot program's main function is to check whether the master table is normal and, after the hardware completes its self-test, boot the operating system on the activated partition and transfer control to the startup program. The MBR is generated by the partitioning program but is independent of the firmware.

[0059] The DBR (Dos Boot Record) is the first block accessible to the operating system. It includes a boot program and a BPB (Bios Parameter Block). The boot program's main task is to determine whether the file at the front of the root directory of this partition is the firmware's boot file after the MBR transfers system control to the boot program. If so, it reads the file into memory and transfers control to it. The BPB parameter block records important parameters such as the partition's starting sector, ending sector, file storage format, hard disk media descriptor, root directory size, number of FAT entries, and allocation unit size. The DBR is generated by the Advanced Format program.

[0060] The FAT (File Allocation Table) is used to indicate the linked storage relationships of files in the memory chip, record occupied storage locations, and indicate the storage locations of subsequent content. Due to its importance to file management, the FAT is backed up by a duplicate FAT created behind the original one. Initially, all entries in the FAT are marked as "unoccupied." However, if a memory chip is partially damaged, the formatting process will detect the damaged location and mark it as such in the corresponding entry. Subsequent files will not be stored in this location.

[0061] The DIR area (Directory root area) follows the second FAT table and records the starting unit of each file (directory) in the root directory, the file's attributes, etc. When locating a file, the operating system uses the starting unit in the DIR and the FAT table to determine the specific location and size of the file on the hard disk.

[0062] The DATA area is used to store data and occupies most of the data space on the hard disk.

[0063] In one embodiment, the second storage chip 32 of the daughter card 30 is used to store a mapping table from the mother card 20 to the daughter card 30 and a file system established based on the mirror data of the file system of the mother card, and the daughter card maps storage blocks according to the mapping table.

[0064] In one embodiment, the daughter card 30 and the mother card 20 are both provided with interfaces, through which they can cooperate with external interfaces, thereby being able to respond to external instructions and perform corresponding operations.

[0065] The testing unit 13 is used to perform a read-write comparison test on the daughter card according to the mirror data of the file system in the mother card to determine whether the daughter card is normal.

[0066] Specifically, the first mirror data of the file system in the mother card 20 is obtained; the second mirror data of the file system in the daughter card 30 is obtained; the first mirror data and the second mirror data are XOR-compared. If the two are the same, it indicates that the daughter card is activated normally; if they are different, the daughter card is reactivated.

[0067] The first mirror data is located at a first position of the file system in the mother card, and the second mirror data is located at a second position of the file system in the daughter card, and the first position corresponds to the second position.

[0068] In this embodiment, since the cache capacity of the main control chip is limited and the entire file system cannot be written completely, the mirror data of the file systems of the mother card and the daughter card are obtained in segments and compared. 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 data file in the file system of the mother card and the second position of the second mirror data file in the file system of the daughter card are the same.

[0069] The device further includes a power interface 14, which is used to connect to an external power source to supply power to various components.

[0070] After the card opening device described in the present application 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 to 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, it will send inquiry signals to the mother card 20 and the daughter card 30 respectively. The first control chip 21 of the mother card 20 will return a confirmation signal based on the inquiry signal, indicating the connection and the mother card identity; the second control chip 32 of the daughter card 30 returns a confirmation signal, indicating the connection and the daughter card identity.

[0071] After the main control chip 10 is connected to the mother card 20 and the daughter card 30 respectively, the main control chip 10 then checks whether there is a mapping table in each daughter card 30. If there is no mapping table, the main control chip 10 controls the writing of card activation information to the daughter card 30.

[0072] Specifically, the main control chip 10 reads the card activation program in the mother card 20 and writes it into the daughter card 30. The second control chip 31 of the daughter card 30 runs the card activation program by itself and controls the scanning of the second storage chip 32 in the daughter card 30. A summary table is established based on the scanned information. The summary table serves as a mapping summary table, which is used to map the storage blocks in the second storage chip and test the quality of the daughter card blocks.

[0073] After the scan is complete, the firmware is retrieved from the mother card 20 and written to the daughter card 30. Specifically, the daughter card 30 sends an instruction to the main control chip 10, which, in accordance with the instruction, controls the firmware to be read from the mother card 20 and written to the daughter card 30. Based on the scanned information, the firmware is written at the beginning of the mapping table, that is, placed in the front-end storage block in the mapping table so that it can be read directly from the beginning of the mapping table.

[0074] Specifically, screening the good blocks of the daughter card includes:

[0075] Reading the second mirror image data of the file system written into the daughter card;

[0076] The ECC check circuit is used to determine whether the read second mirror data of the file system is correct. If not, the unstable good block is classified as a bad block, and the mirror data of the file system is rewritten into other good blocks.

[0077] In the embodiment of the present application, there may be one or more sub-card interfaces 12. When there are multiple sub-card interfaces 12, card activation information can be written to multiple sub-cards 30 at the same time.

[0078] The card opening device described in the embodiment of the present application is provided with a main control chip 10, a mother card interface 11 and at least one daughter card interface 12 and a test unit 13 respectively connected to the main control chip 10. 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, the main control chip 10 communicates and interacts with the first control chip 21 of the mother card 20 and the second control chip 31 of the daughter card 30 respectively to control the reading and writing of card data information. The test unit also performs a read-write comparison test on the daughter card based on the mirror data of the file system in the mother card to determine whether the daughter card is normal. Compared with the existing card opening devices that have the problems of wasteful labor costs, poor compatibility and low efficiency, the card opening device described in the present application can realize the card opening of the storage device efficiently and quickly, and can automatically test whether the card opening is normal after power off and restart. No personnel follow-up is required throughout the process, saving labor costs, and it can adapt to the card opening of various storage cards and has good compatibility.

[0079] The sub-card interface 12 described in the embodiment of the present application can be set to multiple. When multiple storage devices need to be activated, the cards can also be activated at the same time, which can greatly improve the efficiency of batch activation.

[0080] Example 2:

[0081] The present application embodiment provides a card opening method, which is applied to the card opening device described above. Figures 7 to 10 The card activation method specifically includes the following steps:

[0082] S101, obtaining card activation data from the mother card and writing the card activation data into the daughter card;

[0083] Specifically, the card activation data includes a card activation program and firmware. The card activation program is pre-written in the mother card. The card activation program in the mother card is read by the main control chip, and the card activation program in the mother card is controlled to be entered into the daughter card.

[0084] S102: Acquire mirror data of the file system of the mother card and write it into the daughter card, and the daughter card establishes a file system according to the mirror data;

[0085] S103 , after the daughter card is powered off and restarted, a read-write comparison test is performed on the daughter card according to the mirror data to determine whether the daughter card is normal.

[0086] Specifically, performing a read-write comparison test on the daughter card according to the mirror data to determine whether the daughter card is normal includes the following steps:

[0087] S1031. Acquire first image data of the file system in the mother card;

[0088] S1032: Acquire second mirror data of the file system in the daughter card;

[0089] S1033: Perform an XOR comparison on the first mirror data and the second mirror data. If the two are the same, it indicates that the sub-card is activated normally; if they are different, the sub-card is activated again.

[0090] The first mirror data is located at a first position of the file system in the mother card, and the second mirror data is located at a second position of the file system in the daughter card, and the first position corresponds to the second position.

[0091] In the embodiment of the present application, since the cache capacity of the main control chip is limited and the entire file system cannot be completely written, the mirror data of the file systems of the mother card and the daughter card are obtained in segments and compared. Since the file systems of the mother card and the daughter card are the same at this time, the position of the first mirror data file in the file system of the mother card is the same as the position of the second mirror data file in the file system of the daughter card.

[0092] In one embodiment, obtaining the card activation data from the mother card and writing the card activation data into the daughter card further includes:

[0093] Obtain the card activation program from the mother card and write the card activation program into the daughter card;

[0094] The daughter card runs the card activation program and scans the storage area of ​​the daughter card, and establishes a mapping table in the daughter card based on the scanned information;

[0095] When the daughter card scan is completed, the firmware is obtained from the mother card and written into the daughter card.

[0096] In one embodiment, before the main control chip reads the card activation program in the mother card, the method further includes the following steps:

[0097] S201, sending inquiry signals to the mother card and the daughter card respectively;

[0098] Specifically, the main control chip sends inquiry signals to the mother card and the daughter card respectively;

[0099] S202: The mother card returns a confirmation signal according to the inquiry signal, indicating the connection and mother card identity;

[0100] Specifically, the first control chip of the mother card returns a confirmation signal according to the inquiry signal, indicating the connection and the identity of the mother card;

[0101] S203, the daughter card returns a confirmation signal according to the inquiry signal, indicating the connection and daughter card identity;

[0102] Specifically, the second control chip of the daughter card returns a confirmation signal according to the inquiry signal, indicating the connection and the daughter card identity;

[0103] S204: Check whether the sub-card has a mapping table. If not, activate the sub-card.

[0104] Specifically, the main control chip checks whether a mapping table exists in the daughter card. If no mapping table exists, the main control chip controls the daughter card to execute the card activation steps S101 to S103 above.

[0105] In one embodiment, obtaining the mirror data of the file system of the mother card and writing it into the daughter card specifically includes:

[0106] The main control chip controls the writing of mirrored file data from the mother card's file system data to the daughter card. The mother card's file system data refers to the method and data structure used by the first control chip to identify files in the storage chip, specifically, the method used to organize files on the first storage chip. Its functions include managing and scheduling file storage space, providing logical and physical file structures, and storage methods; mapping file identifiers to actual addresses, enabling file control and access operations, enabling file information sharing, and providing reliable file confidentiality and protection measures, thereby ensuring file security. Once the firmware is mounted on this file system, it controls the various processes that initiate system file startups.

[0107] The main control chip collects the file system data in the mother card and forms the mirror data of the mother card file system. The mirror data of the file system includes the block division and the data corresponding to each block. The block division can be divided into MBR area, DBR area, FAT area, DIR area and DATA area.

[0108] Specifically, the MBR (Main Boot Record) contains a series of memory parameters and a boot program. The boot program's primary function is to check whether the master table is normal and, after the hardware completes its self-test, boot the operating system on the partition marked as active and transfer control to the startup program. The MBR is generated by the partitioning program but is independent of the firmware.

[0109] The DBR (Dos Boot Record) is the first block accessible to the operating system. It includes a boot program and a BPB (Bios Parameter Block). The boot program's main task is to determine whether the file at the front of the root directory of this partition is the firmware's boot file after the MBR transfers system control to the boot program. If so, it reads the file into memory and transfers control to it. The BPB parameter block records important parameters such as the partition's starting sector, ending sector, file storage format, hard disk media descriptor, root directory size, number of FAT entries, and allocation unit size. The DBR is generated by the Advanced Format program.

[0110] The FAT (File Allocation Table) is used to indicate the linked storage relationships of files in the memory chip, record occupied storage locations, and indicate the storage locations of subsequent content. Due to its importance to file management, the FAT is backed up by a duplicate FAT created behind the original one. Initially, all entries in the FAT are marked as "unoccupied." However, if a memory chip is partially damaged, the formatting process will detect the damaged location and mark it as such in the corresponding entry. Subsequent files will not be stored in this location.

[0111] The DIR area (Directory root area) follows the second FAT table and records the starting unit of each file (directory) in the root directory, the file's attributes, etc. When locating a file, the operating system uses the starting unit in the DIR and the FAT table to determine the specific location and size of the file on the hard disk.

[0112] The DATA area is used to store data and occupies most of the data space on the hard disk.

[0113] In one embodiment, the method further includes: S104, screening good blocks of the daughter card.

[0114] Specifically, screening the good blocks of the daughter card includes:

[0115] Reading the second mirror image data of the file system written into the daughter card;

[0116] The ECC check circuit is used to determine whether the read second mirror data of the system file is correct. If not, the unstable good block is classified as a bad block, and the second mirror data of the file system is rewritten into other good blocks.

[0117] Specifically, after the main control chip writes the mirror data of the file system in the mother card to the daughter card, the daughter card establishes a file system based on the mirror data. The file system data in the mother card and the daughter card are identical, so the read and write test can be performed using the mirror data of the identical file system data. As can be seen from the above partitions, the file system is used to divide blocks and permanently write data. In essence, the file system is still a 0 / 1 binary file at the bottom layer. Therefore, the main control chip first reads the first mirror data of the file system in the mother card, then reads the second mirror data of the file system on the daughter card, and then performs an XOR comparison between the two to determine whether the card activation is successful.

[0118] The main control chip obtains the mirror data of the file system of the mother card and writes it to the daughter card. The daughter card establishes a file system based on the mirror data. Figure 4 and Figure 5 , you can see that the file system divides the entire mother card storage area into regions, such as the data storage area, card data area (including firmware and card activation program), mapping table area, and block area. Corresponding data is written to each area. Since the daughter card establishes a file system based on the mirror data of the mother card, the data information and storage area corresponding to the mother card are also distributed in the daughter card storage area. The DATA data storage area occupies 93%-97% of the system storage area of ​​the daughter card. Although data is not stored in all blocks of the daughter card at this time, it can be understood that data storage is stored in a 0 / 1 manner. In blocks without data, the blocks are filled with all 0s to represent the absence of data. Therefore, the blocks filled with 0s in the mother card and daughter card can be read out for comparison testing.

[0119] When the main control chip writes the image data of the file system to the daughter card, the good blocks of the daughter card can be filtered, such as Figure 4 and Figure 5In the example, blocks marked with an "×" are bad blocks, and blocks marked with a "√" are good blocks. Screening the good blocks of the daughter card specifically includes: performing a complete write / read operation on the daughter card. When the main control chip transmits the first mirror data of the mother card system file to the daughter card, the first mirror data of the mother card system file is written to the good blocks of the daughter card. Then, the daughter card file system is read out and the second mirror data of the daughter card file system is obtained. An ECC check circuit is used in the underlying layer to determine whether the read second mirror data of the daughter card file system is correct. If not, the unstable good block is classified as a bad block, and the data is rewritten to other good blocks.

[0120] The card activation method described in the embodiment of the present application obtains activation data from a mother card and writes the activation data to a daughter card; obtains mirror data of the mother card's file system and writes it to the daughter card, which then establishes a file system based on the mirror data; then, after powering off and restarting the daughter card, performs a read-write comparison test on the daughter card based on the mirror data to determine whether the daughter card is functioning properly. Compared to existing card activation methods that suffer from wasteful labor costs, poor compatibility, and low efficiency, the card activation method described in the present application can efficiently and quickly activate storage devices without the need for personnel follow-up, is adaptable to the activation of various storage cards, and has excellent compatibility.

[0121] The card activation method described in the embodiment of the present application can activate cards for multiple storage devices at the same time, which can greatly improve the efficiency of batch activation.

[0122] Example 3:

[0123] According to one embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned card activation method are implemented. The specific steps are as described in Example 1 and will not be repeated here.

[0124] The memory in this embodiment can be used to store software programs and various data. The memory may primarily include a program storage area and a data storage area. The program storage area may store an operating system, at least one application required for a function, and the data storage area may store data generated based on the use of the mobile phone. Furthermore, the memory may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0125] According to an example of this embodiment, all or part of the processes in the above-mentioned method can be completed by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium. For example, in the embodiment of the present invention, the program can be stored in a storage medium of a computer system and executed by at least one processor in the computer system to implement the processes including the embodiments of the above-mentioned methods. The storage medium includes but is not limited to a magnetic disk, a USB flash drive, an optical disk, a read-only memory (ROM), etc.

[0126] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0127] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0128] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0129] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are protected by the present invention.

Claims

1. A card activation method, characterized in that: The method comprises: Obtaining a card activation program from the mother card and writing the card activation program into the daughter card, the daughter card running the card activation program and scanning the storage area of ​​the daughter card, and establishing a mapping table in the daughter card based on the scanned information; After the daughter card completes the scan, the firmware is obtained from the mother card and written into the daughter card. Mirror data of the mother card's file system is obtained, and the second mirror data of the file system written into the daughter card is read. An ECC check circuit is used to determine whether the read second mirror data of the file system is correct. If incorrect, a good block is classified as a bad block, and the mirror data of the mother card's file system is rewritten into other good blocks. The daughter card establishes a file system based on the mirror data. The second storage chip of the daughter card is used to store a mapping table from the mother card to the daughter card and a file system established based on the mirror data of the mother card's file system. The daughter card maps storage blocks based on the mapping table. After the daughter card is powered off and restarted, the first mirror image data of the file system in the mother card and the second mirror image data of the file system in the daughter card are obtained; The first mirror data and the second mirror data are segmented, and the segmented first mirror data and the second mirror data are XOR-compared. If the two are the same, it indicates that the sub-card is activated normally; if they are different, the sub-card is reactivated.

2. The card activation method according to claim 1, characterized in that: The first mirror data is located at a first position of the file system in the mother card, and the second mirror data is located at a second position of the file system in the daughter card, and the first position corresponds to the second position.

3. The card activation method according to claim 1, characterized in that: Before the step of obtaining the card activation data from the mother card and writing the card activation data into the daughter card, the method further includes: sending inquiry signals to the mother card and the daughter card respectively; The mother card returns a confirmation signal according to the inquiry signal, indicating the connection and the mother card identity; The daughter card returns a confirmation signal according to the inquiry signal, indicating the connection and daughter card identity; Check whether the sub-card has a mapping table. If not, activate the sub-card.

4. The card activation method according to claim 1, characterized in that: The acquiring of the firmware from the mother card and writing it into the daughter card specifically includes: controlling the firmware to be written into the storage block at the front section of the mapping table.

5. A card opening device, characterized in that: A card activation method according to any one of claims 1 to 4 is used to activate a card, wherein the device comprises a main control chip, a mother card interface and at least one daughter card interface respectively connected to the main control chip, and a test unit connected to the main control chip, wherein the mother card interface is used to insert a mother card, and the daughter card interface is used to insert a daughter card; The mother card includes a first control chip and a first memory chip, and the daughter card includes a second control chip and a second memory chip. When the mother card and the daughter card are inserted into the mother card interface and the daughter card interface, respectively, when powered on, the main control chip communicates and interacts with the first control chip of the mother card and the second control chip of the daughter card, respectively, and controls the reading and writing of card data information; The testing unit is used to perform a read-write comparison test on the daughter card according to the mirror data of the file system in the mother card to determine whether the daughter card is normal.

6. The card opening device according to claim 5, characterized in that: The main control chip is integrated with SRAM static random access memory; the first storage chip of the mother card stores firmware, card activation program and file system; the second storage chip of the daughter card is used to store the mapping table from the mother card to the daughter card, and map the storage block according to the mapping table.

7. The card opening device according to any one of claims 5 or 6, characterized in that: The device further includes a power interface, which is used to connect to an external power source to supply power.

8. A computer-readable storage medium, characterized in that The method comprises a processor, a computer-readable storage medium, and a computer program stored on the computer-readable storage medium, wherein the computer program implements the steps of the method according to any one of claims 1 to 4 when executed by the processor.

Citation Information

Patent Citations

  • Method and device for burning set-top box storage chips

    CN103237252A

  • Method and device of testing a plurality of modules in test circuit

    CN105629148A

  • Solid state drive production method and solid state drive

    CN109119124A