Electric energy meter expansion method and device, computer device, readable storage medium and program product
By using the metering module for identity authentication and connection when connecting extended devices to the electricity meter, the problem of low security in electricity meter extensions is solved, and more secure extended business processing is achieved.
Patent Information
- Application Number
- CN202411769990.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2044-12-04
AI Technical Summary
Existing methods for extending electricity meters have low security. While replacing modules simplifies communication, it also reduces the security of the electricity meter.
When an extended device is connected to the electricity meter, the metering module is used to make an identity authentication request, establish a connection and perform identity authentication based on attribute information. After successful authentication, the extended service is executed.
This improves the security of electricity meter expansion, ensures secure data interaction between the expansion device and the metering module, and enhances the overall security and data processing efficiency of the electricity meter.
Smart Images

Figure CN119336667B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electric energy meter, in particular to an electric energy meter expansion method and device, computer equipment, computer readable storage medium and computer program product. BACKGROUND
[0002] With the rapid development of smart grid, the functional requirements and software design requirements of electric energy meter are also increasing. As a basic module of smart grid, the smart meter provides massive data resources for the metering automation system, and plays an important role in the development and construction of smart grid. With the rapid development of power grid business, electric energy meter needs to undertake more complex business and realize more functions, so it is necessary to expand the electric energy meter. The current expansion method of electric energy meter is usually to modularize the original basic function of the electric energy meter through the management master control circuit, and to realize expansion by replacing a certain basic function module. However, by replacing the existing module to realize expansion, the communication between modules is relatively simple, which reduces the security of electric energy meter.
[0003] Therefore, the current electric energy meter expansion method has the defect of low security. SUMMARY
[0004] Therefore, it is necessary to provide an electric energy meter expansion method, device, computer equipment, computer readable storage medium and computer program product capable of improving security in view of the above technical problems.
[0005] In a first aspect, the present application provides an electric energy meter expansion method applied to an electric energy meter, the method comprising:
[0006] When detecting that an expansion device accesses an expansion interface in the electric energy meter, receiving an identity authentication request sent by the expansion device through a metering module in the electric energy meter; the identity authentication request includes attribute information corresponding to the expansion device;
[0007] According to the identity authentication request, establishing a connection between the metering module and the expansion device;
[0008] Through the metering module, identity authentication is performed on the expansion device based on the connection and the attribute information, and a corresponding identity authentication result is obtained;
[0009] When detecting that the identity authentication result is authentication passed, executing corresponding expansion business according to expansion business application in the operating system of the metering module and the expansion device.
[0010] In one of the embodiments, the establishing a connection between the metering module and the expansion device according to the identity authentication request comprises:
[0011] sending the identity authentication request to the metering module through a serial peripheral interface protocol channel;
[0012] acquiring a handshake notification in the identity authentication request through the metering module;
[0013] generating corresponding response information according to the handshake notification, and sending the response information to the extension device; the extension device establishes a connection with the metering module based on the response information.
[0014] In one embodiment, the identity authentication of the extension device is performed by the metering module based on the connection and the attribute information, and a corresponding identity authentication result is obtained, including:
[0015] generating identity authentication request information messages based on the attribute information through the metering module;
[0016] sending the identity authentication request information messages to the extension device through the connection; the extension device returns corresponding identity authentication confirmation messages when verifying that the identity authentication request information messages are correct;
[0017] verifying the identity authentication confirmation messages, and determining that the identity authentication result is authentication passed when the verification is passed.
[0018] In one embodiment, the corresponding extension service is executed according to the extension service application in the operating system of the metering module and the extension device, including:
[0019] if the extension service application in the operating system of the extension device is a computing class service application, the extension device is determined to be a computing class extension device;
[0020] acquiring a clock synchronization request and a metering configuration request sent by the extension device;
[0021] synchronizing the metering module with the extension device according to the clock synchronization request, and sending configuration parameters of the metering module to the extension device according to the metering configuration request, to obtain a configured extension device;
[0022] acquiring original data through the metering module and outputting to the computing class service application in the configured extension device; the configured extension device is configured to process the original data according to the computing class service application.
[0023] In one embodiment, the metering module is synchronized with the extension device according to the clock synchronization request, including:
[0024] When the metering module detects the time correction information of the master station corresponding to the electric energy meter, the electric energy meter is first corrected according to the time correction information.
[0025] The plain broadcast time correction information is sent to the extension device according to the clock synchronization request and the time correction information; and the extension device is configured to perform second correction according to the plain broadcast time correction information.
[0026] In one of the embodiments, the detection of the access of the extension device to the extension interface in the electric energy meter comprises:
[0027] When the extension interface detects the power-on of the extension device, it is determined that the extension device accesses the extension interface.
[0028] The method further comprises:
[0029] When the extension device is removed from the extension interface, the communication between the metering module and the extension device is stopped.
[0030] In a second aspect, the application provides an electric energy meter extension device, which comprises:
[0031] An access module, configured to, when the extension device accesses the extension interface in the electric energy meter, receive an identity authentication request sent by the extension device through a metering module in the electric energy meter; the identity authentication request comprises attribute information corresponding to the extension device.
[0032] A connection module, configured to establish a connection between the metering module and the extension device according to the identity authentication request.
[0033] An authentication module, configured to perform identity authentication on the extension device based on the connection and the attribute information through the metering module, and obtain a corresponding identity authentication result.
[0034] An extension module, configured to, when the identity authentication result is authentication passed, perform corresponding extension services according to extension service applications in operating systems of the metering module and the extension device.
[0035] In a third aspect, the application provides a computer device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0036] In a fourth aspect, the application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the above method.
[0037] In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the method described above.
[0038] The power meter expansion method, device, computer device, computer readable storage medium and computer program product described above, by expanding the device access, the metering module establishes a connection with the expansion device through identity authentication request, the metering module performs identity authentication on the expansion device based on the connection and the attribute information of the expansion device, obtains the corresponding identity authentication result, and when the identity authentication result is passed, the corresponding expansion service is executed according to the expansion service application in the operating system of the metering module and the expansion device. Compared with the traditional expansion by replacing the original module in the power meter, the present application establishes the connection between the expansion device and the metering module by connecting the expansion device to the expansion interface in the power meter, performs identity authentication on the expansion device, and then processes the corresponding expansion service by using the expansion service application in the operating system of the expansion device and the output data of the metering module, thereby improving the security of the power meter expansion. BRIEF DESCRIPTION OF DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0040] Figure 1 A flowchart of the power meter expansion method in one embodiment;
[0041] Figure 2 A structural diagram of the power meter in one embodiment;
[0042] Figure 3 A structural block diagram of the power meter expansion device in one embodiment;
[0043] Figure 4 An internal structure diagram of the computer device in one embodiment. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solutions and advantages of the present application more clear, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not to limit the present application.
[0045] In one embodiment, as shown in Figure 1As shown, an electric energy meter expansion method is provided. The embodiment takes the method applied to a server as an example. It can be understood that the method can also be applied to an electric energy meter and a system including an electric energy meter and a server, and is realized through the interaction of the electric energy meter and the server. The method includes the following steps S202 to S208. In the steps,
[0046] In step S202, when an expansion device accesses an expansion interface in the electric energy meter, the metering module in the electric energy meter receives an identity authentication request sent by the expansion device. The identity authentication request includes attribute information corresponding to the expansion device.
[0047] The electric energy meter is an instrument for measuring electric energy and is widely used in electric energy trade settlement and monitoring. It is the basis of modernization of electric energy metering management. The electric energy meter is preconfigured with an expansion interface, which can be used to access a corresponding expansion device. The expansion device is installed with an operating system, and the operating system can be installed with a corresponding expansion service application. The expansion device can have multiple types, and the operating systems of different types of expansion devices can be installed with expansion service applications of different service types. The electric energy meter can determine whether an expansion device is accessed by detecting the access information of the expansion interface.
[0048] When the electric energy meter detects that the expansion device accesses the expansion interface in the electric energy meter through the expansion interface, the electric energy meter can perform identity authentication on the accessed expansion device. The electric energy meter can determine whether an expansion device is accessed by detecting whether the expansion device is powered on.
[0049] In one embodiment, when the expansion device accesses the expansion interface in the electric energy meter, the electric energy meter detects that the expansion device accesses the expansion interface by detecting that the expansion device is powered on through the expansion interface. In this embodiment, the electric energy meter can detect whether the expansion device is powered on through the expansion interface. If the electric energy meter detects that the expansion device is powered on through the expansion interface, it can be determined that the expansion device accesses the expansion interface. Then, the expansion device can be registered to the metering module for identity authentication when it is powered on.
[0050] The expansion device generates a corresponding identity authentication request using its own attribute information and sends the identity authentication request to the electric energy meter. The electric energy meter includes a metering module for realizing metering functions. The electric energy meter receives the identity authentication request sent by the expansion device through the metering module, so that the electric energy meter performs identity authentication on the expansion device based on the attribute information in the identity authentication request through the metering module.
[0051] Specifically, the structure of the electric energy meter can be as shown in Figure 2 Figure 2 A structural schematic diagram of an electric energy meter in an embodiment. The electric energy meter includes a metering module, a storage module, and an accessed expansion device. The metering module is used to implement metering functions. The metering module is the core module of the electric energy meter, and mainly implements legal metering functions. The circuit design of the metering module mainly includes three parts: a metering core control circuit, a sampling circuit, and a storage module. The metering control chip can be an FM3308 chip, which has an 8-bit TURBO 51MCU (Microcontroller Unit) core, a 60KB FLASH program memory, a 3.5KB xRAM (on-chip expanded Random Access Memory), and a 256B iRAM (Internal Random Access Memory). In addition, it also integrates an LCD (Liquid Crystal Display) drive circuit, a real-time clock (RTC), multiple UART (Universal Asynchronous Receiver / Transmitter) interfaces, an I2C (Inter-Integrated Circuit) interface, a 7816 interface, and the like, supports multiple communication protocols, and meets the data processing and communication requirements of the smart electric energy meter.
[0052] The sampling circuit includes a voltage sampling circuit and a current sampling circuit. The voltage sampling circuit uses a resistance type voltage division sampling circuit with strong anti-interference ability and low cost. The current sampling circuit is two-way, and samples the current of the zero line and the live line respectively. The electric energy meter can use a manganese copper sheet current sensor to sample the live line current. The manganese copper sheet current sensor is a special sensor. When the current flowing through the manganese copper sheet changes, the potential difference generated will cause the potential difference between the two ends to change. In this way, the size of the potential difference can be measured to determine the size of the current. The resistance value of the manganese copper sheet in the manganese copper sheet current sensor can be 300μΩ. The electric energy meter can also use a circuit transformer to sample the zero line current. In order to avoid damage to the metering chip, different current sensors can be set in the two-way current sampling circuit.
[0053] The storage module is used to realize the storage function. In the working process of the electric energy meter, the collected data and the calculated data need to be stored, and the internal Flash of the MCU of the electric energy meter itself is limited in size, so part of the data needs to be stored in the external storage device. The storage module is a W25Q64JVSSIQ chip, which is a serial flash chip that provides a storage solution for electric energy meters with limited space, pins and power supply. It provides much more flexibility and performance than ordinary serial flash devices, is very suitable for memory code shielding, directly executes code from dual-channel / four-channel SPI (XIP), and stores voice, text and data.
[0054] The extension device is an illegal component of the new electric energy meter, which is completely decoupled from the metering module. The extension device also supports software upgrades, and the operation, upgrade and communication of the extension device should not affect the operation of the metering module. The extension device includes an operating system module, an edge computing module and a peripheral interface module.
[0055] The operating system module includes a startup layer, a driver layer, a system layer and an application layer. The application layer is used to realize the operation and management of system application software, business application software and extension application software. The business application software and the extension application software can also be referred to as extension business applications. The system application software realizes message routing, device management, event notification, application management, upgrade management, security management, access authentication, intelligent operation and maintenance, etc. The business application and the extension application software realize the extension function of the electric energy meter. The system layer supports multi-core design and provides kernel basic capabilities such as embedded operating system multi-task scheduling, inter-task communication, memory resource allocation and protection.
[0056] The system layer includes a kernel, a component and a POSIX (Portable Operating System Interface for Computer Environments) standard interface. The driver layer realizes master control and peripheral driving, and is compatible with multiple architecture hardware platforms (ARM / RISV, etc.), thereby providing unified peripheral access capabilities and driving development and management framework for the system layer and the application layer. The startup layer realizes part of hardware initialization and kernel loading boot. Thus, the electric energy meter sets the operating system in the extension layer and divides the operating system into the startup layer, the driver layer, the system layer and the application layer, so that the operating system is suitable for the hardware conditions of the electric energy meter, and the design logic of the electric energy meter is also more clear.
[0057] In step S204, the connection between the metering module and the extension device is established according to the identity authentication request.
[0058] The extended device needs to establish a bidirectional communication connection with the metering module after accessing the electric energy meter. For example, the electric energy meter can establish the connection between the metering module and the extended device according to the identity authentication request. The electric energy meter can establish the connection between the metering module and the extended device in a handshake connection manner.
[0059] In step S206, the identity of the extended device is authenticated based on the connection and the attribute information by the metering module, and a corresponding identity authentication result is obtained.
[0060] After the electric energy meter establishes the connection between the metering module and the extended device, the electric energy meter can process the attribute information in the identity authentication request by the metering module through the connection, and then perform identity authentication on the extended device to obtain a corresponding identity authentication result. The electric energy meter can perform identity authentication in the metering module by constructing an attribute information construction request and performing bidirectional confirmation with the extended device.
[0061] In step S208, when it is detected that the identity authentication result is authentication passed, a corresponding extended service is executed according to the extended service application in the operating system of the metering module and the extended device.
[0062] The identity authentication result includes authentication passed and authentication not passed. If the electric energy meter detects that the identity authentication result is authentication passed, it means that the extended device can interact with the metering module. The metering module is used to collect electric power related metering data. The extended device is provided with an operating system, and the operating system is installed with a corresponding extended service application. The electric energy meter can execute a corresponding extended service according to the extended service application in the operating system of the metering module and the extended device. For example, the metering module outputs the collected data to the extended device, and the extended device can process the data through the extended service application, and then execute a corresponding type of extended service. The extended device can be a device accessed through an extension interface.
[0063] In one embodiment, it also includes stopping the communication between the metering module and the extended device when it is detected that the extended device is removed from the extension interface. In this embodiment, the extended device can be connected to the electric energy meter through the extension interface, and the electric energy meter can stop the communication between the metering module and the extended device when it is detected that the extended device is removed from the extension interface. Thus, the efficiency of data transmission is improved.
[0064] In the above power meter expansion method, when the expansion device is connected, the metering module establishes a connection with the expansion device through identity authentication request, the metering module performs identity authentication on the expansion device based on the connection and attribute information of the expansion device, obtains a corresponding identity authentication result, and when the identity authentication result is passed, the corresponding expansion service is executed according to the expansion service application in the operating system of the metering module and the expansion device. Compared with the traditional expansion by replacing the original module in the power meter, the present application establishes the connection between the expansion device and the metering module by connecting the expansion device to the expansion interface in the power meter, performs identity authentication on the expansion device, and then processes the corresponding expansion service by using the expansion service application in the operating system of the expansion device and the output data of the metering module, thereby improving the security of the power meter expansion.
[0065] In one embodiment, according to the above identity authentication request, the connection between the metering module and the expansion device is established, including: sending the identity authentication request to the metering module through a serial peripheral interface protocol channel; obtaining the handshake notification in the identity authentication request through the metering module; generating corresponding response information according to the handshake notification, and sending the response information to the expansion device; and the expansion device establishes a connection with the metering module based on the response information.
[0066] In this embodiment, the expansion device can establish a bidirectional connection with the metering module in the power meter. For example, the power meter can receive the identity authentication request sent by the expansion device through the SPI (Serial Peripheral Interface) protocol channel, which contains the encrypted basic data of the expansion device, and send the identity authentication request to the metering module through the SPI protocol channel. The metering module determines the handshake notification based on the encrypted basic data in the identity authentication request, and generates corresponding response information according to the handshake notification, and sends the response information to the expansion device through the metering module. The expansion device can establish a connection with the metering module based on the response information, and then start the corresponding identity authentication process.
[0067] Specifically, when the power meter detects that the expansion device is powered on, the expansion device needs to be registered to the metering module for identity authentication. The expansion device can inform the metering module to receive the encrypted basic data of the expansion device through a bidirectional SPI channel based on the DL / T645 protocol, the metering module can obtain the corresponding handshake notification based on the encrypted basic data, and respond to the handshake notification of the expansion device by generating response information, thereby establishing a bidirectional connection between the metering module and the expansion device.
[0068] Through the embodiment, the electric energy meter can establish the connection between the metering module and the extension device in a bidirectional handshake manner, and then process the corresponding extension service after identity authentication based on the connection, thereby improving the security of the extension device accessing the electric energy meter.
[0069] In one embodiment, the metering module performs identity authentication on the extension device based on the connection and the attribute information, and obtains a corresponding identity authentication result, including: the metering module generates an identity authentication request information message based on the attribute information; the identity authentication request information message is sent to the extension device through the connection; the extension device returns a corresponding identity authentication confirmation message when verifying that the identity authentication request information message is correct; the identity authentication confirmation message is verified, and the identity authentication result is determined to be authenticated when the verification is passed.
[0070] In the embodiment, the electric energy meter can implement identity authentication on the extension device in a bidirectional message confirmation manner. The identity authentication request includes attribute information of the extension device, and the metering module can generate an identity authentication request information message based on the attribute information. The identity authentication request information message is sent to the extension device through the connection, and the extension device can verify the identity authentication request message and return a corresponding identity authentication confirmation message when verifying that the identity authentication request message is correct. The metering module receives the identity authentication message and verifies the correctness of the identity authentication confirmation message. When the verification is passed, the electric energy meter can determine that the identity authentication result is authenticated. After the identity authentication is passed, the electric energy meter can add a pass identifier to the extension device, and if not, the electric energy meter can add an error identifier to the extension device.
[0071] Specifically, when performing identity authentication, the electric energy meter can obtain attribute information of the extension device, including an ESAM (Enhanced Security Access Module, security access module) serial number, a key version, a session negotiation counter, and the like, and generate an extension device identity authentication request information message according to the attribute information. After the electric energy meter generates the identity authentication request information message, the electric energy meter can send the identity authentication request information message to the extension device. After the extension device receives the identity authentication request information message, the extension device can verify the data in the identity authentication request information message, determine whether the data is correct, return an identity authentication error message if the data is incorrect, and end the authentication process.
[0072] If the identity authentication request information message is verified to be correct, the above-mentioned extended device returns the identity authentication request data to form an identity authentication confirmation message and sends it to the electric energy meter. After receiving the identity authentication confirmation message, the electric energy meter can verify whether the data in the identity authentication confirmation message is correct. If not, the electric energy meter adds an error identifier to the extended device and ends the authentication process. If the verification is correct, the electric energy meter can add an authentication pass identifier to the extended device.
[0073] Through the embodiment, the electric energy meter can perform identity authentication on the extended device based on the two-way message verification manner, so that the electric energy meter implements the extended business processing of the data of the metering module based on the extended device after identity authentication, thereby improving the security of the electric energy meter accessing the extended device.
[0074] In one embodiment, according to the extended business application in the operating system of the above-mentioned metering module and the above-mentioned extended device, the corresponding extended business is executed, including: if the extended business application in the operating system of the above-mentioned extended device is a computing type business application, it is determined that the above-mentioned extended device is a computing type extended device; the clock synchronization request and the metering configuration request sent by the above-mentioned extended device are obtained; the above-mentioned metering module is clock-synchronized with the above-mentioned extended device according to the above-mentioned clock synchronization request, and the configuration parameters of the above-mentioned metering module are sent to the above-mentioned extended device according to the above-mentioned metering configuration request, to obtain a configured extended device; the original data is obtained by the above-mentioned metering module and output to the computing type business application in the configured above-mentioned extended device; the configured above-mentioned extended device is used to process the original data according to the above-mentioned computing type business application.
[0075] In the embodiment, the electric energy meter can execute the corresponding extended business application by using the extended device after identity authentication. The extended device can include multiple types, and the electric energy meter can determine the type of the extended business to be executed based on the type of the extended device. The type of the above-mentioned extended device can be determined based on the extended business application in the operating system. If the electric energy meter detects that the extended business application in the operating system of the above-mentioned extended device is a computer type business application, the electric energy meter can determine that the above-mentioned extended device is a computing type extended device.
[0076] The electric energy meter can also configure the extension device accordingly, including clock synchronization and metering configuration. Among them, the electric energy meter can obtain the clock synchronization request and metering configuration request sent by the extension device. The clock synchronization request is used to synchronize the clock between the extension device and the metering module, and the metering configuration request is used to configure the environment for the extension device to process metering data. The electric energy meter can synchronize the clock of the metering module with the extension device according to the clock synchronization request, and send the configuration parameters of the metering module to the extension device according to the metering configuration request. The extension device performs metering configuration based on the configuration parameters, and then the electric energy meter obtains the configured extension device based on the extension device after clock synchronization and metering configuration.
[0077] After the electric energy meter configures the extension device, it can obtain raw data through the metering module and output to the calculation type business application in the configured extension device, so that the configured extension device can process the raw data according to the calculation type business application.
[0078] Specifically, after the extension device and the metering module complete identity authentication, the electric energy meter can actively report the module change event (30300200) through the serial port of the communication module in the electric energy meter to notify the management end to copy 40310200 the extension device list, and the management end establishes the extension device list according to 40310200, so as to perform subsequent group copying and measurement. The extension device can request the clock of the metering module to synchronize the clock, for example, through the clock synchronization request to synchronize the clock; the extension module can also request the metering configuration parameters from the metering module, for example, through the metering configuration request, to obtain the configuration parameters of the metering module. After configuring the extension device, the electric energy meter can determine the type of the extension device. If the device category of the extension device is a calculation type extension device, the metering module starts to sample raw data, such as raw metering data, and outputs to the extension device, so that the extension device can process the raw data through the extension business application installed in the operating system, such as calculation processing.
[0079] Through the embodiment, the electric energy meter can configure the extension device after identity authentication, and based on the type of the extension device, the configured extension device processes the data in the metering module, improves the metering data processing efficiency, and improves the security of the electric energy meter accessing the extension device.
[0080] In one embodiment, the clock synchronization of the metering module and the extension device according to the clock synchronization request comprises: when the clock information of the master station corresponding to the electric energy meter is detected by the metering module, the electric energy meter is first time-synchronized according to the clock information; the extension device is sent the broadcast clock information in plain text according to the clock synchronization request and the clock information; and the extension device is configured to be second time-synchronized according to the broadcast clock information in plain text.
[0081] In the embodiment, the electric energy meter can be time-synchronized with the extension device based on the clock synchronization request and the clock information of the master station corresponding to the electric energy meter. The electric energy meter is connected to the corresponding master station, and when the clock information of the master station corresponding to the electric energy meter is detected by the metering module, the electric energy meter can be first time-synchronized according to the clock information. The electric energy meter can send the broadcast clock information in plain text to the extension device according to the clock synchronization request and the clock information. The extension device can be second time-synchronized based on the broadcast clock information in plain text after receiving the broadcast clock information in plain text.
[0082] Specifically, the electric energy meter can detect whether the master station is time-synchronized by the metering module, and if the master station is time-synchronized, the electric energy meter can be first time-synchronized according to the time of the master station. After the first time-synchronization is successful, the electric energy meter can send the broadcast clock information in plain text to the extension device through the UART. The extension device can be second time-synchronized including time modification and adjustment according to the broadcast clock information in plain text after receiving the broadcast clock information in plain text.
[0083] According to the embodiment, the electric energy meter can synchronize the time of the electric energy meter, the master station and the extension device respectively based on the clock information of the master station, and then process the related extension services of the electric energy meter based on the configured extension device, thereby improving the service processing efficiency.
[0084] It should be understood that, although each step in the flowchart involved in each of the above embodiments is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each of the above embodiments can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or stages in other steps.
[0085] Based on the same inventive concept, the embodiment of the present application also provides an electric energy meter expansion device for implementing the above-mentioned electric energy meter expansion method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above-mentioned method, so the specific limitations in one or more electric energy meter expansion device embodiments provided below can refer to the limitations of the electric energy meter expansion method described above, which will not be repeated here.
[0086] In one exemplary embodiment, as shown in Figure 3 An electric energy meter expansion device is provided, comprising: an access module 500, a connection module 502, an authentication module 504, and an expansion module 506, wherein:
[0087] The access module 500 is configured to, when detecting that an expansion device accesses an expansion interface in the above-mentioned electric energy meter, receive an identity authentication request sent by the expansion device through a metering module in the above-mentioned electric energy meter; the identity authentication request includes attribute information corresponding to the expansion device.
[0088] The connection module 502 is configured to establish a connection between the metering module and the expansion device according to the identity authentication request.
[0089] The authentication module 504 is configured to perform identity authentication on the expansion device based on the connection and the attribute information through the metering module, and obtain a corresponding identity authentication result.
[0090] The expansion module 506 is configured to, when detecting that the identity authentication result is authentication passed, execute corresponding expansion services according to expansion service applications in operating systems of the metering module and the expansion device.
[0091] In one embodiment, the connection module 502 is specifically configured to send the identity authentication request to the metering module through a serial peripheral interface protocol channel; obtain a handshake notification in the identity authentication request through the metering module; generate corresponding response information according to the handshake notification; send the response information to the expansion device; and the expansion device establishes a connection with the metering module based on the response information.
[0092] In one embodiment, the authentication module 504 is specifically configured to generate an identity authentication request information message through the metering module based on the attribute information; send the identity authentication request information message to the expansion device through the connection; the expansion device is configured to return a corresponding identity authentication confirmation message when verifying that the identity authentication request information message is correct; verify the identity authentication confirmation message, and determine that the identity authentication result is authentication passed when the verification is passed.
[0093] In one embodiment, the extension module 506 is specifically configured to determine that the extension device is a computing type extension device if the extension service application in the operating system of the extension device is a computing type service application, obtain a clock synchronization request and a metering configuration request sent by the extension device, synchronize the metering module with the extension device according to the clock synchronization request, send configuration parameters of the metering module to the extension device according to the metering configuration request, and obtain a configured extension device; obtain raw data through the metering module and output the raw data to the computing type service application in the configured extension device; and the configured extension device is configured to process the raw data according to the computing type service application.
[0094] In one embodiment, the extension module 506 is specifically configured to perform first time calibration on the electric energy meter according to the time calibration information when the metering module detects the time calibration information of the master station corresponding to the electric energy meter, send the plain broadcast time calibration information to the extension device according to the clock synchronization request and the time calibration information, and the extension device is configured to perform second time calibration according to the plain broadcast time calibration information.
[0095] In one embodiment, the access module 500 is specifically configured to determine that the extension device accesses the extension interface when detecting that the extension device is powered on through the extension interface.
[0096] In one embodiment, the device further comprises a stop module configured to stop the communication between the metering module and the extension device when detecting that the extension device is removed from the extension interface.
[0097] The various modules in the electric energy meter extension device can be implemented in whole or in part by software, hardware, and combinations thereof. The various modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the various modules.
[0098] In one exemplary embodiment, a computer device is provided, which can be an electric energy meter, and an internal structure diagram of the computer device can be as shown in FIG. 1. Figure 4The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to perform wired or wireless communication with external terminals. The wireless communication can be achieved through WIFI, mobile cellular network, near field communication (NFC) or other technologies. The computer program is executed by the processor to implement an electric energy meter expansion method. The display unit of the computer device is configured to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.
[0099] Those skilled in the art can understand that, Figure 4 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0100] In one exemplary embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the electric energy meter expansion method described above.
[0101] In one embodiment, a computer readable storage medium is provided, storing a computer program, and the computer program is executed by a processor to implement the electric energy meter expansion method described above.
[0102] In one embodiment, a computer program product is provided, including a computer program, and the computer program is executed by a processor to implement the electric energy meter expansion method described above.
[0103] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.
[0104] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments of each method. Any reference to memory, database or other medium used in the embodiments provided by the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (Resistive Random Access Memory, ReRAM), magnetoresistive random access memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (Artificial Intelligence, AI) processor, etc., without being limited thereto.
[0105] Any technical features in the above embodiments can be combined, and for the sake of brevity, not all possible combinations are described above, however, any combination of these technical features is deemed to be within the scope of the present application.
[0106] The above embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the patent scope of the present application. It should be pointed out that, for ordinary skilled persons in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A method for extending an electricity meter, characterized in that, Applied to electricity meters, the method includes: When an extended device is detected to be connected to the extended interface of the electricity meter, the metering module of the electricity meter receives an authentication request sent by the extended device; the authentication request includes attribute information corresponding to the extended device. Based on the identity authentication request, establish a connection between the metering module and the extended device; The metering module performs identity authentication on the extended device based on the connection and attribute information, and obtains the corresponding identity authentication result. When the authentication result is detected as successful, the corresponding extended services are executed according to the extended service applications in the operating systems of the metering module and the extended device, including: if the extended service application in the operating system of the extended device is a computing service application, the extended device is determined to be a computing extended device; a clock synchronization request and a metering configuration request sent by the extended device are obtained; the metering module and the extended device are clock-synchronized according to the clock synchronization request; the configuration parameters of the metering module are sent to the extended device according to the metering configuration request, resulting in a configured extended device; raw data is obtained through the metering module and output to the computing service application in the configured extended device; the configured extended device is used to process the raw data according to the computing service application.
2. The method according to claim 1, characterized in that, The step of establishing a connection between the metering module and the extended device based on the identity authentication request includes: The authentication request is sent to the metering module via the serial peripheral interface protocol channel; The handshake notification in the identity authentication request is obtained through the metering module; The corresponding response information is generated based on the handshake notification, and the response information is sent to the extended device; the extended device establishes a connection with the metering module based on the response information.
3. The method according to claim 1, characterized in that, The step of authenticating the extended device through the metering module based on the connection and attribute information to obtain the corresponding authentication result includes: The metering module generates an identity authentication request message based on the attribute information. The authentication request message is sent to the extended device via the connection; the extended device is used to return a corresponding authentication confirmation message when verifying that the authentication request message is correct. Verify the identity authentication confirmation message, and determine the identity authentication result as successful if the verification is successful.
4. The method according to claim 1, characterized in that, The step of synchronizing the metering module with the extended device according to the clock synchronization request includes: When the metering module detects the time synchronization information of the master station corresponding to the electricity meter, it performs a first time synchronization on the electricity meter based on the time synchronization information. The extended device sends plaintext broadcast time synchronization information to the extended device according to the clock synchronization request and the time synchronization information; the extended device is used to perform a second time synchronization according to the plaintext broadcast time synchronization information.
5. The method according to any one of claims 1 to 4, characterized in that, The detection of an extended device connected to the extended interface of the energy meter includes: When the power-on of the extended device is detected through the extended interface, it is determined that the extended device is connected to the extended interface; The method further includes: When the extension device is detected to have been removed from the extension interface, communication between the metering module and the extension device is stopped.
6. An electricity meter extension device, characterized in that, The device includes: The access module is used to receive an authentication request sent by the extended device through the metering module of the electricity meter when it detects that the extended device is connected to the extended interface of the electricity meter; the authentication request includes attribute information corresponding to the extended device. A connection module is used to establish a connection between the metering module and the extended device based on the identity authentication request; The authentication module is used to perform identity authentication on the extended device based on the connection and the attribute information through the metering module, and obtain the corresponding identity authentication result; An extension module is used to, when the authentication result is successful, execute corresponding extended services based on the extended service applications in the operating systems of the metering module and the extension device. Specifically, if the extended service application in the operating system of the extension device is a computing-related service application, it determines that the extension device is a computing-related extension device; obtains a clock synchronization request and a metering configuration request sent by the extension device; synchronizes the clock between the metering module and the extension device according to the clock synchronization request; sends the configuration parameters of the metering module to the extension device according to the metering configuration request, thus obtaining a configured extension device; obtains raw data through the metering module and outputs it to the computing-related service application in the configured extension device; the configured extension device is used to process the raw data according to the computing-related service application.
7. The apparatus according to claim 6, characterized in that, The connection module is specifically used for: The authentication request is sent to the metering module via the serial peripheral interface protocol channel; The handshake notification in the identity authentication request is obtained through the metering module; Generate corresponding response information based on the handshake notification and send the response information to the extended device; The extended device establishes a connection with the metering module based on the response information.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and device for external equipment to safely access intelligent electric meter
CN112367664A