CN106484469B - A kind of embedded system data processing method and its device - Google Patents

A kind of embedded system data processing method and its device Download PDF

Info

Publication number
CN106484469B
CN106484469B CN201610863994.9A CN201610863994A CN106484469B CN 106484469 B CN106484469 B CN 106484469B CN 201610863994 A CN201610863994 A CN 201610863994A CN 106484469 B CN106484469 B CN 106484469B
Authority
CN
China
Prior art keywords
data
parameter packet
data value
embedded system
application parameter
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
CN201610863994.9A
Other languages
Chinese (zh)
Other versions
CN106484469A (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.)
Guangzhou Core Communications Polytron Technologies Inc
Original Assignee
Guangzhou Core Communications Polytron Technologies Inc
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 Guangzhou Core Communications Polytron Technologies Inc filed Critical Guangzhou Core Communications Polytron Technologies Inc
Priority to CN201610863994.9A priority Critical patent/CN106484469B/en
Publication of CN106484469A publication Critical patent/CN106484469A/en
Application granted granted Critical
Publication of CN106484469B publication Critical patent/CN106484469B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • 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/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a kind of embedded system data processing method and its devices, and this method comprises the following steps: S1, reading application parameter packet from external memory;Application parameter packet includes data type, parameter ID, list of locations length, list of locations, data length, data value and attribute description;S2, the parameter ID according in the application parameter packet, list of locations and data length computation its data-bias value, and the corresponding internal storage region of application parameter packet is obtained according to data-bias value;S3, the application parameter packet is loaded into its corresponding internal storage region;S4, judge whether the application parameter packet comes into force according to the attribute description of application parameter packet.The advantage of the invention is that processing data are more simple, and committed memory is few, and increases the compatibility and scalability of system processes data by the way that the technical characteristics such as parameter ID, list of locations data length, attribute description are arranged in application parameter packet.

Description

