CN113609124B - Data record storage method and system with expandability - Google Patents

Data record storage method and system with expandability Download PDF

Info

Publication number
CN113609124B
CN113609124B CN202110678641.2A CN202110678641A CN113609124B CN 113609124 B CN113609124 B CN 113609124B CN 202110678641 A CN202110678641 A CN 202110678641A CN 113609124 B CN113609124 B CN 113609124B
Authority
CN
China
Prior art keywords
data
store
array
storage
storing
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
CN202110678641.2A
Other languages
Chinese (zh)
Other versions
CN113609124A (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.)
Tianjin Jinhang Computing Technology Research Institute
Original Assignee
Tianjin Jinhang Computing Technology Research Institute
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 Tianjin Jinhang Computing Technology Research Institute filed Critical Tianjin Jinhang Computing Technology Research Institute
Priority to CN202110678641.2A priority Critical patent/CN113609124B/en
Publication of CN113609124A publication Critical patent/CN113609124A/en
Application granted granted Critical
Publication of CN113609124B publication Critical patent/CN113609124B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management

Abstract

A data record storage method with scalability, comprising: defining a storage table structure; defining constant data; defining a mixed data information structure; defining a two-dimensional array for storing buffer data; storing the content of the mixed data information structure; periodically storing the data; traversing according to the array columns, and circularly writing data into an external storage medium. The invention designs a storage table structure in the data record storage mode with expandability, manages all variables needing to store data in the system, and obtains the values of the variables according to addresses in real time in the software operation process. The population of variables is stored periodically in the low priority thread. The processing in this way not only has strong expansibility, but also the user can increase the variables required to be recorded at will. And the core control time sequence of the system is not affected.

Description

