Method, device and equipment for configuring parameters of electric energy meter and storage medium

文档序号:7254 发布日期:2021-09-17 浏览:30次 中文

1. A configuration method of parameters of an electric energy meter is characterized by comprising the following steps:

acquiring historical parameter information of the electric energy meter, and extracting current parameter information in the historical parameter information;

acquiring a preset built-in rule, and setting the current parameter information according to the preset built-in rule to obtain target parameter information;

sending the target parameter information to a parameter configuration upper computer so that the parameter configuration upper computer stores the target parameter information and feeds back corresponding storage information;

acquiring current demand information of a user, so that the parameter configuration upper computer generates and feeds back a corresponding parameter configuration file according to the storage information and the current demand information;

and loading the electric energy meter according to the parameter configuration file, namely completing the configuration of the parameters of the electric energy meter.

2. The method for configuring parameters of an electric energy meter according to claim 1, wherein the obtaining historical parameter information of the electric energy meter and extracting current parameter information in the historical parameter information comprises:

acquiring historical parameter information of the electric energy meter, and sequencing the historical parameter information;

extracting current characteristic information in the sorted historical parameter information;

acquiring target characteristic information of a parameter stored by a parameter configuration upper computer, and selecting the current characteristic information according to the target characteristic information;

and obtaining current parameter information according to the selected current characteristic information.

3. The method for configuring parameters of an electric energy meter according to claim 1, wherein the obtaining of a preset built-in rule and setting of the current parameter information according to the preset built-in rule to obtain target parameter information comprises:

extracting parameter names and parameter values in the current parameter information;

matching the parameter name with the parameter value to obtain a matching result, and selecting the parameter name and the parameter value which are successfully matched in the matching result to obtain a corresponding target key value pair;

and acquiring a preset built-in rule, and setting the target key value pair according to the preset built-in rule to obtain target parameter information.

4. The method for configuring parameters of an electric energy meter according to claim 1, wherein the step of sending the target parameter information to a parameter configuration upper computer so that the parameter configuration upper computer stores and feeds back corresponding stored information according to the target parameter information comprises the steps of:

and sending the target parameter information to a parameter configuration upper computer so that the parameter configuration upper computer identifies the target parameter information, and if the identification is successful, storing the target parameter information to a preset database so that the preset database feeds back corresponding stored information after the storage is finished.

5. The method for configuring parameters of an electric energy meter according to claim 1, wherein the step of acquiring current demand information of a user to enable the parameter configuration upper computer to generate and feed back a corresponding parameter configuration file according to the storage information and the current demand information comprises the steps of:

the method comprises the steps of obtaining current demand information of a user, inputting the current demand information into a parameter configuration upper computer to enable the parameter configuration upper computer to analyze the current demand information to obtain a current key value pair, comparing the current key value pair with a target key value pair, and generating a corresponding parameter configuration file according to a comparison result.

6. The method for configuring parameters of an electric energy meter according to any one of claims 1 to 5, wherein the loading the electric energy meter according to the parameter configuration file to complete the configuration of the parameters of the electric energy meter comprises:

acquiring a preset transmission strategy, importing the parameter configuration file into a file system according to the preset transmission strategy so that the file system identifies the parameter configuration file, and after the parameter configuration file is successfully identified, sending the parameter configuration file to the electric energy meter so that the electric energy meter loads the parameter configuration file, namely, the configuration of the parameters of the electric energy meter is completed.

7. The method for configuring parameters of an electric energy meter according to claim 6, wherein after sending the parameter configuration file to the electric energy meter so that the electric energy meter loads the parameter configuration file, the method further comprises:

when the current demand information of the user changes, the changed demand information is input into the parameter configuration upper computer, so that the parameter configuration upper computer extracts the characteristic information in the changed demand information and generates a preset key value pair according to the characteristic information, and if the preset key value pair cannot be inquired in a preset database, a target parameter configuration file is generated according to the preset key value pair;

and loading the parameters of the electric energy meter according to the target parameter configuration file, namely completing the reconfiguration of the parameters of the electric energy meter when the demand information of the user changes.

8. An apparatus for configuring parameters of an electric energy meter, comprising:

the extraction module is used for acquiring historical parameter information of the electric energy meter and extracting current parameter information in the historical parameter information;

the setting module is used for acquiring a preset built-in rule, and setting the current parameter information according to the preset built-in rule to obtain target parameter information;

the storage module is used for sending the target parameter information to a parameter configuration upper computer so as to enable the parameter configuration upper computer to store the target parameter information and feed back corresponding storage information;

the generation module is used for acquiring current demand information of a user so that the parameter configuration upper computer generates and feeds back a corresponding parameter configuration file according to the storage information and the current demand information;

and the configuration module is used for loading the electric energy meter according to the parameter configuration file, namely completing the configuration of the parameters of the electric energy meter.

9. An apparatus for configuring parameters of an electric energy meter, the apparatus comprising: the electric energy meter parameter configuration method comprises a memory, a processor and an electric energy meter parameter configuration program which is stored on the memory and can run on the processor, wherein the electric energy meter parameter configuration program is configured with a configuration method for realizing the electric energy meter parameter according to any one of claims 1 to 7.

10. A storage medium, wherein a configuration program of parameters of an electric energy meter is stored on the storage medium, and when executed by a processor, the configuration program of parameters of the electric energy meter realizes the configuration method of parameters of the electric energy meter according to any one of claims 1 to 7.

Background

