CN109739858B - ANSI C12.19-based data classification storage method and device and electronic equipment - Google Patents

ANSI C12.19-based data classification storage method and device and electronic equipment Download PDF

Info

Publication number
CN109739858B
CN109739858B CN201811641278.1A CN201811641278A CN109739858B CN 109739858 B CN109739858 B CN 109739858B CN 201811641278 A CN201811641278 A CN 201811641278A CN 109739858 B CN109739858 B CN 109739858B
Authority
CN
China
Prior art keywords
data
stored
sub
storage
ansi
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
CN201811641278.1A
Other languages
Chinese (zh)
Other versions
CN109739858A (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.)
Holley Technology Co Ltd
Original Assignee
Holley Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Holley Technology Co Ltd filed Critical Holley Technology Co Ltd
Priority to CN201811641278.1A priority Critical patent/CN109739858B/en
Publication of CN109739858A publication Critical patent/CN109739858A/en
Application granted granted Critical
Publication of CN109739858B publication Critical patent/CN109739858B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a data classification storage method, a data classification storage device and electronic equipment based on ANSI C12.19, which relate to the technical field of data storage and comprise the following steps: acquiring a table to be stored; the table to be stored is a functional table defined by ANSI C12.19 communication protocol; the table to be stored comprises a plurality of data to be stored; identifying data types of the plurality of data to be stored in the table to be stored; and storing the data to be stored in the storage space according to the data type. The invention is convenient for communication to apply table operation, and greatly increases readability, portability and expandability of table firmware codes.

Description