Data record storage method and system with expandability
Technical Field
The invention relates to a data record storage method with expandability, belonging to the field of computer control.
Background
In a computer control system, the method is particularly important for process data recording, and the data recording has important significance for system debugging, fault diagnosis, fault positioning, maintenance time shortening and the like. In a flight system, process record data is used for recording motion parameters and states of subsystems in the flight process, and in a scientific research test flight stage, recorded data is often needed to participate in system troubleshooting and control law parameter adjustment work according to the recorded data. The data record is an important function in the computer control system, and can trace back the state of the system when the system fails according to the recorded process data, and play a guiding role in system optimization and parameter adjustment. The traditional data recording is usually to add a storage device to operate at a key control position of a control system to record the data to the storage device, and the processing mode has the defects that the increase of the data output of the system at a place with higher time sequence has an influence on the control efficiency, has time uncertainty on the operation of the storage device and easily has a great disastrous influence on the core control of the system. Often, a large number of parameters in the control system need to be recorded, if the parameters are recorded in a scattered way, the requirement on the maintainability cost of the data is high, and the expandability and maintainability of the system software are poor.
Disclosure of Invention
The technical solution of the invention is as follows: the method has the advantages that the defects of the prior art are overcome, the data record storage method with expandability is provided, the system data record function is integrated and unified on the premise that the core control of the system is not affected, and the system parameter record has stronger expandability.
The technical scheme of the invention is as follows:
a data record storage method with expandability comprises the following steps:
(1) Defining a storage table structure, and carrying out storage management on all global variables to be recorded of a software system;
(2) Defining a constant array dataRec according to the storage table structure in the step (1) and initializing, wherein the length of the constant array is determined by an initialization variable, the array is an information table for storing data, and the data information to be stored is filled into the array;
(3) Defining a hybrid data information structure store_info, which records all information of the data record; the method comprises the steps of including a name, a function code, a storage frequency, a data storage table pointer, a storage table type pointer and the number of stored information;
(4) Defining a two-dimensional array BUFFER for storing BUFFER data, and circularly storing the recorded data; the row information of the two-dimensional array is the number of the buffer areas, and the column information of the two-dimensional array is the length of the writing storage medium;
(5) When the system is started, storing the content of the mixed data information structure STORE_INFO into the two-dimensional array BUFFER;
(6) After the system is started, periodically storing data in a storage table STORE_LIST in the running process;
(7) And writing the data of the two-dimensional array BUFFER to the storage device.
Further, the STORE table structure store_list includes four members:
a sequence number Num of the stored data, and the type is defined as integer;
the Name of the stored data is of a type of signed character constant;
storing the byte number Size of the data, wherein the type is unsigned character type;
the global variable pointer pVar of the stored data is of the unsigned character type.
Further, the step (2) defines a constant array dataRec and initializes, specifically:
(2.1) the element in the constant array is a memory table structure STORE_LIST, the constant array dataRec comprises all data needing to be recorded and stored in the system, when the array is defined, the array length is set to be empty, and the array length is determined by an initialization variable;
(2.2) designing the content of all elements in the array, wherein the content comprises four elements:
(1) the first element represents the sequence number of the variable store, starting with 1;
(2) the second element is the name of the storage variable;
(3) the third element is the byte number occupied by the variable, the number of the symbol character type is defined as 1 by a macro definition mode, the number of the symbol character type is defined as 1, the number of the symbol short integer is defined as 2, the number of the symbol character type is defined as 4, and the number of the symbol character type is defined as 4;
(4) the fourth element is an address stored as a global variable.
Further, the step (3) defines a mixed data information structure store_info, specifically:
(3.1) name MixName of mixed data information structure store_info, type is signed character constant;
(3.2) the function code MixFunc of the mixed data information structure store_info, the type is unsigned integer;
(3.3) storing frequency MixRate of the mixed data information structure STORE_INFO, defining the type as floating point type, and the unit is Hz;
(3.4) storing a table STORE_LIST type pointer PList, this element being directly associated with a set constant array dataRec;
(3.5) the number of store_list elements of the STORE table structure is MixNum.
Further, the storing the mixed data information structure store_info in the two-dimensional array BUFFER specifically includes:
(5.1) storing the mixed data information structure STORE_INFO, and storing the mixed data information STORE_INFO continuously for N times, wherein N is a positive integer;
(5.2) the stored contents include the name MixName of the mixed data information structure, the function code MixFunc of the mixed data information structure store_info, and the storage frequency MixRate of the mixed data information structure store_info;
(5.3) calculating the length Size of the Name in the STORE table store_list and copying the Name into the transmit buffer array using the memory copy function; and circularly assigning the information in the storage table STORE_LIST to a sending buffer array, wherein the information comprises the space occupied by the name of each table element, the name of the table and the space of data, and storing the data in the sending buffer array in a log file storing mode to enter the next step.
Further, the step (6) STOREs the data in the storage table store_list periodically during the operation, specifically:
(6.1) starting a timer in the initialization process, and periodically storing data in a storage table STORE_LIST in a timer callback function;
(6.2) the stored message design includes two start bytes, a total length of two bytes, a time stamp of four bytes, a storage type of one byte, and a function code of two bytes;
(6.3) traversing the memory table STORE_LIST, and assigning values according to the type of the stored data;
and (6.4) after traversing, calculating the total length of all data, storing, putting the total length into the third four bytes of the data frame, calculating and checking all data, filling end codes, and putting the end codes into a two-dimensional array BUFFER for storing BUFFER data.
Further, the step (7) writes the data of the two-dimensional array BUFFER into the storage device, specifically:
(7.1) circularly judging the currently stored byte number LEN_NOW by taking a column of the two-dimensional array BUFFER as a variable, and when the byte number is larger than or equal to the byte number WRITE_ONCE_LEN which is allowed to be written by the storage device at one time, sending the head address of the column of the two-dimensional array and the length WRITE_ONCE_LEN of data to be written to a data storage operation thread through a message queue;
and (7.2) adding one to the column number of the two-dimensional array, if the added value is BUF_NUM, the value of the line number is 0, the data which is not sent out in the previous column is copied to the forefront of the memory in the column through the memory, and the pointer is moved to the position where the data needs to be written.
Furthermore, the present invention also provides a data record storage system, which includes:
and a storage table module: defining a storage table structure, and carrying out storage management on all global variables to be recorded of a software system;
an initialization module: defining a constant array dataRec according to a storage table structure, initializing, determining the length of the constant array by an initialization variable, wherein the array is an information table for storing data, and filling the data information to be stored into the array;
the mixed data information structure definition module: defining a hybrid data information structure store_info, which records all information of the data record; the method comprises the steps of including a name, a function code, a storage frequency, a data storage table pointer, a storage table type pointer and the number of stored information;
two-dimensional array definition module: defining a two-dimensional array BUFFER for storing BUFFER data, and circularly storing the recorded data; the row information of the two-dimensional array is the number of the buffer areas, and the column information of the two-dimensional array is the length of the writing storage medium;
and a starting module: when the system is started, storing the content of the mixed data information structure STORE_INFO into the two-dimensional array BUFFER;
and a storage module: after the system is started, periodically storing data in a storage table STORE_LIST in the running process; and writing the data of the two-dimensional array BUFFER to the storage device.
Compared with the prior art, the invention has the beneficial effects that:
the invention provides a data record storage mode with expandability, which designs a storage table structure to manage all variables needing to store data in a system, and obtains values of the variables according to addresses in real time in the running process of software. The population of variables is stored periodically in the low priority thread. The processing in this way not only has strong expansibility, but also the user can increase the variables required to be recorded at will. And the core control time sequence of the system is not affected.
Drawings
Fig. 1 is a diagram of a data record storage method with scalability.
Detailed Description
The following describes in further detail the embodiments of the present invention with reference to the accompanying drawings.
The data record is an important function in the computer control system, and can trace back the state of the system when the system fails according to the recorded process data, and play a guiding role in system optimization and parameter adjustment. The traditional data recording is usually to add a storage device to operate at a key control position of a control system to record the data to the storage device, and the processing mode has the defects that the increase of the data output of the system at a place with higher time sequence has an influence on the control efficiency, has time uncertainty on the operation of the storage device and easily has a great disastrous influence on the core control of the system. Often, a large number of parameters in the control system need to be recorded, if the parameters are recorded in a scattered way, the requirement on the maintainability cost of the data is high, and the expandability and maintainability of the system software are poor. Therefore, the invention provides a novel data recording method, which integrates and unifies the system data recording functions and has stronger expansibility of system parameter recording on the premise of not influencing the core control of the system.
As shown in fig. 1, the present invention proposes a data record storage method with scalability, comprising the following steps:
1. and defining a storage table structure, and managing all global variables required to be recorded in the software system, wherein the global variables comprise a storage data sequence number, a storage data name, the number of bytes occupied by data and a non-type pointer.
2. The constant data is defined according to the structure designed by 1, the array length is determined by the initialization variable, and the data information to be stored is filled into the array.
3. A hybrid data information structure is defined, including a name, a function code, a storage frequency, a data storage table pointer, a storage table type pointer, and the number of information stored.
4. Defining a two-dimensional array for storing buffer data, circularly storing recorded data, wherein the row information of the array is the number of buffer areas, and the column information of the array is the length of a writing storage medium.
5. The content of the mixed data information structure is stored, including the name, function code, storage frequency, including the name, type of each variable.
6. And periodically storing the data, and storing the information into a two-dimensional buffer area according to a storage table structure by each variable according to a message format.
7. Traversing according to the array columns, and circularly writing data into an external storage medium.
The invention designs a storage table structure in the data record storage mode with expandability, manages all variables needing to store data in the system, and obtains the values of the variables according to addresses in real time in the software operation process. The population of variables is stored periodically in the low priority thread. The processing in this way not only has strong expansibility, but also the user can increase the variables required to be recorded at will. And the core control time sequence of the system is not affected.
Examples:
s1, defining a storage table structure STORE_LIST, and carrying out storage management on all global variables to be recorded in a software system, wherein the structure comprises four members:
(1) Sequence number Num of stored data (type defined as integer)
(2) The Name of the data (type is a signed character constant) is stored.
(3) The number of bytes Size (type is unsigned character) occupied by the stored data.
(4) The global variable pointer pVar (type is an unsigned character type pointer) of the stored data.
S2, setting a constant array dataRec and initializing (dataRec is an array name), wherein the array is an information table for storing data.
(1) The elements in the array are memory_list, the constant array dataRec includes all the data needed to be recorded and stored in the system, and for the expandable system, the array length is set to be empty (not filled with specific values) when the array is defined, and the array length is determined by the initialization variable (sizeof (dataRec) is used for obtaining the array length).
(2) Designing the content of all elements in the array, wherein the content comprises four elements: (1) the first element represents the sequence number of the variable store, starting with 1; (2) the second element is the name of the storage variable, such as scroll, PITCH, heading, YAW, etc.; (3) the third element is the byte number occupied by the variable, the number of the symbol character type is defined as 1 by a macro definition mode, the number of the symbol character type is defined as 1, the number of the symbol short integer is defined as 2, the number of the symbol character type is defined as 4, and the number of the symbol character type is defined as 4; (4) the fourth element is an address stored as a global variable, different variable addresses have different pointer types, and the element type is defined as a void type, and can be converted into any type. The two steps S1 and S2 define a table of information to be stored.
S3: a hybrid data information structure STORE INFO is defined which records all information of the data record:
(1) The name MixName of the mixed data information structure STORE INFO, type is a signed character constant,
(2) The function code MixFunc of the mixed data information structure store_info is of the unsigned integer type
(3) The storage frequency MixRate of the mixed data information structure store_info is defined as a floating point type in Hz.
(4) STORE table STORE_LIST type pointer PList, this element is directly associated with the constant array dataRec set by S2
(5) The number MixNum of table structure STORE LIST elements is stored.
S4: a two-dimensional array BUFFER is defined for storing the buffered data, and the recorded data is cyclically stored. The row information of the array is the number BUF_NUM of the buffer area, the column information of the array is the length ONCE_WR_SIZE of the write-ONCE storage medium plus the data overflow protection length EXTRA_LEN (the data overflow protection length EXTRA_LEN is needed to be supplemented with EXTRA length storage for preventing the data stored by the system from being larger than the length of the write-ONCE storage medium, and the length is EXTRA_LEN).
And S5, when the system is started, storing the mixed data information structure STORE_INFO into the two-dimensional array BUFFER defined in S4.
(1) The mixed data information structure store_info is stored, and thus the mixed data information store_info is stored N consecutive times (typically SD card 3 according to the characteristic setting of the medium) considering the possibility of a failure in the medium writing operation.
(2) The stored contents include the name MixName of the mixed data information structure, the function code MixFunc of the mixed data information structure store_info, and the storage frequency MixRate of the mixed data information structure store_info.
(3) The length Size of the Name in the STORE table store_list is calculated and the Name is copied into the send buffer array using a memory copy function. And circularly assigning the information in the storage table STORE_LIST to the sending buffer array, wherein the information comprises the space occupied by the name of each table element, the name of the table and the space of data, and storing the data in the sending buffer array in a log file storing mode, and the storing method is transferred to S7.
And S6, after the system is started, periodically storing the data in the storage table STORE_LIST in the running process.
(1) And starting a timer in the initialization process, and periodically storing data in a storage table STORE_LIST in a timer callback function, wherein the storage message uses a storage message designed in the next step.
(2) The memory packet design includes two start bytes (0 x55 x aa), the total length of two bytes. A four byte time stamp, a one byte storage type, and a two byte function code.
(3) The STORE table store_list is traversed and assigned according to the type of data stored (one byte, two bytes and four bytes of the buffer are occupied by variables of different types according to the definition in S2).
(4) After the traversal is completed, the total length of all data is calculated and stored, and the third four bytes of the data frame are put in. And calculate and check all data, fill in end codes (0 x66 and 0x 99), put into two-dimensional array BUFFER which stores BUFFER data.
And S7, writing the data of the two-dimensional array BUFFER into the storage device.
(1) And circularly judging the currently stored byte number LEN_NOW by taking a column of the two-dimensional array BUFFER as a variable, and when the byte number is larger than or equal to the byte number WRITE_ONCE_LEN which is allowed to be written by the storage device at one time, sending the head address of the column of the two-dimensional array and the length WRITE_ONCE_LEN of data to be written to a data storage operation thread through a message queue.
(2) And adding one to the column number of the two-dimensional array, if the added value is BUF_NUM, the value of the line number is 0, copying the data which is not sent out in the previous column and has the length of LEN_NOW-WRITE_ONCE_LEN to the forefront of the memory in the column through the memory, and moving the pointer to the position where the data needs to be written.
According to the data record storage method with expandability, on the premise of not affecting the core control of the system, the system data record functions are integrated and unified, and the system parameter record has stronger expandability.
What is not described in detail in the present specification is a technology known in the art.

