CN110489439B - Parameter processing method and power terminal - Google Patents

Parameter processing method and power terminal Download PDF

Info

Publication number
CN110489439B
CN110489439B CN201910866921.9A CN201910866921A CN110489439B CN 110489439 B CN110489439 B CN 110489439B CN 201910866921 A CN201910866921 A CN 201910866921A CN 110489439 B CN110489439 B CN 110489439B
Authority
CN
China
Prior art keywords
parameter
target
storage unit
changed
type
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
CN201910866921.9A
Other languages
Chinese (zh)
Other versions
CN110489439A (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.)
Ningbo Sanxing Medical and Electric Co Ltd
Original Assignee
Ningbo Sanxing Medical and Electric 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 Ningbo Sanxing Medical and Electric Co Ltd filed Critical Ningbo Sanxing Medical and Electric Co Ltd
Priority to CN201910866921.9A priority Critical patent/CN110489439B/en
Publication of CN110489439A publication Critical patent/CN110489439A/en
Application granted granted Critical
Publication of CN110489439B publication Critical patent/CN110489439B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/23Updating
    • G06F16/2358Change logging, detection, and notification
    • 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/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification

Abstract

The invention provides a parameter processing method and an electric power terminal, and relates to the technical field of data processing. The parameter processing method is applied to a processor of an electric power terminal, and comprises the steps of receiving a target parameter changing instruction, wherein the target parameter changing instruction comprises a target parameter to be changed, then determining the type of the target parameter to be changed according to the target parameter to be changed and a preset parameter configuration table, wherein the preset parameter configuration table comprises the corresponding relation between the target parameter to be changed and the parameter type, then determining a target parameter storage unit according to the type of the target parameter to be changed, changing the target parameter stored in the target parameter storage unit according to the target parameter changing instruction, and finally synchronizing the changed target parameter to the parameter backup unit for backup. The parameter processing method and the power terminal provided by the invention have the advantages of higher execution efficiency and effectively reduced memory overhead of the parameter backup unit.

Description