The electric energy meter is one of important devices for measuring electric energy change, the electric energy meter is applied more and more widely in the electric energy field, due to different application scenes and regions, the requirements of users are different, so the requirements of the users are continuously changed, the parameter information of the electric energy meter produced at present is completely fixed when the electric energy meter leaves a factory, if the parameters of the electric energy meter are modified by the users, the damage of the electric energy meter is possibly caused, and the problem that the parameters of the electric energy meter are difficult to reconfigure is solved, the technical scheme is that a section of default parameters are solidified in the program of the electric energy meter, the solidified parameters in the program of the electric energy meter are sequentially written into an external storage space in a program operation mode when the electric energy meter is operated for the first time, but when the default parameters need to be modified when the electric energy meter is executed according to the technical scheme, the program of the electric energy meter also needs to be modified correspondingly, and recompilation, executable file generation and retest verification, which must be performed by a professional developer, thus consuming a lot of time.

The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.

Disclosure of Invention

The invention mainly aims to provide a method, a device, equipment and a storage medium for configuring parameters of an electric energy meter, and aims to solve the technical problem that the efficiency of configuring the parameters of the electric energy meter cannot be effectively improved in the prior art.

In order to achieve the above object, the present invention provides a method for configuring parameters of an electric energy meter, wherein the method for configuring parameters of an electric energy meter comprises the following steps:

acquiring historical parameter information of the electric energy meter, and extracting current parameter information in the historical parameter information;

acquiring a preset built-in rule, and setting the current parameter information according to the preset built-in rule to obtain target parameter information;

sending the target parameter information to a parameter configuration upper computer so that the parameter configuration upper computer stores the target parameter information and feeds back corresponding storage information;

acquiring current demand information of a user, so that the parameter configuration upper computer generates and feeds back a corresponding parameter configuration file according to the storage information and the current demand information;

and loading the electric energy meter according to the parameter configuration file, namely completing the configuration of the parameters of the electric energy meter.

Optionally, the obtaining historical parameter information of the electric energy meter, and extracting current parameter information in the historical parameter information includes:

acquiring historical parameter information of the electric energy meter, and sequencing the historical parameter information;

extracting current characteristic information in the sorted historical parameter information;

acquiring target characteristic information of a parameter stored by a parameter configuration upper computer, and selecting the current characteristic information according to the target characteristic information;

and obtaining current parameter information according to the selected current characteristic information.

Optionally, the obtaining a preset built-in rule, and setting the current parameter information according to the preset built-in rule to obtain target parameter information includes:

extracting parameter names and parameter values in the current parameter information;

matching the parameter name with the parameter value to obtain a matching result, and selecting the parameter name and the parameter value which are successfully matched in the matching result to obtain a corresponding target key value pair;

and acquiring a preset built-in rule, and setting the target key value pair according to the preset built-in rule to obtain target parameter information.

Optionally, the sending the target parameter information to a parameter configuration upper computer so that the parameter configuration upper computer stores and feeds back corresponding storage information according to the target parameter information includes:

and sending the target parameter information to a parameter configuration upper computer so that the parameter configuration upper computer identifies the target parameter information, and if the identification is successful, storing the target parameter information to a preset database so that the preset database feeds back corresponding stored information after the storage is finished.

Optionally, the acquiring current demand information of the user to enable the parameter configuration upper computer to generate and feed back a corresponding parameter configuration file according to the storage information and the current demand information includes:

the method comprises the steps of obtaining current demand information of a user, inputting the current demand information into a parameter configuration upper computer to enable the parameter configuration upper computer to analyze the current demand information to obtain a current key value pair, comparing the current key value pair with a target key value pair, and generating a corresponding parameter configuration file according to a comparison result.

Optionally, the loading the electric energy meter according to the parameter configuration file to complete configuration of the parameters of the electric energy meter includes:

acquiring a preset transmission strategy, importing the parameter configuration file into a file system according to the preset transmission strategy so that the file system identifies the parameter configuration file, and after the parameter configuration file is successfully identified, sending the parameter configuration file to the electric energy meter so that the electric energy meter loads the parameter configuration file, namely, the configuration of the parameters of the electric energy meter is completed.

Optionally, the sending the parameter configuration file to the electric energy meter so that after the electric energy meter loads the parameter configuration file, the method further includes:

when the current demand information of the user changes, the changed demand information is input into the parameter configuration upper computer, so that the parameter configuration upper computer extracts the characteristic information in the changed demand information and generates a preset key value pair according to the characteristic information, and if the preset key value pair cannot be inquired in a preset database, a target parameter configuration file is generated according to the preset key value pair;

and loading the parameters of the electric energy meter according to the target parameter configuration file, namely completing the reconfiguration of the parameters of the electric energy meter when the demand information of the user changes.

In addition, in order to achieve the above object, the present invention further provides a device for configuring parameters of an electric energy meter, where the device for configuring parameters of an electric energy meter includes:

the extraction module is used for acquiring historical parameter information of the electric energy meter and extracting current parameter information in the historical parameter information;

the setting module is used for acquiring a preset built-in rule, and setting the current parameter information according to the preset built-in rule to obtain target parameter information;

the storage module is used for sending the target parameter information to a parameter configuration upper computer so as to enable the parameter configuration upper computer to store the target parameter information and feed back corresponding storage information;

the generation module is used for acquiring current demand information of a user so that the parameter configuration upper computer generates and feeds back a corresponding parameter configuration file according to the storage information and the current demand information;

and the configuration module is used for loading the electric energy meter according to the parameter configuration file, namely completing the configuration of the parameters of the electric energy meter.

In addition, in order to achieve the above object, the present invention further provides a device for configuring parameters of an electric energy meter, where the device for configuring parameters of an electric energy meter includes: the electric energy meter parameter configuration method comprises a memory, a processor and an electric energy meter parameter configuration program which is stored on the memory and can run on the processor, wherein the electric energy meter parameter configuration program is configured to realize the electric energy meter parameter configuration method.