Claims (7)

1. A data record storage method with expandability is characterized by comprising the following steps:
(1) Defining a storage table structure, and carrying out storage management on all global variables to be recorded of a software system;
(2) Defining a constant array dataRec according to the storage table structure in the step (1) and initializing, wherein the length of the constant array is determined by an initialization variable, the array is an information table for storing data, and the data information to be stored is filled into the array;
(3) Defining a hybrid data information structure store_info, which records all information of the data record; the method comprises the steps of including a name, a function code, a storage frequency, a data storage table pointer, a storage table type pointer and the number of stored information;
(4) Defining a two-dimensional array BUFFER for storing BUFFER data, and circularly storing the recorded data; the row information of the two-dimensional array is the number of the buffer areas, and the column information of the two-dimensional array is the length of the writing storage medium;
(5) When the system is started, the content of the mixed data information structure STORE_INFO is stored in the two-dimensional array BUFFER, specifically:
(5.1) storing the mixed data information structure STORE_INFO, and storing the mixed data information STORE_INFO continuously for N times, wherein N is a positive integer;
(5.2) the stored contents include the name MixName of the mixed data information structure, the function code MixFunc of the mixed data information structure store_info, and the storage frequency MixRate of the mixed data information structure store_info;
(5.3) calculating the length Size of the Name in the STORE table store_list and copying the Name into the transmit buffer array using the memory copy function; circularly assigning information in a storage table STORE_LIST to a sending buffer array, wherein the information comprises a space occupied by the name of each table element, the name of a table and a space of data, and storing the data in the sending buffer array in a log file storing mode to enter the next step;
(6) After the system is started, periodically storing data in a storage table STORE_LIST in the running process, wherein the method specifically comprises the following steps:
(6.1) starting a timer in the initialization process, and periodically storing data in a storage table STORE_LIST in a timer callback function;
(6.2) the stored message design includes two start bytes, a total length of two bytes, a time stamp of four bytes, a storage type of one byte, and a function code of two bytes;
(6.3) traversing the memory table STORE_LIST, and assigning values according to the type of the stored data;
(6.4) after traversing, calculating the total length of all data, storing, putting the total length into the third four bytes of the data frame, calculating and checking all data, filling end codes, and putting the end codes into a two-dimensional array BUFFER for storing BUFFER data;
(7) And writing the data of the two-dimensional array BUFFER to the storage device.
2. A data record storage method with scalability according to claim 1, characterized in that: the STORE table structure store_list includes four members:
a sequence number Num of the stored data, and the type is defined as integer;
the Name of the stored data is of a type of signed character constant;
storing the byte number Size of the data, wherein the type is unsigned character type;
the global variable pointer pVar of the stored data is of the unsigned character type.
3. A data record storage method with scalability according to claim 2, characterized in that: the step (2) defines a constant array dataRec and initializes, specifically:
(2.1) the element in the constant array is a memory table structure STORE_LIST, the constant array dataRec comprises all data needing to be recorded and stored in the system, when the array is defined, the array length is set to be empty, and the array length is determined by an initialization variable;
(2.2) designing the content of all elements in the array, wherein the content comprises four elements:
(1) the first element represents the sequence number of the variable store, starting with 1;
(2) the second element is the name of the storage variable;
(3) the third element is the byte number occupied by the variable, the number of the symbol character type is defined as 1 by a macro definition mode, the number of the symbol character type is defined as 1, the number of the symbol short integer is defined as 2, the number of the symbol character type is defined as 4, and the number of the symbol character type is defined as 4;
(4) the fourth element is an address stored as a global variable.
4. A data record storage method with scalability according to claim 2, characterized in that: the step (3) defines a mixed data information structure store_info, specifically:
(3.1) name MixName of mixed data information structure store_info, type is signed character constant;
(3.2) the function code MixFunc of the mixed data information structure store_info, the type is unsigned integer;
(3.3) storing frequency MixRate of the mixed data information structure STORE_INFO, defining the type as floating point type, and the unit is Hz;
(3.4) storing a table STORE_LIST type pointer PList, this element being directly associated with a set constant array dataRec;
(3.5) the number of store_list elements of the STORE table structure is MixNum.
5. The data record storage method with scalability according to claim 4, wherein: the step (7) writes the data of the two-dimensional array BUFFER into the storage device, specifically:
(7.1) circularly judging the currently stored byte number LEN_NOW by taking a column of the two-dimensional array BUFFER as a variable, and when the byte number is larger than or equal to the byte number WRITE_ONCE_LEN which is allowed to be written by the storage device at one time, sending the head address of the column of the two-dimensional array and the length WRITE_ONCE_LEN of data to be written to a data storage operation thread through a message queue;
and (7.2) adding one to the column number of the two-dimensional array, if the added value is BUF_NUM, the value of the line number is 0, the data which is not sent out in the previous column is copied to the forefront of the memory in the column through the memory, and the pointer is moved to the position where the data needs to be written.
6. A data record storage system implemented according to the data record storage method with scalability of claim 1, characterized by comprising:
and a storage table module: defining a storage table structure, and carrying out storage management on all global variables to be recorded of a software system;
an initialization module: defining a constant array dataRec according to a storage table structure, initializing, determining the length of the constant array by an initialization variable, wherein the array is an information table for storing data, and filling the data information to be stored into the array;
the mixed data information structure definition module: defining a hybrid data information structure store_info, which records all information of the data record; the method comprises the steps of including a name, a function code, a storage frequency, a data storage table pointer, a storage table type pointer and the number of stored information;
two-dimensional array definition module: defining a two-dimensional array BUFFER for storing BUFFER data, and circularly storing the recorded data; the row information of the two-dimensional array is the number of the buffer areas, and the column information of the two-dimensional array is the length of the writing storage medium;
and a starting module: when the system is started, storing the content of the mixed data information structure STORE_INFO into the two-dimensional array BUFFER;
and a storage module: after the system is started, periodically storing data in a storage table STORE_LIST in the running process; writing data of the two-dimensional array BUFFER to the storage device;
storing a mixed data information structure STORE_INFO into the two-dimensional array BUFFER, specifically:
(5.1) storing the mixed data information structure STORE_INFO, and storing the mixed data information STORE_INFO continuously for N times, wherein N is a positive integer;
(5.2) the stored contents include the name MixName of the mixed data information structure, the function code MixFunc of the mixed data information structure store_info, and the storage frequency MixRate of the mixed data information structure store_info;
(5.3) calculating the length Size of the Name in the STORE table store_list and copying the Name into the transmit buffer array using the memory copy function; circularly assigning information in a storage table STORE_LIST to a sending buffer array, wherein the information comprises a space occupied by the name of each table element, the name of a table and a space of data, and storing the data in the sending buffer array in a log file storing mode;
the data in the memory table STORE_LIST in the running process is periodically stored, specifically:
(6.1) starting a timer in the initialization process, and periodically storing data in a storage table STORE_LIST in a timer callback function;
(6.2) the stored message design includes two start bytes, a total length of two bytes, a time stamp of four bytes, a storage type of one byte, and a function code of two bytes;
(6.3) traversing the memory table STORE_LIST, and assigning values according to the type of the stored data;
(6.4) after traversing, calculating the total length of all data, storing, putting the total length into the third four bytes of the data frame, calculating and checking all data, filling end codes, and putting the end codes into a two-dimensional array BUFFER for storing BUFFER data;
writing the data of the two-dimensional array BUFFER into a storage device, specifically:
(7.1) circularly judging the currently stored byte number LEN_NOW by taking a column of the two-dimensional array BUFFER as a variable, and when the byte number is larger than or equal to the byte number WRITE_ONCE_LEN which is allowed to be written by the storage device at one time, sending the head address of the column of the two-dimensional array and the length WRITE_ONCE_LEN of data to be written to a data storage operation thread through a message queue;
and (7.2) adding one to the column number of the two-dimensional array, if the added value is BUF_NUM, the value of the line number is 0, the data which is not sent out in the previous column is copied to the forefront of the memory in the column through the memory, and the pointer is moved to the position where the data needs to be written.
7. The data record storage system of claim 6, wherein:
the STORE table structure store_list includes four members:
a sequence number Num of the stored data, and the type is defined as integer;
the Name of the stored data is of a type of signed character constant;
storing the byte number Size of the data, wherein the type is unsigned character type;
a global variable pointer pVar for storing data, the type of which is an unsigned character pointer;
defining and initializing a constant array dataRec, specifically:
(2.1) the element in the constant array is a memory table structure STORE_LIST, the constant array dataRec comprises all data needing to be recorded and stored in the system, when the array is defined, the array length is set to be empty, and the array length is determined by an initialization variable;
(2.2) designing the content of all elements in the array, wherein the content comprises four elements:
(1) the first element represents the sequence number of the variable store, starting with 1;
(2) the second element is the name of the storage variable;
(3) the third element is the byte number occupied by the variable, the number of the symbol character type is defined as 1 by a macro definition mode, the number of the symbol character type is defined as 1, the number of the symbol short integer is defined as 2, the number of the symbol character type is defined as 4, and the number of the symbol character type is defined as 4;
(4) the fourth element is an address stored as a global variable;
defining a mixed data information structure STORE_INFO, specifically:
(3.1) name MixName of mixed data information structure store_info, type is signed character constant;
(3.2) the function code MixFunc of the mixed data information structure store_info, the type is unsigned integer;
(3.3) storing frequency MixRate of the mixed data information structure STORE_INFO, defining the type as floating point type, and the unit is Hz;
(3.4) storing a table STORE_LIST type pointer PList, this element being directly associated with a set constant array dataRec;
(3.5) the number of store_list elements of the STORE table structure is MixNum.
CN202110678641.2A 2021-06-18 2021-06-18 Data record storage method and system with expandability Active CN113609124B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110678641.2A CN113609124B (en) 2021-06-18 2021-06-18 Data record storage method and system with expandability

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110678641.2A CN113609124B (en) 2021-06-18 2021-06-18 Data record storage method and system with expandability

