CN112306416B - Method and terminal for automatically reading and writing NV (network video) parameters - Google Patents

Method and terminal for automatically reading and writing NV (network video) parameters Download PDF

Info

Publication number
CN112306416B
CN112306416B CN202011216521.2A CN202011216521A CN112306416B CN 112306416 B CN112306416 B CN 112306416B CN 202011216521 A CN202011216521 A CN 202011216521A CN 112306416 B CN112306416 B CN 112306416B
Authority
CN
China
Prior art keywords
file
parameter
read
configuration file
configuration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011216521.2A
Other languages
Chinese (zh)
Other versions
CN112306416A (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.)
Fujian Huisibo Digital Technology Co ltd
Original Assignee
Fuzhou Huisibo Information Technology 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 Fuzhou Huisibo Information Technology Co ltd filed Critical Fuzhou Huisibo Information Technology Co ltd
Priority to CN202011216521.2A priority Critical patent/CN112306416B/en
Publication of CN112306416A publication Critical patent/CN112306416A/en
Application granted granted Critical
Publication of CN112306416B publication Critical patent/CN112306416B/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/0604Improving or facilitating administration, e.g. storage management
    • 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/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • 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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a terminal for automatically reading and writing NV parameters.A judgment is made as to whether an NV configuration file is stored in a memory when the terminal is started, if so, the type of the NV configuration file is judged, and if so, the value of the corresponding NV parameter in the memory is modified according to an NV item identifier in the NV configuration file; if the NV read file is the NV read file, obtaining a value of a corresponding NV parameter in a memory according to the NV item identifier in the NV read file and storing the value into an NV result file; according to the method, the NV configuration file is set to carry out read-write operation of the NV parameters, the NV configuration file is obtained preferentially when the terminal is started, the NV parameters are modified after the terminal leaves a factory, the NV configuration file needs to be issued by the server, convenience in modifying the NV parameters is guaranteed, automatic read-write of the NV parameters is achieved, and meanwhile safety in modifying the NV parameters is improved.

Description

