Method and device for storing and reading telephone book, medium, equipment and program product
By partitioning and numbering the flash memory of the Bluetooth module and storing and managing telephone information, the problem of insufficient storage space of the Bluetooth module is solved, extending the flash memory life and improving information reading efficiency and data stability.
Patent Information
- Application Number
- CN202510446881.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-25
AI Technical Summary
In the prior art, the local platform storage volume of Bluetooth modules is limited and cannot effectively solve the storage needs of telephone information.
The flash memory of the serial interface is partitioned according to predetermined rules, and the storage partition is numbered to store the current contact and call record information, and the start address, end address and quantity information are used as permanent storage key codes to reduce the read and write operations to the same partition.
It effectively solves the problem of insufficient local storage space, while extending the service life of flash memory, improving information reading efficiency and data stability.
Smart Images

Figure CN120371206A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless communication technologies, and particularly to a method, device, storage medium, electronic device, and computer program product for storing and reading a phone book. Background Art
[0002] PBAP (Phone Book Access Profile) refers to the Bluetooth phone book protocol. In actual applications, after a user establishes a PBAP connection, AT commands are sent to download the phone book and call log of the mobile phone. In the prior art, after the Bluetooth module receives the phone information returned by the mobile phone, it feeds back the relevant information to the user through the serial port, and the user directly saves the received phone information to the local platform, while the phone information is not saved in the Bluetooth module. However, in the application process, there is a need for the user to download the phone when the platform memory is insufficient, and in the prior art, there is no more effective solution except to expand the storage capacity of the local platform. Summary of the Invention
[0003] In view of the problem in the prior art that the storage capacity of the local platform is limited and phone information needs to be stored, this application mainly provides a method, device, storage medium, electronic device, and computer program product for storing and reading a phone book.
[0004] To achieve the above object, the first technical solution adopted in this application is: to provide a method for storing and reading a phone book, which includes: partitioning the flash memory of the serial interface according to a predetermined rule to obtain storage partitions, and numbering the storage partitions; saving the start address and end address corresponding to each storage partition as permanent storage key codes; within the storage partition, storing the relevant information of the current contact and the relevant information of the current call record according to the size of the storage partition number, and saving the number information of the current contacts and the number information of the current call records in the storage partition as permanent storage key codes; after completing the storage of the current information, closing the storage function of the storage partition that has stored the relevant information of the current contact and the relevant information of the current call record; and reading information in the flash memory by using the start address, end address, number information of the current contacts, and number information of the current call records.
[0005] Optionally, within the storage partition, storing the relevant information of the current contact and the relevant information of the current call record according to the size of the storage partition number, and saving the number information of the current contacts and the number information of the current call records in the storage partition as permanent storage key codes includes: erasing the stored information in the storage partition before storing the relevant information of the current contact and the relevant information of the current call record into the storage partition.
[0006] Optionally, the method for storing and reading a phone book further includes: when storing the next phone book information after the current phone book information, storing the next phone book information in the next storage area after the last storage area where the current phone book information is stored.
[0007] Optionally, the method for storing and reading a phone book further includes: obtaining the original data of the current contact-related information and the current call record-related information, sorting the current contact-related information and the current call record-related information according to a predetermined classification rule, and storing the current contact-related information and the current call record-related information into the storage area according to the sorting result and the number size of the storage partition, and saving the start address and the end address corresponding to each classification as the permanent storage key codes.
[0008] Optionally, the function of closing the storage partition that has stored the current contact-related information and the current call record-related information after completing the storage of the current information includes: when storing the current call record-related information in the storage partition, closing the storage function of the storage partition that has stored the current call record-related information when reading the current call record-related information.
[0009] Optionally, storing the current contact-related information and the current call record-related information includes: when storing the current call record-related information, reading the current call record-related information in each storage partition and redownloading the current call record-related information according to the storage partition; when the number of the current call record-related information reaches a predetermined threshold, rereading the current call record-related information in each storage partition and saving a predetermined number of the current call record-related information to the storage partition that has not stored the current call record-related information.
[0010] The second technical solution adopted by this application is: providing a device for storing and reading a phone book, which includes: a partitioning module, configured to partition the flash memory of the serial interface according to a predetermined rule to obtain storage partitions and number the storage partitions; saving the start address and the end address corresponding to each storage partition as the permanent storage key codes; a storage module, configured to store the current contact-related information and the current call record-related information in the storage area according to the number size of the storage partition, and save the current contact quantity information and the current call record quantity information in the storage partition as the permanent storage key codes; a storage function closing module, configured to close the storage function of the storage partition that has stored the current contact-related information and the current call record-related information after completing the storage of the current information; a reading module, configured to read information in the flash memory by using the start address, the end address, the current contact quantity information, and the current call record quantity information.
[0011] Optionally, the storage module includes: before storing the current contact-related information and the current call record-related information into the storage partition, first erase the stored information in the storage partition.
[0012] Optionally, the apparatus for storing and reading the phone book further includes: when storing the next phone book information of the current phone book information, store the next phone book information in the next storage area after the last storage area where the current phone book information is stored.
[0013] Optionally, the apparatus for storing and reading the phone book further includes: obtaining the original data of the current contact-related information and the current call record-related information, sorting the current contact-related information and the current call record-related information according to a predetermined classification rule, and storing the current contact-related information and the current call record-related information into the storage area according to the sorting result and the number size of the storage partition, and saving the start address and the end address corresponding to each classification as the permanent storage key code.
[0014] Optionally, the storage function closing module includes: when storing the current call record-related information in the storage partition, when reading the current call record-related information, close the storage function of the storage partition where the current call record-related information has been stored.
[0015] Optionally, the storage module includes: when storing the current call record-related information, read the current call record-related information in each storage partition, and re-download the current call record-related information according to the storage partition; when the number of the current call record-related information reaches a predetermined threshold, re-read the current call record-related information in each storage partition, and save a predetermined number of the current call record-related information to the storage partition where the current call record-related information has not been stored.
[0016] The third technical solution adopted by this application is: to provide a computer-readable storage medium, which stores a computer program / instructions, and the computer program / instructions are operated to execute the method for storing and reading the phone book in Solution 1.
[0017] The fourth technical solution adopted by this application is: to provide a computer device, including a memory, a processor, and a computer program stored on the memory, and the processor executes the computer program to implement the method for storing and reading the phone book in Solution 1.
[0018] The fifth technical solution adopted by this application is: to provide a computer program product, including a computer program / instructions, and when the computer program / instructions are executed by a processor, the method for storing and reading the phone book as in Solution 1 is implemented.
[0019] The beneficial effects that the technical solution of this application can achieve are as follows: By storing phone information in the flash memory of the Bluetooth module, the problem of insufficient local storage space while still needing to store phone numbers can be effectively solved. At the same time, this application avoids shortening the flash memory lifespan by reducing repeated reading and writing to the same partition. Brief Description of the Drawings
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0021] Figure 1 It is a schematic diagram of a specific implementation of a method for storing and reading a phone book in this application;
[0022] Figure 2 It is a schematic diagram of a specific implementation of a device for storing and reading a phone book in this application;
[0023] Figure 3 It is a schematic diagram of the Flash partition configuration of a device for storing and reading a phone book in this application.
[0024] Through the above drawings, the clear embodiments of this application have been shown, and there will be more detailed descriptions later. These drawings and written descriptions are not intended to limit the scope of the concept of this application in any way, but to explain the concept of this application to those skilled in the art by referring to specific embodiments. Detailed Embodiments
[0025] The following will elaborate on the preferred embodiments of this application in conjunction with the drawings, so that the advantages and features of this application can be more easily understood by those skilled in the art, thereby making the protection scope of this application more clearly defined.
[0026] It should be noted that in this text, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising..." does not exclude the presence of additional identical elements in the process, method, article or device comprising said element.
[0027] Next, specific embodiments will be used to describe in detail the technical solutions of this application and how the technical solutions of this application solve the above technical problems. The specific embodiments described below can be combined with each other to form new embodiments. For the same or similar ideas or processes described in one embodiment, they may not be repeated in some other embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0028] Figure 1 An embodiment of a method for storing and reading a phone book according to this application is shown.
[0029] Figure 1 The method for storing and reading a phone book shown includes: Step S101, partitioning the flash memory of the serial interface according to a predetermined rule to obtain storage partitions, and numbering the storage partitions;
[0030] Step S102, saving the start address and end address corresponding to each storage partition as a permanent storage key;
[0031] Step S103, within the storage partition, store the current contact-related information and the current call record-related information according to the size of the storage partition number, and save the current contact quantity information and the current call record quantity information within the storage partition as a permanent storage key;
[0032] Step S104, after completing the storage of the current information, turn off the storage function of the storage partition that has stored the current contact-related information and the current call record-related information;
[0033] Step S105, information is read in the flash memory by using the start address, end address, current contact number information, and current call record number information. In this specific implementation, by storing phone information in partitions in the flash memory and reading information in partitions, the repeated reading and writing of the same storage area can be reduced, extending the service life of the flash memory. At the same time, the phone information obtained in this application can be non-lost when the power is off. Compared with the prior art, the efficiency of the user to obtain phone information using this application is higher, and the obtained data is more stable.
[0034] In Figure 1 the embodiment shown, the method for storing and reading the phone book includes step S101, partitioning the flash memory of the serial interface according to a predetermined rule to obtain storage partitions, and numbering the storage partitions.
[0035] Specifically, taking QCC3007 Bluetooth as an example, the size of its flash (flash memory) is 4M. Therefore, the size of the partition related to the phone book set therein and its corresponding number can be as Figure 3 shown.
[0036] When information needs to be stored in the above partitions, taking the main phone book as an example, the original data of the main phone book can be stored in partitions 10 - 14 of the flash, and the sorted main phone book information can be stored in partitions 15 - 19. At the same time, when storing information, the start address and end address corresponding to the partition, as well as relevant information such as the number of phone entries and phone information, need to be saved as permanent storage key codes, so as to directly obtain the starting partition position and the required offset through the stored permanent storage key codes when reading information, and then quickly and efficiently obtain phone information in the specified partition.
[0037] In Figure 1 the embodiment shown, the method for storing and reading the phone book includes step S102, saving the start address and end address corresponding to each storage partition as permanent storage key codes. In this specific embodiment, the number of information reading times during information reading can be effectively reduced, and at the same time, the number of read and write operations on the flash memory can be reduced, which can improve the efficiency of information reading and the service life of the flash memory.
[0038] Specifically, obtain the start address and end address corresponding to each partition, and save the start address and end address corresponding to each partition as non-lost permanent storage key codes for subsequent obtaining of relevant information of the partition.
[0039] In Figure 1In the illustrated embodiment, the method for storing and reading a phone book includes step S103. In a storage partition, according to the size of the storage partition number, store the current contact related information and the current call record related information, and save the current contact number information and the current call record number information in the storage partition as permanent storage key codes.
[0040] Specifically, when the Bluetooth obtains the current phone information, traverse all the storage partitions, and in the storage partition with the smallest numbered number and the storage function not closed, store the current contact related information and the current call record related information, and use the current contact number information and the current call record number information in the current storage area as the permanent storage key code, and the storage area information related to the current contact number information and the current call record number information as the permanent storage key code for saving, and save the corresponding relationship between the storage space number and the phone information for subsequent information reading.
[0041] In a specific embodiment of the present application, in a storage partition, according to the size of the storage partition number, store the current contact related information and the current call record related information, and save the current contact number information and the current call record number information in the storage partition as permanent storage key codes, including: before storing the current contact related information and the current call record related information into the storage partition, first erase the storage information in the storage partition.
[0042] Specifically, when storing the current contact information, a piece of current contact information includes its corresponding serial number information, number, name, phone path and other information. Therefore, usually the size of a piece of current contact information is 64. And the number of mobile phone address books is usually about 100 to 500. Taking a partition size of 20K and the number of mobile phone address books being 1000 as an example, each partition can store up to 320 pieces of current contact information at most. Considering the situation that the partition storage space is full, preferably, set the maximum number of phones in a partition to 312. The excess number of phones starts to be written in the next partition. When writing to a new partition, the method of erasing first and then writing can effectively avoid the existing data in the storage space, and thus avoid data overflow caused by writing information therein, and the space waste caused by writing data in the new storage partition. When storing the current call record related information, to ensure that as much information as possible is stored in the effective storage space and avoid waste of storage space by invalid information, first erase the information in the storage partition where the information needs to be stored, and then write the information.
[0043] In a specific embodiment of the present application, the original data of the current contact-related information and the current call record-related information is obtained, and the current contact-related information and the current call record-related information are sorted according to a predetermined classification rule. Then, according to the sorting result and the number of the storage partition, the current contact-related information and the current call record-related information are stored in the storage area, and the start address and the end address corresponding to each classification are saved as the permanent storage key codes.
[0044] Specifically, when the user needs to obtain the sorted information of the current contacts, first, all the original data storing the current contacts is obtained. According to the sorting rule, the original data of the current contacts is traversed, sorted, and the sorted result is stored in a new storage space according to the sorting result. Also, the start address and the end address of each classification storage location, and the current contact-related information corresponding to each classification are saved as the permanent storage key codes. Among them, the new storage space is the storage space of the classified storage space where the storage function is not closed.
[0045] Particularly, the present application does not limit the classification criteria, nor the specific location of the corresponding new storage space, and the user can make appropriate adjustments according to the needs.
[0046] For example, when the classification criterion is sorting by the first letter, the original data of the current contacts is traversed. According to the position of the original data in the storage partition, starting from the storage position of the first current contact as the starting position, offset by 64 each time, the first letter of each current contact is judged one by one, and the phone information is stored in a new storage partition in the order of letters A to Z. For example, it is stored in partitions 15 to 19. When the user needs to obtain the relevant information of the current contacts in order, the sorted current contact information is obtained from partitions 15 to 19. Among them, the sorting of the present application has no average wear.
[0047] In a specific embodiment of the present application, storing the current contact-related information and the current call record-related information includes: when storing the current call record-related information, reading the current call record-related information in each storage partition, and re-downloading the current call record-related information according to the storage partition; when the number of the current call record-related information reaches a predetermined threshold, re-reading the current call record-related information in each storage partition, and saving a predetermined number of the current call record-related information to the storage partition where the current call record-related information has not been stored. In this step, when reading the call records stored in the flash memory, by performing defragmentation, it not only ensures sufficient storage space for the next data storage, but also can store a predetermined number of call records to facilitate the user to search for call information.
[0048] For example, the default number of downloaded current call record information for each storage partition is 0. If 5 storage partitions are defined for storing call record information and the size of each partition is 2K, a partition can store at most 32 current call record information. To prevent information overflow, preferably, it is set that a partition can store at most 20 current call record information, and the excess number of records is written starting from the next partition. When there is no storage partition with the storage function turned off among the defined storage partitions, the current call record information is continuously written at the end position of the write position of the previous call record. When information is read after writing, the storage partition from which the information is read will turn off the storage function of this storage partition. At this time, when writing information again, the next storage partition of this storage partition needs to be opened, and the call record information is written in the next storage partition. When writing reaches the penultimate storage partition of the defined storage partitions for storing current call record information, after writing this penultimate storage partition, read the call information of all storage partitions for storing current call record information and perform fragmentation of the call information. Among them, when storing the current call record information, when information is not read immediately after writing the current call record information in the storage partition, the storage function of this partition is not turned off; when storing the current call record information, when information is read immediately after writing the current call record information in the storage partition, the storage function of this partition is turned off.
[0049] When fragmentation is not performed, reading call records starts offset from the beginning of the corresponding starting partition. That is, when reading call records, when the starting offset address of the starting partition remains unchanged, the starting point for reading information is fixed. After fragmentation, the partition positions of the starting offset address and the ending offset address of the starting partition change, so the starting point for reading information also changes accordingly.
[0050] The process of fragmentation is as follows: When storing information related to the current call record, read the information related to the current call record in each storage partition for storing call records and re-download the information related to the current call record in each partition; when the number of information related to the current call record reaches a predetermined threshold, re-read the information related to the current call record in each storage partition and save a predetermined number of information related to the current call record to the storage partition that has not stored the information related to the current call record. Among them, the predetermined threshold can take a value of 32 or 24, and the predetermined number can take a value of 20.
[0051] In a specific embodiment of the present application, when storing the next phone book information of the current phone book information, the next phone book information is stored in the next storage area after the last storage area where the current phone book information is stored.
[0052] Specifically, after writing the phone book information received for the current number of times, regardless of whether the storage space corresponding to the current phone book information is fully occupied, the storage function of the corresponding storage space is closed. Therefore, when the writing requirement for the next phone book information is received, the next phone book information is stored in the next storage area after the last storage area where the current phone book information is stored.
[0053] In Figure 1 The embodiment shown, the method for storing and reading the phone book includes step S104 of closing the storage function of the storage partition that has stored the information related to the current contact and the information related to the current call record after storing the current information.
[0054] In a specific embodiment of the present application, after storing the current information, closing the storage function of the storage partition that has stored the information related to the current contact and the information related to the current call record includes: when storing the information related to the current call record in the storage partition, when reading the information related to the current call record, closing the storage function of the storage partition that has stored the information related to the current call record.
[0055] Specifically, after storing the current information, closing the storage function of the storage partition that has stored the information related to the current contact and the information related to the current call record, and when storing the information related to the current call record in the storage partition, when reading the information related to the current call record, closing the storage function of the storage partition that has stored the information related to the current call record can effectively ensure the reliability of the data and can also effectively prevent data loss of the obtained phone book information during storage.
[0056] In Figure 1 The embodiment shown, the method for storing and reading the phone book includes step S105 of reading information in the flash memory by using the start address, end address, current contact number information, and current call record number information.
[0057] Specifically, when reading the phone book from the flash memory, the start address of the reading position is the position of the start address that was previously saved as the permanent storage key code. Starting from this position, each time it is offset by 64 bits, a contact information can be read. If you want to obtain N consecutive phones starting from a certain position M as the starting offset position, start reading from position M, offset by 64 each time, and after offsetting N times, the required phone information can be obtained.
[0058] Figure 2 Shows a device for storing and reading a phone book according to the present application, and a specific embodiment of the device.
[0059] In Figure 2In the specific embodiment shown, the device for storing and reading a phone book mainly includes: a partitioning module 201, configured to partition a flash memory of a serial interface according to a predetermined rule to obtain storage partitions, and number the storage partitions; save the start address and end address corresponding to each storage partition as a permanent storage key;
[0060] a storage module 202, configured to store current contact-related information and current call record-related information in the storage partitions according to the size of the storage partition numbers, and save the current contact quantity information and current call record quantity information in the storage partitions as permanent storage keys;
[0061] a storage function closing module 203, configured to close the storage function of the storage partition in which the current contact-related information and current call record-related information have been stored after completing the storage of the current information;
[0062] a reading module 204, configured to read information in the flash memory by using the start address, end address, current contact quantity information, and current call record quantity information.
[0063] In a specific embodiment of the present application, the storage module 202 includes: erasing the stored information in the storage partition before storing the current contact-related information and current call record-related information into the storage partition.
[0064] In a specific embodiment of the present application, the device for storing and reading a phone book further includes: when storing the next phone book information after storing the current phone book information, storing the next phone book information in the next storage area after the last storage area where the current phone book information is stored.
[0065] In a specific embodiment of the present application, the device for storing and reading a phone book further includes: obtaining the original data of the current contact-related information and current call record-related information, sorting the current contact-related information and current call record-related information according to a predetermined classification rule, storing the current contact-related information and current call record-related information into the storage area according to the sorting result and the size of the storage partition numbers, and saving the start address and end address corresponding to each classification as a permanent storage key.
[0066] In a specific embodiment of the present application, the storage function closing module 203 includes: when storing the current call record-related information in the storage partition, closing the storage function of the storage partition in which the current call record-related information has been stored when reading the current call record-related information.
[0067] In a specific embodiment of the present application, the storage module 202 includes: when storing the information related to the current call record, reading the information related to the current call record in each storage partition, and redownloading the information related to the current call record according to the storage partition; when the number of the information related to the current call record reaches a predetermined threshold, rereading the information related to the current call record in each storage partition, and saving a predetermined number of the information related to the current call record to the storage partition that has not stored the information related to the current call record.
[0068] The device for storing and reading the phone book provided by the present application can be used to execute the method for storing and reading the phone book described in any of the above embodiments. The implementation principles and technical effects are similar and will not be elaborated here.
[0069] In a specific embodiment of the present application, each functional module in a device for storing and reading a phone book of the present application can be directly in hardware, in a software module executed by a processor, or in a combination of both.
[0070] The software module may reside in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. The exemplary storage medium is coupled to the processor such that the processor can read information from and write information to the storage medium.
[0071] The processor may be a central processing unit (English: Central Processing Unit, abbreviated: CPU), or may also be other general-purpose processors, digital signal processors (English: Digital Signal Processor, abbreviated: DSP), application specific integrated circuits (English: Application Specific Integrated Circuit, abbreviated: ASIC), field programmable gate arrays (English: Field Programmable Gate Array, abbreviated: FPGA), or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination thereof. The general-purpose processor may be a microprocessor, but in an alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors combined with a DSP core, or any other such configuration. In an alternative, the storage medium may be integrated with the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In an alternative, the processor and the storage medium may reside in the user terminal as discrete components.
[0072] In another specific embodiment of the present application, a computer-readable storage medium stores computer programs / instructions, and the computer programs / instructions are operated to execute the methods for storing and reading a phone book described in the above embodiments.
[0073] In a specific embodiment of the present application, a computer device includes a memory, a processor, and a computer program stored on the memory. The processor executes the computer program to implement the methods for storing and reading a phone book described in the above embodiments.
[0074] In a specific embodiment of the present application, a computer program product includes computer programs / instructions, and when the computer programs / instructions are executed by a processor, the methods for storing and reading a phone book described in the above embodiments are implemented.
[0075] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical or other forms.
[0076] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0077] The above are only the embodiments of the present application, and do not limit the patent scope of the present application accordingly. Any equivalent structural transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.
Claims
1. A method for storing and reading a phone book, characterized in that, Including: Partitioning the flash memory of the serial interface according to a predetermined rule to obtain storage partitions, and numbering the storage partitions; Saving the start address and end address corresponding to each storage partition as permanent storage key codes; Within the storage partition, storing the current contact related information and the current call record related information according to the number size of the storage partition, and saving the current contact quantity information and the current call record quantity information within the storage partition as permanent storage key codes; After storing the current information, closing the storage function of the storage partition that has stored the current contact related information and the current call record related information; Using the start address, the end address, the current contact quantity information and the current call record quantity information to read information in the flash memory.
2. The method for storing and retrieving a phone book according to claim 1, characterized in that, The step of within the storage partition, storing the current contact related information and the current call record related information according to the number size of the storage partition, and saving the current contact quantity information and the current call record quantity information within the storage partition as permanent storage key codes includes: Before storing the current contact related information and the current call record related information into the storage partition, first erasing the stored information within the storage partition.
3. The method for storing and reading a phone book according to claim 1, characterized in that, Also including: When storing the next phone book information after storing the current phone book information, storing the next phone book information in the next storage area after the last storage area where the current phone book information is stored.
4. The method for storing and retrieving a phone book according to claim 1, characterized in that, Also including: Obtaining the original data of the current contact related information and the current call record related information, sorting the current contact related information and the current call record related information according to a predetermined classification rule, and storing the current contact related information and the current call record related information into the storage area according to the sorting result and the number size of the storage partition, and saving the start address and end address corresponding to each classification as permanent storage key codes.
5. The method for storing and reading a phone book according to claim 1, wherein The step of after storing the current information, closing the storage function of the storage partition that has stored the current contact related information and the current call record related information includes: When storing the current call record related information within the storage partition, when reading the current call record related information, closing the storage function of the storage partition that has stored the current call record related information.
6. The method for storing and reading a phone book according to claim 1, wherein The step of storing the current contact related information and the current call record related information includes: When storing the current call record related information, reading the current call record related information within each storage partition, and redownloading the current call record related information according to the storage partition; When the number of the current call record related information reaches a predetermined threshold, rereading the current call record related information within each storage partition, and saving a predetermined number of the current call record related information into the storage partition that has not stored the current call record related information.
7. A device for storing and reading a phone book, characterized in that, Including: A partitioning module, configured to partition a flash memory of a serial interface according to a predetermined rule to obtain storage partitions, and number the storage partitions; Save the start address and end address corresponding to each of the storage partitions as permanent storage key codes; A storage module, configured to store current contact-related information and current call record-related information within a storage partition according to the number size of the storage partition, and save the current contact quantity information and current call record quantity information within the storage partition as permanent storage key codes; A storage function closing module, configured to close the storage function of the storage partition that has stored the current contact-related information and the current call record-related information after the current information is stored; A reading module, configured to read information in the flash memory by using the start address, the end address, the current contact quantity information, and the current call record quantity information; 8. A computer-readable storage medium storing a computer program / instructions, characterized in that, The computer program / instructions are operated to execute the method for storing and reading a phone book according to any one of claims 1-6.
9. A computer device, comprising a memory, a processor, and a computer program stored on the memory, characterized in that, The processor executes the computer program to implement the method for storing and reading a phone book according to any one of claims 1-6.
10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by a processor, the method for storing and reading a phone book according to any one of claims 1-6 is implemented.