CN113296830A - Parameter configuration and data synchronization method in time-frequency time system embedded application - Google Patents

Parameter configuration and data synchronization method in time-frequency time system embedded application Download PDF

Info

Publication number
CN113296830A
CN113296830A CN202110612039.9A CN202110612039A CN113296830A CN 113296830 A CN113296830 A CN 113296830A CN 202110612039 A CN202110612039 A CN 202110612039A CN 113296830 A CN113296830 A CN 113296830A
Authority
CN
China
Prior art keywords
configuration
storage area
configuration item
storage
parameters
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.)
Pending
Application number
CN202110612039.9A
Other languages
Chinese (zh)
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.)
Chengdu Jinnuoxin High Tech Co Ltd
Original Assignee
Chengdu Jinnuoxin High Tech 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 Chengdu Jinnuoxin High Tech Co Ltd filed Critical Chengdu Jinnuoxin High Tech Co Ltd
Priority to CN202110612039.9A priority Critical patent/CN113296830A/en
Publication of CN113296830A publication Critical patent/CN113296830A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention discloses a parameter configuration and data synchronization method in time-frequency time system embedded application, which comprises the following steps: dividing a storage medium for storing the parameters into at least a first storage area and a second storage area according to addresses, wherein the storage areas are used for storing the configuration parameters; the configuration parameters comprise a plurality of configuration items, and each configuration item comprises a frame header unit, a configuration command unit and a verification unit; storing each configuration item according to the character string format, wherein the actual occupied space of each configuration item is fixed and the same when being stored; the configuration command unit is used for storing configuration types, configuration modes and a plurality of parameters. The method has the characteristics of clear storage format, small check magnitude, convenient storage and strong expansibility, can ensure that the method can be more conveniently applied to effective parameter storage contents after the abnormal power failure restart or version upgrade of an operating system, and improves the reliability of parameter storage.

Description