Parameter processing method and power terminal
Technical Field
The invention relates to the technical field of data processing, in particular to a parameter processing method and an electric power terminal.
Background
With the continuous promotion of the informatization transformation of the power system, the usage amount of the power terminal concentrator in the meter reading system is continuously increased. As many as dozens of various configuration parameters exist in the concentrator, and the parameters control the power terminals such as the concentrator together, so that the concentrator can operate stably for a long time according to the designed inherent scheme. But all parameters in the concentrator are not invariable, and relevant parameter values in the concentrator are dynamically modified according to the requirements of each region. It becomes crucial how to correctly and efficiently modify and manage these parameters.
For modification of parameters in the power terminal, currently, a commonly adopted processing scheme is as follows:
the method comprises the steps of establishing a parameter file in an external storage unit through a file system, and simultaneously backing up a parameter in a memory. When the parameters need to be modified, the backup parameters in the memory are modified, and when all the parameters to be modified are modified in the memory, the backup parameters in the memory are integrally synchronized into the parameter file in the external storage.
Although the existing scheme can modify parameters of the power terminal, due to the fact that the parameters are more in variety, when the parameters need to be modified each time, the parameters need to be modified and stored in the memory, and then the modified parameters are synchronized to the external storage, so that the content stored in the memory is more, the memory cost is higher, and the execution efficiency is lower.
Disclosure of Invention
The present invention provides a parameter processing method to solve the problems of large memory overhead and low execution efficiency in the parameter processing process in the prior art.
Another objective of the present invention is to provide a power terminal, so as to solve the problems of large memory overhead and low execution efficiency in the parameter processing process in the prior art.
To solve the above problem, the present application is implemented as follows:
on one hand, the embodiment of the application provides a parameter processing method, which is applied to a controller of an electric power terminal, wherein the electric power terminal further comprises a parameter backup unit and a plurality of parameter storage units, each parameter storage unit is connected with the parameter backup unit, the controller is respectively connected with the parameter backup unit and the plurality of parameter storage units, and each parameter storage unit is used for storing different types of data; the parameter processing method comprises the following steps:
receiving a target parameter changing instruction, wherein the target parameter changing instruction comprises a target parameter to be changed;
determining the type of the target parameter to be changed according to the target parameter to be changed and a preset parameter configuration table, wherein the preset parameter configuration table comprises a corresponding relation between the target parameter to be changed and the type of the parameter;
determining a target parameter storage unit according to the type of the target parameter to be changed, and changing the target parameter stored in the target parameter storage unit according to the target parameter changing instruction;
and synchronizing the changed target parameters to the parameter backup unit for backup.
Further, the target parameter to be changed is provided with an identification code, and the step of determining the type of the target parameter to be changed according to the target parameter to be changed and a preset parameter configuration table includes:
determining the type of the target parameter according to the identification code of the target parameter and a preset parameter configuration table; and the parameter configuration table comprises the corresponding relation between the identification code and the parameter type.
Further, the step of determining the type of the target parameter according to the identification code of the target parameter and a preset parameter configuration table includes:
determining the intermediate category to which the target parameter belongs according to the identification code of the target parameter and the parameter configuration table;
determining the type of the target parameter according to the intermediate class to which the target parameter belongs and the parameter configuration table; the parameter configuration table comprises the corresponding relation between the identification code and the intermediate type and the corresponding relation between the intermediate type and the parameter type.
Further, the plurality of parameter storage units comprise a first parameter storage unit, a second parameter storage unit and a third parameter storage unit, and the types of the target parameters to be changed comprise a first type of parameters, a second type of parameters and a third type of parameters;
the step of determining a target parameter storage unit according to the type of the target parameter to be changed comprises the following steps:
when the type of the target parameter to be changed is a first type parameter, determining the first parameter storage unit as a target parameter storage unit;
when the type of the target parameter to be changed is a second type parameter, determining that the second parameter storage unit is a target parameter storage unit;
and when the type of the target parameter to be changed is a third type parameter, determining that the third parameter storage unit is a target parameter storage unit.
Further, the first parameter storage unit is a database, the second parameter storage unit is an rsv file, the third parameter storage unit is a self file, and the types of the target parameters to be changed include common parameters, important parameters which are easy to change and important parameters which are not easy to change;
the step of determining a target parameter storage unit according to the type of the target parameter to be changed comprises the following steps:
when the type of the target parameter to be changed is a common parameter, determining the database as a target parameter storage unit;
when the type of the target parameter to be changed is an important parameter which is easy to change, determining the rsv file as a target parameter storage unit;
and when the type of the target parameter to be changed is an important parameter which is not easy to change, determining the self file as a target parameter storage unit.
Further, the power terminal is provided with a binary conversion tool, and the parameter processing method further includes:
parameters stored in rsv files are converted into each other with parameters stored in a database by a binary conversion tool.
Further, the parameter processing method further includes:
receiving a target parameter reading instruction, wherein the target parameter reading instruction comprises bytes of target parameters to be read;
when the parameters in any one parameter storage unit are read according to the target parameter reading instruction, the bytes of the read target parameters are obtained;
and when the bytes of the read target parameters are not equal to the bytes of the target parameters to be read, judging that the reading of the parameters fails.
Further, the parameter processing method further includes:
and when a synchronization instruction is received, sending the data stored in the parameter backup unit to one or more parameter storage units.
On the other hand, an embodiment of the present application further provides an electric power terminal, where the electric power terminal includes a controller, a parameter backup unit, and a plurality of parameter storage units, the controller is connected to the parameter backup unit and the plurality of parameter storage units, each parameter storage unit is connected to the parameter backup unit, and each parameter storage unit is used to store different types of data, where;
the controller is used for receiving a target parameter changing instruction, wherein the target parameter changing instruction comprises a target parameter to be changed;
the controller is further configured to determine a type of the target parameter to be changed according to the target parameter to be changed and a preset parameter configuration table, where the preset parameter configuration table includes a corresponding relationship between the target parameter to be changed and the parameter type;
the controller is also used for determining a target parameter storage unit according to the type of the target parameter to be changed and changing the target parameter stored in the target parameter storage unit according to the target parameter changing instruction;
the parameter storage unit is used for synchronizing the changed target parameters to the parameter backup unit for backup.
Furthermore, the target parameters stored in the target parameter storage unit are all provided with safety codes, and when the target parameters are changed, the safety codes are correspondingly changed.
Now to prior art, this application has following beneficial effect:
the application provides a parameter processing method and an electric power terminal, wherein the parameter processing method is applied to a processor of the electric power terminal, the electric power terminal further comprises a parameter backup unit and a plurality of parameter storage units, each parameter storage unit is connected with the parameter backup unit, a controller is respectively connected with the parameter backup unit and the plurality of parameter storage units, and each parameter storage unit is used for storing different types of data. The method comprises the steps of receiving a target parameter changing instruction, determining the type of a target parameter to be changed according to the target parameter to be changed and a preset parameter configuration table, determining a target parameter storage unit according to the type of the target parameter to be changed, changing the target parameter stored in the target parameter storage unit according to the target parameter changing instruction, and finally synchronizing the changed target parameter to a parameter backup unit for backup. On one hand, the parameters are directly changed in the parameter storage unit, and then the changed parameters are backed up to the parameter backup unit, so that the parameters can be changed without waiting, and the execution efficiency is higher. On the other hand, because the parameters are classified, only the changed parameters need to be backed up, and data which is not changed does not need to be backed up, so that the memory overhead of the parameter backup unit is effectively reduced.
Drawings
Fig. 1 is a schematic block diagram of an electric power terminal according to an embodiment of the present disclosure.
Fig. 2 is a partial flowchart of a parameter processing method according to an embodiment of the present application.
Fig. 3 is a flowchart of a sub-step of S104 in fig. 2 according to an embodiment of the present disclosure.
Fig. 4 is a flowchart of another sub-step of S104 in fig. 2 according to an embodiment of the present application.
Fig. 5 is another partial flowchart of a parameter processing method according to an embodiment of the present application.
100-a power terminal; 110-a controller; 120-parameter storage unit; 130-parameter backup unit.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
At present, a parameter processing method for an electric power terminal generally comprises the following steps:
an external storage unit and a memory are arranged in the power terminal, wherein a parameter file is created in the external storage unit through a file system, and meanwhile a parameter backup is performed in the memory. When the parameters are to be changed, i.e. the parameters are to be added, deleted and modified, the backup parameters in the memory are changed first, and when all the parameters to be changed are modified in the memory, the backup parameters in the memory are integrally synchronized to the external storage unit. Although the scheme can change the parameters, the practical application has the problem of relatively large memory overhead, and the memory overhead is increased along with the increase of the types of the parameters, and the execution efficiency is low. Meanwhile, for the power terminal, all the parameters exist together, and the quantity of the parameters is large, so that the readability of the parameters is poor.
For example, in the conventional parameter processing scheme, when parameters need to be changed, for example, voltage parameters and current parameters need to be changed, after the data are changed in a memory, the entire data are synchronized to be stored outside, and each time data synchronization is performed, additional data, such as a terminal address, needs to be carried, so that each time parameter is changed, some important and difficultly-changed parameters need to be repeatedly stored, and when the parameter is used, the parameter is synchronized to an external storage unit after the parameter is changed, some difficultly-changed data are repeatedly stored in the memory, which causes the problems of high memory overhead and low execution efficiency.
First embodiment
Based on the problems of the prior art regarding the processing method of the parameters, the present application provides a new parameter processing method, which is applied to the controller 110 of the power terminal 100, wherein, referring to fig. 1, the power terminal 100 further includes a parameter backup unit 130 and a plurality of parameter storage units 120, each parameter storage unit 120 is connected to the parameter backup unit 130, the controller 110 is respectively connected to the parameter backup unit 130 and the plurality of parameter storage units 120, and each parameter storage unit 120 is used for storing different types of data. By the parameter processing method, the execution efficiency can be effectively improved in the parameter processing process, and meanwhile, the cost of the memory can be reduced in the parameter processing process.
As a possible implementation manner of the present application, please refer to fig. 2, a parameter processing method provided by the present application includes:
s102, a target parameter changing instruction is received, wherein the target parameter changing instruction comprises a target parameter to be changed.
When modification operations such as addition, deletion, and modification of parameters are required, a target parameter modification instruction needs to be sent to the power terminal 100 by a user, for example, the power terminal 100 is in communication connection with a server, and the user can send a target parameter modification quality to the power terminal 100 through the server.
In addition, the target parameter change instruction at least includes a target parameter to be changed, that is, a target parameter to be changed, for example, the target parameter to be changed is current information, voltage information, or the like.
S104, determining the type of the target parameter to be changed according to the target parameter to be changed and a preset parameter configuration table, wherein the preset parameter configuration table comprises the corresponding relation between the target parameter to be changed and the parameter type.
As an implementation manner of the present application, the power terminal 100 further includes a signal receiving unit, which is electrically connected to the controller 110, and is configured to receive the target parameter changing instruction and transmit the target parameter changing instruction to the controller 110 after receiving the target parameter changing instruction.
In the present application, a parameter configuration table is pre-stored in the controller 110, and the parameter configuration table includes a corresponding relationship between parameters and parameter types, for example, the voltage information belongs to a first type of parameter, the address information belongs to a second type of parameter, and the like. When the controller 110 receives the target parameter changing instruction, the type of the target parameter to be changed can be determined from the parameter configuration table according to the target parameter to be changed carried by the target parameter changing instruction.
S106, determining a target parameter storage unit according to the type of the target parameter to be changed, and changing the target parameter stored in the target parameter storage unit according to the target parameter changing instruction.
Since different parameter storage units 120 are used for storing different types of parameters, when the controller 110 determines the type of the target parameter to be changed, the target parameter storage unit 120 storing the type of parameter can be correspondingly determined, and then the target parameter stored in the target parameter storage unit 120 is changed. For example, the target parameter is voltage information, and the voltage information is stored in the target parameter storage unit 120, and the value of the voltage information stored at this time is 210V. At this time, the worker needs to modify the value of the voltage information to 220V, the content of the target parameter modification instruction may be "the voltage information is modified to 220V", when the controller 110 determines the type of the voltage information according to the upper voltage information, the target parameter storage unit 120 storing the voltage information may be determined, then the voltage information stored in the target parameter storage unit 120 is modified to 220V, and further, the modification of the parameters is completed quickly. Similarly, the addition or deletion of the parameter can be achieved in the same manner.
And S108, synchronizing the changed target parameters into a parameter backup unit for backup.
When the target parameter is modified, the controller 110 further controls the target parameter storage unit 120 to send the modified target parameter to the parameter backup unit 130 for backup.
It should be noted that, in the present application, the controller 110 only controls the modified parameters to be sent to the parameter backup unit 130 for backup, and for the unmodified parameters, since the parameters are already backed up in the parameter backup unit 130, it is not necessary to send the data to the parameter backup unit 130 again, so that the parameters stored in the parameter backup unit 130 are always the modified parameters, and the overhead of the memory is effectively reduced.
As a possible implementation manner, the plurality of parameter storage units 120 includes a first parameter storage unit, a second parameter storage unit, and a third parameter storage unit, where the first storage unit is used to store a first type of data, the second storage unit is used to store a second type of data, and the third storage unit is used to store a third type of data. The parameters are classified into three categories, and of course, in other embodiments, the parameters may be classified into more categories, which is not limited in this application.
Namely, S106 includes:
s106-1, when the type of the target parameter to be changed is the first type of parameter, determining that the first parameter storage unit is the target parameter storage unit.
S106-2, when the type of the target parameter to be changed is the second type parameter, determining that the second parameter storage unit is the target parameter storage unit.
S106-3, when the type of the target parameter to be changed is the third type parameter, determining that the third parameter storage unit is the target parameter storage unit.
After the type of the target parameter is determined through control, the target parameter storage unit can be correspondingly determined.
Further, as an implementation manner, the first parameter storage unit is a database, the second parameter storage unit is an rsv file, and the third parameter storage unit is a self file, and the parameters of the power terminal 100 are divided into the common parameters and the important parameters, and the important parameters are divided into the important parameters that are easy to change and the important parameters that are not easy to change. The database is used for storing common parameters, such as voltage information, current information and the like; rsv files are used to store important parameters that are subject to variation, such as communication parameters; the self file is used for storing important parameters which are not easy to change, such as terminal addresses.
In this implementation, S106 may specifically include:
s106-a, when the type of the target parameter to be changed is the common parameter, determining the database as a target parameter storage unit.
And S106-b, when the type of the target parameter to be changed is the variable important parameter, determining rsv the file as a target parameter storage unit.
And S106-c, when the type of the target parameter to be changed is an important parameter which is not easy to change, determining the self file as a target parameter storage unit.
Through adopting the mode of database and two unifications of file, realized the categorised storage to the parameter, on the one hand, through setting up different parameter memory cell 120, can carry out real-time processing to the parameter, can realize saving the parameter in database, rsv file or self file in real time, do not need other transfer operations, the executive efficiency who makes is high. In the second aspect, the readability of the parameters is better by classifying and storing the parameters, the parameters to be changed can be quickly positioned, and the time for positioning the parameters is saved. In the third aspect, important parameters are put into the rsv file and the self file, so that the operation of the power terminal 100 is more stable, and meanwhile, by classifying and storing the parameters, even if one of the parameters is damaged, all types of parameters are not damaged, and the safety of data storage is further improved.
Moreover, it should be noted that the csv file is distributed and stored according to the number of bytes occupied by each parameter in a parameter structure storage manner, has good intuitiveness in comparison with a binary storage manner of a database db file, supports direct modification, and can be consistent with parameters of an SDK (Software Development Kit) layer during compiling.
Meanwhile, in order to enable a worker to visually see the contents stored in the database, the power terminal 100 is installed with a system conversion tool to convert the data stored in the rsv file and the parameters stored in the database to each other. As an implementation mode, the system conversion tools are csv2db and db2csv tools, and the mutual conversion between the parameters stored in the database and the csv file storage parameters is realized, namely the storage parameters in the database are converted into 16 systems, or the 16 systems stored in rsv files are converted into binary parameters, so that the use of the parameters of an application layer and an SDK layer is realized, the effect of visually showing the database through the csv files is achieved, and the database form which is convenient to modify and compatible with the Linux system identification is realized.
Furthermore, the rsv file provided by the application can also be used for distinguishing types, regions, protocol type parameters and the like of different products, one set of codes can be used for distinguishing different region requirements, and the number of code versions is reduced. That is, codes suitable for a plurality of regions are integrated and stored in the rsv file. It will be appreciated that the code for each region has a fixed number, for example, code number 1 is a version of the code suitable for Beijing and code number 2 is a version of the code suitable for Jiangsu. Therefore, the rsv file is utilized to achieve the effects of really realizing the concepts of function configuration and generalization, reducing the maintenance amount and improving the working efficiency. For example, after the power terminal 100 is installed in beijing, a user may send a code version selection instruction to the power terminal 100, that is, only the code with the number 1 needs to be selected to implement the configuration of the power terminal 100 in beijing area, and it is not necessary to separately develop a single version corresponding to the area, thereby improving the work efficiency.
On the basis of the above implementation, the implementation manner of S102 includes three manners.
Firstly, the target parameter change instruction is sent and received in a message form, in this implementation manner, communication connection is implemented between the server and the power terminal 100, and the parameter change is implemented in a message form sent to the power terminal 100 by a server lamp. For example, the modification of the parameters in the database and rsv files is realized in the form of messages. Meanwhile, it should be noted that the parameters are modified in the form of a message, which is generally a single parameter.
Secondly, parameters in the database are directly modified, which may be in a remote form or in a field form, for example, at the site of the power terminal 100, a certain part of one parameter in the database is directly modified through the xShell background, so that the parameter modification is more efficient.
Thirdly, the parameters are modified through the liquid crystal on the power terminal 100, that is, the power terminal 100 is provided with a key, and through the content displayed on the liquid crystal, a user can select a certain parameter through a case, so as to further modify the parameter. Of course, the liquid crystal of the power terminal 100 may also be provided as a touch screen, which is not limited in this application.
On the basis of S104, please refer to fig. 3 as a possible implementation manner of the present application, where S104 includes:
s104-1, determining the type of the target parameter according to the identification code of the target parameter and a preset parameter configuration table; the parameter configuration table comprises the corresponding relation between the identification code and the parameter type.
Wherein each parameter stored by the power terminal 100 is provided with an identification code that can be used to determine the type of parameter. For example, the identification code of the parameter may be a, b, c, etc. representation that can be easily distinguished. Similarly, the target parameter is also provided with an identification code.
Meanwhile, the parameter configuration table pre-stored in the controller 110 actually includes a corresponding relationship between the identification code and the parameter type, for example, the parameter type corresponding to the parameter with the identification code a in the parameter configuration table is a common parameter, the parameter type corresponding to the parameter with the identification code b is an important parameter which is easy to change, the parameter type corresponding to the parameter with the identification code c is an important parameter which is not easy to change, and the type of the target parameter can be determined through the parameter configuration table and the identification code of the target parameter.
Since the number of parameters is large in practical use, the common parameters, the important parameters that are easy to change, and the important parameters that are not easy to change may include tens or hundreds of parameters, and thus, the time required for response is long when the parameters are determined.
Therefore, referring to fig. 4, as a possible implementation manner of the present application, S104-1 may include:
s104-2, determining the intermediate category of the target parameter according to the identification code of the target parameter and the parameter configuration table.
S104-3, determining the type of the target parameter according to the intermediate class to which the target parameter belongs and the parameter configuration table; the parameter configuration table comprises the corresponding relation between the identification code and the middle type and the corresponding relation between the middle type and the parameter type.
I.e. the common parameters, the important parameters which are easy to change and the important parameters which are not easy to change all comprise a plurality of intermediate categories, and each intermediate category corresponds to a plurality of identification codes, for example, for the common parameters, the intermediate categories comprise intermediate categories a1, a2 and A3, and the identification codes corresponding to a1 comprise a1, a2 and A3. At this time, if the target parameter is voltage information and the indication code corresponding to the voltage information is a1, the intermediate type to which the target parameter belongs can be determined to be a1 according to the identification code of the target parameter and the parameter configuration table, and meanwhile, the type of the target parameter can be determined according to the intermediate type to which the target parameter belongs and the parameter configuration table, so that the type of the target parameter can be determined more quickly.
As an implementation manner of the present application, the identifier of the parameter is an OAD, the controller 110 searches and determines which kind of parameter is in the parameter configuration table, if the parameter is a common parameter, the parameter is stored in the database according to the size sequence of the OAD, and the operations such as adding, deleting, modifying, and checking the parameter are performed according to the OAD.
Moreover, in order to ensure the correctness when reading the parameters, the present application further stores the corresponding parameters according to the JSON syntax, please refer to fig. 5, and the parameter processing method further includes:
s110, receiving a target parameter reading instruction, where the target parameter reading instruction includes bytes of a target parameter to be read.
S112, when the parameter in any one of the parameter storage units is read according to the target parameter reading instruction, the byte of the read target parameter is obtained.
S114, when the bytes of the read target parameters are not equal to the bytes of the target parameters to be read, the failure of reading the parameters is judged.
When the parameter in the parameter storage unit 120 needs to be read, a target parameter reading instruction needs to be sent to the power terminal 100 through a server or the like first, for example, when the voltage information needs to be read, then the target parameter reading instruction includes bytes of the voltage parameter that needs to be read.
And after receiving the parameter reading instruction, the controller 110 reads the parameters in the corresponding one or more parameter storage units 120 according to the parameter reading instruction, for example, when only the voltage information needs to be read, the controller 110 only needs to read the parameters of the voltage information in the database and simultaneously obtains the bytes of the read voltage information.
When the bytes of the obtained target parameters are not equal to the bytes of the target parameters to be read, the JSON syntax is incorrect, and at this time, the controller 110 determines that reading the parameters fails and cannot read the parameters. For example, the byte of the voltage information is 4 bytes, but the byte read by the controller 110 is 3 bytes, which indicates that misreading may occur at this time, and the controller 110 determines that reading fails, thereby effectively ensuring the correctness when reading the parameter.
Meanwhile, the present application can implement not only the backup of parameters, but also the restoration of parameters, and when the database, rsv file or self file is damaged, the user may send a synchronization instruction to the power terminal 100, and when the controller 110 receives the synchronization instruction, the data stored in the parameter backup unit 130 may be sent to the one or more parameter storage units 120.
For example, a shell script may be written, a fbak may be input to xShell to implement parameter backup, and when a parameter initialization operation is performed, a parameter initial value is obtained from a backup parameter through a parameter path, so that the parameter backup unit 130 and the parameter storage unit 120 are synchronized.
Second embodiment
Referring to fig. 1 again, an embodiment of the present application further provides an electric power terminal 100, where the electric power terminal 100 includes a controller 110, a parameter backup unit 130, and a plurality of parameter storage units 120, the controller 110 is respectively connected to the parameter backup unit 130 and the plurality of parameter storage units 120, each parameter storage unit 120 is connected to the parameter backup unit 130, and each parameter storage unit 120 is used for storing different types of data.
The controller 110 is configured to receive a target parameter modification instruction, where the target parameter modification instruction includes a target parameter to be modified.
The controller 110 is further configured to determine the type of the target parameter to be changed according to the target parameter to be changed and a preset parameter configuration table, where the preset parameter configuration table includes a corresponding relationship between the target parameter to be changed and the parameter type.
The controller 110 is further configured to determine the target parameter storage unit 120 according to the type of the target parameter to be changed, and change the target parameter stored in the target parameter storage unit 120 according to the target parameter change instruction.
The parameter storage unit 120 is configured to synchronize the changed target parameter to the parameter backup unit 130 for backup.
And, in order to protect the security of the parameters, the parameters stored in the power terminal 100 are all correspondingly provided with security codes, and it can be understood that the target parameters stored in the target parameter storage unit 120 are also provided with security codes, and when the target parameters are changed, the security codes are correspondingly changed, so that it can be determined whether the parameters have been changed according to the security codes. For example, when the security code of the voltage information is stored as X, when the voltage information is read, if the security code of the voltage information is X, it indicates that the voltage information has not been changed; when the voltage information is read, if the security code of the voltage information is Y, it indicates that the voltage information has been modified, thereby implementing the detection of the parameter security of the power terminal 100.
As one implementation way of the application, the application uses the md5 method to ensure the correctness of the important parameter, namely the security code is the md5 value. When the parameters are normally operated, the md5 values are updated in real time, if the parameters are changed due to illegal operation, the md5 values are inconsistent, the operation is illegal, and the reliability of the parameters is further ensured.
In summary, the present application provides a parameter processing method and an electric power terminal, wherein the parameter processing method is applied to a processor of the electric power terminal, the electric power terminal further includes a parameter backup unit and a plurality of parameter storage units, each parameter storage unit is connected with the parameter backup unit, the controller is respectively connected with the parameter backup unit and the plurality of parameter storage units, and each parameter storage unit is used for storing different types of data. The method comprises the steps of receiving a target parameter changing instruction, determining the type of a target parameter to be changed according to the target parameter to be changed and a preset parameter configuration table, determining a target parameter storage unit according to the type of the target parameter to be changed, changing the target parameter stored in the target parameter storage unit according to the target parameter changing instruction, and finally synchronizing the changed target parameter to a parameter backup unit for backup. On one hand, the parameters are directly changed in the parameter storage unit, and then the changed parameters are backed up to the parameter backup unit, so that the parameters can be changed without waiting, and the execution efficiency is higher. On the other hand, because the parameters are classified, only the changed parameters need to be backed up, and data which is not changed does not need to be backed up, so that the memory overhead of the parameter backup unit is effectively reduced.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (8)

