CN110764713A - Writing method and system of flash memory, electronic device, medium and communication module - Google Patents

Writing method and system of flash memory, electronic device, medium and communication module Download PDF

Info

Publication number
CN110764713A
CN110764713A CN201911056213.5A CN201911056213A CN110764713A CN 110764713 A CN110764713 A CN 110764713A CN 201911056213 A CN201911056213 A CN 201911056213A CN 110764713 A CN110764713 A CN 110764713A
Authority
CN
China
Prior art keywords
cell
serving cell
flash memory
time interval
communication module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911056213.5A
Other languages
Chinese (zh)
Other versions
CN110764713B (en
Inventor
张勇星
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Quectel Wireless Solutions Co Ltd
Original Assignee
Quectel Wireless Solutions Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Quectel Wireless Solutions Co Ltd filed Critical Quectel Wireless Solutions Co Ltd
Priority to CN201911056213.5A priority Critical patent/CN110764713B/en
Publication of CN110764713A publication Critical patent/CN110764713A/en
Application granted granted Critical
Publication of CN110764713B publication Critical patent/CN110764713B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0616Improving the reliability of storage systems in relation to life time, e.g. increasing Mean Time Between Failures [MTBF]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Abstract

The invention discloses a writing method, a system, electronic equipment, a medium and a communication module of a flash memory, wherein the flash memory is arranged in the communication module and is used for storing a reference cell of the communication module, and the writing method of the flash memory comprises the following steps: acquiring the change frequency of a serving cell of a communication module in a first reference time interval; and if the change frequency is less than the preset threshold value and the current serving cell is not matched with the reference cell, writing the current serving cell into the flash memory to assign the current serving cell to the reference cell. The invention effectively avoids frequent writing operation to the flash memory under the condition that the service cell of the communication module is frequently switched by detecting the frequency of the service cell switching of the communication module, thereby effectively prolonging the service lives of the flash memory and the communication module.

Description

Writing method and system of flash memory, electronic device, medium and communication module
Technical Field
The invention belongs to the technical field of communication modules, and particularly relates to a writing method and system of a flash memory, electronic equipment, a medium and a communication module.
Background
For 3GPP (third generation partnership project) networks such as GSM (global system for mobile communications, a mobile communication standard), W-CDMA (wideband code division multiple access, a cellular network), LTE (long term evolution), 5G (fifth generation mobile communication technology), there are many operators, and each operator also has many frequency bands. The 3GPP adopts the cellular form, and different frequency bands and frequency points are used under each cell. However, blind searching for the frequency point after the mobile terminal is powered on can lead to long time for the mobile terminal to power on and register the network, in order to accelerate the speed of the mobile terminal to power on and register the network, after the network is registered or after the network changes, the currently registered network environment information (including service cell information, frequency band, frequency point and the like corresponding to the network environment) can be stored in a file system of a communication module of the mobile terminal, and after the mobile terminal is powered on next time, historical frequency band frequency point information in the file system is preferentially searched, so that the purpose of rapidly finding the network is achieved.
However, in the existing scheme, a large amount of historical information is often stored in a file system, for example, frequent cellular network environment switching is designed in a high-speed moving scene of a high-speed rail, so that frequent changes of frequency points used by cells and modules are frequently performed, and frequent writing of the file system is caused. Flash memory (e.g., NAND flash memory) is often employed in communication modules as a storage medium for file systems. Flash memories have a certain erase-write cycle, i.e., the limit of the number of erase-write times. Frequent writes to the file system may cause the flash memory to reach an erase-write cycle, which affects the life of the communication module.
Disclosure of Invention
The invention provides a flash memory writing method, a flash memory writing system, electronic equipment, a medium and a communication module, and aims to overcome the defect that the service life of the communication module is influenced by frequently writing the flash memory under the condition that the service cell of the communication module is frequently switched in the prior art.
The invention solves the technical problems through the following technical scheme:
the invention provides a writing method of a flash memory, wherein the flash memory is arranged in a communication module and is used for storing a reference cell of the communication module, and the writing method of the flash memory comprises the following steps:
s1, acquiring the change frequency of the serving cell of the communication module in a first reference time interval;
and S2, if the change frequency is less than the preset threshold value and the current serving cell is not matched with the reference cell, writing the current serving cell into a flash memory to assign the current serving cell to the reference cell.
Preferably, step S2 includes:
s21, judging whether the change frequency is smaller than a preset threshold value, if so, executing a step S22, and if not, executing a step S23;
s22, judging whether the current service cell is matched with the reference cell, if so, executing the step S23; if the current serving cell does not match the reference cell, performing step S24;
s23, assigning the second reference time interval to the first reference time interval, and returning to the step S1, wherein the time length of the second reference time interval is the same as that of the first reference time interval, and the starting point of the second reference time interval is not earlier than the end point of the first reference time interval;
and S24, writing the current service cell into the flash memory to assign the current service cell to the reference cell.
Preferably, the first reference time interval includes a plurality of time units, and step S1 includes:
every time a time unit passes, acquiring a real-time service cell of the communication module, if the real-time service cell is not matched with the comparison service cell, adding 1 to the count value, and assigning a real-time setting value to the comparison service cell; and at the end of the first reference time interval, taking the ratio of the count value to the length of the first reference time interval as the change frequency, and clearing the count value.
Preferably, the length of the first reference time interval is 1 minute, and the time unit is 1 second.
The invention also provides a writing system of the flash memory, which is applied to the communication module and comprises a change frequency acquisition unit and a service cell writing unit;
the change frequency acquiring unit is used for acquiring the change frequency of a serving cell of the communication module in a first reference time interval;
and if the change frequency is less than the preset threshold value and the current serving cell is not matched with the reference cell, the serving cell writing unit is used for writing the current serving cell into the flash memory to assign the current serving cell to the reference cell.
Preferably, the serving cell writing unit is further configured to write the current serving cell into the flash memory according to the following steps:
s21, judging whether the change frequency is smaller than a preset threshold value, if so, executing a step S22, and if not, executing a step S23;
s22, judging whether the current service cell is matched with the reference cell, if so, executing the step S23; if the current serving cell does not match the reference cell, performing step S24;
s23, assigning a second reference time interval to the first reference time interval, and calling the change frequency acquisition unit, wherein the time length of the second reference time interval is the same as that of the first reference time interval, and the starting point of the second reference time interval is not earlier than the end point of the first reference time interval;
and S24, writing the current service cell into the flash memory to assign the current service cell to the reference cell.
Preferably, the first reference time interval includes a plurality of time units, and the serving cell writing unit is further configured to acquire a real-time serving cell of the communication module every time one time unit passes, and if the real-time serving cell is not matched with the comparison serving cell, the serving cell writing unit is further configured to add 1 to the count value and assign a real-time set to the comparison serving cell; at the end of the first reference time interval, the serving cell writing unit is further configured to use a ratio of the count value to the length of the first reference time interval as a change frequency, and clear the count value.
Preferably, the length of the first reference time interval is 1 minute, and the time unit is 1 second.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the writing method of the flash memory when executing the computer program.
The present invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the writing method of the flash memory of the present invention.
The invention also provides a communication module which comprises the flash memory and the writing system of the flash memory.
The positive progress effects of the invention are as follows: the invention effectively avoids frequent writing operation to the flash memory under the condition that the service cell of the communication module is frequently switched by detecting the frequency of the service cell switching of the communication module, thereby effectively prolonging the service lives of the flash memory and the communication module.
Drawings
Fig. 1 is a flowchart of a flash memory writing method according to embodiment 1 of the present invention.
Fig. 2 is a schematic structural diagram of a flash memory writing system according to embodiment 1 of the present invention.
Fig. 3 is a schematic structural diagram of a communication module according to embodiment 1 of the present invention.
Fig. 4 is a flowchart of a flash memory writing method according to embodiment 2 of the present invention.
Fig. 5 is a flowchart of a serving cell writing unit of a flash memory writing system according to embodiment 2 of the present invention writing a current serving cell into a flash memory.
Fig. 6 is a schematic structural diagram of an electronic device according to embodiment 3 of the present invention.
Detailed Description
The invention is further illustrated by the following examples, which are not intended to limit the scope of the invention.
Example 1
The present embodiment provides a flash memory writing method, which is used for controlling a flash memory disposed in a communication module to perform a writing operation. The flash memory is used for storing a file system of the communication module, and the file system comprises a reference cell of the communication module. The reference cell is the serving cell information of the communication module in a history state. As an optional implementation manner, the reference cell is service cell information corresponding to a network environment after network registration, which is stored in the flash memory after the mobile terminal provided with the communication module is powered on to register a network. In another optional implementation manner, the reference cell is serving cell information corresponding to a network environment of the mobile terminal provided with the communication module after a network change.
Referring to fig. 1, the writing method of the flash memory of the present embodiment includes the following steps:
step S1, acquiring a change frequency of the serving cell of the communication module in the first reference time interval. The changing frequency of the serving cell is the frequency of serving cell handover of the communication module.
And step S2, if the change frequency is less than the preset threshold value and the current serving cell is not matched with the reference cell, writing the current serving cell into the flash memory to assign the current serving cell to the reference cell.
By obtaining and judging the change frequency of the serving cell of the communication module, the writing method of the flash memory of the embodiment can avoid frequent writing operation on the flash memory under the condition that the serving cell of the communication module is frequently switched (when the change frequency of the serving cell is greater than or equal to the preset threshold), thereby effectively prolonging the service lives of the flash memory and the communication module.
The embodiment also provides a writing system of the flash memory, and the writing method of the flash memory is used for controlling the writing operation of the flash memory arranged in a communication module. The flash memory is used for storing a file system of the communication module, and the file system comprises a reference cell of the communication module. The reference cell is the serving cell information of the communication module in a history state. As an optional implementation manner, the reference cell is service cell information corresponding to a network environment after network registration, which is stored in the flash memory after the mobile terminal provided with the communication module is powered on to register a network. In another optional implementation manner, the reference cell is serving cell information corresponding to a network environment of the mobile terminal provided with the communication module after a network change.
Referring to fig. 2, the flash memory writing system includes a change frequency acquiring unit 11 and a serving cell writing unit 12. The change frequency acquiring unit 11 is configured to acquire a change frequency of a serving cell of the communication module in a first reference time interval. If the change frequency is less than the preset threshold value and the current serving cell is not matched with the reference cell, the serving cell writing unit 12 is configured to write the current serving cell into the flash memory to assign a value to the reference cell.
By obtaining and judging the change frequency of the serving cell of the communication module, the writing system of the flash memory of the embodiment can avoid frequent writing operation on the flash memory under the condition that the serving cell of the communication module is frequently switched (when the change frequency of the serving cell is greater than or equal to the preset threshold), thereby effectively prolonging the service lives of the flash memory and the communication module.
The present embodiment also provides a communication module, and referring to fig. 3, the communication module includes a flash memory 4 and a writing system 5 of the flash memory of the present embodiment. In the working process of the communication module, how the write system 5 of the flash memory performs the write operation on the flash memory 4 may refer to the write system of the flash memory of this embodiment, and details thereof are not repeated herein.
Example 2
On the basis of embodiment 1, the present embodiment provides a method for writing to a flash memory. In this embodiment, the first reference time interval includes several time units, and the step S1 includes the following steps:
every time a time unit passes, acquiring a real-time service cell of the communication module, if the real-time service cell is not matched with the comparison service cell, adding 1 to the count value, and assigning a real-time setting value to the comparison service cell; and at the end of the first reference time interval, taking the ratio of the count value to the length of the first reference time interval as the change frequency, and clearing the count value.
As an alternative embodiment, the length of the first reference time interval is 1 minute and the time unit is 1 second.
Referring to fig. 4, in the present embodiment, step S2 includes the steps of:
step S21, determining whether the variation frequency is less than a preset threshold, if the variation frequency is less than the preset threshold, executing step S22, and if the variation frequency is greater than or equal to the preset threshold, executing step S23.
Step S22, judging whether the current service cell is matched with the reference cell, if the current service cell is matched with the reference cell, executing step S23; if the current serving cell does not match the reference cell, step S24 is performed.
And step S23, assigning the second reference time interval to the first reference time interval, and returning to step S1, wherein the second reference time interval has the same time length as the first reference time interval, and the starting point of the second reference time interval is not earlier than the end point of the first reference time interval.
And step S24, writing the current service cell into the flash memory to assign the current service cell to the reference cell.
In specific implementation, in step S1, the 1 minute time from the 0 th second to the 60 th second is used as the first reference time interval, and the serving cell of the communication module at the 0 th second is used as the comparison serving cell. At the 0 th second, the initial value of the count value is 0. And acquiring the real-time service cell of the communication module in the 1 st second. Then, it is determined whether the real-time serving cell matches the comparison serving cell. As an optional implementation, if the real-time serving cell and the comparison serving cell belong to the same cell, they are matched; if the two belong to different cells, the two do not match. If the two are matched, the communication module is considered to not change the cell, so that the service cell is considered not to be changed, and the counting value is not changed. If the two are not matched, the communication module is considered to change the affiliated cell due to movement, therefore, the counting value is added with 1 when the change of the serving cell is considered to occur, and the serving cell is updated to be the real-time serving cell, so that the change of the serving cell at the next second is judged. Next, the above steps are repeated at 2 nd second and 3 rd second … … th second, 60 th second, and the count value in the first reference time interval, that is, the value of the serving cell change of the communication module is acquired. Dividing the value of the change of the service cell of the communication module by the time length (1 minute) of the first reference time interval to obtain the change frequency of the service cell of the communication module in the first reference time interval, and then resetting the count value so as to recount in the next reference time interval (second reference time interval). In this embodiment, for a 2G (second generation mobile communication) network and a 3G (third generation mobile communication) network, a serving cell where a communication module is located may be obtained according to LAC (location area code) and cellid (a positioning technology); for a 4G (fourth generation mobile communication) network, a serving cell in which a communication module is located may be determined according to TAC (Tracking Area Code). The detailed implementation is not described herein.
After the next 60 th to 120 th seconds, after the 60 th seconds, step S21 is executed, the change frequency of the serving cell is compared with a preset threshold, if the change frequency of the serving cell is greater than or equal to the preset threshold, it is considered that the communication module is in the fast moving state within the 0 th to 60 th seconds, and with this as a reference, it may not be necessary to update the address in the file system in the 60 th to 120 th seconds, and then, the process proceeds to step S23, the 60 th to 120 th seconds (i.e., the time interval corresponding to the second reference time interval) are taken as the first reference time interval, and the process returns to step S1. The preset threshold value can be reasonably set as required. That is, if the communication module is in a fast moving state within the time from 0 th to 60 th seconds, the update of the file system is stopped between 60 th to 120 th seconds regardless of whether the serving cell of the communication module is changed or not between 60 th to 120 th seconds; however, between the 60 th second and the 120 th second, the change frequency of the serving cell of the communication module is still obtained according to the step S1, and is used as the evaluation basis of the next reference time interval.
In step S21, if the change frequency of the serving cell is less than the preset threshold, the communication module is considered to be in a slower moving state, and at this time, updating the address in the file system does not result in high-frequency writing of the flash memory. Then, on the one hand, the change frequency of the serving cell of the communication module between the 60 th second and the 120 th second is obtained according to the step S1 to be used as the evaluation basis of the next reference time interval; on the other hand, at the time of 61 th second, step S22 is executed to acquire the current serving cell of the communication module, and determine whether the current serving cell matches the reference cell. If the current serving cell matches the reference cell (i.e., belongs to the same cell), there is no need to update the serving cell information in the file system, and thus step S23 is performed. If the current serving cell does not match the reference cell (i.e., does not belong to the same cell), step S24 writes the current serving cell into the flash memory to assign a value to the reference cell. Next, at 62 seconds, step S22 is executed to acquire the current serving cell of the communication module and determine whether the current serving cell matches the reference cell. If the current serving cell matches the reference cell (i.e., belongs to the same cell), there is no need to update the serving cell information in the file system, and thus step S23 is performed. If the current serving cell does not match the reference cell (i.e., does not belong to the same cell), step S24 is performed to write the current serving cell into the flash memory to assign a value to the reference cell.
That is, in step S21, if the change frequency of the serving cell is less than the preset threshold, the communication module is considered to be in a slower moving state, and then in the following reference time interval, at the 61 st second and the 62 nd … … nd 120 th seconds of every elapsed time unit, the current serving cell of the communication module is respectively obtained, and it is determined whether the current serving cell matches with the reference cell. If the current serving cell matches the reference cell (i.e., belongs to the same cell), there is no need to update the serving cell information in the file system, and thus step S23 is performed. If the current serving cell does not match the reference cell (i.e., does not belong to the same cell), step S24 is performed to write the current serving cell into the flash memory to assign a value to the reference cell.
And at the 120 th second, reaching the end of the current reference time interval, and finishing the process of judging whether the service cell change of the communication module in the current reference time interval is written into the flash memory. Next, the next reference time interval is processed according to the change frequency of the serving cell of the communication module acquired from the 60 th to the 120 th seconds. According to the steps, the operation is repeated in a circulating mode.
According to the writing method of the flash memory, by detecting the frequency of the service cell switching of the communication module, frequent writing operation of the flash memory under the condition that the service cell switching of the communication module is frequent is effectively avoided, so that the service lives of the flash memory and the communication module are effectively prolonged.
On the basis of embodiment 1, this embodiment also provides a flash memory writing system. In this embodiment, the first reference time interval includes a plurality of time units, and the serving cell writing unit 12 is further configured to obtain a real-time serving cell of the communication module every time one time unit passes, and if the real-time serving cell is not matched with the comparison serving cell, the serving cell writing unit is further configured to add 1 to the count value and assign a real-time set to the comparison serving cell; at the end of the first reference time interval, the serving cell writing unit is further configured to use a ratio of the count value to the length of the first reference time interval as a change frequency, and clear the count value.
As an alternative embodiment, the length of the first reference time interval is 1 minute and the time unit is 1 second.
Referring to fig. 5, in the present embodiment, the serving cell writing unit 12 is further configured to write the current serving cell into the flash memory according to the following steps:
step S21, determining whether the variation frequency is less than a preset threshold, if the variation frequency is less than the preset threshold, executing step S22, and if the variation frequency is greater than or equal to the preset threshold, executing step S23.
Step S22, judging whether the current service cell is matched with the reference cell, if the current service cell is matched with the reference cell, executing step S23; if the current serving cell does not match the reference cell, step S24 is performed.
Step S23, assigning a second reference time interval to the first reference time interval, and calling the change frequency obtaining unit, where the second reference time interval has the same time length as the first reference time interval, and a start point of the second reference time interval is not earlier than an end point of the first reference time interval.
And step S24, writing the current service cell into the flash memory to assign the current service cell to the reference cell.
In specific implementation, first, the 1 minute time from the 0 th second to the 60 th second is used as a first reference time interval, and the serving cell of the communication module at the 0 th second is used as a comparison serving cell. At the 0 th second, the initial value of the count value is 0. At the time of 1 second, the change frequency acquisition unit 11 acquires the real-time serving cell of the communication module. Then, the change frequency acquisition unit 11 determines whether the real-time serving cell and the comparison serving cell match. As an optional implementation, if the real-time serving cell and the comparison serving cell belong to the same cell, they are matched; if the two belong to different cells, the two do not match. If the two are matched, the communication module is considered to not change the cell, so that the service cell is considered not to be changed, and the counting value is not changed. If the two are not matched, the communication module is considered to change the cell to which the communication module belongs due to movement, and therefore, the change frequency acquisition unit 11 determines that the serving cell change has occurred, adds 1 to the count value, and updates the serving cell to be the real-time serving cell, so as to determine the serving cell change at the next second. Next, at 2 nd second, 3 rd second … … th second 60 th, change frequency acquisition section 11 repeats the above process, and acquires the count value in the first reference time interval, that is, the value of the serving cell change of the communication module. The change frequency acquiring unit 11 divides the value of the change of the serving cell of the communication module by the time length (1 minute) of the first reference time interval to obtain the change frequency of the serving cell of the communication module in the first reference time interval, and then the change frequency acquiring unit 11 clears the count value to be recounted in the next reference time interval (second reference time interval). In this embodiment, the serving cell information of the communication module is obtained according to the disclosed technology of cellular mobile communication, and the specific implementation manner is not described herein again.
After the next 60 th to 120 th seconds and the 60 th seconds, step S21 is executed, the serving cell writing unit 12 compares the change frequency of the serving cell with a preset threshold, if the change frequency of the serving cell is greater than or equal to the preset threshold, it is considered that the communication module is in the fast moving state in the 0 th to 60 th seconds, and with this as a reference, it may not be necessary to update the address in the file system in the 60 th to 120 th seconds, and then, step S23 is entered, the 60 th to 120 th seconds (i.e., the time interval corresponding to the second reference time interval) are taken as the first reference time interval, and the change frequency acquiring unit is called to acquire the change frequency of the serving cell of the communication module in the 60 th to 120 th seconds. The preset threshold value can be reasonably set as required. That is, if the communication module is in a fast moving state within the time from 0 th to 60 th seconds, the update of the file system is stopped between 60 th to 120 th seconds regardless of whether the serving cell of the communication module is changed or not between 60 th to 120 th seconds; however, between the 60 th second and the 120 th second, the change frequency acquiring unit 11 still acquires the change frequency of the serving cell of the communication module according to the step S1, so as to serve as the evaluation basis of the next reference time interval.
In step S21, if the change frequency of the serving cell is less than the preset threshold, the communication module is considered to be in a slower moving state, and at this time, updating the address in the file system does not result in high-frequency writing of the flash memory. Then, on the one hand, the change frequency acquiring unit acquires the change frequency of the serving cell of the communication module between the 60 th second and the 120 th second according to the step S1 as the evaluation basis of the next reference time interval; on the other hand, at the time of 61 th second, step S22 is executed, change frequency acquisition unit 11 acquires the current serving cell of the communication module, serving cell writing unit 12 receives the current serving cell from change frequency acquisition unit 11, and determines whether the current serving cell matches the reference cell. If the current serving cell matches the reference cell (i.e., belongs to the same cell), there is no need to update the serving cell information in the file system, and thus step S23 is performed. If the current serving cell does not match the reference cell (i.e., does not belong to the same cell), step S24 is executed in which the serving cell writing unit 12 writes the current serving cell into the flash memory to assign a value to the reference cell. Next, at the 62 th second, returning to step S22, change frequency acquisition unit 11 acquires the current serving cell of the communication module, serving cell writing unit 12 receives the current serving cell from change frequency acquisition unit 11, and determines whether the current serving cell matches the reference cell. If the current serving cell matches the reference cell (i.e., belongs to the same cell), there is no need to update the serving cell information in the file system, and thus step S23 is performed. If the current serving cell does not match the reference cell (i.e., does not belong to the same cell), step S24 is executed in which the serving cell writing unit 12 writes the current serving cell into the flash memory to assign a value to the reference cell.
That is, in step S21, if the change frequency of the serving cell is less than the preset threshold, it is determined that the communication module is in a slower moving state, in the following reference time interval, at every 61 st second and 62 nd … … nd 120 th second after one time unit, the change frequency acquiring unit 11 respectively acquires the current serving cell of the communication module, and the serving cell writing unit 12 receives the current serving cell from the change frequency acquiring unit 11 and determines whether the current serving cell matches the reference cell. If the current serving cell matches the reference cell (i.e., belongs to the same cell), there is no need to update the serving cell information in the file system, and thus step S23 is performed. If the current serving cell does not match the reference cell (i.e. does not belong to the same cell), step S24 is executed, and the serving cell writing unit 12 writes the current serving cell into the flash memory to assign a value to the reference cell.
And at the 120 th second, reaching the end of the current reference time interval, and finishing the process of judging whether the service cell change of the communication module in the current reference time interval is written into the flash memory. Next, the next reference time interval is processed according to the change frequency of the serving cell of the communication module acquired from the 60 th to the 120 th seconds. According to the steps, the operation is repeated in a circulating mode.
The writing system of the flash memory of the embodiment effectively avoids frequent writing operation on the flash memory under the condition that the service cell of the communication module is frequently switched by detecting the frequency of switching the service cell of the communication module, thereby effectively prolonging the service lives of the flash memory and the communication module.
The present embodiment also provides a communication module, which includes a flash memory and the write system of the flash memory of the present embodiment. In the working process of the communication module, how the write-in system of the flash memory performs the write-in operation on the flash memory can refer to the write-in system of the flash memory of this embodiment, and details are not described here.
Example 3
Fig. 6 is a schematic structural diagram of an electronic device provided in this embodiment. The electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the writing method of the flash memory of embodiment 1 or embodiment 2 when executing the program. The electronic device 30 shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
The electronic device 30 may be embodied in the form of a general purpose computing device, which may be, for example, a server device. The components of the electronic device 30 may include, but are not limited to: the at least one processor 31, the at least one memory 32, and a bus 33 connecting the various system components (including the memory 32 and the processor 31).
The bus 33 includes a data bus, an address bus, and a control bus.
The memory 32 may include volatile memory, such as Random Access Memory (RAM)321 and/or cache memory 322, and may further include Read Only Memory (ROM) 323.
Memory 32 may also include a program/utility 325 having a set (at least one) of program modules 324, such program modules 324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The processor 31 executes various functional applications and data processing, such as a writing method of a flash memory of embodiment 1 or embodiment 2 of the present invention, by running the computer program stored in the memory 32.
The electronic device 30 may also communicate with one or more external devices 34 (e.g., keyboard, pointing device, etc.). Such communication may be through input/output (I/O) interfaces 35. Also, model-generating device 30 may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via network adapter 36. As shown, network adapter 36 communicates with the other modules of model-generating device 30 via bus 33. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the model-generating device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
It should be noted that although in the above detailed description several units/modules or sub-units/modules of the electronic device are mentioned, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the units/modules described above may be embodied in one unit/module according to embodiments of the invention. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Example 4
The present embodiment provides a computer-readable storage medium on which a computer program is stored, the program implementing the steps of the writing method of the flash memory of embodiment 1 or embodiment 2 when executed by a processor.
More specific examples, among others, that the readable storage medium may employ may include, but are not limited to: a portable disk, a hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible implementation, the invention can also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps of implementing the method for writing to a flash memory of embodiment 1 or embodiment 2, when said program product is run on said terminal device.
Where program code for carrying out the invention is written in any combination of one or more programming languages, the program code may be executed entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on a remote device or entirely on the remote device.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.

Claims (11)

1. A writing method of a flash memory, wherein the flash memory is arranged in a communication module, and the flash memory is used for storing a reference cell of the communication module, the writing method of the flash memory comprises the following steps:
s1, acquiring the change frequency of the serving cell of the communication module in a first reference time interval;
and S2, if the change frequency is less than a preset threshold value and the current serving cell is not matched with the reference cell, writing the current serving cell into the flash memory to assign a value to the reference cell.
2. The writing method of the flash memory according to claim 1, wherein the step S2 includes:
s21, judging whether the change frequency is smaller than a preset threshold value, if so, executing a step S22, and if not, executing a step S23;
s22, judging whether the current service cell is matched with the reference cell, if so, executing the step S23; if the current serving cell does not match the reference cell, performing step S24;
s23, assigning a second reference time interval to the first reference time interval, and returning to the step S1, wherein the second reference time interval has the same time length as the first reference time interval, and the starting point of the second reference time interval is not earlier than the end point of the first reference time interval;
and S24, writing the current service cell into the flash memory to assign the current service cell to the reference cell.
3. The method according to claim 1 or 2, wherein the first reference time interval comprises a plurality of time units, and step S1 comprises:
acquiring a real-time service cell of the communication module every time unit passes, if the real-time service cell is not matched with a comparison service cell, adding 1 to a count value, and assigning the real-time setting to the comparison service cell; and at the end point of the first reference time interval, taking the ratio of the count value to the length of the first reference time interval as the change frequency, and clearing the count value.
4. The method of claim 3, wherein the first reference time interval has a length of 1 minute and the time unit is 1 second.
5. The writing system of the flash memory is applied to a communication module and comprises a change frequency acquisition unit and a service cell writing unit;
the change frequency acquiring unit is used for acquiring the change frequency of the serving cell of the communication module in a first reference time interval;
and if the change frequency is less than a preset threshold value and the current serving cell is not matched with the reference cell, the serving cell writing unit is used for writing the current serving cell into the flash memory to assign the current serving cell to the reference cell.
6. The flash memory writing system of claim 5, wherein the serving cell writing unit is further configured to write the current serving cell to the flash memory according to the following steps:
s21, judging whether the change frequency is smaller than a preset threshold value, if so, executing a step S22, and if not, executing a step S23;
s22, judging whether the current service cell is matched with the reference cell, if so, executing the step S23; if the current serving cell does not match the reference cell, performing step S24;
s23, assigning a second reference time interval to the first reference time interval, and calling the change frequency acquisition unit, wherein the time length of the second reference time interval is the same as that of the first reference time interval, and the starting point of the second reference time interval is not earlier than the end point of the first reference time interval;
and S24, writing the current service cell into the flash memory to assign the current service cell to the reference cell.
7. The flash memory writing system according to claim 5 or 6, wherein the first reference time interval includes a plurality of time units, and the serving cell writing unit is further configured to obtain a real-time serving cell of the communication module every time one of the time units passes, and if the real-time serving cell does not match a comparison serving cell, the serving cell writing unit is further configured to add 1 to a count value and assign the real-time setting to the comparison serving cell; at the end of the first reference time interval, the serving cell writing unit is further configured to use a ratio of the count value to the length of the first reference time interval as the change frequency, and zero-clear the count value.
8. The flash memory writing system of claim 7, wherein the first reference time interval is 1 minute in length and the time unit is 1 second.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the writing method of the flash memory according to any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for writing to a flash memory according to any one of claims 1 to 4.
11. A communication module, characterized in that the communication module comprises the flash memory and a write system of the flash memory according to any of claims 5-8.
CN201911056213.5A 2019-10-31 2019-10-31 Writing method and system of flash memory, electronic equipment, medium and communication module Active CN110764713B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911056213.5A CN110764713B (en) 2019-10-31 2019-10-31 Writing method and system of flash memory, electronic equipment, medium and communication module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911056213.5A CN110764713B (en) 2019-10-31 2019-10-31 Writing method and system of flash memory, electronic equipment, medium and communication module

Publications (2)

Publication Number Publication Date
CN110764713A true CN110764713A (en) 2020-02-07
CN110764713B CN110764713B (en) 2023-11-07

Family

ID=69335524

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911056213.5A Active CN110764713B (en) 2019-10-31 2019-10-31 Writing method and system of flash memory, electronic equipment, medium and communication module

Country Status (1)

Country Link
CN (1) CN110764713B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002190769A (en) * 2000-12-21 2002-07-05 Sharp Corp Communication equipment and communication system of mobile object
CN1533211A (en) * 2003-03-19 2004-09-29 �ձ�������ʽ���� Mobile terminal and transarea switching resolving method
CN102123425A (en) * 2010-01-11 2011-07-13 中兴通讯股份有限公司 Method and system for measurement, node B and user equipment (UE)
CN102665245A (en) * 2012-04-19 2012-09-12 华为技术有限公司 Method and equipment for reducing switching signalings
CN103546939A (en) * 2012-07-13 2014-01-29 普天信息技术研究院有限公司 Multi-channel wireless communication system cell searching method and terminal
CN104252221A (en) * 2013-06-28 2014-12-31 重庆重邮信科通信技术有限公司 Method for updating data, processors and system
CN104301921A (en) * 2014-10-29 2015-01-21 京信通信系统(中国)有限公司 Ping-pong switching detection method and device and switching parameter configuration method and device
US20150230143A1 (en) * 2012-09-27 2015-08-13 Zte Corporation Measurement Initiation Method for Inter-Fequency/Inter-System Cell Reselection and User Equipment Thereof
US20160255564A1 (en) * 2015-02-27 2016-09-01 Qualcomm Incorporated Cell selection for a high speed scenario
WO2017156759A1 (en) * 2016-03-18 2017-09-21 华为技术有限公司 User-equipment network-migration method and access-network device
CN107567046A (en) * 2017-08-25 2018-01-09 维沃移动通信有限公司 A kind of cell accessing method and mobile terminal
WO2018040677A1 (en) * 2016-08-31 2018-03-08 深圳市中兴微电子技术有限公司 Cell reselection method and device, and storage medium
CN108124262A (en) * 2017-12-19 2018-06-05 努比亚技术有限公司 Pseudo-base station recognition methods, terminal and computer readable storage medium
CN109769281A (en) * 2019-03-06 2019-05-17 Oppo广东移动通信有限公司 A kind of method, apparatus, storage medium and intelligent terminal promoting traffic rate
WO2019095198A1 (en) * 2017-11-16 2019-05-23 Nokia Shanghai Bell Co., Ltd. Neighbor monitoring in cellular communications network systems

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002190769A (en) * 2000-12-21 2002-07-05 Sharp Corp Communication equipment and communication system of mobile object
CN1533211A (en) * 2003-03-19 2004-09-29 �ձ�������ʽ���� Mobile terminal and transarea switching resolving method
CN102123425A (en) * 2010-01-11 2011-07-13 中兴通讯股份有限公司 Method and system for measurement, node B and user equipment (UE)
CN102665245A (en) * 2012-04-19 2012-09-12 华为技术有限公司 Method and equipment for reducing switching signalings
CN103546939A (en) * 2012-07-13 2014-01-29 普天信息技术研究院有限公司 Multi-channel wireless communication system cell searching method and terminal
US20150230143A1 (en) * 2012-09-27 2015-08-13 Zte Corporation Measurement Initiation Method for Inter-Fequency/Inter-System Cell Reselection and User Equipment Thereof
CN104252221A (en) * 2013-06-28 2014-12-31 重庆重邮信科通信技术有限公司 Method for updating data, processors and system
CN104301921A (en) * 2014-10-29 2015-01-21 京信通信系统(中国)有限公司 Ping-pong switching detection method and device and switching parameter configuration method and device
US20160255564A1 (en) * 2015-02-27 2016-09-01 Qualcomm Incorporated Cell selection for a high speed scenario
WO2017156759A1 (en) * 2016-03-18 2017-09-21 华为技术有限公司 User-equipment network-migration method and access-network device
WO2018040677A1 (en) * 2016-08-31 2018-03-08 深圳市中兴微电子技术有限公司 Cell reselection method and device, and storage medium
CN107567046A (en) * 2017-08-25 2018-01-09 维沃移动通信有限公司 A kind of cell accessing method and mobile terminal
WO2019095198A1 (en) * 2017-11-16 2019-05-23 Nokia Shanghai Bell Co., Ltd. Neighbor monitoring in cellular communications network systems
CN108124262A (en) * 2017-12-19 2018-06-05 努比亚技术有限公司 Pseudo-base station recognition methods, terminal and computer readable storage medium
CN109769281A (en) * 2019-03-06 2019-05-17 Oppo广东移动通信有限公司 A kind of method, apparatus, storage medium and intelligent terminal promoting traffic rate

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
KORDE, M.S等: "Issues in time and frequency synchronization in WCDMA system", 2012 INTERNATIONAL CONFERENCE ON ADVANCES IN MOBILE NETWORK, COMMUNICATION AND ITS APPLICATIONS (MNCAPPS) *
邓德位: "高铁环境中TD-LTE系统内切换流程及算法研究", 中国优秀硕士学位论文全文数据库 信息科技辑 *

Also Published As

Publication number Publication date
CN110764713B (en) 2023-11-07

Similar Documents

Publication Publication Date Title
US8683113B2 (en) Concurrently searching multiple devices of a non-volatile semiconductor memory
US10168917B2 (en) Hotness based data storage for facilitating garbage collection
US20130166824A1 (en) Block management for nonvolatile memory device
US9767018B2 (en) Allocation aware heap fragmentation metrics
EP3690663A1 (en) Application cleaning method and apparatus, storage medium and electronic device
CN110209348B (en) Data storage method and device, electronic equipment and storage medium
CN110704492A (en) Data acquisition method and device and computer readable storage medium
US9626113B2 (en) Management of destage tasks with large number of ranks
US10198180B2 (en) Method and apparatus for managing storage device
CN104346264A (en) System and method for processing system event logs
CN103020146A (en) Data processing method and equipment
CN105826976A (en) Mobile terminal charging method and mobile terminal
CN109213448B (en) Method, device, equipment and storage medium for erasing and writing data of smart card
US10684902B2 (en) Method and apparatus for memory vulnerability prediction
CN107566480B (en) User activity information acquisition method and device for mobile terminal application and storage medium
CN111221840A (en) Data processing method and device, data caching method, storage medium and system
CN105205125A (en) Recommendation method and device for application programs
CN104331330A (en) Resource pool generation method and device
CN110764713B (en) Writing method and system of flash memory, electronic equipment, medium and communication module
CN105446982A (en) Data storage system management method and device
US11113160B2 (en) Apparatus for migrating data and method of operating same
CN111132011A (en) Configuration method, system, electronic device and medium of communication module
US10996977B2 (en) Information processing apparatus and process management method that control a number of processes executed in parallel
US10872015B2 (en) Data storage system with strategic contention avoidance
CN109408532A (en) Data capture method, device, computer equipment and storage medium

Legal Events

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