In addition, to achieve the above object, the present invention further provides a storage medium, where a configuration program of parameters of an electric energy meter is stored, and when the configuration program of parameters of the electric energy meter is executed by a processor, the configuration program of parameters of the electric energy meter implements the configuration method of parameters of the electric energy meter as described above.

The method for configuring the parameters of the electric energy meter comprises the steps of extracting current parameter information in historical parameter information by acquiring the historical parameter information of the electric energy meter; acquiring a preset built-in rule, and setting the current parameter information according to the preset built-in rule to obtain target parameter information; sending the target parameter information to a parameter configuration upper computer so that the parameter configuration upper computer stores the target parameter information and feeds back corresponding storage information; acquiring current demand information of a user, so that the parameter configuration upper computer generates and feeds back a corresponding parameter configuration file according to the storage information and the current demand information; loading the electric energy meter according to the parameter configuration file; the method comprises the steps of setting current parameter information through a preset built-in rule, generating a corresponding parameter configuration file according to target parameter information and current demand information obtained through setting, and loading the electric energy meter according to the parameter configuration file.

Drawings

Fig. 1 is a schematic structural diagram of an apparatus for configuring parameters of an electric energy meter in a hardware operating environment according to an embodiment of the present invention;

FIG. 2 is a schematic flow chart illustrating a configuration method of parameters of an electric energy meter according to a first embodiment of the present invention;

FIG. 3 is a schematic flow chart illustrating a configuration method of parameters of an electric energy meter according to a second embodiment of the present invention;

FIG. 4 is a flow chart illustrating a third embodiment of a method for configuring parameters of an electric energy meter according to the present invention;

fig. 5 is a functional block diagram of a device for configuring parameters of an electric energy meter according to a first embodiment of the present invention.

The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.

Detailed Description

It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

Referring to fig. 1, fig. 1 is a schematic structural diagram of a configuration device for parameters of an electric energy meter in a hardware operating environment according to an embodiment of the present invention.

As shown in fig. 1, the configuration device for parameters of the electric energy meter may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a DisPlay screen (displayability), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or may be a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.

Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the configuration device of the parameters of the electric energy meter, and may include more or less components than those shown, or some components in combination, or a different arrangement of components.

As shown in fig. 1, the memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a configuration program of parameters of the power meter.

In the configuration device for parameters of the electric energy meter shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 of the device for configuring parameters of an electric energy meter of the present invention may be disposed in the device for configuring parameters of an electric energy meter, and the device for configuring parameters of an electric energy meter calls the configuration program of parameters of an electric energy meter stored in the memory 1005 through the processor 1001, and executes the method for configuring parameters of an electric energy meter provided in the embodiment of the present invention.

Based on the hardware structure, the embodiment of the configuration method of the electric energy meter parameters is provided.

Referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of a method for configuring parameters of an electric energy meter according to the present invention.

In a first embodiment, the configuration method of the electric energy meter parameters comprises the following steps:

step S10, obtaining historical parameter information of the electric energy meter, and extracting current parameter information in the historical parameter information.

It should be noted that, the execution subject of the embodiment is a configuration device for parameters of an electric energy meter, and may also be other devices that can implement the same or similar functions, such as a parameter configuration application program.

It should be understood that the historical parameter information refers to all parameter information at the time of electric energy meter production, including: as shown in table 1, if the parameter is stored in a conventional binary system, the parameter configuration upper computer needs to be provided with the following information:

parameter name Length of Parameter value Alignment mode Big and small end Storage sequence
Para1 1 byte 12 4 bytes Small end 1
Para2 2 bytes 1234 4 bytes Small end 2
Para3 4 bytes 12345678 4 bytes Small end 3

TABLE 1

The parameter names may be names directly set by a technical developer according to a naming rule, the lengths of the parameter names are 1 byte, 2 bytes, 4 bytes and the like, the parameter values are assigned values corresponding to the parameter names one by one, and the alignment mode is an alignment mode with the largest length, for example, if the longest byte of the length is 4 bytes, the alignment mode is a 4-byte alignment mode, the big end and the small end are generally divided into a big end and a small end, which is exemplified in this embodiment, and the storage sequence corresponds to the command sequence of the parameter names.

It can be understood that the binary file generated in the parameter configuration upper computer according to the parameter information in table 1 refers to table 2, as shown in table 2:

position of 1 2 3 4 5 6 7 8
Value of 0c 00 D2 04 4E 61 BC 00

TABLE 2

Wherein, position 1: 0x0c ═ 12; position 2: 00 is 4 bytes according to the alignment mode, and null values are inserted, so that no practical significance is realized; positions 3-4: 0x04D2 — 1234, since it is small end, 04 at position 4, D2 at position 3, and vice versa if large end; position 5-8: 0x00BC614E ═ 12345678, with size ends also considered.

Further, in order to effectively improve the efficiency of extracting the current characteristic information, the historical parameter information of the electric energy meter is obtained, and the current parameter information in the historical parameter information is extracted, which includes: acquiring historical parameter information of the electric energy meter, and sequencing the historical parameter information; extracting current characteristic information in the sorted historical parameter information; acquiring target characteristic information of a parameter stored by a parameter configuration upper computer, and selecting the current characteristic information according to the target characteristic information; and obtaining current parameter information according to the selected current characteristic information.

It can be understood that the current parameter information is parameter information extracted from all parameter information during the production of the electric energy meter, after the historical parameter information is obtained, the historical parameter information needs to be sequenced to improve the efficiency of extracting the current feature information, the current feature information is a parameter name, a length maximum value, an alignment mode, a size end and a storage sequence, the current feature information needs to be screened according to target feature information stored by a parameter configuration upper computer, for example, the target feature information is the parameter name and the parameter value, the parameter name and the parameter value in the current feature information are selected, and as the parameter name and the parameter value are multiple, all the selected parameter names and parameter values are used as the current parameter information.