1. The parameter processing method is characterized in that the parameter processing method is applied to a controller of an electric power terminal, the electric power terminal further comprises a parameter backup unit and a plurality of parameter storage units, each parameter storage unit is connected with the parameter backup unit, the controller is respectively connected with the parameter backup unit and the plurality of parameter storage units, and each parameter storage unit is used for storing different types of data; the parameter processing method comprises the following steps:
receiving a target parameter changing instruction, wherein the target parameter changing instruction comprises a target parameter to be changed;
determining the type of the target parameter to be changed according to the target parameter to be changed and a preset parameter configuration table, wherein the preset parameter configuration table comprises a corresponding relation between the target parameter to be changed and the type of the parameter;
determining a target parameter storage unit according to the type of the target parameter to be changed, and changing the target parameter stored in the target parameter storage unit according to the target parameter changing instruction;
synchronizing the changed target parameters into the parameter backup unit for backup;
the plurality of parameter storage units comprise a first parameter storage unit, a second parameter storage unit and a third parameter storage unit, and the types of the target parameters to be changed comprise a first type of parameters, a second type of parameters and a third type of parameters;
the step of determining a target parameter storage unit according to the type of the target parameter to be changed comprises the following steps:
when the type of the target parameter to be changed is a first type parameter, determining the first parameter storage unit as a target parameter storage unit;
when the type of the target parameter to be changed is a second type parameter, determining that the second parameter storage unit is a target parameter storage unit;
when the type of the target parameter to be changed is a third type parameter, determining that the third parameter storage unit is a target parameter storage unit;
the first parameter storage unit is a database, the second parameter storage unit is an rsv file, the third parameter storage unit is a self file, and the types of the target parameters to be changed comprise common parameters, variable important parameters and variable important parameters;
the step of determining a target parameter storage unit according to the type of the target parameter to be changed comprises the following steps:
when the type of the target parameter to be changed is a common parameter, determining the database as a target parameter storage unit;
when the type of the target parameter to be changed is an important parameter which is easy to change, determining the rsv file as a target parameter storage unit;
and when the type of the target parameter to be changed is an important parameter which is not easy to change, determining the self file as a target parameter storage unit.
2. The parameter processing method according to claim 1, wherein the target parameter to be changed is provided with an identification code, and the step of determining the type of the target parameter to be changed according to the target parameter to be changed and a preset parameter configuration table comprises:
determining the type of the target parameter according to the identification code of the target parameter and a preset parameter configuration table; and the parameter configuration table comprises the corresponding relation between the identification code and the parameter type.
3. The method according to claim 2, wherein the step of determining the type of the target parameter according to the identification code of the target parameter and a preset parameter configuration table comprises:
determining the intermediate category to which the target parameter belongs according to the identification code of the target parameter and the parameter configuration table;
determining the type of the target parameter according to the intermediate class to which the target parameter belongs and the parameter configuration table; the parameter configuration table comprises the corresponding relation between the identification code and the intermediate type and the corresponding relation between the intermediate type and the parameter type.
4. The parameter processing method according to claim 1, wherein the power terminal is mounted with a binary conversion tool, the parameter processing method further comprising:
parameters stored in the rsv file are interconverted with parameters stored in a database using a binary translation tool.
5. The parameter processing method according to claim 1, further comprising:
receiving a target parameter reading instruction, wherein the target parameter reading instruction comprises bytes of target parameters to be read;
when the parameters in any one parameter storage unit are read according to the target parameter reading instruction, the bytes of the read target parameters are obtained;
and when the bytes of the read target parameters are not equal to the bytes of the target parameters to be read, judging that the reading of the parameters fails.
6. The parameter processing method according to claim 1, further comprising:
and when a synchronization instruction is received, sending the data stored in the parameter backup unit to one or more parameter storage units.
7. An electric power terminal, characterized in that the electric power terminal comprises a controller, a parameter backup unit and a plurality of parameter storage units, the controller is respectively connected with the parameter backup unit and the plurality of parameter storage units, each of the parameter storage units is connected with the parameter backup unit, and each of the parameter storage units is used for storing different types of data, wherein,
the controller is used for receiving a target parameter changing instruction, wherein the target parameter changing instruction comprises a target parameter to be changed;
the controller is further configured to determine a type of the target parameter to be changed according to the target parameter to be changed and a preset parameter configuration table, where the preset parameter configuration table includes a corresponding relationship between the target parameter to be changed and the parameter type;
the controller is also used for determining a target parameter storage unit according to the type of the target parameter to be changed and changing the target parameter stored in the target parameter storage unit according to the target parameter changing instruction;
the parameter storage unit is used for synchronizing the changed target parameters to the parameter backup unit for backup; wherein the content of the first and second substances,
the plurality of parameter storage units comprise a first parameter storage unit, a second parameter storage unit and a third parameter storage unit, and the types of the target parameters to be changed comprise a first type of parameters, a second type of parameters and a third type of parameters;
when the type of the target parameter to be changed is a first type parameter, the controller is used for determining that the first parameter storage unit is a target parameter storage unit;
when the type of the target parameter to be changed is a second type parameter, the controller is used for determining that the second parameter storage unit is a target parameter storage unit;
when the type of the target parameter to be changed is a third type parameter, the controller is configured to determine that the third parameter storage unit is a target parameter storage unit;
the first parameter storage unit is a database, the second parameter storage unit is rsv files, the third parameter storage unit is a self file, and the types of the target parameters to be changed comprise common parameters, variable important parameters and variable important parameters;
when the type of the target parameter to be changed is a common parameter, the controller is used for determining the database as a target parameter storage unit;
when the type of the target parameter to be changed is an important parameter which is variable, the controller is used for determining the rsv file as a target parameter storage unit;
and when the type of the target parameter to be changed is an important parameter which is not easy to change, the controller is used for determining the self file as a target parameter storage unit.
8. The power terminal according to claim 7, wherein the target parameters stored in the target parameter storage unit are each provided with a security code, and when the target parameters are changed, the security codes are changed correspondingly.
CN201910866921.9A 2019-09-12 2019-09-12 Parameter processing method and power terminal Active CN110489439B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910866921.9A CN110489439B (en) 2019-09-12 2019-09-12 Parameter processing method and power terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910866921.9A CN110489439B (en) 2019-09-12 2019-09-12 Parameter processing method and power terminal