A kind of embedded system data processing method and its device
Technical field
The present invention relates to embedded system technology more particularly to embedded system data processing method and its devices.
Background technique
Embedded system (Embedded system) is that one kind is completely embedded into inside controlled device, is set for specific application The dedicated computer system of meter.In embedded systems, parameter is saved there are mainly three types of form: 1) it is injunctive, as primary flow path by The configuration file of device uses CLI command mode recording parameters configuring condition;2) formula is described, such as many application software use XML lattice Formula saves parameter;3) initial data formula saves parameter in a manner of most direct, simple in order.It is using authoritative advantage Compatibility, scalability are good, and have recorded the sequence that parameter comes into force.Equally there is compatibility and scalability using description formula Good advantage, and can be with the hierarchical relationship between characterising parameter.But injunctive and description formula is required using resolver to matching It sets file to be parsed, the parameter speed that comes into force is slow, occupies more memory headroom.Initial data formula, compatibility and scalability Difference, but parameter comes into force that speed is fast, and committed memory is few.Under the embedded environment using single-chip microcontroller, memory resource limitation is more susceptible Parameter preservation is carried out using initial data formula under condition.
Not use Code automatic build technology in the case where, when need when parameter region adds new parameter, programming Personnel must load in parameter, save, add corresponding code in the new and old parameter value power functions such as relatively, and operating process is easy There is the case where leakage adds, mistake adds code, operation correctness and stability, the software development efficiency for influencing embedded system be not high.
Summary of the invention
For overcome the deficiencies in the prior art, one of the objects of the present invention is to provide a kind of processing of embedded system data Method can make data processing committed memory few and simpler.
The second object of the present invention is to provide a kind of embedded system data processing unit, data processing can be made to occupy Memory is few and simpler.
An object of the present invention is implemented with the following technical solutions:
A kind of embedded system data processing method, specifically comprises the following steps:
S1, application parameter packet is read from external memory;Application parameter packet includes data type, parameter ID, location column Table length, list of locations, data length, data value and attribute description;
S2, the parameter ID according in the application parameter packet, list of locations and data length computation its data-bias value, and root The corresponding internal storage region of application parameter packet is obtained according to data-bias value;
S3, the data value of the application parameter packet is loaded into its corresponding internal storage region;
S4, judge whether the application parameter packet comes into force according to the attribute description of application parameter packet, if it is should Otherwise etc. the data value of application parameter packet is applied in the running environment of embedded system, and embedded systems again answer this after restarting It is applied in the running environment of embedded system with the data value of parameter packet.
Preferably, in the S1 further include: when obtaining new data value, execute S5;
S5, data type corresponding with the new data value, parameter ID, list of locations length, list of locations sum number are obtained Storage parameter packet is generated according to length, and together with new data value, executes S6;
S6, the storage parameter packet is stored to external memory.
Preferably, further including executing S5a before executing S5, S5a, judging the new number when obtaining new data value It is whether identical according to corresponding data value currently in use in value and embedded system, if it is terminate, otherwise executes S5.
Preferably, further including following steps before S2:
Whether corresponding data value is identical in S2a, the data value for judging application parameter packet and embedded system;If it is Terminate, otherwise executes S2.
The second object of the present invention is implemented with the following technical solutions:
A kind of embedded system data processing unit, specifically includes:
Execution module is obtained, for reading application parameter packet from external memory;Application parameter packet include data type, Parameter ID, list of locations length, list of locations, data length, data value and attribute description;
Computing module, for according to parameter ID, list of locations and data length computation its data in the application parameter packet Deviant, and the corresponding internal storage region of application parameter packet is obtained according to data-bias value;
Loading module, for the data value of the application parameter packet to be loaded into its corresponding internal storage region;
The module that comes into force is judged, for judging whether the application parameter packet gives birth to immediately according to the attribute description of application parameter packet Otherwise the data value of the application parameter packet, is if it is applied in the running environment of embedded system by effect, the embedded system such as The data value of the application parameter packet is applied in the running environment of embedded system by system again after restarting.
Preferably, executing generation module when the acquisition execution module is also used to obtain new data value;
Generation module, for obtaining data type corresponding with the new data value, parameter ID, list of locations length, position List and data length are set, and generates storage parameter packet together with new data value, executes memory module;
Memory module, for storing the storage parameter packet to external memory.
Preferably, further include executing the second comparison module before executing generation module when obtaining new data value, the Two comparison modules, for judging whether corresponding data value currently in use is identical in the new data value and embedded system, If it is terminate, otherwise execute generation module.
Preferably, embedded system data processing unit further includes the first comparison module, the first comparison module, for sentencing Whether corresponding data value is identical in the data value and embedded system of disconnected application parameter packet;If it is terminate, otherwise execute Computing module.
Compared with prior art, the beneficial effects of the present invention are: pass through in application parameter packet be arranged parameter ID, location column The technical characteristics such as table data length, attribute description, processing data are more simple, and committed memory is few, and increase system processing The compatibility and scalability of data.
Detailed description of the invention
Fig. 1 is the flow chart of embedded system data processing method of the invention;
Fig. 2 is the module connection figure of embedded system data processing unit of the invention.
Specific embodiment
In the following, being described further in conjunction with attached drawing and specific embodiment to the present invention:
A kind of embedded system data processing method is applied in embedded system;As shown in Figure 1, specifically including as follows Step:
Step 01, when reading application parameter packet from external memory, execute step 02;
When getting new data value, step 06 is executed;
The new data value can be user setting, be also possible to voluntarily to generate inside embedded system.
The application parameter packet includes data type, parameter ID, list of locations length, list of locations, data length, data Value and attribute description;Data type includes STRING, IP, MAC and PASSWORD etc.;
For example, as shown in table 1, the parameter ID of parameter Magic is 0x00000001, and list of locations length is 0x00000001, list of locations only one list item 0x0000, the data value of data length 0x00000004, Magic are 0x55aa1234。
The parameter ID of parameter User is 0x00000002, and list of locations length is 0x00000001, list of locations 0x0000 User [0] and User [1] are respectively corresponded with 0x0001, the character string of data length 0x00000008, i.e., each User are maximum Length, benefit 0 at the end of less than 8;Wherein the data value of User [0] be " admin ", ASCII character 0x61,0x64, 0x6d, 0x6e;The data value of User [1] is " guest ", ASCII character 0x67,0x75,0x65,0x73,0x74;Parameter The data type of User is STRING.
Under some parameter ID, there is a n bit array, wherein there is n different data value, list of locations length indicates the number The length of group, list of locations indicate position of some data value in the array.
Table 1
Parameter ID List of locations length List of locations Data length Data value
00 00 00 01 00 00 00 01 00 00 00 00 00 04 55 aa 12 34
00 00 00 02 00 00 00 01 00 00 00 00 00 08 61 64 6d 69 6e 00 00 00
00 00 00 02 00 00 00 01 00 01 00 00 00 08 67 75 65 73 74 00 00 00
In the present embodiment, the attribute description includes whether the application parameter packet comes into force, involved in the parameter Module description and the application parameter packet are that global or special interface is related.
For example, if identified in the attribute description of the User [0] of parameter User comprising F_ON_FLY, then it represents that User [0] It comes into force, otherwise User [0] is to come into force after restarting;If in the attribute description of the User [0] of parameter User including F_PORT Mark, it indicates that special interface is related, otherwise then indicates global;If including in the attribute description of the User [0] of parameter User F_SYS, F_NET or F_TRANS, then it represents that User [0] relates separately to system module, network function module or data transmission mould Block.
Step 02 judges corresponding data value currently in use in data value and embedded system in the application parameter packet It is whether identical, if it is terminate;It is no to then follow the steps 03.
Step 03, the parameter ID according in the application parameter packet, list of locations and data length computation its data-bias value, And the corresponding internal storage region of application parameter packet is obtained according to data-bias value;Execute step 04.
The internal storage region is the internal storage region in embedded system.
The application parameter packet is loaded into its corresponding internal storage region by step 04;Execute step 05.
Step 05 judges whether the application parameter packet comes into force according to the attribute description of application parameter packet, if it is Otherwise etc. the data value of the application parameter packet is applied in the running environment of embedded system, again will after embedded systems are restarted The data value of the application parameter packet is applied in the running environment of embedded system.
Step 06 judges whether corresponding data value currently in use is identical in the new data value and embedded system, If it is terminate;It is no to then follow the steps 03.
Step 07 obtains data type corresponding with the new data value, parameter ID, list of locations length, list of locations And data length, and storage parameter packet is generated together with new data value;Execute step 08;
The storage parameter packet includes data type, parameter ID, list of locations length, list of locations, data length and data Value.
For example, one new parameter User [3] of user setting, data value is " abc ", and data type is STRING;The list of locations length of new parameter User [3] is 0x00000001, list of locations 0x0002, and data length is 0x00000008, the corresponding ASCII character of data value are 0x61,0x62,0x63;As shown in table 2.
Table 2
Parameter ID List of locations length List of locations Data length Data value
00 00 00 02 00 00 00 01 00 02 00 00 00 08 61 62 63 00 00 00 00 00
Step 08 stores the storage parameter packet to external memory.
It is long to use data type, parameter ID, list of locations in application parameter packet for embedded system data processing method Multiple technical characteristics such as degree, list of locations, data length, data value and attribute description determine parameter in data according to parameter ID Base address in structure determines the offset address of parameter further according to list of locations, and the length of elongated data is determined according to data length Degree, treatment process is simple, and committed memory is few;And increase the compatibility and scalability of data.
A kind of embedded system data processing unit, as shown in Fig. 2, specifically including:
Execution module is obtained, for executing the first comparison module when reading application parameter packet from external memory; When getting new data value, the second comparison module is executed;
First comparison module, it is currently in use corresponding in data value and embedded system in the parameter packet for judging Whether data value is identical, if it is terminates;Otherwise computing module is executed.
Computing module, for according to parameter ID, list of locations and data length computation its data-bias in the parameter packet Value, and the corresponding internal storage region of parameter packet is obtained according to data-bias value;Execute loading module.
Loading module, for the parameter packet to be loaded into its corresponding internal storage region;It executes and judges the module that comes into force.
Judge the module that comes into force, for judging whether the parameter packet comes into force according to the attribute description of parameter packet, if it is Otherwise etc. then the data value of the parameter packet is applied in the running environment of embedded system, embedded systems again should after restarting The data value of parameter packet is applied in the running environment of embedded system.
Second comparison module, for judging corresponding data value currently in use in the new data value and embedded system It is whether identical, if it is terminate;Otherwise generation module is executed.
Generation module, for obtaining data type corresponding with the new data value, parameter ID, list of locations length, position List and data length are set, and generates storage parameter packet together with new data value;Execute memory module;
Memory module, for storing the storage parameter packet to external memory.
It will be apparent to those skilled in the art that can make various other according to the above description of the technical scheme and ideas Corresponding change and deformation, and all these changes and deformation all should belong to the protection scope of the claims in the present invention Within.