Method and terminal for automatically reading and writing NV (network video) parameters
Technical Field
The invention relates to the field of NV parameter management, in particular to a method and a terminal for automatically reading and writing NV parameters.
Background
NV is Non Volatile abbreviation, which means nonvolatile storage, and even after the system is powered down, data stored in the NV memory will not be lost, and generally, parameters stored in the NV memory are NV parameters, and key parameters such as radio frequency parameters, calibration data, network protocol parameters, IMEI, MEID, WiFi address, bluetooth address, and the like are all NV parameters.
Sometimes, a terminal in a development stage or a factory terminal after production encounters a network problem or a configuration problem, and at this time, a corresponding NV parameter in the terminal needs to be modified to solve or be derived to analyze the cause of the problem; in the development process of the Android terminal, NV parameters can be modified through tools of a platform manufacturer, such as tools provided by a high-pass platform, such as QXDM and QRCT; however, the terminal after the production is used by the user, and then the tool is used to read or modify the NV, which relates to the issue of the tool permission, so that the safety is affected, the tool is professional to use, and the time and labor cost for the user to learn and operate are high.
At present, the prior art generally has two methods:
(1) pushing NV bin files through an OTA (Over the Air, Over the Air technology), for example, storing protocol NV files in mbn binary files in a high-pass platform, pushing mbn to a terminal through the OTA, loading new mbn by an equipment terminal, and downloading NV parameters in mbn to the terminal;
(2) and pushing a modem bin file by the OTA, forcibly writing NV parameters to be modified or NV parameters to be read into a code, compiling the code into an image file, pushing the image file to the user terminal by the OTA, and modifying or reading the NV parameters added in the code after starting the terminal.
In the prior art, only NV parameters can be written or modified but cannot be read in a mode of pushing NV bins, the NV bins cannot play a role in the case of needing to export the NV parameters for analysis, all NV parameters, including NV parameters which do not need to be modified, are carried in NV bin files, and if the NV parameters which do not need to be modified are unintentionally changed in the process of writing the NV files, system errors may be caused; the power failure may be caused by using a mode of pushing a modem bin file, the modem bin file is usually large and can reach dozens of megabytes in size, a large amount of time and flow are consumed for obtaining several NV parameters, the cost performance is low, the processes of code modification, compiling and OTA need to be repeated every time NV parameter problems occur, time and labor are wasted, and the use experience of a user is influenced.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the method and the terminal for automatically reading and writing the NV parameters are provided, and the NV parameters can be automatically read and written in the terminal without an external tool.
In order to solve the technical problems, the invention adopts a technical scheme that:
a method of automatically reading and writing NV parameters, comprising the steps of:
s1, judging whether NV configuration files are stored in a memory or not when the computer is started, if so, executing S2, wherein the NV configuration files comprise NV write files and NV read files, and each NV configuration file comprises an NV item identifier;
s2, judging the type of the NV configuration file, if the type of the NV configuration file is an NV write file, executing S3, and if the type of the NV configuration file is an NV read file, executing S4;
s3, modifying the value of the corresponding NV parameter in the memory according to the NV item identifier in the NV write file;
s4, obtaining the value of the corresponding NV parameter in the memory according to the NV item identifier in the NV read file and storing the value in an NV result file.
In order to solve the technical problem, the invention adopts another technical scheme as follows:
a terminal for automatically reading and writing NV parameters, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
s1, judging whether an NV configuration file is stored in a memory when the computer is started, if so, executing S2, wherein the NV configuration file comprises an NV write file and an NV read file, and each NV configuration file comprises an NV item identifier;
s2, judging the type of the NV configuration file, if the type of the NV configuration file is an NV write file, executing S3, and if the type of the NV configuration file is an NV read file, executing S4;
s3, modifying the value of the corresponding NV parameter in the memory according to the NV item identifier in the NV write file;
s4, obtaining the value of the corresponding NV parameter in the memory according to the NV item identifier in the NV read file and storing the value in an NV result file.
The invention has the beneficial effects that: if the NV parameters need to be read and written, an NV configuration file is placed in a memory in advance, whether the NV configuration file exists in the memory is judged automatically when the terminal is started, if yes, the NV parameters need to be read and written, the NV configuration file is divided into an NV writing file and an NV reading file, the type of the NV configuration file is judged after the NV configuration file is obtained, different operations are carried out according to different types, automatic reading and writing of the NV parameters after the terminal is started are achieved, relevant operations of the NV parameters do not need to be carried out through an external platform, relevant processing of the NV parameters can be carried out automatically in the terminal, meanwhile, reading and writing operations can be achieved, and the NV parameters can be configured conveniently.
Drawings
FIG. 1 is a flow chart illustrating steps of a method for automatically reading and writing NV parameters in accordance with an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a terminal for automatically reading and writing NV parameters according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a specific application scenario of a method for automatically reading and writing NV parameters according to an embodiment of the present invention;
description of the reference symbols:
1. a terminal for automatically reading and writing NV parameters; 2. a processor; 3. a memory.
Detailed Description
In order to explain the technical contents, the objects and the effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.
Referring to fig. 1, a method for automatically reading and writing NV parameters includes the steps of:
s1, judging whether an NV configuration file is stored in a memory when the computer is started, if so, executing S2, wherein the NV configuration file comprises an NV write file and an NV read file, and each NV configuration file comprises an NV item identifier;
s2, judging the type of the NV configuration file, if the type of the NV configuration file is an NV write file, executing S3, and if the type of the NV configuration file is an NV read file, executing S4;
s3, modifying the value of the corresponding NV parameter in the memory according to the NV item identifier in the NV write file;
s4, obtaining the value of the corresponding NV parameter in the memory according to the NV item identifier in the NV read file and storing the value in an NV result file.
From the above description, the beneficial effects of the present invention are: if the NV parameters need to be read and written, an NV configuration file is placed in a memory in advance, whether the NV configuration file exists in the memory is judged automatically when the terminal is started, if yes, the NV parameters need to be read and written, the NV configuration file is divided into an NV write file and an NV read file, the type of the NV configuration file is judged after the NV configuration file is obtained, different operations are performed according to different types, the NV parameters are automatically read and written after the terminal is started, related operations of the NV parameters do not need to be performed through an external platform, related processing of the NV parameters can be performed automatically in the terminal, the read operation and the write operation can be performed simultaneously, and the NV parameters can be configured conveniently.
Further, the S1 specifically includes:
acquiring file names of all files in the memory through a preset NV management service program;
judging whether each file name meets preset NV configuration file naming rules, if so, determining that the file corresponding to the file name is the NV configuration file, and executing S2;
the S2 specifically includes:
analyzing the configuration file name of each NV configuration file according to a first preset rule to obtain an analysis result;
and dividing the NV configuration file into an NV write file and an NV read file according to the analysis result.
As can be seen from the above description, when the NV configuration file is named, naming is performed by referring to the preset naming rule, when it is determined that the NV configuration file is the NV configuration file, the file corresponding to the file name that meets the preset rule can be obtained according to the preset rule, so that the NV configuration file is identified, the NV configuration file name that is determined to be the NV configuration file is analyzed, the NV configuration file is determined to be the NV write file or the NV read file according to the analysis result, so that different NV parameter operations can be performed subsequently, it is determined whether the NV configuration file is the NV configuration file first, the file name that is determined to be the NV configuration file is analyzed subsequently, and the calculation cost is saved.
Further, the NV write file in S3 further includes NV parameter target values;
the S3 specifically includes:
determining a corresponding NV parameter to be modified in the memory according to the NV item identifier in the NV write file;
reading the NV parameter target value corresponding to the NV item identifier in the NV write file, and replacing the NV parameter to be modified with the NV parameter target value.
As can be seen from the above description, the NV write file includes the NV parameter target value and the NV item identifier, the NV parameter to be operated can be determined according to the NV item identifier, and then the NV parameter is changed according to the NV parameter target value written in the NV write file, and the writing of the NV parameter can be implemented without using a platform tool.
Further, the S4 specifically includes:
determining a corresponding NV parameter to be read in the memory according to the NV item identifier in the NV read file;
and acquiring an NV parameter value of the NV parameter to be read, and storing the NV parameter value and the NV item identifier into the NV result file.
According to the description, if the NV read file is formed, the corresponding NV parameter is read according to the NV item identifier in the NV read file, the NV parameter is stored in the result file, a single result file is generated to replace the situation that the query result is directly and simply output, the result of each NV parameter reading can be stored in a file form, the loss is not easy, the follow-up corresponding examination is convenient to perform if a problem occurs, and the formed single file is also convenient for a technician to check.
Further, the NV configuration file is an XML file, and the NV configuration file is stored in the memory in an OTA mode.
As can be seen from the above description, the NV configuration file is set in the XML format, the size of the XML format file is small, stable downloading can be achieved by using an OTA mode, the re-downloading cost is low when power failure occurs, and the NV configuration file is convenient to combine with other languages, is supported by multiple platforms, and is easy to read and generate.
Referring to fig. 2, a terminal for automatically reading and writing NV parameters includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the following steps:
s1, judging whether an NV configuration file is stored in a memory when the computer is started, if so, executing S2, wherein the NV configuration file comprises an NV write file and an NV read file, and each NV configuration file comprises an NV item identifier;
s2, judging the type of the NV configuration file, if the type of the NV configuration file is an NV write file, executing S3, and if the type of the NV configuration file is an NV read file, executing S4;
s3, modifying the value of the corresponding NV parameter in the memory according to the NV item identifier in the NV write file;
s4, obtaining the value of the corresponding NV parameter in the memory according to the NV item identifier in the NV read file and storing the value in an NV result file.
The invention has the beneficial effects that: if the NV parameters need to be read and written, an NV configuration file is placed in a memory in advance, whether the NV configuration file exists in the memory is judged automatically when the terminal is started, if yes, the NV parameters need to be read and written, the NV configuration file is divided into an NV write file and an NV read file, the type of the NV configuration file is judged after the NV configuration file is obtained, different operations are performed according to different types, the NV parameters are automatically read and written after the terminal is started, related operations of the NV parameters do not need to be performed through an external platform, related processing of the NV parameters can be performed automatically in the terminal, the read operation and the write operation can be performed simultaneously, and the NV parameters can be configured conveniently.
Further, the S1 specifically includes:
acquiring file names of all files in the memory through a preset NV management service program;
judging whether each file name meets preset NV configuration file naming rules, if so, determining that the file corresponding to the file name is the NV configuration file, and executing S2;
the S2 specifically includes:
analyzing the configuration file name of each NV configuration file according to a first preset rule to obtain an analysis result;
and dividing the NV configuration file into an NV write file and an NV read file according to the analysis result.
As can be seen from the above description, when naming an NV configuration file, naming is performed by referring to a preset naming rule, when determining whether the NV configuration file is an NV configuration file, a file corresponding to a file name that meets the preset rule can be obtained according to the preset rule, so that the NV configuration file is identified, the NV configuration file name that is determined to be the NV configuration file is analyzed, the NV configuration file is determined to be an NV write file or an NV read file according to an analysis result, thereby facilitating subsequent different NV parameter operations, determining whether the NV configuration file is an NV configuration file first, and performing subsequent analysis on the file name that is determined to be the NV configuration file, so that the calculation cost is saved.
Further, in S3, the NV write file further includes NV parameter target values;
the S3 specifically includes:
determining a corresponding NV parameter to be modified in the memory according to the NV item identifier in the NV write file;
reading the NV parameter target value corresponding to the NV item identifier in the NV write file, and replacing the NV parameter to be modified with the NV parameter target value.
As can be seen from the above description, the NV write file includes the NV parameter target value and the NV item identifier, and can determine the NV parameter to be operated according to the NV item identifier, and then change the NV parameter according to the NV parameter target value written in the NV write file, and the writing of the NV parameter can be achieved without using a platform tool.
Further, the S4 specifically includes:
determining a corresponding NV parameter to be read in the memory according to the NV item identifier in the NV read file;
and acquiring an NV parameter value of the NV parameter to be read, and storing the NV parameter value and the NV item identifier into the NV result file.
According to the description, if the NV read file is formed, the corresponding NV parameter is read according to the NV item identifier in the NV read file, the NV parameter is stored in the result file, a single result file is generated to replace the situation that the query result is directly and simply output, the result of each NV parameter reading can be stored in a file form, the loss is not easy, the follow-up corresponding examination is convenient to perform if a problem occurs, and the formed single file is also convenient for a technician to check.
Further, the NV configuration file is an XML file, and is stored in the memory in an OTA mode.
As can be seen from the above description, the NV configuration file is set in the XML format, the size of the XML format file is small, stable downloading can be realized by using an OTA mode, the re-downloading cost is low when power failure occurs, and the combination with other languages is convenient, and the re-downloading cost is also supported by multiple platforms, so that the re-downloading method is easy to read and generate.
Referring to fig. 1, a first embodiment of the present invention is:
a method for automatically reading and writing NV parameters, comprising the steps of:
s1, judging whether an NV configuration file is stored in a memory when the computer is started, if so, executing S2, wherein the NV configuration file comprises an NV write file and an NV read file, and each NV configuration file comprises an NV item identifier;
in an alternative embodiment, the memory is an SD card;
in this embodiment, S1 is specifically;
acquiring file names of all files in the memory through a preset NV management service program;
the NV management service program is automatically started after being started, reads the xml file under the specified path, and reads/writes the NV parameters according to NV items in the xml file to realize automatic reading and writing of the NV parameters; expanding a read/write (NV) interface of the modem to an Android terminal, and calling the newly expanded interface by an NV management program to read/write NV; storing NV items to be read and written into xml, and realizing one-time reading/writing of multiple NV parameters by the NV management program through traversing xml files and then reading/writing NV one by one;
judging whether each file name meets preset NV configuration file naming rules, if so, determining that the file corresponding to the file name is the NV configuration file, and executing S2;
s2, judging the type of the NV configuration file, if the type of the NV configuration file is an NV write file, executing S3, and if the type of the NV configuration file is an NV read file, executing S4;
in this embodiment, S2 is specifically;
analyzing the configuration file name of each NV configuration file according to a first preset rule to obtain an analysis result;
dividing the NV configuration file into an NV write file and an NV read file according to the analysis result;
s3, modifying the value of the corresponding NV parameter in the memory according to the NV item identifier in the NV write file; wherein the NV write file further comprises NV parameter target values;
then S3 in this embodiment is specifically: determining a corresponding NV parameter to be modified in the memory according to the NV item identifier in the NV write file;
reading the NV parameter target value corresponding to the NV item identifier in the NV write file, and replacing the NV parameter to be modified with the NV parameter target value;
s4, obtaining the value of the corresponding NV parameter in the memory according to the NV item identifier in the NV read file and storing the value into an NV result file;
in this embodiment, S4 specifically includes:
s4 specifically includes:
determining a corresponding NV parameter to be read in the memory according to the NV item identifier in the NV read file;
acquiring an NV parameter value of the NV parameter to be read, and storing the NV parameter value and the NV item identifier into the NV result file;
in this embodiment, S1 further includes:
if the NV parameters need to be configured, generating an NV parameter configuration file according to the NV item identifier of the NV parameters needing to be configured and the operation on the NV parameters needing to be configured, naming the NV parameter configuration file according to a preset rule and sending the NV parameter configuration file to the equipment in an OTA (over the air) mode;
the device stores the NV configuration file in a preset folder of the memory in an OTA manner, wherein the NV configuration file is an XML (Extensible Markup Language) file.
Referring to fig. 3, the second embodiment of the present invention is:
the method for automatically reading and writing the NV parameters is applied to an actual scene:
when the NV parameters need to be configured, generating an NV configuration file according to the NV item identifier of the NV parameters needing to be configured and the operation performed on the NV parameters needing to be configured: (1) writing the NV parameters to be configured: the single label format is < NVItem id ═ phoneid ═ data1</NVItem >, and a plurality of labels form an NV write file, wherein the < NVItem > identifies that the label is an NV parameter configuration label, the id and the phoneid jointly form an NV item identifier, the id identifies which NV parameter is specifically targeted, and the phoneid identifies which NV parameter in the SIM card is targeted; data1 indicates a wildcard, and for example, < nvltem id ═ 1 "phoney ═ 0" >55 </nvltem > indicates that a value 55 is written to NV parameter NV1 of SIM card 1, and < nvltem id ═ 1 "phoney ═ 1" >55 </nvltem > indicates that a value 55 is written to NV parameter NV1 of SIM card 2; (2) the NV parameter to be configured is read: the format of the single label is < NvItem id ═ phoneid ═ ThenItem >, and a plurality of labels form an NV read file; NV parameter NV1 of reading SIM card 1 is represented by < nvitemid ═ 1"phoneid ═ 0" >/nvitemi >, and NV parameter NV1 of reading SIM card 2 is represented by < nvitemid ═ 1"phoneid >/1" >/nvitemi >;
naming an NV configuration file by a preset rule, specifically, naming the NV configuration file by the naming rule of NV _ A.xml, wherein A is an NV configuration file type identifier, and the configuration file is identified to be an NV read file or an NV write file, and if the configuration file is specified, naming the NV read file as NV _ read.xml and naming the NV write file as NV _ write.xml;
in an optional implementation manner, an NV read file is written in a read operation set of NV parameters, and an NV write file is written in a write operation set of NV parameters, that is, the NV configuration file is an NV read file and an NV write file, a single NV read file, or a single NV write file;
the device acquires the NV configuration file in an OTA mode and stores the NV configuration file in a preset folder/sdcard/NV/;
starting NV management service in the process of starting up the equipment, and judging whether NV configuration files, namely files with the file name format of NV _ A.xml, are stored in a preset folder/sdcard/NV/in a memory; if yes, acquiring and judging whether the NV configuration file is an NV read file or an NV write file according to the NV configuration file type identifier and then processing; if the NV read file and the NV write file exist at the same time, the two files can be processed at the same time, or one of the files can be processed first and then the other file can be processed, which is not limited in this embodiment;
if the written file is NV, reading the tags line by line, writing NV parameters one by one according to NV item identifiers in the tags and NV parameter values to be written, and restarting the modem subsystem to enable modification to be effective after the tags in the NV written file are completely read;
if the NV read file is the NV read file, establishing an NV result file, wherein the format of a label in the NV result file corresponds to the NV read file, < NvItem id ═ phoneid ═ data2</NvItem >, and data2 represents the read NV parameter value; reading a label in an NV read file line by line, storing a read result into an NV result file, and if the NV read file label < NvItem id ═ 1"phoneid ═ 0 > < NvItem > is read, and the read result is 55, writing < NvItem id ═ 1" phoneid ═ 0">55</NvItem > into the NV result file;
and if the NV configuration files are read completely, deleting the NV configuration files and quitting the NV management service.
Referring to fig. 2, a third embodiment of the present invention is:
a terminal 1 for automatically reading and writing NV parameters includes a processor 2, a memory 3, and a computer program stored in the memory 3 and operable on the processor 2, where the processor 2 implements each step in the first embodiment or the second embodiment when executing the computer program.
In summary, the present invention provides a method and a terminal for automatically reading and writing NV parameters, where an NV configuration file is set, and when the terminal is started, it is determined whether the NV configuration file exists in a memory, if so, the type of the NV configuration file is determined, if the NV configuration file is an NV read file, a corresponding NV result file is set to receive an operation result of the NV read file, if the NV write file is an NV write file, the NV parameter to be modified is automatically modified according to the configuration in the NV write file, and a corresponding NV read file can be automatically generated according to the NV write file, and after the NV write operation is performed, the NV read file corresponding to the NV write file is automatically executed to obtain an execution result, so that a technician can obtain a modification result of the NV parameter, and if the modification fails, the execution result can be timely found and processed; when the NV configuration file is generated, the preset file name naming rule and the file format are specified, the device can conveniently judge whether the file is the NV configuration file or not, the size of the configuration file is reduced by adopting the XML format, the XML format is convenient to read, the NV parameter configuration efficiency is accelerated, the influence of the corresponding operation of the NV parameters on the startup time is reduced, and the use experience of a user is not influenced while the NV parameters are automatically read and written without a third-party platform.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.