Publications (2)

Publication Number Publication Date
CN110489439A CN110489439A (en) 2019-11-22
CN110489439B true CN110489439B (en) 2022-09-20

Family

ID=68557930

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910866921.9A Active CN110489439B (en) 2019-09-12 2019-09-12 Parameter processing method and power terminal

Country Status (1)

Country Link
CN (1) CN110489439B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012014400A1 (en) * 2010-07-27 2012-02-02 パナソニック株式会社 Data transfer control device and data transfer control method
CN103106123A (en) * 2012-12-27 2013-05-15 苏州佳世达电通有限公司 Backup recovery device and wireless parameter backup recovery method
CN108647154A (en) * 2018-05-14 2018-10-12 国网山东省电力公司阳谷县供电公司 A method of carrying out parameter modification in concentrator

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609336B (en) * 2012-01-19 2013-12-25 青岛海信传媒网络技术有限公司 Data administration method and data administration system
CN103676913A (en) * 2013-12-27 2014-03-26 恒天创丰重工有限公司 Method for engineering device electrical parameter protection
CN104536398B (en) * 2014-12-10 2020-05-22 沈阳远大电力电子科技有限公司 Frequency converter monitoring method and system
JP6538771B2 (en) * 2017-07-26 2019-07-03 ファナック株式会社 Numerical control device and control method of numerical control device
CN110225612A (en) * 2018-03-02 2019-09-10 松下知识产权经营株式会社 Micro-control unit, LED drive unit and products thereof parameter setting system
CN110209529A (en) * 2019-04-29 2019-09-06 深圳市有方科技股份有限公司 The guard method of radio frequency parameter and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012014400A1 (en) * 2010-07-27 2012-02-02 パナソニック株式会社 Data transfer control device and data transfer control method
CN103106123A (en) * 2012-12-27 2013-05-15 苏州佳世达电通有限公司 Backup recovery device and wireless parameter backup recovery method
CN108647154A (en) * 2018-05-14 2018-10-12 国网山东省电力公司阳谷县供电公司 A method of carrying out parameter modification in concentrator

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Hierarchical Control of Droop-Controlled AC and DC Microgrids—A General Approach Toward Standardization;Josep M.Guerrero;《IEEE Transactions on Industrial Electronics》;20100812;158-172 *
智能电网输配电互动系统的研究;董自奇;《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》;20160515;C042-886 *