Claims (8)

1. a kind of embedded system data processing method, which comprises the steps of:
S1, application parameter packet is read from external memory;Application parameter packet includes that data type, parameter ID, list of locations are long Degree, list of locations, data length, data value and attribute description;
S2, the parameter ID according in the application parameter packet, list of locations and data length computation its data-bias value, and according to number The corresponding internal storage region of application parameter packet is obtained according to deviant;
S3, the data value of the application parameter packet is loaded into its corresponding internal storage region;
S4, judge whether the application parameter packet comes into force according to the attribute description of application parameter packet, if it is by the application Otherwise etc. the data value of parameter packet is applied in the running environment of embedded system, again joins the application after embedded systems are restarted The data value of number packet is applied in the running environment of embedded system.
2. embedded system data processing method as described in claim 1, which is characterized in that in the S1 further include: obtain When new data value, S5 is executed;
S5, acquisition data type corresponding with the new data value, parameter ID, list of locations length, list of locations and data are long Degree, and storage parameter packet is generated together with new data value, execute S6;
S6, the storage parameter packet is stored to external memory.
3. embedded system data processing method as claimed in claim 2, which is characterized in that when obtaining new data value, Further include executing S5a before executing S5, S5a, judges corresponding number currently in use in the new data value and embedded system It is whether identical according to being worth, if it is terminate, otherwise executes S5.
4. embedded system data processing method as described in claim 1, which is characterized in that further include walking as follows before S2 Rapid: whether corresponding data value is identical in S2a, the data value for judging application parameter packet and embedded system;If it is terminate, Otherwise S2 is executed.
5. a kind of embedded system data processing unit characterized by comprising
Execution module is obtained, for reading application parameter packet from external memory;Application parameter packet includes data type, parameter ID, list of locations length, list of locations, data length, data value and attribute description;
Computing module, for according to parameter ID, list of locations and data length computation its data-bias in the application parameter packet Value, and the corresponding internal storage region of application parameter packet is obtained according to data-bias value;
Loading module, for the data value of the application parameter packet to be loaded into its corresponding internal storage region;
Judge the module that comes into force, for judging whether the application parameter packet comes into force according to the attribute description of application parameter packet, such as Otherwise etc. fruit is that the data value of the application parameter packet is applied in the running environment of embedded system, and embedded systems are restarted The data value of the application parameter packet is applied in the running environment of embedded system again afterwards.
6. embedded system data processing unit as claimed in claim 5, which is characterized in that the acquisition execution module is also used When obtaining new data value, generation module is executed;
Generation module, for obtaining data type corresponding with the new data value, parameter ID, list of locations length, location column Table and data length, and storage parameter packet is generated together with new data value, execute memory module;
Memory module, for storing the storage parameter packet to external memory.
7. embedded system data processing unit as claimed in claim 6, which is characterized in that when obtaining new data value, It further include executing the second comparison module before executing generation module,
Second comparison module, for judging in the new data value and embedded system whether is corresponding data value currently in use It is identical, if it is terminate, otherwise executes generation module.
8. embedded system data processing unit as claimed in claim 5, which is characterized in that it further include the first comparison module, First comparison module, whether corresponding data value is identical in the data value and embedded system for judging application parameter packet;Such as Fruit is to terminate, and otherwise executes computing module.
CN201610863994.9A 2016-09-29 2016-09-29 A kind of embedded system data processing method and its device Active CN106484469B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610863994.9A CN106484469B (en) 2016-09-29 2016-09-29 A kind of embedded system data processing method and its device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610863994.9A CN106484469B (en) 2016-09-29 2016-09-29 A kind of embedded system data processing method and its device