In specific implementation, a parameter configuration application program acquires historical parameter information of the electric energy meter and extracts current parameter information in the historical parameter information.

And step S20, acquiring a preset built-in rule, and setting the current parameter information according to the preset built-in rule to obtain target parameter information.

It should be understood that the preset built-in rule refers to a rule for redefining the change of the format of the parameter, by which the format of different parameters can be modified, for example, the current format of the a parameter is a, and when the preset built-in rule is used, the normal import operation cannot be performed due to the problem of the format, at this time, the format of the a parameter needs to be changed, and the format of the a parameter can be changed to b by the preset built-in rule, in this embodiment, the current parameter information is set to be a JS Object Notation (JavaScript Object Notation) format by the preset built-in rule, and after the setting is completed, the target parameter information can be obtained, wherein JSON is a lightweight data exchange format, and based on a subset of JS specifications established by the european computer association, data is stored and represented by a text format completely independent of the programming language, and a compact and clear hierarchical structure makes JSON an ideal data exchange language, the method has the characteristics of easy human reading and writing, easy machine analysis and generation, and can effectively improve the network transmission efficiency.

Further, in order to effectively improve the efficiency of storing the target parameter information, a preset built-in rule is obtained, and the current parameter information is set according to the preset built-in rule to obtain the target parameter information, which includes:

extracting parameter names and parameter values in the current parameter information; matching the parameter name with the parameter value to obtain a matching result, and selecting the parameter name and the parameter value which are successfully matched in the matching result to obtain a corresponding target key value pair; and acquiring a preset built-in rule, and setting the target key value pair according to the preset built-in rule to obtain target parameter information.

It should be understood that the representation of the target parameter information refers to table 3, specifically as follows:

parameter name Parameter value
Para1 12
Para2 1234
Para3 12345678

TABLE 3

It can be understood that, after the current parameter information is obtained, the parameter names and the parameter values in the current parameter information are extracted, because the parameter names and the parameter values are in a one-to-one correspondence relationship, the parameter names and the parameter values need to be matched to obtain a corresponding matching result, and the parameter names and the parameter information that are successfully matched in the matching result form a target key value pair by a preset built-in rule, for example, the parameter names are Para1, Para2 and Para3, the parameter values are 12, 1234, 12345678, and the target key value pair obtained after the matching is successful is Para 1: 12. para 2: 1234 and Para 3: 12345678, wherein the ordering order of the target key-value pairs is not limited, and the target key-value pairs are expressed by ASCII code format, and the first expression mode is:

{

"Para1":12,

"Para2":1234,

"Para3":12345678,

}

the second expression is as follows:

{

"Para2":1234,

"Para1":12,

"Para3":12345678,

}

in specific implementation, a parameter configuration application program obtains a preset built-in rule, and sets the current parameter information according to the preset built-in rule to obtain target parameter information.

And step S30, sending the target parameter information to a parameter configuration upper computer so that the parameter configuration upper computer stores the target parameter information and feeds back corresponding storage information.

It should be understood that the parameter configuration upper computer refers to a device for performing parameter configuration on different devices, after target parameter information is obtained, the target parameter information needs to be sent to the parameter configuration upper computer, the parameter configuration machine stores the target parameter information to a corresponding storage system, the storage system is a local storage module built in the parameter configuration upper computer, the local storage module may be a memory card or a virtual database, this embodiment does not limit this and exemplifies a virtual database, after storage is completed, corresponding storage information needs to be fed back, including storage success or storage failure, and if storage failure occurs, storage memory in the local storage module needs to be released until the target parameter information is successfully stored.

Further, in order to effectively improve the accuracy of storing the target parameter information, the target parameter information is sent to a parameter configuration upper computer, so that the parameter configuration upper computer stores and feeds back corresponding storage information according to the target parameter information, and the method comprises the following steps:

and sending the target parameter information to a parameter configuration upper computer so that the parameter configuration upper computer identifies the target parameter information, and if the identification is successful, storing the target parameter information to a preset database so that the preset database feeds back corresponding stored information after the storage is finished.

The target parameter information is sent to the parameter configuration upper computer after the target parameter information is obtained, and at the moment, the parameter configuration upper computer identifies the target parameter information to judge whether the target parameter information is the parameter information in the required format.

In specific implementation, the parameter configuration application program sends the target parameter information to a parameter configuration upper computer, so that the parameter configuration upper computer stores the target parameter information and feeds back corresponding storage information.

And step S40, acquiring current demand information of a user, so that the parameter configuration upper computer generates and feeds back a corresponding parameter configuration file according to the storage information and the current demand information.

It should be understood that the current demand information refers to demand information provided by a user according to the use of the electric energy meter, the current demand information is continuously changed based on the use of the electric energy meter, if storage information fed back by storing target parameter information in a preset database is successful, a corresponding parameter configuration file is generated according to the current demand information, the type of the parameter name in the parameter configuration file is the same as that in a target key value pair, the file format of the parameter configuration file is consistent with the format set by a preset built-in rule, for example, the parameter name is Para, and the generated parameter configuration file is Para.

In specific implementation, the parameter configuration application program acquires current demand information of a user, so that the parameter configuration upper computer generates and feeds back a corresponding parameter configuration file according to the storage information and the current demand information.

And step S50, loading the electric energy meter according to the parameter configuration file, namely completing the configuration of the parameters of the electric energy meter.

Further, in order to effectively improve the efficiency of configuring parameters, the method for loading the electric energy meter according to the parameter configuration file, that is, completing the configuration of the parameters of the electric energy meter, includes:

acquiring a preset transmission strategy, importing the parameter configuration file into a file system according to the preset transmission strategy so that the file system identifies the parameter configuration file, and after the parameter configuration file is successfully identified, sending the parameter configuration file to the electric energy meter so that the electric energy meter loads the parameter configuration file, namely, the configuration of the parameters of the electric energy meter is completed.

It should be understood that the preset transmission policy refers to a policy for transmitting the parameter configuration file to the electric energy meter, where the preset transmission policy may be communication network transmission or physical medium transmission policy, and this embodiment is described by taking wireless network transmission in the communication network as an example to determine whether parameters in the parameter configuration file are correct, including the number of the parameters and parameter information, and after the identification is successful, the electric energy meter loads the parameter configuration file, that is, completes configuration of the parameters of the electric energy meter.

In specific implementation, the parameter configuration application program loads the electric energy meter according to the parameter configuration file, namely, the configuration of the parameters of the electric energy meter is completed.

Further, in order to improve the experience of the user, the sending of the parameter configuration file to the electric energy meter so that the electric energy meter loads the parameter configuration file further includes:

when the current demand information of the user changes, the changed demand information is input into the parameter configuration upper computer, so that the parameter configuration upper computer extracts the characteristic information in the changed demand information and generates a preset key value pair according to the characteristic information, and if the preset key value pair cannot be inquired in a preset database, a target parameter configuration file is generated according to the preset key value pair; and loading the parameters of the electric energy meter according to the target parameter configuration file, namely completing the reconfiguration of the parameters of the electric energy meter when the demand information of the user changes.

It can be understood that after the configuration of the parameters of the electric energy meter is completed, if the current demand information of the user changes, feature information in the changed demand information needs to be extracted again, a corresponding preset key value pair is generated according to the feature information, whether the preset key value pair exists in the target key value pair is judged, if the preset key value pair exists in the target key value pair, a corresponding parameter configuration file is directly inquired in a preset database according to the name of the target key value pair and is transmitted to a file system of the electric energy meter through a preset transmission strategy, and if the preset key value pair does not exist in the target key value pair, a target parameter configuration file is generated according to the preset key value pair, that is, the re-configuration of the parameters of the electric energy meter when the demand information of the user changes is completed.

The method comprises the steps of extracting current parameter information in historical parameter information by acquiring the historical parameter information of the electric energy meter; acquiring a preset built-in rule, and setting the current parameter information according to the preset built-in rule to obtain target parameter information; sending the target parameter information to a parameter configuration upper computer so that the parameter configuration upper computer stores the target parameter information and feeds back corresponding storage information; acquiring current demand information of a user, so that the parameter configuration upper computer generates and feeds back a corresponding parameter configuration file according to the storage information and the current demand information; loading the electric energy meter according to the parameter configuration file; the method comprises the steps of setting current parameter information through a preset built-in rule, generating a corresponding parameter configuration file according to target parameter information and current demand information obtained through setting, and loading the electric energy meter according to the parameter configuration file.

In an embodiment, as shown in fig. 3, a second embodiment of the method for configuring parameters of an electric energy meter according to the present invention is provided based on the first embodiment, and the step S20 includes:

step S201, extracting the parameter name and the parameter value in the current parameter information.

It should be understood that after obtaining the current parameter information, parameter names and parameter values need to be extracted, for example, the extracted parameter names are Para1, Para2, and Para3, and the parameter values are 12, 1234, and 12345678, where the parameter names and parameter values are randomly ordered, i.e., are out-of-order.

In a specific implementation, the parameter configuration application program extracts the parameter name and the parameter value in the current parameter information.

Step S202, matching the parameter name with the parameter value to obtain a matching result, and selecting the parameter name and the parameter value which are successfully matched in the matching result to obtain a corresponding target key value pair.

It can be understood that, after obtaining the parameter name and the parameter value, the parameter name and the parameter value need to be matched one by one to obtain a matching result, the matching result has a parameter name and a parameter value that match successfully and also has a parameter name and a parameter value that match unsuccessfully, for example, Para1 only matches with 12 successfully, and matches with other parameter values are matching failures, after matching is completed, the parameter name and the parameter value that match to a success method need to be selected from the matching result, and a target key value pair is obtained according to the extracted parameter name and parameter value, for example, Para 1: 12. para 2: 1234 and Para 3: 12345678.

in specific implementation, the parameter configuration application program matches the parameter name with the parameter value to obtain a matching result, and selects the parameter name and the parameter value which are successfully matched in the matching result to obtain a corresponding target key value pair.

Step S203, acquiring a preset built-in rule, and setting the target key value pair according to the preset built-in rule to obtain target parameter information.

It should be understood that the preset built-in rule refers to a rule for redefining a change of a format of a parameter, and formats of different parameters may be modified by the preset built-in rule.

In specific implementation, a parameter configuration application program obtains a preset built-in rule, and sets the target key value pair according to the preset built-in rule to obtain target parameter information.

In the embodiment, the parameter name and the parameter value in the current parameter information are extracted; matching the parameter name with the parameter value to obtain a matching result, and selecting the parameter name and the parameter value which are successfully matched in the matching result to obtain a corresponding target key value pair; acquiring a preset built-in rule, and setting the target key value pair according to the preset built-in rule to obtain target parameter information; and obtaining a corresponding target key value pair by selecting the successfully matched parameter name and parameter value, and setting the target key value pair according to a preset built-in rule to obtain corresponding target parameter information, thereby effectively improving the accuracy of obtaining the target parameter information.

In an embodiment, as shown in fig. 4, a third embodiment of the method for configuring parameters of an electric energy meter according to the present invention is provided based on the first embodiment, and the step S40 includes:

step S401, obtaining current demand information of a user, inputting the current demand information into the parameter configuration upper computer to enable the parameter configuration upper computer to analyze the current demand information to obtain a current key value pair, comparing the current key value pair with a target key value pair, and generating a corresponding parameter configuration file according to a comparison result.

It can be understood that the current demand information refers to demand information provided by a user according to the use of the electric energy meter, after the current demand information is obtained, the current demand information needs to be input into the parameter configuration upper computer, the parameter configuration upper computer analyzes the current demand information to obtain a current key value pair corresponding to the current demand information, the current key value pair is compared with a target key value pair in the parameter configuration upper computer, if the current key value pair exists in the target key value pair, and if the current key value pair exists, a corresponding parameter configuration file is generated according to the current key value pair.

In specific implementation, a parameter configuration application program acquires current demand information of a user, inputs the current demand information into the parameter configuration upper computer so that the parameter configuration upper computer analyzes the current demand information to obtain a current key value pair, compares the current key value pair with a target key value pair, and generates a corresponding parameter configuration file according to a comparison result.

In the embodiment, the current demand information of a user is acquired and input to the parameter configuration upper computer, so that the parameter configuration upper computer analyzes the current demand information to obtain a current key value pair, the current key value pair is compared with a target key value pair, a corresponding parameter configuration file is generated according to a comparison result, the current demand information is input to the parameter configuration upper computer, the parameter configuration upper computer obtains the corresponding current key value pair according to the current demand information, and when the target key value pair has the current key value pair, the corresponding parameter configuration file is generated according to the current key value pair. Therefore, the efficiency of obtaining the parameter configuration file is effectively improved.

In addition, an embodiment of the present invention further provides a storage medium, where a configuration program of parameters of an electric energy meter is stored on the storage medium, and when the configuration program of parameters of the electric energy meter is executed by a processor, the steps of the configuration method of parameters of an electric energy meter are implemented as described above.

Since the storage medium adopts all technical solutions of all the embodiments, at least all the beneficial effects brought by the technical solutions of the embodiments are achieved, and no further description is given here.

In addition, referring to fig. 5, an embodiment of the present invention further provides a device for configuring parameters of an electric energy meter, where the device for configuring parameters of an electric energy meter includes:

the extraction module 10 is configured to obtain historical parameter information of the electric energy meter, and extract current parameter information in the historical parameter information.

It should be understood that the historical parameter information refers to all parameter information at the time of electric energy meter production, including: referring to table 1, table 1 is a historical parameter information table of an embodiment of the configuration method of the electric energy meter parameters of the present invention, and if the traditional binary mode is adopted for storage, the following information needs to be provided to a parameter configuration upper computer:

parameter name Length of Parameter value Alignment mode Big and small end Storage sequence
Para1 1 byte 12 4 bytes Small end 1
Para2 2 bytes 1234 4 bytes Small end 2
Para3 4 bytes 12345678 4 bytes Small end 3

The parameter names may be names directly set by a technical developer according to a naming rule, the lengths of the parameter names are 1 byte, 2 bytes, 4 bytes and the like, the parameter values are assigned values corresponding to the parameter names one by one, and the alignment mode is an alignment mode with the largest length, for example, if the longest byte of the length is 4 bytes, the alignment mode is a 4-byte alignment mode, the big end and the small end are generally divided into a big end and a small end, which is exemplified in this embodiment, and the storage sequence corresponds to the command sequence of the parameter names.

It can be understood that the binary file generated in the parameter configuration upper computer according to the parameter information in table 1 refers to table 2, and table 2 is a binary file table of an embodiment of the configuration method of the electric energy meter parameters of the present invention:

position of 1 2 3 4 5 6 7 8
Value of 0c 00 D2 04 4E 61 BC 00

Wherein, position 1: 0x0c ═ 12; position 2: 00 is 4 bytes according to the alignment mode, and null values are inserted, so that no practical significance is realized; positions 3-4: 0x04D2 — 1234, since it is small end, 04 at position 4, D2 at position 3, and vice versa if large end; position 5-8: 0x00BC614E ═ 12345678, with size ends also considered.

Further, in order to effectively improve the efficiency of extracting the current characteristic information, the historical parameter information of the electric energy meter is obtained, and the current parameter information in the historical parameter information is extracted, which includes: acquiring historical parameter information of the electric energy meter, and sequencing the historical parameter information; extracting current characteristic information in the sorted historical parameter information; acquiring target characteristic information of a parameter stored by a parameter configuration upper computer, and selecting the current characteristic information according to the target characteristic information; and obtaining current parameter information according to the selected current characteristic information.

It can be understood that the current parameter information is parameter information extracted from all parameter information during the production of the electric energy meter, after the historical parameter information is obtained, the historical parameter information needs to be sequenced to improve the efficiency of extracting the current feature information, the current feature information is a parameter name, a length maximum value, an alignment mode, a size end and a storage sequence, the current feature information needs to be screened according to target feature information stored by a parameter configuration upper computer, for example, the target feature information is the parameter name and the parameter value, the parameter name and the parameter value in the current feature information are selected, and as the parameter name and the parameter value are multiple, all the selected parameter names and parameter values are used as the current parameter information.

In specific implementation, a parameter configuration application program acquires historical parameter information of the electric energy meter and extracts current parameter information in the historical parameter information.

The setting module 20 is configured to obtain a preset built-in rule, and set the current parameter information according to the preset built-in rule to obtain target parameter information.

