Information writing method and device of mobile terminal and mobile terminal
Technical Field
The embodiment of the invention relates to a mobile terminal technology, in particular to an information writing method and device of a mobile terminal and the mobile terminal.
Background
A mobile terminal is a wireless communication device directly carried by an individual, which, on the one hand, is free to move within a service area formed by a mobile communication base station, and, on the other hand, performs instant communication with a counterpart terminal participating in communication anytime and anywhere via a communication path established through switching under the supervision and control of a mobile switching center.
The mobile terminal is internally provided with identification information, and the mobile switching center registers the position of the mobile terminal through the identification information and determines the service area of the mobile terminal. For a mobile terminal with an Android system, the identification information is usually written before shipment. For example, for a mobile terminal based on MTK (short for taiwan co-launch technology multimedia chip provider), wmtv2.0.0.1beta (tool version may be different) based software tools are used on a production line to write identification information. The use process of the software tool is as follows: firstly, turning off a power supply of the mobile terminal, connecting the mobile terminal with a writing information device (configured with the software tool) through a USB data line, and ensuring that the mobile terminal is in a shutdown state in the whole writing process; secondly, configuring a port of the mobile terminal and identification information to be written; then, loading the AP _ Database and the Modem _ Database corresponding to the system software version of the mobile terminal; and adjusting the mobile terminal to enter a META (Mobile engineering test) mode, and writing the identification information in the META mode. The operation process is complicated, and the situation that the corresponding COM port and Kernel port cannot be found by software often occurs, so that the test progress and production line efficiency of testers are influenced.
Disclosure of Invention
Embodiments of the present invention provide a method and an apparatus for writing information into a mobile terminal, and a mobile terminal, which can provide a simplified manner for writing identification information into a mobile terminal, simplify the steps of information writing processing of the mobile terminal, and improve the execution efficiency of the mobile terminal.
In a first aspect, an embodiment of the present invention provides an information writing method for a mobile terminal, including:
acquiring a dialing operation input by a user;
when the instruction corresponding to the dialing operation is a set trigger instruction, displaying an identification information writing interface and acquiring identification information input by a user;
and when a write instruction is detected, erasing the storage unit corresponding to the identification information in the set nonvolatile memory, and writing the identification information into the erased storage unit.
In a second aspect, an embodiment of the present invention further provides an information writing apparatus for a mobile terminal, where the apparatus includes:
the operation acquisition module is used for acquiring the dialing operation input by the user;
the information acquisition module is used for displaying an identification information writing interface and acquiring identification information input by a user when the instruction corresponding to the dialing operation is a set trigger instruction;
and the information writing module is used for erasing the storage unit corresponding to the identification information in the set nonvolatile memory when a writing instruction is detected, and writing the identification information into the erased storage unit.
In a third aspect, an embodiment of the present invention further provides a mobile terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the following steps when executing the computer program:
acquiring a dialing operation input by a user;
when the instruction corresponding to the dialing operation is a set trigger instruction, displaying an identification information writing interface and acquiring identification information input by a user;
and when a write instruction is detected, erasing the storage unit corresponding to the identification information in the set nonvolatile memory, and writing the identification information into the erased storage unit.
The embodiment of the invention obtains the dialing operation input by the user; when the instruction corresponding to the dialing operation is a set trigger instruction, displaying an identification information writing interface and acquiring identification information input by a user; when a write-in instruction is detected, the storage unit corresponding to the identification information in the set nonvolatile memory is erased, the identification information is written into the erased storage unit, complex operations such as configuring a port, loading AP _ Database and Modem _ Database corresponding to the system software version, shutting down and starting up are avoided, the information write-in processing steps of the mobile terminal are simplified, the execution efficiency of the mobile terminal is improved, a tester can complete the write-in operation of the identification information within tens of seconds, and the test progress and the production line efficiency are greatly improved.
Drawings
Fig. 1 is a flowchart of an information writing method of a mobile terminal according to a first embodiment of the present invention;
fig. 2 is a flowchart of an information writing method of a mobile terminal according to a second embodiment of the present invention;
fig. 3 is a flowchart of an information writing method of a mobile terminal according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an information writing apparatus of a mobile terminal according to a fourth embodiment of the present invention;
fig. 5 is a schematic diagram of a mobile terminal in a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example one
Fig. 1 is a flowchart of an information writing method of a mobile terminal according to an embodiment of the present invention, where the method may be executed by an information writing apparatus, where the information writing apparatus is generally configured in a mobile terminal such as a mobile phone, a tablet computer, and the like, and the method may include:
and step 110, obtaining the dialing operation input by the user.
Optionally, the dialing operation input by the user may be obtained by monitoring the dialing module. The dialing module (Dialer module) comprises a dialing keyboard and a number editing frame. When detecting that the user inputs characters (numbers or symbols such as #, and #) directly on the dial pad, acquiring the characters input by the user, and displaying the acquired characters in an edit box.
And starting a background thread to monitor the touch screen and detecting the dialing operation of the user. And when the dialing operation is detected, acquiring the coordinates of each touch point. Then, according to the characters on the dial pad corresponding to the coordinates of the touch point, input characters (including at least one of numbers, a and a) are determined.
For ease of understanding, a detection mechanism of a touch operation is briefly described by taking a mobile phone with a capacitive touch screen as an example. The capacitive touch screen works on the principle that a touch point of a contact area between a finger and the touch screen is detected by sensing capacitance change generated by human body touch. It has two sets of signal lines: the driving line emits signals, and the sensing line detects the change of the capacitance value. When a finger touches the metal layer, the finger and the surface of the touch screen form a coupling capacitor due to the existence of an electric field of a human body, and for high-frequency current, the capacitor is a direct conductor, so that the finger sucks a small current from a contact point. The coupling between the two electrodes near the touch point is affected, thereby changing the capacitance between the two electrodes. When the mutual capacitance is detected, the electrodes in the driving line direction sequentially send out excitation signals, and all the electrodes in the sensing line direction receive signals simultaneously, so that the change of capacitance values of intersection points of all the transverse electrodes and the longitudinal electrodes, namely the capacitance of the two-dimensional plane of the whole touch screen can be obtained. The touch screen chip (touch IC) can calculate the coordinates of each touch point according to the two-dimensional capacitance variation data of the touch screen.
And 120, displaying an identification information writing interface and acquiring identification information input by a user when the instruction corresponding to the dialing operation is a set trigger instruction.
The triggering instruction can be used for triggering and executing a jump operation of the dialing interface to the identification information writing interface. The identification information includes a telecommunication service brand identification customersid, a country code CountryCode, a color identification ColorID, an installation package code PackingCode, and the like.
Preferably, before the identification information is written into the mobile terminal for the first time, a set trigger instruction is added into the native dialing module of the android system. It will be appreciated that the trigger is set by the manufacturer of the mobile terminal and that the trigger may be different in different models of mobile terminals, and not brands. For example, the trigger command may be composed of digits 0 to 9 and symbols # and #, on a 4-bit to 8-bit dial pad. It is understood that the numbers and symbols may be ordered according to a predefined order, and the order is not limited.
When the dialing operation of a user is detected, the input content corresponding to the dialing operation is identified, and the input content is matched with a preset trigger instruction, so that whether the trigger instruction for jumping to an identification information writing interface is received or not is judged. Illustratively, the determined at least one input character is compared with a trigger instruction added in a native dialing module of the android system. If the at least one input character is the same as the trigger instruction, the instruction corresponding to the dialing operation is considered as the set trigger instruction, otherwise, the trigger instruction is not received.
And when the instruction corresponding to the dialing operation is a set trigger instruction, controlling the current display interface to jump from the dialing interface to an identification information writing interface for a user to input identification information (including CustomerID, CountryCode, ColoriD and PackingCode). Optionally, a write button is displayed in the identifier information write interface, and the user clicks the write button after completing the input, which represents that the identifier information input operation is completed. The touch IC generates a write instruction when detecting that a user clicks a write button, and transmits the write instruction to the processor. Further, the processor is triggered to perform an operation of writing the identification information into a setting storage unit of the nonvolatile memory.
Illustratively, if the user inputs identification information, the input identification information is read, and whether the write button is pressed is detected in real time. When the pressing of the writing button is detected, a writing instruction signal is generated.
Step 130, when the write instruction is detected, erasing the storage unit corresponding to the identification information in the set nonvolatile memory, and writing the identification information into the erased storage unit.
And when the writing instruction is detected, erasing the storage unit corresponding to the identification information in the set nonvolatile memory. Wherein, in the nonvolatile memory, the identification information is stored according to the address of the memory cell allocated in advance. If the storage unit corresponding to the identification information in the nonvolatile memory needs to be erased, the corresponding storage unit is searched according to the address of the storage unit corresponding to each identification information, and the erasing operation is performed on the storage unit. Then, the identification information input by the user is correspondingly written into the pre-allocated storage unit. The above-described processing method is adopted to realize repeated writing to a nonvolatile memory (NVRAM). In addition, the terminal does not need to be switched to the META mode or the engineering mode, and the execution process of the terminal is simplified.
According to the technical scheme of the embodiment, the dialing operation input by a user is acquired; when the instruction corresponding to the dialing operation is a set trigger instruction, displaying an identification information writing interface and acquiring identification information input by a user; when a write-in instruction is detected, according to the corresponding relation between identification information and a storage unit, the storage unit corresponding to the identification information in a set nonvolatile memory is erased, the identification information is written into the erased storage unit, a user can complete the operation of writing the identification information only by inputting touch operation and the identification information corresponding to a trigger instruction and then clicking a write-in button, complex operations such as AP _ Database and Modem _ Database for configuring a port and loading a corresponding system software version, shutdown and startup are avoided, the steps of information write-in processing of the mobile terminal are simplified, the execution efficiency of the mobile terminal is improved, a tester can complete the write-in operation of the identification information within tens of seconds, and the test progress and production line efficiency are greatly improved.
Example two
Fig. 2 is a flowchart of an information writing method of a mobile terminal according to a second embodiment of the present invention. On the basis of the technical scheme, the obtaining of the identification information input by the user preferably may be obtaining of the identification information input by the user, and storing the identification information in a preset cache region. And a verification step of attaching the written identification information.
Based on the optimization, the method can comprise the following steps:
and step 210, obtaining the dialing operation input by the user.
And step 220, displaying an identification information writing interface when the instruction corresponding to the dialing operation is a set trigger instruction.
And step 230, acquiring identification information input by a user, and storing the identification information in a preset cache region.
And allocating a section of cache address in advance for temporarily storing the identification information input by the user. And acquiring identification information input by a user and storing the identification information in a cache region corresponding to the pre-allocated cache address. After waiting for erasing the memory cell corresponding to the identification information in the pre-configured nonvolatile memory, reading the identification information from the cache region, and correspondingly writing the identification information into the memory cell corresponding to the identification information in the nonvolatile memory.
Step 240, when a write instruction is detected, erasing the memory cell corresponding to the identification information in the set nonvolatile memory, and writing the identification information into the erased memory cell.
And when a write instruction corresponding to the operation of clicking the write button by the user is detected, executing the operation of erasing the storage unit corresponding to the identification information in the set nonvolatile memory. And then, reading the cache region, acquiring the identification information temporarily stored in the cache region, and writing the identification information into the erased storage unit correspondingly.
And 250, verifying whether the identification information is matched with the identification information in the cache region, if so, executing a step 260, otherwise, executing a step 270.
And inquiring the nonvolatile memory according to the address of a storage unit which is allocated for the identification information in advance, and reading the identification information corresponding to the storage unit. And inquiring the cache region according to the pre-allocated cache address, and reading the identification information in the cache region. Comparing the identification information stored in the nonvolatile memory with the identification information temporarily stored in the cache region, if the identification information is the same, executing step 260, otherwise, executing step 270.
And step 260, judging that the identification information is written correctly.
When the identification information stored in the nonvolatile memory is matched with the identification information temporarily stored in the cache region, the identification information is considered to be written correctly. Preferably, the identification information stored in the buffer is erased.
And 270, determining that the identification information is wrongly written, and displaying prompt information to remind a user of the wrongly written identification information.
And when the identification information stored in the nonvolatile memory is not matched with the identification information temporarily stored in the cache region, the identification information is considered to be wrongly written, and prompt information is displayed on a screen of the mobile terminal. The prompt message is used for reminding the user of the writing error of the identification information.
According to the technical scheme of the embodiment, the dialing operation input by a user is acquired; when the instruction corresponding to the dialing operation is a set trigger instruction, displaying an identification information writing interface, acquiring identification information input by a user, and storing the identification information in a preset cache region; when a write-in instruction is detected, according to the corresponding relation between identification information and a storage unit, erasing the storage unit corresponding to the identification information in a set nonvolatile memory, and writing the identification information into the erased storage unit; whether the identification information stored in the nonvolatile memory is matched with the identification information temporarily stored in the cache region or not is judged, whether the identification information is written correctly or not is determined according to the judgment result, and the situation that the terminal cannot work normally due to the fact that the identification information is written incorrectly can be avoided.
EXAMPLE III
Fig. 3 is a flowchart of an information writing method of a mobile terminal in the third embodiment of the present invention, and on the basis of the above technical solution, it may further preferably include reading the identification information corresponding to the storage unit, and displaying the identification information in a screen of the mobile terminal, so that a user can verify whether the identification information is written correctly.
Based on the optimization, the method can comprise the following steps:
and step 310, acquiring the dialing operation input by the user.
And step 320, displaying an identification information writing interface when the instruction corresponding to the dialing operation is a set trigger instruction.
And 330, acquiring identification information input by a user, and storing the identification information in a preset cache region.
Step 340, when a write instruction is detected, erasing the memory cell corresponding to the identification information in the set nonvolatile memory, and writing the identification information into the erased memory cell.
Optionally, after reading the identification information input by the user from the buffer and writing the identification information into the memory cell corresponding to the identification information in the erased non-volatile memory, the identification information temporarily stored in the buffer is erased.
Step 350, reading the identification information corresponding to the storage unit, and displaying the identification information in a screen of the mobile terminal.
And inquiring the nonvolatile memory according to the address of a storage unit which is allocated for the identification information in advance, and reading the identification information corresponding to the storage unit. Then, the identification information is displayed on a screen of the terminal, and a user can verify whether the identification information is written correctly.
According to the technical scheme of the embodiment, the dialing operation input by a user is acquired; when the instruction corresponding to the dialing operation is a set trigger instruction, displaying an identification information writing interface, acquiring identification information input by a user, and storing the identification information in a preset cache region; when a write-in instruction is detected, according to the corresponding relation between identification information and a storage unit, erasing the storage unit corresponding to the identification information in a set nonvolatile memory, and writing the identification information into the erased storage unit; reading the identification information corresponding to the storage unit, displaying the identification information in a screen of the mobile terminal, and displaying the identification information written by the user to the user, so that the situation that the terminal cannot work normally due to the writing error of the identification information is avoided.
Example four
Fig. 4 is a schematic structural diagram of an information writing apparatus of a mobile terminal according to a fourth embodiment of the present invention, where the apparatus includes: an operation acquisition module 410, an information acquisition module 420, and an information writing module 430.
An operation obtaining module 410, configured to obtain a dialing operation input by a user;
an information obtaining module 420, configured to display an identification information writing interface and obtain identification information input by a user when the instruction corresponding to the dialing operation is a set trigger instruction;
the information writing module 430 is configured to, when a writing instruction is detected, perform erasing processing on a storage unit corresponding to the identification information in the set nonvolatile memory, and write the identification information into the erased storage unit.
The technical scheme of this embodiment provides an information writing device of a mobile terminal, which can avoid performing complex operations such as configuring a port, loading AP _ Database and Modem _ Database corresponding to a system software version, shutting down and starting up, simplify the steps of information writing processing of the mobile terminal, improve the execution efficiency of the mobile terminal, enable a tester to complete writing operation of identification information within several tens of seconds, and greatly improve the test progress and production line efficiency.
On the basis of the technical scheme, the method further comprises the following steps:
and the instruction adding module is used for adding a set triggering instruction into the native dialing module of the android system before the identification information is written into the mobile terminal for the first time, wherein the triggering instruction is used for triggering and executing the jump operation of the dialing interface to the identification information writing interface.
On the basis of the above technical solution, the information obtaining module 420 is specifically configured to obtain the identification information input by the user, and store the identification information in a preset cache region.
And, further comprising:
the information verification module is used for reading the identification information corresponding to the storage unit after the identification information is written into the erased storage unit, and verifying whether the identification information is matched with the identification information in the cache region;
if so, judging that the identification information is correctly written, otherwise, determining that the identification information is wrongly written, and displaying prompt information to remind a user that the identification information is wrongly written.
On the basis of the technical scheme, the method further comprises the following steps:
and the information display module is used for reading the identification information corresponding to the memory cell after the identification information is written into the erased memory cell, and displaying the identification information in a screen of the mobile terminal so that a user can verify whether the identification information is written correctly.
The information writing device of the mobile terminal can execute the information writing method of the mobile terminal provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in the above embodiments, reference may be made to an information writing method of a mobile terminal provided in any embodiment of the present invention.
EXAMPLE five
The mobile terminal provided by the embodiment of the invention is integrated with the information writing device of the mobile terminal in the embodiment. For example, the mobile terminal in this embodiment may be a terminal such as a mobile phone, a handheld game console, and a tablet computer, and is preferably a smart phone.
Fig. 5 is a schematic diagram of a mobile terminal in a fifth embodiment of the present invention. As shown in fig. 5, the mobile terminal may include: a housing (not shown), a memory 501, a Central Processing Unit (CPU) 502 (also called a processor, hereinafter referred to as CPU), a circuit board (not shown), a touch screen 512, and a power circuit (not shown). The touch screen 512 is used for converting user operation into an electric signal, inputting the electric signal to the processor and displaying a visual output signal; the circuit board is arranged in a space enclosed by the touch screen 512 and the shell; the CPU502 and the memory 501 are provided on the circuit board; the power supply circuit is used for supplying power to each circuit or device of the mobile terminal; the memory 501 is used for storing a computer program; the CPU502 reads and executes the computer program stored in the memory 501. The CPU502, when executing the computer program, implements the steps of: acquiring a dialing operation input by a user; when the instruction corresponding to the dialing operation is a set trigger instruction, displaying an identification information writing interface and acquiring identification information input by a user; and when a write instruction is detected, erasing the storage unit corresponding to the identification information in the set nonvolatile memory, and writing the identification information into the erased storage unit.
The mobile terminal further includes: peripheral interface 503, RF (Radio Frequency) circuitry 505, audio circuitry 506, speakers 511, power management chip 508, input/output (I/O) subsystem 509, other input/control devices 510, and external port 504, which communicate via one or more communication buses or signal lines 507.
It should be understood that the illustrated mobile terminal 500 is merely one example of a mobile terminal and that the mobile terminal 500 may have more or fewer components than shown, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The following describes the mobile terminal provided in this embodiment in detail, and the mobile terminal is a mobile phone as an example.
A memory 501, the memory 501 being accessible by the CPU502, the peripheral interface 503, and the like, the memory 501 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other volatile solid state storage devices.
A peripheral interface 503, the peripheral interface 503 may connect input and output peripherals of the device to the CPU502 and the memory 501.
An I/O subsystem 509, which I/O subsystem 509 may connect input and output peripherals on the device, such as a touch screen 512 and other input/control devices 510, to the peripheral interface 503. The I/O subsystem 509 may include a display controller 5091 and one or more input controllers 5092 for controlling other input/control devices 510. Where one or more input controllers 5092 receive electrical signals from or send electrical signals to other input/control devices 510, the other input/control devices 510 may include physical buttons (push buttons, rocker buttons, etc.), dials, slide switches, joysticks, click wheels. It is noted that the input controller 5092 may be connected to any one of: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
A touch screen 512, which is an input interface and an output interface between the user terminal and the user, displays visual output to the user, which may include graphics, text, icons, video, and the like.
The display controller 5091 in the I/O subsystem 509 receives electrical signals from the touch screen 512 or transmits electrical signals to the touch screen 512. The touch screen 512 detects a contact on the touch screen, and the display controller 5091 converts the detected contact into an interaction with a user interface object displayed on the touch screen 512, that is, implements a human-computer interaction, and the user interface object displayed on the touch screen 512 may be an icon for running a game, an icon networked to a corresponding network, or the like. It is worth mentioning that the device may also comprise a light mouse, which is a touch sensitive surface that does not show visual output, or an extension of the touch sensitive surface formed by the touch screen.
The RF circuit 505 is mainly used to establish communication between the mobile phone and the wireless network (i.e., network side), and implement data reception and transmission between the mobile phone and the wireless network. Such as sending and receiving short messages, e-mails, etc. In particular, the RF circuitry 505 receives and transmits RF signals, also referred to as electromagnetic signals, through which the RF circuitry 505 converts electrical signals to or from electromagnetic signals and communicates with communication networks and other devices. The RF circuitry 505 may include known circuitry for performing these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC (CODEC) chipset, a Subscriber Identity Module (SIM), and so forth.
The audio circuit 506 is mainly used to receive audio data from the peripheral interface 503, convert the audio data into an electric signal, and transmit the electric signal to the speaker 511.
The speaker 511 is used for restoring the voice signal received by the handset from the wireless network through the RF circuit 505 to sound and playing the sound to the user.
And a power management chip 508 for supplying power and managing power to the hardware connected to the CPU502, the I/O subsystem, and the peripheral interfaces.
The mobile terminal provided in the above embodiments may execute the information writing method of the mobile terminal provided in any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method. For technical details that are not described in detail in the above embodiments, reference may be made to an information writing method of a mobile terminal provided in any embodiment of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.