Publications (2)

Publication Number Publication Date
CN106484469A CN106484469A (en) 2017-03-08
CN106484469B true CN106484469B (en) 2019-07-02

Family

ID=58269045

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610863994.9A Active CN106484469B (en) 2016-09-29 2016-09-29 A kind of embedded system data processing method and its device

Country Status (1)

Country Link
CN (1) CN106484469B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116737249A (en) * 2023-08-11 2023-09-12 深圳麦格米特电气股份有限公司 Driving method of driving board, driving board and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102314364A (en) * 2011-08-08 2012-01-11 北京登合科技有限公司 Method for automatically adapting to mobile terminal
CN102339227A (en) * 2010-07-28 2012-02-01 环旭电子股份有限公司 Multi-firmware embedded system and firmware update method thereof
CN103645924A (en) * 2013-12-27 2014-03-19 金三立视频科技(深圳)有限公司 Method and device for managing program parameters of embedded device
CN103942066A (en) * 2014-03-25 2014-07-23 中国科学院长春光学精密机械与物理研究所 Satellite-borne embedded software module on-orbit updating method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102339227A (en) * 2010-07-28 2012-02-01 环旭电子股份有限公司 Multi-firmware embedded system and firmware update method thereof
CN102314364A (en) * 2011-08-08 2012-01-11 北京登合科技有限公司 Method for automatically adapting to mobile terminal
CN103645924A (en) * 2013-12-27 2014-03-19 金三立视频科技(深圳)有限公司 Method and device for managing program parameters of embedded device
CN103942066A (en) * 2014-03-25 2014-07-23 中国科学院长春光学精密机械与物理研究所 Satellite-borne embedded software module on-orbit updating method