It should be understood that the preset built-in rule refers to a rule for redefining the change of the format of the parameter, by which the format of different parameters can be modified, for example, the current format of the a parameter is a, and when the preset built-in rule is used, the normal import operation cannot be performed due to the problem of the format, at this time, the format of the a parameter needs to be changed, and the format of the a parameter can be changed to b by the preset built-in rule, in this embodiment, the current parameter information is set to be a JS Object Notation (JavaScript Object Notation) format by the preset built-in rule, and after the setting is completed, the target parameter information can be obtained, wherein JSON is a lightweight data exchange format, and based on a subset of JS specifications established by the european computer association, data is stored and represented by a text format completely independent of the programming language, and a compact and clear hierarchical structure makes JSON an ideal data exchange language, the method has the characteristics of easy human reading and writing, easy machine analysis and generation, and can effectively improve the network transmission efficiency.

Further, in order to effectively improve the efficiency of storing the target parameter information, a preset built-in rule is obtained, and the current parameter information is set according to the preset built-in rule to obtain the target parameter information, which includes:

extracting parameter names and parameter values in the current parameter information; matching the parameter name with the parameter value to obtain a matching result, and selecting the parameter name and the parameter value which are successfully matched in the matching result to obtain a corresponding target key value pair; and acquiring a preset built-in rule, and setting the target key value pair according to the preset built-in rule to obtain target parameter information.

It should be understood that the target parameter information can be represented by referring to table 3, where table 3 is a target parameter information table of an embodiment of the configuration method of the electric energy meter parameter of the present invention, and the specific details are as follows:

parameter name Parameter value
Para1 12
Para2 1234
Para3 12345678

It can be understood that, after the current parameter information is obtained, the parameter names and the parameter values in the current parameter information are extracted, because the parameter names and the parameter values are in a one-to-one correspondence relationship, the parameter names and the parameter values need to be matched to obtain a corresponding matching result, and the parameter names and the parameter information that are successfully matched in the matching result form a target key value pair by a preset built-in rule, for example, the parameter names are Para1, Para2 and Para3, the parameter values are 12, 1234, 12345678, and the target key value pair obtained after the matching is successful is Para 1: 12. para 2: 1234 and Para 3: 12345678, wherein the ordering order of the target key-value pairs is not limited, and the target key-value pairs are expressed by ASCII code format, and the first expression mode is:

{

"Para1":12,

"Para2":1234,

"Para3":12345678,

}

the second expression is as follows:

{

"Para2":1234,

"Para1":12,

"Para3":12345678,

}

in specific implementation, a parameter configuration application program obtains a preset built-in rule, and sets the current parameter information according to the preset built-in rule to obtain target parameter information.

The storage module 30 is configured to send the target parameter information to a parameter configuration upper computer, so that the parameter configuration upper computer stores the target parameter information and feeds back corresponding storage information.

It should be understood that the parameter configuration upper computer refers to a device for performing parameter configuration on different devices, after target parameter information is obtained, the target parameter information needs to be sent to the parameter configuration upper computer, the parameter configuration machine stores the target parameter information to a corresponding storage system, the storage system is a local storage module built in the parameter configuration upper computer, the local storage module may be a memory card or a virtual database, this embodiment does not limit this and exemplifies a virtual database, after storage is completed, corresponding storage information needs to be fed back, including storage success or storage failure, and if storage failure occurs, storage memory in the local storage module needs to be released until the target parameter information is successfully stored.

Further, in order to effectively improve the accuracy of storing the target parameter information, the target parameter information is sent to a parameter configuration upper computer, so that the parameter configuration upper computer stores and feeds back corresponding storage information according to the target parameter information, and the method comprises the following steps:

and sending the target parameter information to a parameter configuration upper computer so that the parameter configuration upper computer identifies the target parameter information, and if the identification is successful, storing the target parameter information to a preset database so that the preset database feeds back corresponding stored information after the storage is finished.

The target parameter information is sent to the parameter configuration upper computer after the target parameter information is obtained, and at the moment, the parameter configuration upper computer identifies the target parameter information to judge whether the target parameter information is the parameter information in the required format.

In specific implementation, the parameter configuration application program sends the target parameter information to a parameter configuration upper computer, so that the parameter configuration upper computer stores the target parameter information and feeds back corresponding storage information.

And the generating module 40 is used for acquiring current demand information of a user so that the parameter configuration upper computer generates and feeds back a corresponding parameter configuration file according to the storage information and the current demand information.

It should be understood that the current demand information refers to demand information provided by a user according to the use of the electric energy meter, the current demand information is continuously changed based on the use of the electric energy meter, if storage information fed back by storing target parameter information in a preset database is successful, a corresponding parameter configuration file is generated according to the current demand information, the type of the parameter name in the parameter configuration file is the same as that in a target key value pair, the file format of the parameter configuration file is consistent with the format set by a preset built-in rule, for example, the parameter name is Para, and the generated parameter configuration file is Para.

In specific implementation, the parameter configuration application program acquires current demand information of a user, so that the parameter configuration upper computer generates and feeds back a corresponding parameter configuration file according to the storage information and the current demand information.

And the configuration module 50 is configured to load the electric energy meter according to the parameter configuration file, that is, complete configuration of parameters of the electric energy meter.

Further, in order to effectively improve the efficiency of configuring parameters, the method for loading the electric energy meter according to the parameter configuration file, that is, completing the configuration of the parameters of the electric energy meter, includes:

acquiring a preset transmission strategy, importing the parameter configuration file into a file system according to the preset transmission strategy so that the file system identifies the parameter configuration file, and after the parameter configuration file is successfully identified, sending the parameter configuration file to the electric energy meter so that the electric energy meter loads the parameter configuration file, namely, the configuration of the parameters of the electric energy meter is completed.