ANSI C12.19-based data classification storage method and device and electronic equipment
Technical Field
The invention relates to the technical field of data storage, in particular to a data classification storage method and device based on ANSI C12.19 and electronic equipment.
Background
Currently, the communication protocol adopted by most electric energy meters is the ANSI communication protocol, wherein ANSI C12.19 mainly defines the application content of transmission data as a utility terminal device meter. ANSI C12.19 classifies the data function content, and defines various function table types, namely Decode 00 (configuration table), Decode 10 (data source table), Decode 20 (register table), Decode 30 (local display table), Decode 40 (safety table), Decode 50 (time-of-use (TOU) table), Decode 60 (load curve table), Decode 70 (historical event table) and Decode 80 (user-defined table). Each Decode xx (Table class) manages 10 tables. The 1 st table of each Decade defines the limit value under the table class, the 2 nd table of each Decade defines the actual value under the table class, the actual value is limited by the limit value, and other tables of the Decade operate based on the actual value range.
However, the ANSI C12.19 protocol is a table-based protocol without data identification, which is very different from the DL/T645 protocol or the IEC DLMS protocol. If the ANSI C12.19 TABLE is not classified and stored, the readability of the firmware of the meter is affected, the realization function of the interface is disordered, and the upgradability is poor.
Disclosure of Invention
In view of this, the present invention provides a data classification storage method, device and electronic device based on ANSI C12.19, which facilitates application of table operation by communication, and greatly increases readability, portability and extensibility of table firmware codes.
In a first aspect, an embodiment of the present invention provides a data classification storage method based on ANSI C12.19, including:
acquiring a table to be stored; the table to be stored is a functional table defined by ANSI C12.19 communication protocol; the table to be stored comprises a plurality of data to be stored;
identifying data types of the plurality of data to be stored in the table to be stored;
and storing the data to be stored in the storage space according to the data type.
With reference to the first aspect, an embodiment of the present invention provides a first possible implementation manner of the first aspect, where identifying data types of the multiple pieces of data to be stored in the table to be stored includes:
identifying data types of the data to be stored in the table to be stored by utilizing a plurality of classifiers.
With reference to the first aspect, an embodiment of the present invention provides a second possible implementation manner of the first aspect, where storing the multiple data to be stored in the storage space according to the data type includes:
dividing the data to be stored into sub-tables according to the data types;
adding a data structure of a classifier corresponding to a data type to the data in the sub-table;
storing the sub-table in a storage space according to the data structure.
With reference to the first aspect, an embodiment of the present invention provides a third possible implementation manner of the first aspect, where before the step of dividing the plurality of data to be stored into the sub-tables according to the data types, the method further includes:
identifying whether the data types of the data to be stored in the table to be stored are consistent;
if yes, adding a data structure of a classifier corresponding to the data type to the data to be stored in the table to be stored;
storing the table to be stored in a storage space according to the data structure;
if not, dividing the data to be stored into sub-tables according to the data types.
With reference to the first aspect, an embodiment of the present invention provides a fourth possible implementation manner of the first aspect, where the storage space includes a plurality of first storage subspaces and a plurality of second storage subspaces, where the first storage subspaces are storage subspaces in which data is stored, and the second storage subspaces are storage subspaces in which data is not stored, and according to the data structure, storing the sub-table in the storage space includes:
matching the data structure of the sub-table with a storage subspace governed by a classifier;
and when the matching is successful, storing the sub-table in the first storage sub-space successfully matched with the sub-table.
With reference to the first aspect, an embodiment of the present invention provides a fifth possible implementation manner of the first aspect, where after the step of matching the data structure in the storage space with the data structure corresponding to the sub-table, the method further includes:
and when the matching is unsuccessful, defining the second storage subspace as the storage subspace of the classifier corresponding to the sub-table, and storing.
With reference to the first aspect, an embodiment of the present invention provides a sixth possible implementation manner of the first aspect, where before the step of identifying, by using multiple classifiers, data types of the multiple data to be stored in the table to be stored, the method further includes:
classifying a plurality of tables to be stored under an ANSI C12.19 protocol, and determining a plurality of classifiers.
In a second aspect, an embodiment of the present invention further provides a data classification storage apparatus based on ANSI C12.19, including:
the acquisition module is used for acquiring a table to be stored; the table to be stored is a functional table defined by ANSI C12.19 communication protocol; the table to be stored comprises a plurality of data to be stored;
the identification module is used for identifying the data types of the data to be stored in the table to be stored;
and the storage module is used for storing the data to be stored in the storage space according to the data type.
In a third aspect, an embodiment of the present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program that is executable on the processor, and the processor implements the steps of the method in any one of the foregoing embodiments when executing the computer program.
In a fourth aspect, the present invention further provides a computer-readable medium having a non-volatile program code executable by a processor, where the program code causes the processor to execute the method of any one of the above embodiments.
The embodiment of the invention has the following beneficial effects: the table to be stored is obtained and is a functional table defined by an ANSI C12.19 communication protocol, the table to be stored comprises a plurality of data to be stored, the data types of the data to be stored in the table to be stored are identified, and the data to be stored are stored in the storage space according to the data types.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a data classification storage method based on ANSI C12.19 according to an embodiment of the present invention;
FIG. 2 is a flow chart of a process for storing by data type according to an embodiment of the present invention;
FIG. 3 is a block diagram of an ANSI C12.19 based data classification storage device according to an embodiment of the present invention;
fig. 4 is a structural diagram of a memory module in the data classification storage device based on ANSI C12.19 according to the embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Currently, the communication protocol adopted by most electric energy meters is the ANSI communication protocol, wherein ANSI C12.19 mainly defines the application content of transmission data as a utility terminal device meter. ANSI C12.19 classifies the data function content, and defines various function table types, namely Decode 00 (configuration table), Decode 10 (data source table), Decode 20 (register table), Decode 30 (local display table), Decode 40 (safety table), Decode 50 (time-of-use (TOU) table), Decode 60 (load curve table), Decode 70 (historical event table) and Decode 80 (user-defined table). Each Decode xx (Table class) manages 10 tables. The 1 st table of each Decade defines the limit value under the table class, the 2 nd table of each Decade defines the actual value under the table class, the actual value is limited by the limit value, and other tables of the Decade operate based on the actual value range.
However, the ANSI C12.19 protocol is a table-based protocol without data identification, which is very different from the DL/T645 protocol or the IEC DLMS protocol. If the ANSI C12.19 TABLE is not classified and stored, the readability of the firmware of the meter is affected, the realization function of the interface is disordered, and the upgradability is poor.
Based on this, the data classified storage method, device and electronic device based on the ANSI C12.19 provided by the embodiments of the present invention can obtain the table to be stored, where the table to be stored is the function table defined by the ANSI C12.19 communication protocol, the table to be stored includes a plurality of data to be stored, then identify the data types of the plurality of data to be stored in the table to be stored, and store the plurality of data to be stored in the storage space according to the data types.
For the understanding of the present embodiment, first, a detailed description will be given of a data classification storage method based on ANSI C12.19 disclosed in the embodiment of the present invention,
the embodiment of the invention provides a data classification storage method based on ANSI C12.19, which is shown in a combined figure 1 and comprises the following steps:
s110: and acquiring the table to be stored.
Since the present invention modifies the function table stored under the existing ANSI communication protocol to store data according to the data type, the table to be stored in step S110 is the function table defined by the ANSI C12.19 communication protocol, where. In practical application, the ANSI C12.19 communication protocol is mostly used for electric energy meter communication reduction, so the table to be stored includes a plurality of data to be stored. The table to be stored can be stored in a storage space of the electric energy meter, for example, a main chip internal RAM, a main chip internal ROM, an external EEPROM storage chip and an external FLASH storage chip.
S120: and identifying the data types of a plurality of data to be stored in the table to be stored.
In step S120, a plurality of classifiers may be used to identify data types of the plurality of data to be stored in the table to be stored. In addition, a plurality of tables to be stored under the ANSI C12.19 protocol are classified, and a plurality of classifiers are determined.
It can be understood that, when a table to be stored in a functional storage is initially converted to be stored according to a data type, it is necessary to classify a plurality of tables to be stored under the ANSI C12.19 protocol, determine classifiers, that is, determine classifiers in total according to data types of data in the plurality of tables to be stored under the ANSI C12.19 protocol, and then specifically identify data types of the plurality of data to be stored in the tables to be stored through the classifiers. For example, the classifier can be a constant class table, a variable class table, a small parameter class table, a large parameter class table, a small data storage class table, or a large data storage class table. Then, the classifiers are utilized to specifically identify the table to be stored.
As an example, a plurality of tables to be stored under the ANSI C12.19 protocol are classified, and a classifier is determined. Table1 introduces a table to be stored under ANSI C12.19 protocol, which may be: TABLE00, TABLE10, TABLE20, TABLE30, TABLE40, TABLE50, TABLE60, TABLE70, TABLE23, TABLE28, TABLE55, TABLE11, TABLE21, TABLE31, TABLE41, TABLE51, TABLE61, TABLE71, TABLE54, TABLE26_0, TABLE76_0, TABLE26_1, TABLE64_1, and TABLE76_1, although these TABLEs are not all functional TABLEs under ANSI C12.19 protocol, and the above TABLEs are given as examples only. The table can be judged by attributes, and the classifier is determined as follows: the table comprises a constant class table, a variable class table, a small parameter class table, a large parameter class table, a small data storage class table and a large data storage class table.
Figure BDA0001931171680000071
Figure BDA0001931171680000081
S130: and storing a plurality of data to be stored in the storage space according to the data types.
Step S130 may be performed as follows: as shown in connection with figure 2 of the drawings,
step S1301: and dividing the data to be stored into sub-tables according to the data types. It can be understood here how many data types are present, how many data to be stored can be divided into sub-tables.
Step S1302: and adding a data structure of the classifier corresponding to the data type to the data in the sub-table. Each classifier can only classify one data type, and the corresponding classifier has a data structure, and the data structure can be added into the data of the sub-table classified by the classifier. For example, when the classifier is to divide the constant class data, the data structure corresponding to the classifier is ROM, so that the ROM is added to the constant class data divided by the classifier, wherein the form may be: XXX-ROM.
Step S1303: the sub-table is stored in the storage space according to the data structure.
Wherein, the storage space includes a plurality of first storage subspaces and a plurality of second storage subspaces, the first storage subspaces are storage subspaces in which data are stored, the second storage subspaces are storage subspaces in which data are not stored, step 3 can be executed according to the following manner:
and matching the data structure of the sub-table with the storage subspace governed by the classifier.
When the matching is successful, the sub-table is stored in the first storage subspace, which is successfully matched with the sub-table.
And when the matching is unsuccessful, defining the second storage subspace as the storage subspace of the classifier corresponding to the sub-table, and storing.
Specifically, when the storage space has a plurality of storage areas, some of which store data and some of which do not store data, in the present invention, the storage subspace storing data is referred to as a first storage subspace, and the storage subspace not storing data is referred to as a second storage subspace. In the process of storing the sub-tables, when the data structure of the data of the sub-tables has a storage sub-space, the data structure is stored in a first storage sub-space, and when one of the plurality of storage sub-spaces does not have the data structure of the sub-tables, the data structure is defined as a second storage sub-space to be stored in the storage sub-space of the classifier corresponding to the sub-table.
For step S130, as an example:
according to the data types, a plurality of data to be stored are divided into sub-TABLEs, in TABLE2, the TABLE to be stored TABLE26 is divided into two sub-TABLEs, namely TABLE26_0 and TABLE26_1, and the TABLE to be stored TABLE76 is divided into two sub-TABLEs, namely TABLE76_0 and TABLE76_ 1. The classifier for identifying the table can be a classifier for identifying a small data storage class and a classifier for identifying a large data storage class.
TABLE2
Figure BDA0001931171680000101
Figure BDA0001931171680000111
The data structure of the CLASSIFIER corresponding to the data type is added to the data in the sub-table, wherein, as shown in table3, the data structure of the sub-table classified by the constant class table CLASSIFIER is STRUCT _ CLASSIFIER1, the data structure of the sub-table classified by the variable class table CLASSIFIER is STRUCT _ CLASSIFIER2, the data structure of the sub-table classified by the small parameter class table CLASSIFIER is STRUCT _ CLASSIFIER3, the data structure of the sub-table classified by the large parameter class table CLASSIFIER is STRUCT _ CLASSIFIER4, the data structure of the sub-table classified by the small data storage class table CLASSIFIER is STRUCT _ CLASSIFIER5, and the data structure of the sub-table classified by the large data storage class table CLASSIFIER is STRUCT _ CLASSIFIER 6.
TABLE3
Classifier Data structure
Constant class tables STRUCT_CLASSIFIER1
Variable class table STRUCT_CLASSIFIER2
Small parameter class form STRUCT_CLASSIFIER3
Large parameter class table STRUCT_CLASSIFIER4
Small data storage class table STRUCT_CLASSIFIER5
Big data storage class table STRUCT_CLASSIFIER6
Storing the sub-table in the storage space according to the data structure, wherein the data structure of the sub-table corresponds to the storage space as shown in table4, and when the data structure of the sub-table is STRUCT _ CLASSIFIER1, the data structure of the sub-table is stored in CLASSIFIER1_ ROM, and so on.
TABLE4
Figure BDA0001931171680000121
In addition, because the data in the function table defined by the ANSI C12.19 communication protocol may have the data types consistent, the data can be directly stored without disassembling the molecular table, so that the operation speed can be improved by adding a step of identifying whether the data types of the table to be stored are consistent, in the invention, the method specifically comprises the following steps:
identifying whether the data types of the data to be stored in the table to be stored are consistent;
if so, adding a data structure of a classifier corresponding to the data type to the plurality of data to be stored in the table to be stored;
and storing the table to be stored in a storage space according to the data structure. In this step, the data structure of the table to be stored may be specifically matched with the storage subspace governed by the classifier. And when the matching is successful, storing the table to be stored in the first storage subspace successfully matched with the sub-tables. And when the matching is unsuccessful, defining the second storage subspace as the storage subspace of the classifier corresponding to the table to be stored, and storing.
If not, steps S1301-S1303 are executed.
Based on the data classification storage method based on ANSI C12.19 described in the foregoing embodiment, correspondingly, an embodiment of the present invention further provides a data classification storage apparatus based on ANSI C12.19, which is shown in fig. 3, and includes:
an obtaining module 310, configured to obtain a table to be stored; the table to be stored is a functional table defined by ANSI C12.19 communication protocol; the table to be stored comprises a plurality of data to be stored;
an identifying module 320, configured to identify data types of the plurality of data to be stored in the table to be stored;
the storage module 330 is configured to store the multiple data to be stored in the storage space according to the data type.
Optionally, the identifying module 320 is configured to identify data types of the data to be stored in the table to be stored by using a plurality of classifiers.
Optionally, the storage module 330 includes:
the dividing sub-module 3301 is configured to divide a plurality of data to be stored into sub-tables according to data types;
a first adding sub-module 3302, configured to add a data structure of a classifier corresponding to a data type to the data in the sub-table;
a first storage submodule 3303, configured to store the sub-table in the storage space according to the data structure.
Optionally, the apparatus further comprises:
the identification submodule is used for identifying whether the data types of the data to be stored in the table to be stored are consistent or not;
a second adding submodule, configured to add, if yes, a data structure of a classifier corresponding to a data type to the plurality of data to be stored in the table to be stored;
the second storage submodule is used for storing the table to be stored in a storage space according to the data structure;
and the first adding submodule is used for dividing the data to be stored into the sub-tables according to the data types if the data types are not the same.
Optionally, the storage space includes a plurality of first storage sub-spaces and a plurality of second storage sub-spaces, the first storage sub-spaces are storage sub-spaces in which data is stored, the second storage sub-spaces are storage sub-spaces in which data is not stored, and the first storage sub-module is configured to:
matching the data structure of the sub-table with a storage subspace governed by a classifier;
and when the matching is successful, storing the sub-table in the first storage sub-space successfully matched with the sub-table.
Optionally, after matching the data structure in the storage space with the data structure corresponding to the sub-table, the first storage sub-module is further configured to:
and when the matching is unsuccessful, defining the second storage subspace as the storage subspace of the classifier corresponding to the sub-table, and storing.
Optionally, the apparatus further comprises:
and the determining module is connected with the identifying module 320 and is used for classifying the tables to be stored under the ANSI C12.19 protocol and determining the classifiers.
The device provided by the embodiment of the present invention has the same implementation principle and technical effect as the method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the method embodiments without reference to the device embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The embodiment of the present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program that can be executed on the processor, and the processor implements the steps of the method according to any one of the above embodiments when executing the computer program.
The Memory may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory.
The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable medium having a non-volatile program code executable by a processor, where the program code enables the processor to execute any one of the methods in the foregoing embodiments, and specific implementation may refer to the method embodiment, which is not described herein again.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Unless specifically stated otherwise, the relative steps, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present invention.
In all examples shown and described herein, any particular value should be construed as merely exemplary, and not as a limitation, and thus other examples of example embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (7)