Publications (2)

Publication Number Publication Date
CN113609124A CN113609124A (en) 2021-11-05
CN113609124B true CN113609124B (en) 2024-03-26

Family

ID=78336587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110678641.2A Active CN113609124B (en) 2021-06-18 2021-06-18 Data record storage method and system with expandability

Country Status (1)

Country Link
CN (1) CN113609124B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002088924A1 (en) * 2001-04-30 2002-11-07 The Commonwealth Of Australia Data view of a modelling system
CN101395602A (en) * 2005-12-29 2009-03-25 亚马逊科技公司 Method and apparatus for a distributed file storage and indexing service
CA2668306A1 (en) * 2009-06-08 2010-12-08 Stephen R. Germann Method and system for applying metadata to data sets of file objects
CN101976472A (en) * 2010-11-22 2011-02-16 奇瑞汽车股份有限公司 Vehicle-mounted data recorder
CN102771089A (en) * 2009-12-23 2012-11-07 思杰系统有限公司 Systems and methods for mixed mode handling of IPv6 and IPv4 traffic by a virtual server
CN103034499A (en) * 2012-12-13 2013-04-10 中国航空无线电电子研究所 General data format conversion method and system for network data transmission of airborne equipment
CN103229165A (en) * 2010-08-12 2013-07-31 安全第一公司 Systems and methods for secure remote storage
CN103403707A (en) * 2010-12-28 2013-11-20 思杰系统有限公司 Systems and methods for database proxy request switching
CN106209382A (en) * 2010-09-20 2016-12-07 安全第公司 The system and method shared for secure data
CN110764935A (en) * 2019-10-28 2020-02-07 天津津航计算技术研究所 Method for efficiently transferring messages among tasks based on real-time operating system
CN111506581A (en) * 2020-06-17 2020-08-07 北京北龙超级云计算有限责任公司 Data aggregation method and server

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002088924A1 (en) * 2001-04-30 2002-11-07 The Commonwealth Of Australia Data view of a modelling system
CN101395602A (en) * 2005-12-29 2009-03-25 亚马逊科技公司 Method and apparatus for a distributed file storage and indexing service
CA2668306A1 (en) * 2009-06-08 2010-12-08 Stephen R. Germann Method and system for applying metadata to data sets of file objects
CN102771089A (en) * 2009-12-23 2012-11-07 思杰系统有限公司 Systems and methods for mixed mode handling of IPv6 and IPv4 traffic by a virtual server
CN103229165A (en) * 2010-08-12 2013-07-31 安全第一公司 Systems and methods for secure remote storage
CN106209382A (en) * 2010-09-20 2016-12-07 安全第公司 The system and method shared for secure data
CN101976472A (en) * 2010-11-22 2011-02-16 奇瑞汽车股份有限公司 Vehicle-mounted data recorder
CN103403707A (en) * 2010-12-28 2013-11-20 思杰系统有限公司 Systems and methods for database proxy request switching
CN103034499A (en) * 2012-12-13 2013-04-10 中国航空无线电电子研究所 General data format conversion method and system for network data transmission of airborne equipment
CN110764935A (en) * 2019-10-28 2020-02-07 天津津航计算技术研究所 Method for efficiently transferring messages among tasks based on real-time operating system
CN111506581A (en) * 2020-06-17 2020-08-07 北京北龙超级云计算有限责任公司 Data aggregation method and server

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
a scalable array storage for efficient maintenance of future data;Mehnuma Tabassum Omar等;the journal of supercomputing;6540-6565 *
Key-Value型NoSQL本地存储系统研究;马文龙;朱妤晴;蒋德钧;熊劲;张立新;孟潇;包云岗;;计算机学报;第41卷(第08期);1722-1751 *
云边协同的调控云数据质量优化;李大鹏等;电力系统及其自动化学报;第34卷(第3期);11-19 *
闪存数据库:现状、技术与展望;王江涛;赖文豫;孟小峰;;计算机学报;第36卷(第08期);1549-1567 *