Parameter configuration and data synchronization method in time-frequency time system embedded application
Technical Field
The invention relates to a parameter configuration and data synchronization method in time-frequency and time-system field embedded operating system application.
Background
In the application of an embedded operating system in the time-frequency and time-system field, a parameter storage area is damaged due to abnormal power failure of the system, or parameters are incompatible due to version upgrading, so that the function of the operating system is wrong and the operating system cannot be used; one or more backup storage areas are opened up to protect parameters in a redundant mode; the parameters in the new upgraded version are classified according to different versions, and when the new upgraded version is used, the configuration parameters are extracted according to the version numbers, so that the parameter storage reliability is poor, and effective parameter storage contents cannot be obtained.
Configuration parameters in the application of an embedded operating system in the traditional time-frequency and time-system field generally adopt an original hexadecimal data storage format, and the visualization effect of the parameters is poor; the actual occupied space of each configuration item in storage is not fixed in the traditional parameter configuration, the number or length of the parameters is different due to different specifically-realized functions, the damaged configuration items are not easy to repair, the data storage is inconvenient, and the data items cannot be expanded and updated synchronously when the subsequent version parameters have the requirements of addition, deletion and change.
Disclosure of Invention
The present invention aims to solve the above problems and provide a method for parameter configuration and data synchronization in time-frequency system embedded application, comprising:
dividing a storage medium for storing the parameters into at least a first storage area and a second storage area according to addresses, wherein the storage areas are used for storing the configuration parameters;
the first storage area and the second storage area both comprise a plurality of configuration items, and each configuration item comprises a frame header unit, a configuration command unit and a verification unit; storing each configuration item according to the character string format, wherein the actual occupied space of each configuration item is fixed and the same when being stored;
the configuration command unit is used for storing a configuration type, a configuration mode and a plurality of parameters;
loading all configuration items in the first storage area, analyzing each configuration item one by one, taking a single configuration item as a minimum check unit, starting from a frame header, calculating a CRC32 value by using a 32-bit cyclic redundancy code algorithm, and checking all data; if the calculated CRC32 value is consistent with the stored content of the configuration item, the check is passed; otherwise, the configuration item of the second storage area is loaded and analyzed again, the data of the configuration item is verified and identified, and if the verification is passed, the configuration item of the first storage area is covered by the configuration item of the second storage area.
The invention has the beneficial effects that: the method has the characteristics of configuring parameters in the application of the embedded operating system in the time-frequency and time-system fields, clear storage format, small check magnitude, convenient storage and strong expansibility, can ensure that the parameters are more conveniently applied to effective parameter storage contents after the operating system is restarted in abnormal power failure or the version is upgraded, and improves the reliability of parameter storage.
Drawings
FIG. 1 is a schematic diagram of configuration items of a first memory area and a second memory area;
fig. 2 is a flow chart of the present invention.
Detailed Description
The invention will be further described with reference to the accompanying drawings in which:
the invention relates to a parameter configuration and data synchronization method in time-frequency time system embedded application, which comprises the following steps:
dividing a storage medium for storing the parameters into at least a first storage area and a second storage area according to addresses, wherein the storage areas are used for storing the configuration parameters;
the first storage area and the second storage area both comprise a plurality of configuration items, and each configuration item comprises a frame header unit, a configuration command unit and a verification unit; storing each configuration item according to the character string format, wherein the actual occupied space of each configuration item is fixed and the same when being stored;
the configuration command unit is used for storing a configuration type, a configuration mode and a plurality of parameters;
loading all configuration items in the first storage area, analyzing each configuration item one by one, taking a single configuration item as a minimum check unit, starting from a frame header, calculating a CRC32 value by using a 32-bit cyclic redundancy code algorithm, and checking all data; if the calculated CRC32 value is consistent with the stored content of the configuration item, the check is passed; otherwise, the configuration item of the second storage area is loaded and analyzed again, the data of the configuration item is verified and identified, and if the verification is passed, the configuration item of the first storage area is covered by the configuration item of the second storage area.
Specifically, after the storage area receives the input control command, if the configuration item is dynamically deleted, the first storage area configuration item is operated first, correct CRC32 check is performed, and then the first storage area configuration item is written back to the primary storage area, and then the configuration item of the second storage area is updated in a consistent manner, so that run-time synchronization is completed.
Specifically, the configuration parameters stored in the first storage area and the second storage area are completely the same.
Firstly, dividing a storage medium for storing parameters into at least a first storage area and a second storage area according to addresses, wherein the first storage area is a primary configuration storage area, the second storage area is a standby storage area, and each storage area stores configuration data with the same content.
As shown in fig. 1, each storage area is composed of a plurality of configuration items, each configuration item is designed to occupy the largest space actually, each configuration item unit is stored according to a string format of "frame header, configuration type, configuration mode, parameter 1, parameter 2 … …, parameter N, check", wherein the number of parameters and the parameter value of a single parameter are set values.
By adopting the configuration item storage, the following advantages are achieved:
(1) the storage format is clear: the storage of the character string format is different from the traditional original hexadecimal data storage, the visualization of the parameters is higher, and after the authority verification is passed, the operation system can be conveniently exported, browsed, edited and imported from the operation system through other modes such as a serial port, a network port and the like;
(2) the check magnitude is small: a single configuration item is used as the minimum check unit, all data are checked by using a 32-bit cyclic redundancy code (CRC32) algorithm from a frame header, the safety is high, and even if the configuration is damaged due to major abnormity of an operating system, the configuration item which is influenced is few; the damaged configuration items can be conveniently repaired by combining a double backup mechanism, so that good fault tolerance is provided for the system;
(3) the storage is convenient: the number or the length of the actual parameters of each configuration item are different due to the specific realized functions, the application program sequentially analyzes and applies the character strings of the configuration items, but the actual occupied space of each configuration item during storage is fixed, and when the subsequent version parameters have the requirements of addition, deletion and change, the data items can be conveniently expanded and synchronously updated;
(4) the expansibility is strong: when the version changes, the storage mode keeps better compatibility of the configuration parameters, can conveniently carry out the activation of a new configuration item and the deactivation of an old configuration item, and the like, achieves the complete compatibility of different versions, and avoids the situation that the whole storage configuration is unavailable due to the change of the configuration items.
As shown in fig. 2, the data synchronization mechanism: loading all configuration items from the main storage area, analyzing each configuration item one by one, performing CRC32 verification identification on configuration item data, if the calculated CRC32 value is consistent with that stored by the configuration item, the verification is passed, the configuration item can be used, and the configuration item is synchronized to the standby storage area; if the calculated CRC32 value is inconsistent with the value stored in the configuration item, the check fails, at this time, the configuration item in the spare storage area needs to be loaded and analyzed again, CRC32 check identification is carried out on the configuration item data, if the check is passed, the spare storage item is applied, and the spare storage configuration item is used for covering the main storage configuration item.
In the running of the application program of the embedded operating system in the time-frequency and time-system field, the state of the storage item is periodically checked, after a control command is input by a user, if the configuration item is dynamically deleted, the configuration item of the primary storage area is firstly operated, correct CRC32 is checked and then written back to the primary storage area, then the consistency updating is carried out on the standby storage configuration item, and the running synchronization is completed.
The invention redefines the data structure and the access mode of the configuration parameters on the basis of adopting the parameter protection of the redundant storage area, ensures that the configuration parameters can be more conveniently applied to effective parameter storage contents after the abnormal power failure restart or version upgrade of an operating system, and improves the reliability of parameter storage.
The technical solution of the present invention is not limited to the limitations of the above specific embodiments, and all technical modifications made according to the technical solution of the present invention fall within the protection scope of the present invention.