1. A data classification storage method based on ANSI C12.19 is characterized by comprising the following steps:
acquiring a table to be stored; the table to be stored is a functional table defined by ANSI C12.19 communication protocol; the table to be stored comprises a plurality of data to be stored;
identifying data types of the plurality of data to be stored in the table to be stored;
storing the data to be stored in a storage space according to the data type;
identifying data types of the plurality of data to be stored in the table to be stored, including:
identifying data types of the data to be stored in the table to be stored by utilizing a plurality of classifiers;
storing the plurality of data to be stored in a storage space according to the data type, including:
dividing the data to be stored into sub-tables according to the data types;
adding a data structure of a classifier corresponding to a data type to the data in the sub-table;
storing the sub-table in a storage space according to the data structure, wherein the data structure of the sub-table is matched with the storage sub-space governed by the classifier, when the matching is successful, the sub-table is stored in a first storage sub-space successfully matched with the sub-table, and when the matching is unsuccessful, the sub-table is stored in a second storage sub-space;
identifying whether the data types of the data to be stored in the table to be stored are consistent;
if yes, adding a data structure of a classifier corresponding to the data type to the data to be stored in the table to be stored;
storing the table to be stored in a storage space according to the data structure;
if not, dividing the data to be stored into sub-tables according to the data types.
2. The ANSI C12.19-based data classification storage method according to claim 1, wherein the storage space comprises a plurality of first storage subspaces and a plurality of second storage subspaces, the first storage subspaces are storage subspaces in which data are stored, the second storage subspaces are storage subspaces in which no data are stored, and the storing the sub-tables in the storage space according to the data structure comprises:
matching the data structure of the sub-table with a storage subspace governed by a classifier;
and when the matching is successful, storing the sub-table in the first storage sub-space successfully matched with the sub-table.
3. The ANSI C12.19 based data classification storage method of claim 2, wherein after the step of matching the data structure in the storage space with the data structure corresponding to the sub-table, the method further comprises:
and when the matching is unsuccessful, defining the second storage subspace as the storage subspace of the classifier corresponding to the sub-table, and storing.
4. The ANSI C12.19 based data classification storage method of claim 1, wherein prior to the step of identifying the data types of the plurality of data to be stored in the table to be stored using a plurality of classifiers, the method further comprises:
classifying a plurality of tables to be stored under an ANSI C12.19 protocol, and determining a plurality of classifiers.
5. An ANSI C12.19 based data classification storage device, comprising:
the acquisition module is used for acquiring a table to be stored; the table to be stored is a functional table defined by ANSI C12.19 communication protocol; the table to be stored comprises a plurality of data to be stored;
the identification module is used for identifying the data types of the data to be stored in the table to be stored;
the storage module is used for storing the data to be stored in a storage space according to the data type;
the identification module is further used for identifying the data types of the data to be stored in the table to be stored by utilizing a plurality of classifiers;
the storage module further comprises: the dividing submodule is used for dividing a plurality of data to be stored into sub-tables according to the data types;
the first adding sub-module is used for adding a data structure of a classifier corresponding to the data type to the data in the sub-table;
the first storage sub-module is used for storing the sub-table in a storage space according to the data structure, wherein the data structure of the sub-table is matched with the storage sub-space governed by the classifier, when the matching is successful, the sub-table is stored in the first storage sub-space successfully matched with the sub-table, and when the matching is unsuccessful, the sub-table is stored in the second storage sub-space;
the data classification storage device further comprises:
the identification submodule is used for identifying whether the data types of the data to be stored in the table to be stored are consistent or not;
a second adding submodule, configured to add, if yes, a data structure of a classifier corresponding to a data type to the plurality of data to be stored in the table to be stored;
the second storage submodule is used for storing the table to be stored in a storage space according to the data structure;
and the first adding submodule is used for dividing the data to be stored into the sub-tables according to the data types if the data types are not the same.
6. An electronic device comprising a memory and a processor, wherein the memory stores a computer program operable on the processor, and wherein the processor implements the steps of the method of any of claims 1 to 4 when executing the computer program.
7. A computer-readable medium having non-volatile program code executable by a processor, wherein the program code causes the processor to perform the method of any of claims 1-4.
CN201811641278.1A 2018-12-29 2018-12-29 ANSI C12.19-based data classification storage method and device and electronic equipment Active CN109739858B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811641278.1A CN109739858B (en) 2018-12-29 2018-12-29 ANSI C12.19-based data classification storage method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811641278.1A CN109739858B (en) 2018-12-29 2018-12-29 ANSI C12.19-based data classification storage method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN109739858A CN109739858A (en) 2019-05-10
CN109739858B true CN109739858B (en) 2021-08-17