It should be understood that the preset transmission policy refers to a policy for transmitting a parameter configuration file to an electric energy meter, where the preset transmission policy may be communication network transmission or a physical medium transmission policy, in this embodiment, wireless network transmission in a communication network is taken as an example for explanation, after the parameter configuration file is obtained, the parameter configuration file is downloaded to a data storage space corresponding to a main chip of a Micro Controller Unit (MCU), the downloading time is 10 to 90 seconds, after the downloading is completed, a system file of the electric energy meter further identifies the parameter configuration file again to determine whether parameters in the parameter configuration file are correct, including the number of the parameters and parameter information, after the identification is successful, the electric energy meter loads the parameter configuration file, and in the loading process, the configuration of the parameters of the electric energy meter is completed.

In specific implementation, the parameter configuration application program loads the electric energy meter according to the parameter configuration file, namely, the configuration of the parameters of the electric energy meter is completed.

Further, in order to improve the experience of the user, the sending of the parameter configuration file to the electric energy meter so that the electric energy meter loads the parameter configuration file further includes:

when the current demand information of the user changes, the changed demand information is input into the parameter configuration upper computer, so that the parameter configuration upper computer extracts the characteristic information in the changed demand information and generates a preset key value pair according to the characteristic information, and if the preset key value pair cannot be inquired in a preset database, a target parameter configuration file is generated according to the preset key value pair; and loading the parameters of the electric energy meter according to the target parameter configuration file, namely completing the reconfiguration of the parameters of the electric energy meter when the demand information of the user changes.

It can be understood that after the configuration of the parameters of the electric energy meter is completed, if the current demand information of the user changes, feature information in the changed demand information needs to be extracted again, a corresponding preset key value pair is generated according to the feature information, whether the preset key value pair exists in the target key value pair is judged, if the preset key value pair exists in the target key value pair, a corresponding parameter configuration file is directly inquired in a preset database according to the name of the target key value pair and is transmitted to a file system of the electric energy meter through a preset transmission strategy, and if the preset key value pair does not exist in the target key value pair, a target parameter configuration file is generated according to the preset key value pair, that is, the re-configuration of the parameters of the electric energy meter is completed when the demand information of the user changes.

The method comprises the steps of extracting current parameter information in historical parameter information by acquiring the historical parameter information of the electric energy meter; acquiring a preset built-in rule, and setting the current parameter information according to the preset built-in rule to obtain target parameter information; sending the target parameter information to a parameter configuration upper computer so that the parameter configuration upper computer stores the target parameter information and feeds back corresponding storage information; acquiring current demand information of a user, so that the parameter configuration upper computer generates and feeds back a corresponding parameter configuration file according to the storage information and the current demand information; loading the electric energy meter according to the parameter configuration file; the method comprises the steps of setting current parameter information through a preset built-in rule, generating a corresponding parameter configuration file according to target parameter information and current demand information obtained through setting, and loading the electric energy meter according to the parameter configuration file.

It should be noted that the above-described work flows are only exemplary, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of them to achieve the purpose of the solution of the embodiment according to actual needs, and the present invention is not limited herein.

In addition, the technical details that are not described in detail in this embodiment may refer to the configuration method of the electric energy meter parameter provided in any embodiment of the present invention, and are not described herein again.

In an embodiment, the extracting module 10 is further configured to obtain historical parameter information of the electric energy meter, and sort the historical parameter information; extracting current characteristic information in the sorted historical parameter information; acquiring target characteristic information of a parameter stored by a parameter configuration upper computer, and selecting the current characteristic information according to the target characteristic information; and obtaining current parameter information according to the selected current characteristic information.

In an embodiment, the setting module 20 is further configured to extract a parameter name and a parameter value in the current parameter information; matching the parameter name with the parameter value to obtain a matching result, and selecting the parameter name and the parameter value which are successfully matched in the matching result to obtain a corresponding target key value pair; and acquiring a preset built-in rule, and setting the target key value pair according to the preset built-in rule to obtain target parameter information.

In an embodiment, the storage module 30 is further configured to send the target parameter information to a parameter configuration upper computer, so that the parameter configuration upper computer identifies the target parameter information, and if the identification is successful, the target parameter information is stored in a preset database, so that the preset database feeds back corresponding storage information after the storage is completed.

In an embodiment, the generating module 40 is further configured to obtain current demand information of a user, input the current demand information to the parameter configuration upper computer, so that the parameter configuration upper computer analyzes the current demand information to obtain a current key value pair, compare the current key value pair with a target key value pair, and generate a corresponding parameter configuration file according to a comparison result.

In an embodiment, the configuration module 50 is further configured to obtain a preset transmission policy, import the parameter configuration file into a file system according to the preset transmission policy, so that the file system identifies the parameter configuration file, and send the parameter configuration file to the electric energy meter after the parameter configuration file is successfully identified, so that the electric energy meter loads the parameter configuration file, that is, the configuration of the parameter of the electric energy meter is completed.

In an embodiment, the configuration module 50 is further configured to, when the current demand information of the user changes, input the changed demand information to the parameter configuration upper computer, so that the parameter configuration upper computer extracts feature information in the changed demand information, generates a preset key value pair according to the feature information, and generates a target parameter configuration file according to the preset key value pair if the preset key value pair cannot be queried in a preset database; and loading the parameters of the electric energy meter according to the target parameter configuration file, namely completing the reconfiguration of the parameters of the electric energy meter when the demand information of the user changes.

Other embodiments or methods of implementing the configuration device for parameters of an electric energy meter according to the present invention can refer to the above embodiments, and are not redundant here.

Further, it is to be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.

The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.

Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g. Read Only Memory (ROM)/RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal device (e.g. a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.

The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:机器功能配置方法、装置、计算机可读介质及设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!