Claims (8)

1. A method for automatically reading and writing NV parameters, comprising the steps of:
s1, if the NV parameters need to be read and written, placing NV configuration files in a memory in advance, judging whether the NV configuration files are stored in the memory when the computer is started, if so, executing S2, wherein the NV configuration files comprise NV write files and NV read files, and each NV configuration file comprises an NV project identifier;
s2, judging the type of the NV configuration file, if the type of the NV configuration file is an NV write file, executing S3, and if the type of the NV configuration file is an NV read file, executing S4;
s3, modifying the value of the corresponding NV parameter in the memory according to the NV item identifier in the NV write file;
s4, obtaining the value of the corresponding NV parameter in the memory according to the NV item identifier in the NV read file and storing the value into an NV result file;
the S1 specifically includes:
acquiring file names of all files in the memory through a preset NV management service program;
judging whether each file name meets preset NV configuration file naming rules, if so, determining that the file corresponding to the file name is the NV configuration file, and executing S2;
the S2 specifically includes:
analyzing the configuration file name of each NV configuration file according to a first preset rule to obtain an analysis result;
and dividing the NV configuration file into an NV write file and an NV read file according to the analysis result.
2. The method according to claim 1, wherein the NV write file in S3 further includes NV parameter target values;
the S3 specifically includes:
determining a corresponding NV parameter to be modified in the memory according to the NV item identifier in the NV write file;
reading the NV parameter target value corresponding to the NV item identifier in the NV write file, and replacing the NV parameter to be modified with the NV parameter target value.
3. The method according to claim 1, wherein S4 specifically is:
determining a corresponding NV parameter to be read in the memory according to the NV item identifier in the NV read file;
and acquiring an NV parameter value of the NV parameter to be read, and storing the NV parameter value and the NV item identifier into the NV result file.
4. The method of claim 1, wherein the NV configuration file is an XML file, and the NV configuration file is stored in the memory in an OTA manner.
5. A terminal for automatically reading and writing NV parameters, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the following steps:
s1, if the NV parameters need to be read and written, placing NV configuration files in a memory in advance, judging whether the NV configuration files are stored in the memory when the computer is started, if so, executing S2, wherein the NV configuration files comprise NV write files and NV read files, and each NV configuration file comprises an NV project identifier;
s2, judging the type of the NV configuration file, if the type of the NV configuration file is an NV write file, executing S3, and if the type of the NV configuration file is an NV read file, executing S4;
s3, modifying the value of the corresponding NV parameter in the memory according to the NV item identifier in the NV write file;
s4, obtaining the value of the corresponding NV parameter in the memory according to the NV item identifier in the NV read file and storing the value into an NV result file;
the S1 specifically includes:
acquiring file names of all files in the memory through a preset NV management service program;
judging whether each file name meets preset NV configuration file naming rules, if so, determining that the file corresponding to the file name is the NV configuration file, and executing S2;
the S2 specifically includes:
analyzing the configuration file name of each NV configuration file according to a first preset rule to obtain an analysis result;
and dividing the NV configuration file into an NV write file and an NV read file according to the analysis result.
6. The terminal for automatically reading from and writing to NV parameters of claim 5, wherein the NV write file in S3 further includes a target value of NV parameter;
the S3 specifically includes:
determining a corresponding NV parameter to be modified in the memory according to the NV item identifier in the NV write file;
reading the NV parameter target value corresponding to the NV item identifier in the NV write file, and replacing the NV parameter to be modified with the NV parameter target value.
7. The terminal for automatically reading and writing NV parameters of claim 5, wherein the S4 specifically is:
determining a corresponding NV parameter to be read in the memory according to the NV item identifier in the NV read file;
and acquiring an NV parameter value of the NV parameter to be read, and storing the NV parameter value and the NV item identifier into the NV result file.
8. The terminal for automatically reading from and writing to NV parameters of claim 5, wherein the NV configuration file is an XML file, and the NV configuration file is stored in the memory in an OTA manner.
CN202011216521.2A 2020-11-04 2020-11-04 Method and terminal for automatically reading and writing NV (network video) parameters Active CN112306416B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011216521.2A CN112306416B (en) 2020-11-04 2020-11-04 Method and terminal for automatically reading and writing NV (network video) parameters

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011216521.2A CN112306416B (en) 2020-11-04 2020-11-04 Method and terminal for automatically reading and writing NV (network video) parameters