Also Published As

Publication number Publication date
CN113609124A (en) 2021-11-05

Similar Documents

Publication Publication Date Title
CN102508784B (en) Data storage method of flash memory card in video monitoring equipment, and system thereof
CN109564502B (en) Processing method and device applied to access request in storage device
CN107797933B (en) Method and device for generating simulation message
CN107133144A (en) A kind of dynamic monitoring heap memory uses wrong internal memory monitoring device and method
CN104951482B (en) A kind of method and device of the image file of operation Sparse formats
CN114237714A (en) Command packet generation method and device, electronic equipment and storage medium
EP0386719B1 (en) Partial store control circuit
CN111291022A (en) Data storage system based on block chain
CN114741449A (en) Object storage method and device based on distributed database
CN113609124B (en) Data record storage method and system with expandability
CN114490023A (en) High-energy physical calculable storage device based on ARM and FPGA
US20090150137A1 (en) Method for generating performance evaluation model
CN101751311B (en) Request processing device, request processing system, and access testing method
CN108334453B (en) File debugging method and device, terminal equipment and storage medium
CN116561091A (en) Log storage method, device, equipment and readable storage medium
CN115756556A (en) BIOS updating method based on graphic processor
CN115185458A (en) Data writing method and device, storage medium and computer equipment
CN112948336B (en) Data acceleration method, cache unit, electronic device and storage medium
CN103345377A (en) FIFO storer control method and device
CN115470235A (en) Data processing method, device and equipment
CN110955383A (en) Data storage device and non-volatile memory control method
US20220229932A1 (en) Method for performing multi-system log access management, associated system on chip integrated circuit and non-transitory computer-readable medium
JP4696500B2 (en) Memory management method and apparatus
CN115993938B (en) Disk formatting method, apparatus, device and computer readable storage medium
CN116301602A (en) Data recording or reading method and device, acquisition equipment, vehicle and medium

Legal Events

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