Family

ID=66362546

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811641278.1A Active CN109739858B (en) 2018-12-29 2018-12-29 ANSI C12.19-based data classification storage method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN109739858B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110286909B (en) * 2019-06-29 2023-01-24 潍柴动力股份有限公司 Statistical method and device for resource use data of Simulink model

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101615193A (en) * 2009-07-07 2009-12-30 北京大学 A kind of based on the integrated inquiry system of encyclopaedia data extract
GB201409214D0 (en) * 2014-05-23 2014-07-09 Ibm A method and system for processing a data set
CN106294520B (en) * 2015-06-12 2019-11-12 微软技术许可有限责任公司 Carry out identified relationships using the information extracted from document
CN105630734A (en) * 2015-12-28 2016-06-01 深圳市科陆电子科技股份有限公司 Configuration method and device for ex-factory parameters of power equipment terminal
CN106777265B (en) * 2016-12-28 2020-06-19 新奥科技发展有限公司 Service data processing method and device
CN107633008A (en) * 2017-08-10 2018-01-26 阿里巴巴集团控股有限公司 Web project data processing method, device, server and system

Also Published As

Publication number Publication date
CN109739858A (en) 2019-05-10

Similar Documents

Publication Publication Date Title
CN108388598B (en) Electronic device, data storage method, and storage medium
CN110445860B (en) Message sending method, device, terminal equipment and storage medium
CN108376364B (en) Payment system account checking method and device and terminal device
CN109271611B (en) Data verification method and device and electronic equipment
CN110807080A (en) Commodity coding method and device
CN110599354A (en) Online reconciliation method, system, computer device and computer-readable storage medium
CN108920592B (en) Database field association method and device
CN109739858B (en) ANSI C12.19-based data classification storage method and device and electronic equipment
CN111092880B (en) Network traffic data extraction method and device
CN110766160A (en) Data verification method and device, storage medium and electronic equipment
CN111966712A (en) Data processing method, device, server and storage medium
CN110851113A (en) Method and device for detecting randomness of byte sequence, storage medium and electronic equipment
CN109918385A (en) Tripartite's account checking method, electronic device and readable storage medium storing program for executing
CN114003796A (en) Industrial control asset discovery method and device and electronic equipment
CN110852091B (en) Method, device, electronic equipment and computer readable medium for monitoring wrongly written characters
CN112085588A (en) Method and device for determining safety of rule model and data processing method
CA2956155A1 (en) Methods and apparatus for comparing different types of data
CN115643172A (en) Abnormity detection method, abnormity detection device, terminal equipment and storage medium
CN104636377A (en) Data compression method and equipment
CN108665020B (en) Marking method and device for substrate
CN110913353B (en) Short message classification method and device
CN110119337B (en) Data analysis method and device and server
CN113128848A (en) Data quality monitoring method for full-service index, electronic equipment and storage medium
CN113392105B (en) Service data processing method and terminal equipment
CN110751204A (en) Data fusion method and device, storage medium and electronic device

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