Publications (2)

Publication Number Publication Date
CN112306416A CN112306416A (en) 2021-02-02
CN112306416B true CN112306416B (en) 2022-09-27

Family

ID=74325630

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011216521.2A Active CN112306416B (en) 2020-11-04 2020-11-04 Method and terminal for automatically reading and writing NV (network video) parameters

Country Status (1)

Country Link
CN (1) CN112306416B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1584884A (en) * 2003-08-20 2005-02-23 富士通株式会社 Apparatus and method for searching data of structured document
CN101425079A (en) * 2008-11-29 2009-05-06 中兴通讯股份有限公司 NV data processing method and apparatus
CN105205019A (en) * 2015-10-30 2015-12-30 上海斐讯数据通信技术有限公司 Qualcomm platform mobile phone-based NV (Nonvolatile Random Access Memory) parameter reading and writing system and method
CN106028382A (en) * 2016-05-27 2016-10-12 努比亚技术有限公司 NV (Nonvolatile Random Access Memory) parameter reading-writing device and method
CN108153521A (en) * 2017-12-13 2018-06-12 深圳市泛海三江科技发展有限公司 The management method and its system of a kind of XML configuration file
CN111512375A (en) * 2017-12-18 2020-08-07 高通股份有限公司 Transposed non-volatile (NV) memory (NVM) bit cells and associated data arrays configured for row and column transposed access operations

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1584884A (en) * 2003-08-20 2005-02-23 富士通株式会社 Apparatus and method for searching data of structured document
CN101425079A (en) * 2008-11-29 2009-05-06 中兴通讯股份有限公司 NV data processing method and apparatus
CN105205019A (en) * 2015-10-30 2015-12-30 上海斐讯数据通信技术有限公司 Qualcomm platform mobile phone-based NV (Nonvolatile Random Access Memory) parameter reading and writing system and method
CN106028382A (en) * 2016-05-27 2016-10-12 努比亚技术有限公司 NV (Nonvolatile Random Access Memory) parameter reading-writing device and method
CN108153521A (en) * 2017-12-13 2018-06-12 深圳市泛海三江科技发展有限公司 The management method and its system of a kind of XML configuration file
CN111512375A (en) * 2017-12-18 2020-08-07 高通股份有限公司 Transposed non-volatile (NV) memory (NVM) bit cells and associated data arrays configured for row and column transposed access operations