Also Published As

Publication number Publication date
CN110489439A (en) 2019-11-22

Similar Documents

Publication Publication Date Title
CN103530199B (en) A kind of method, Apparatus and system repairing running software mistake
CN101364193A (en) BIOS automatic recovery method and computer and system using the method
CN102662697A (en) Software upgrading method and device
CN112988770B (en) Method, device, electronic equipment and storage medium for updating serial number
CN110895472A (en) Method and device for identifying service change
US11212658B2 (en) Method for providing near filed communication device information for user and system therefor
CN110688305B (en) Test environment synchronization method, device, medium and electronic equipment
CN114374602A (en) Master control equipment configuration method and device, cloud server and storage medium
CN204989452U (en) Hand -held type electric energy meter trouble inquiry terminal equipment
CN108768995B (en) Substation self-adaptive master station access method
WO2020000657A1 (en) Method and apparatus for establishing operation and maintenance monitoring connection, terminal device, and medium
CN110489439B (en) Parameter processing method and power terminal
CN111385613B (en) Television system repairing method, storage medium and application server
CN107784085B (en) Data list exporting method and terminal thereof
CN110442059B (en) Controlled equipment expanding method and device and control equipment
CN112579141A (en) Firmware updating method, device, equipment and storage medium of embedded system
CN106855850A (en) Based on portable equipment intelligent substation secondary void terminal figure reality symbol detection method
CN114168482A (en) Test method of vehicle control unit
CN111258896A (en) Method and device for automatic number-making breakpoint continuous making and computer readable storage medium
CN110209418B (en) Program updating method, device, equipment and computer readable storage medium
CN112417012A (en) Data processing method and system
CN111399871A (en) System updating method, device, equipment and medium for HBA card
CN111209161B (en) Method and system for automatically generating configuration file based on interface monitoring
CN110691446B (en) Secondary generation method and device of ID information
EP4270397A1 (en) Repair system and repair method for semiconductor structure, and 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