Also Published As

Publication number Publication date
CN106484469A (en) 2017-03-08

Similar Documents

Publication Publication Date Title
US8200628B2 (en) Multi-tenancy data storage and access method and apparatus
JP6225261B2 (en) Method and apparatus for storing data
US8452991B2 (en) Partition level power management using fully asynchronous cores with software that has limited asynchronous support
EP3005079B1 (en) On-the-fly performance adjustment for solid state storage devices
WO2020177138A1 (en) Fan speed regulation method and apparatus, and electronic device
CN106611037A (en) Method and device for distributed diagram calculation
US9338057B2 (en) Techniques for searching data associated with devices in a heterogeneous data center
CN104025520B (en) Lookup table creation method and query method, and controller, forwarding device and system therefor
US20150169249A1 (en) Path management techniques for storage networks
US10996936B2 (en) Techniques for distributing code to components of a computing system
US9104567B2 (en) Memory-leak identification
US10788997B2 (en) Method and device for storage management with metadata stored in disk extents in an extent pool
WO2021258512A1 (en) Data aggregation processing apparatus and method, and storage medium
CN108681493A (en) Data exception detection method, device, server and storage medium
CN104574275B (en) A kind of method for merging textures during modeling rendering
US11875117B2 (en) Ontology management method and M2M platform
CN106484469B (en) A kind of embedded system data processing method and its device
CN104536780A (en) Electronic game resource high-efficiency loading method and system
CN103106373A (en) Trusted computing chip and trusted computing system
CN104050189B (en) The page shares processing method and processing device
US9507813B1 (en) Method and apparatus for hardware-implemented AVL tree updates
CN103415085B (en) A kind of automatic generation method of general MAC protocol processor
WO2021174779A1 (en) Data pre-processing system and method, computer device, and readable storage medium
US9563687B1 (en) Storage configuration in data warehouses
CN109766386A (en) A kind of method and system of synchronous service end off-line data

Legal Events

Date Code Title Description
C06 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