Claims (3)

1. A parameter configuration and data synchronization method in time-frequency time-system embedded application is characterized by comprising the following steps:
dividing a storage medium for storing the parameters into at least a first storage area and a second storage area according to addresses, wherein the storage areas are used for storing the configuration parameters;
the first storage area and the second storage area both comprise a plurality of configuration items, and each configuration item comprises a frame header unit, a configuration command unit and a verification unit; each configuration item is stored according to a string format of the character, and the actual occupied space of each configuration item is fixed and the same when being stored;
the configuration command unit is used for storing a configuration type, a configuration mode and a plurality of parameters;
loading all configuration items in the first storage area, analyzing each configuration item one by one, taking a single configuration item as a minimum check unit, starting from a frame header, calculating a CRC32 value by using a 32-bit cyclic redundancy code algorithm, and checking all data; if the calculated CRC32 value is consistent with the stored content of the configuration item, the check is passed; otherwise, the configuration item of the second storage area is loaded and analyzed again, the data of the configuration item is verified and identified, and if the verification is passed, the configuration item of the first storage area is covered by the configuration item of the second storage area.
2. The method according to claim 1, wherein after receiving the input control command, if the configuration item is dynamically deleted, the storage area first operates the first storage area configuration item, performs correct CRC32 check, writes back to the primary storage area, and then performs consistency update on the configuration item of the second storage area to complete run-time synchronization.
3. The method according to claim 1, wherein the configuration parameters stored in the first storage area and the second storage area are identical.
CN202110612039.9A 2021-06-02 2021-06-02 Parameter configuration and data synchronization method in time-frequency time system embedded application Pending CN113296830A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110612039.9A CN113296830A (en) 2021-06-02 2021-06-02 Parameter configuration and data synchronization method in time-frequency time system embedded application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110612039.9A CN113296830A (en) 2021-06-02 2021-06-02 Parameter configuration and data synchronization method in time-frequency time system embedded application

Publications (1)

Publication Number Publication Date
CN113296830A true CN113296830A (en) 2021-08-24

Family

ID=77326704

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110612039.9A Pending CN113296830A (en) 2021-06-02 2021-06-02 Parameter configuration and data synchronization method in time-frequency time system embedded application

Country Status (1)

Country Link
CN (1) CN113296830A (en)

Similar Documents

Publication Publication Date Title
US6836859B2 (en) Method and system for version control in a fault tolerant system
US6990611B2 (en) Recovering data from arrays of storage devices after certain failures
KR101143112B1 (en) Applying custom software image updates to non-volatile storage in a failsafe manner
CN104239082A (en) Hot patching implementation method of embedded system
US8176009B2 (en) Performing a pre-update on a non volatile memory
US20050246701A1 (en) Methods and systems for updating memory contents
CN112416406B (en) Terminal equipment upgrading method, device, terminal equipment and medium
CN108509215B (en) System software replacing method and device, terminal equipment and storage medium
US20230229424A1 (en) Operating System Upgrade Method and Device, Storage Medium, and Computer Program Product
EP1934727A1 (en) Method and system for in-place updating content stored in a storage device
EP2329368B1 (en) Updating content without using a mini operating system
CN111651304B (en) Software recovery method and device based on double-core intelligent ammeter and computer equipment
CN115840579A (en) FPGA remote updating method, system, chip mounter and storage medium
CN113296830A (en) Parameter configuration and data synchronization method in time-frequency time system embedded application
JP3675375B2 (en) Nonvolatile memory and data rewriting method of nonvolatile memory
CN111159123B (en) Embedded reliable parameter storage file system and method
CN105938417B (en) Update the method and device of configuration data
KR100628176B1 (en) Method for upgrading program stored in information terminal
CN113805946B (en) Processing method and device for nonvolatile attribute of android system and electronic equipment
CN111611000A (en) High-reliability firmware over-the-air upgrading method and system
JP2016157245A (en) Information processing apparatus, system setting method, and computer program
CN107844303B (en) Production mirror image-based configurable and power-down security embedded system deployment method
CN116501354B (en) FPGA configuration file safety online upgrading method in fiber channel network node equipment
CN109976940A (en) A kind of soft start network equipment
US20220374223A1 (en) Server and updating method for mac address

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