Also Published As

Publication number Publication date
CN112306416A (en) 2021-02-02

Similar Documents

Publication Publication Date Title
CN102567053A (en) Method and device for downgrading software version
CN110825619A (en) Automatic generation method and device of interface test case and storage medium
CN112764874B (en) Virtual machine server information acquisition method based on CMDB configuration management system
CN110333876A (en) A kind of data clearing method and control equipment
US20170262263A1 (en) Process and system for the generation of an operating program in the form of a mobile application that is capable of operating on a mobile device
CN110750286A (en) Management method, device, system, equipment and medium for upgrading Mbn through OTA
CN112115055A (en) Multi-machine automatic testing method and device and computer equipment
CN111538523A (en) Differential upgrading method, device and storage medium
CN104461621A (en) Attribute information updating method and device
CN112052037A (en) Application software development method, device, equipment and medium
CN106603289B (en) LMT configuration file smooth upgrading method
CN112269588B (en) Algorithm upgrading method, device, terminal and computer readable storage medium
US20060026415A1 (en) Method of updating a portion BIOS
CN112306416B (en) Method and terminal for automatically reading and writing NV (network video) parameters
CN105447040B (en) Binary file management and updating method, device and system
CN113254045A (en) Software initialization method, system and computer readable storage medium
CN110806891B (en) Method and device for generating software version of embedded device
CN110727565B (en) Network equipment platform information collection method and system
CN107608879B (en) Fault detection method, device and storage medium
CN107220174B (en) Automatic testing method and device
CN114237976A (en) Data acquisition method and device
CN113254040A (en) Front-end framework updating method, device, equipment and storage medium
CN109561121B (en) Method and device for monitoring deployment
CN112817953A (en) Data verification method and device, computer equipment and computer-readable storage medium
CN112416383A (en) Hot updating method and device for golang program and computer equipment

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
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Room 201-9, Zone C, No. 18 Guanri Road, Phase II, Software Park, Torch High tech Zone, Xiamen City, Fujian Province, 361000

Patentee after: Fujian Huisibo Digital Technology Co.,Ltd.

Address before: No. 89 Software Avenue, Tongpan Road, Gulou District, Fuzhou City, Fujian Province, 350000. 510, Floor 5, 34 #, Zone C, Fuzhou Software Park

Patentee before: FUZHOU HUISIBO INFORMATION TECHNOLOGY Co.,Ltd.