Power equipment data information transmission system, method and device
By using the MQTT protocol to actively push power equipment data in the low-voltage distribution network, the problem of data transmission delay in the prior art is solved, real-time interaction and efficient transmission of power data are realized.
Patent Information
- Application Number
- CN202510032455.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-05-13
Smart Images

Figure CN119996512A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of Internet of Things, and in particular, relates to a system, method and device for transmitting data information of electric power equipment. Background Art
[0002] With the rapid development of new energy power systems, smart grids are evolving towards distributed, flexible, and highly automated. As an important hub connecting end users and power systems, low-voltage distribution networks are responsible for increasingly complex energy management and control tasks. In response to the needs of high-proportion distributed photovoltaic access between low-voltage stations, orderly charging of electric vehicles, and energy management of energy storage equipment, it is urgent to build an intelligent regional integration platform.
[0003] In the related art, the data interaction mode between the Web end and the server end in the regional integration platform is that the Web end initiates a request to the server end, the server end receives the request and calls for device data, the device responds and returns the data, and the server end processes the data and returns it to the Web end. However, this data transmission method has a large delay in each step from the Web end initiating the request to the final device response, and then sending the device response data to the Web end, resulting in too high a delay in the real-time data display, which cannot meet the user's real-time acquisition needs for the latest data. Summary of the invention
[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a power equipment data information transmission system, method and device to reduce the delay in the power data interaction process and improve the timeliness of the interaction process.
[0005] In a first aspect, the present application provides a power equipment data information transmission system, comprising:
[0006] The power equipment is used to collect power data, encapsulate the power data into a target message and send it to the MQTT topic corresponding to the MQTT module;
[0007] The MQTT module is used to send the target message of the MQTT topic update to the server subscribed to the MQTT topic in response to the update of the MQTT topic;
[0008] The server is used to parse the target message and send the target data obtained after parsing to the Web end.
[0009] According to the power equipment data information transmission system of the present application, by using the MQTT protocol to interact between the power equipment and the server, the power equipment can directly encapsulate the collected power data into messages and actively send them to the topic corresponding to the MQTT module. The MQTT module responds quickly to the update of the topic, and can instantly push the updated target message to the server that has subscribed to the topic. After receiving the target message, the server quickly parses it and sends the parsed data to the Web. Compared with the traditional request-response mode, this active push mechanism reduces the waiting time for requests from the Web and server, thereby reducing the delay in the power data interaction process and improving the timeliness of the interaction process.
[0010] According to an embodiment of the present application, the service end includes a data service module and a business service module;
[0011] The data service module is used to receive the target message sent by the MQTT module, parse the target message, and send the target data obtained after parsing to the business service module;
[0012] The business service module is used to perform business analysis on the target data and send the analyzed data to the Web end.
[0013] In this embodiment, by adopting a separate architecture of data service module and business service module on the server side, the data service module focuses on receiving the target message sent by the MQTT module and is responsible for parsing these messages, and can quickly pass the parsed data to the business service module, while the business service module can focus on the implementation of business logic without having to deal with the details of the underlying data parsing, making the process of data flow from collection to analysis and then to Web-side display smoother, reducing the delay of data processing and transmission. In addition, this separation architecture can also enable each module to be optimized and upgraded independently, thereby improving the flexibility and response speed of the system.
[0014] According to one embodiment of the present application, the data service module and the business service module interact through Kafka middleware;
[0015] The data service module is also used to deliver the target data obtained after parsing to the Kafka topic corresponding to the Kafka middleware;
[0016] The Kafka middleware is used to send the target data updated by the Kafka topic to the business service module subscribed to the Kafka topic in response to the update of the Kafka topic.
[0017] In this embodiment, the interaction between the data service module and the business service module is realized by introducing Kafka middleware, which effectively utilizes Kafka's distributed architecture and partitioning mechanism. The two parties of data interaction agree on the interaction topics and data specifications, and adopt real-time message sending and real-time consumption monitoring methods to improve the timeliness of data interaction.
[0018] According to an embodiment of the present application, parsing the target message includes:
[0019] Verifying the target message;
[0020] If the verification is successful, the target message is parsed and the data in the target message is converted into target data in a preset format.
[0021] In this embodiment, by integrating the verification and parsing process of the target message in the data service module, the integrity and validity of the data can be checked, reducing the risk of erroneous or malicious data entering the system. If the verification is passed, the data service module will further parse the target message and convert the data into a preset format, making the data more standardized and facilitating subsequent business analysis and processing, thereby improving the accuracy and efficiency of data processing.
[0022] According to one embodiment of the present application, performing business analysis on the target data includes:
[0023] Perform business analysis on the target data according to business needs; the business analysis includes at least one of statistics, comparison, and prediction.
[0024] In this embodiment, by integrating statistics, comparison, prediction and other analyses into the business service module, the analysis results can quickly respond to business needs, thereby improving the response speed of the system.
[0025] According to an embodiment of the present application, the business service module and the Web end interact using the WebSocket real-time interaction protocol.
[0026] In this embodiment, the WebSocket real-time interactive protocol is used to perform data interaction between the business service module and the Web end. The characteristics of the WebSocket protocol are utilized to actively push data to the Web end, so that the Web end can obtain the latest data in real time, achieve millisecond-level response, improve the speed of data transmission, and provide users with timely feedback.
[0027] In a second aspect, the present application provides a method for transmitting data information of an electric power device, comprising:
[0028] Obtaining a target message sent by the MQTT module in response to an update of the MQTT topic; wherein the target message is a message obtained by encapsulating the collected power data by the power device, and the target message is sent by the power device to the MQTT topic corresponding to the MQTT module;
[0029] Parsing the target message to obtain target data;
[0030] The target data is sent to the Web end.
[0031] According to the power equipment data information transmission method of the present application, by using the MQTT protocol to interact between the power equipment and the server, the power equipment can directly encapsulate the collected power data into a message and actively send it to the topic corresponding to the MQTT module. The MQTT module responds quickly to the update of the topic and can instantly push the updated target message to the server that has subscribed to the topic. After receiving the target message, the server quickly parses it and sends the parsed data to the Web. Compared with the traditional request-response mode, this active push mechanism reduces the waiting time for requests from the Web and server, thereby reducing the delay in the power data interaction process and improving the timeliness of the interaction process.
[0032] According to an embodiment of the present application, parsing the target message includes:
[0033] The target message is parsed by the data service module, and the target data obtained after parsing is sent to the business service module;
[0034] The sending the target data to the Web end includes:
[0035] The business service module performs business analysis on the target data and sends the analyzed data to the Web end.
[0036] According to an embodiment of the present application, parsing the target message through a data service module includes:
[0037] Verifying the target message;
[0038] If the verification is successful, the target message is parsed and the data in the target message is converted into target data in a preset format.
[0039] According to an embodiment of the present application, performing business analysis on the target data by the business service module includes:
[0040] Perform business analysis on the target data according to business needs; the business analysis includes at least one of statistics, comparison, and prediction.
[0041] According to an embodiment of the present application, the sending of the target data obtained after parsing to the business service module includes:
[0042] The target data obtained after parsing is delivered to the Kafka topic corresponding to the Kafka middleware through the data service module;
[0043] In the case of a Kafka topic update, the target data of the Kafka topic update is sent to the business service module subscribed to the Kafka topic through the Kafka middleware.
[0044] According to an embodiment of the present application, sending the target data to a Web terminal includes:
[0045] The target data is sent to the Web end via the WebSocket real-time interactive protocol.
[0046] In a third aspect, the present application provides a device for transmitting data information of an electric power device, comprising:
[0047] An acquisition module, used to acquire a target message sent by the MQTT module in response to an update of the MQTT topic; wherein the target message is a message obtained by encapsulating the collected power data by the power device, and the target message is sent by the power device to the MQTT topic corresponding to the MQTT module;
[0048] A parsing module, used for parsing the target message to obtain target data;
[0049] The sending module is used to send the target data to the Web end.
[0050] According to the power equipment data information transmission device of the present application, by using the MQTT protocol to interact between the power equipment and the server, the power equipment can directly encapsulate the collected power data into a message and actively send it to the topic corresponding to the MQTT module. The MQTT module responds quickly to the update of the topic, and can instantly push the updated target message to the server that has subscribed to the topic. After receiving the target message, the server quickly parses it and sends the parsed data to the Web. Compared with the traditional request-response mode, this active push mechanism reduces the waiting time for requests from the Web and server, thereby reducing the delay in the power data interaction process and improving the timeliness of the interaction process.
[0051] In a fourth aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for transmitting data information of an electric power device as described in the first aspect above is implemented.
[0052] In a fifth aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for transmitting data information of an electric power device as described in the first aspect above is implemented.
[0053] In a sixth aspect, the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method for transmitting data information of an electric power device as described in the first aspect above.
[0054] In a seventh aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method for transmitting data information of an electric power device as described in the first aspect above.
[0055] The above one or more technical solutions in the embodiments of the present application have at least one of the following technical effects:
[0056] According to the power equipment data information transmission system of the present application, by using the MQTT protocol to interact between the power equipment and the server, the power equipment can directly encapsulate the collected power data into messages and actively send them to the topic corresponding to the MQTT module. The MQTT module responds quickly to the update of the topic, and can instantly push the updated target message to the server that has subscribed to the topic. After receiving the target message, the server quickly parses it and sends the parsed data to the Web. Compared with the traditional request-response mode, this active push mechanism reduces the waiting time for requests from the Web and server, thereby reducing the delay in the power data interaction process and improving the timeliness of the interaction process.
[0057] Furthermore, in some embodiments, by adopting a separate architecture of data service module and business service module on the server side, the data service module focuses on receiving the target message sent by the MQTT module and is responsible for parsing these messages, and can quickly pass the parsed data to the business service module, while the business service module can focus on the implementation of business logic without having to deal with the details of the underlying data parsing, making the process of data flow from collection to analysis and then to Web-side display smoother, reducing data processing and transmission delays. In addition, this separation architecture can also enable each module to be optimized and upgraded independently, thereby improving the flexibility and response speed of the system.
[0058] Furthermore, in some embodiments, the interaction between the data service module and the business service module is realized by introducing Kafka middleware, which effectively utilizes Kafka's distributed architecture and partitioning mechanism. The two parties of data interaction agree on the interaction topics and data specifications, and adopt real-time message sending and real-time consumption monitoring methods to improve the timeliness of data interaction.
[0059] Furthermore, in some embodiments, by integrating the verification and parsing process of the target message in the data service module, the integrity and validity of the data can be checked, reducing the risk of erroneous or malicious data entering the system. If the verification is passed, the data service module will further parse the target message and convert the data into a preset format, making the data more standardized and facilitating subsequent business analysis and processing, thereby improving the accuracy and efficiency of data processing.
[0060] Furthermore, in some embodiments, by integrating statistics, comparison, prediction and other analyses into the business service module, the analysis results can be quickly responded to business needs, thereby improving the response speed of the system.
[0061] Furthermore, in some embodiments, by adopting the WebSocket real-time interaction protocol to perform data interaction between the business service module and the Web end, the characteristics of the WebSocket protocol are utilized to actively push data to the Web end, so that the Web end can obtain the latest data in real time, achieve millisecond-level response, improve the speed of data transmission, and provide users with timely feedback.
[0062] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0064] Figure 1 It is an architecture diagram of the power equipment data information transmission system provided in an embodiment of the present application;
[0065] Figure 2 It is a schematic diagram of the interaction process of the power equipment, MQTT module and data service module provided in the embodiment of the present application;
[0066] Figure 3It is a schematic diagram of the interaction process between the data service module and the business service module provided in the embodiment of the present application;
[0067] Figure 4 It is a schematic diagram of the interaction process between the business service module and the Web terminal provided in the embodiment of the present application;
[0068] Figure 5 It is a flowchart of a method for transmitting data information of electric power equipment provided in an embodiment of the present application;
[0069] Figure 6 It is a structural schematic diagram of a data information transmission device for electric power equipment provided in an embodiment of the present application;
[0070] Figure 7 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0071] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0072] The terms "first", "second", etc. in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0073] The following, in conjunction with the accompanying drawings, describes in detail the power equipment data information transmission system, method and device provided in the embodiments of the present application through specific embodiments and their application scenarios.
[0074] like Figure 1 As shown, the power equipment data information transmission system 100 may include a power equipment 110 , an MQTT module 120 and a server 130 .
[0075] The power device 110 may be used to collect power data, encapsulate the power data into a target message and send it to the MQTT topic corresponding to the MQTT module 120;
[0076] The MQTT module 120 may be used to respond to an update of the MQTT topic and send a target message of the MQTT topic update to the server 130 subscribed to the MQTT topic;
[0077] The server 130 can be used to parse the target message and send the target data obtained after parsing to the Web end.
[0078] In the embodiment of the present application, the power equipment 110 refers to equipment used in the power system, which is responsible for the production, conversion, transmission, distribution and consumption of electric energy. For example, the power equipment 110 may include power generation equipment, such as generators, transformers, solar panels, inverters, etc.; the power equipment 110 may also include power consumption equipment, such as charging piles, electric vehicles, etc.; the power equipment 110 may also include energy storage equipment, such as energy storage batteries, battery management systems, energy management systems, etc. Of course, the power equipment 110 may also include other equipment, which is not limited in the embodiment of the present application.
[0079] The power data may be data related to the production, transmission, distribution and consumption of electric energy collected by various sensors and measuring devices in the power equipment 110. For example, the power data may include basic electrical parameters such as voltage, current, frequency, and power consumption. The power data may also include data related to the operating status of the power equipment 110, such as temperature, pressure, etc. The embodiments of the present application do not limit the power data.
[0080] In the embodiment of the present application, the MQTT module 120 is a middleware service, and the MQTT module 120 works based on the MQTT (Message Queuing Telemetry Transport) protocol. MQTT is a lightweight message transmission protocol designed for the Internet of Things environment and is suitable for low-bandwidth, high-latency or unreliable network environments. The core of the MQTT protocol lies in MQTT topics and wildcards, which form the basis of the MQTT publish-subscribe model, enabling accurate communication in a complex Internet of Things ecosystem. The MQTT topic is an addressing mechanism for messages that enables devices and applications to organize and filter information flows. The MQTT topic provides a hierarchical structure that can represent different aspects of the Internet of Things system, such as device location, sensor type, and data category. The MQTT topic is similar to a URL (Uniform Resource Locator) path, and is hierarchical using a slash " / ", such as sensor / 10 / temperature, where sensor represents the device type, 10 can represent the device ID or location, and temperature indicates the data type.
[0081] In the embodiment of the present application, after the power device 110 collects power data through built-in sensors and measuring devices, the collected power data can be encapsulated into a target message in the format specified by the MQTT protocol. For example, the power data can be converted into JSON or binary format, and the necessary MQTT message header and attributes can be set to form the target message. The power device 110 publishes the encapsulated target message to the MQTT topic predefined in the MQTT module 120.
[0082] Specifically, when using the MQTT protocol to transmit data, MQTT topics corresponding to different power data can be pre-defined. For example, different topics can be defined according to the source device of the power data, the data type of the power data, etc. For example, if the power data is voltage, an MQTT topic solar_panel / 1 / voltage can be created, where solar_panel represents the device type, 1 represents the device ID, and voltage represents the voltage data. If the power data is battery power, an MQTT topic storage / 1 / charge_level can be created, where storage represents the device type, 1 represents the device ID, and charge_level represents the remaining power. Each MQTT topic can correspond to a data type and device. The power device 110 can determine which MQTT topic in the MQTT module to send the power data to based on the data type and source device of the collected power data.
[0083] In some embodiments, before the power device 110 sends a message to the MQTT module 120, it is necessary to successfully establish a connection with the MQTT module 120. Specifically, Figure 2 As shown, after the network connection from the power device 110 to the MQTT module 120 is established, the power device 110 will send a CONNECT message to the MQTT module 120 to request to establish a connection; after receiving the CONNECT message, the MQTT module 120 will verify the format and content of the CONNECT message, including information such as the protocol name, protocol level, connection flag, and connection retention time, as well as verify the identity and authority of the power device 110. If the verification fails, the network connection is directly closed. If the verification passes, a CONNACK message response will be returned to confirm the connection. After the connection is successfully established, the power device 110 can encapsulate the power data into a PUBLISH message and publish the message to the topic of the MQTT module 120. The PUBLISH message contains a fixed header, a variable header, and a payload. The fixed header contains the message type and reserved bits, the variable header contains the topic name and message identifier, and the payload is the actual message content to be published.
[0084] A heartbeat mechanism may be used between the power device 110 and the MQTT module 120 to maintain the connection with the MQTT service. After receiving the PINGREQ message sent by the power device 110, the MQTT module 120 returns a PINGREESP message as a heartbeat response to confirm that the connection is still valid.
[0085] In the MQTT protocol, subscription means that the client sends a SUBSCRIBE message to the MQTT broker, indicating that the client wants to receive messages from a specific topic. The subscription mechanism allows the client to receive only the messages it is interested in, rather than all messages, which can effectively reduce network traffic and processing load.
[0086] In the embodiment of the present application, the MQTT module 120 can maintain a subscription list internally to record which server 130 has subscribed to which topics. When the target message arrives, the MQTT module 120 will detect the updated topic, check the subscription list, find out the server 130 that has subscribed to the topic, and forward the target message to the server 130 that has subscribed to the topic.
[0087] In some embodiments, the server 130 can be a single server or a server cluster composed of multiple servers to provide high availability and load balancing. The MQTT module 120 can be an independently deployed server or integrated as a functional module in the server 130. When the MQTT module 120 is deployed independently, the MQTT module 120 can act as a dedicated MQTT agent responsible for processing MQTT communications, including message publishing and subscription. In this case, the server 130 acts as an application server responsible for processing tasks such as business logic and data storage.
[0088] In an embodiment of the present application, after receiving the target message, the server 130 can parse the target message, and the parsing may include decoding the target message, format conversion, etc., to obtain target data; the parsing process may include analyzing the power data in the target message, such as the power data in the target message includes voltage, current, active power and power factor, and these data can be calculated to obtain the load data of the equipment, and the obtained load data can be determined as the target data.
[0089] In some embodiments, the server 130 can establish a WebSocket connection with the Web terminal, and send the target data to the Web terminal through the WebSocket real-time interactive protocol. The Web terminal can be a user interface that allows users to access and interact through a browser. For example, the Web terminal can be a monitoring dashboard that can display real-time data, historical trends, and analysis results. Users can monitor the operating status of power equipment in real time through the Web interface and promptly discover and handle potential problems.
[0090] Among them, WebSocket is a protocol for full-duplex communication on a single TCP connection, replacing the traditional HTTP polling to achieve more efficient and real-time communication. WebSocket creates a persistent connection between the Web end and the server 130, allowing both parties to send data while the connection remains open without having to re-establish the connection for each data exchange.
[0091] By adopting the WebSocket real-time interactive protocol to exchange data between the server 130 and the Web end, the characteristics of the WebSocket protocol are utilized to actively push data to the Web end, so that the Web end can obtain the latest data in real time, achieve millisecond-level response, improve the speed of data transmission, and provide timely feedback to users.
[0092] According to the power equipment data information transmission system of the present application, by using the MQTT protocol to interact between the power equipment and the server, the power equipment can directly encapsulate the collected power data into messages and actively send them to the topic corresponding to the MQTT module. The MQTT module responds quickly to the update of the topic, and can instantly push the updated target message to the server that has subscribed to the topic. After receiving the target message, the server quickly parses it and sends the parsed data to the Web. Compared with the traditional request-response mode, this active push mechanism reduces the waiting time for requests from the Web and server, thereby reducing the delay in the power data interaction process and improving the timeliness of the interaction process.
[0093] In some embodiments, the server 130 includes a data service module 131 and a business service module 132;
[0094] The data service module 131 is used to receive the target message sent by the MQTT module 120, parse the target message, and send the target data obtained after parsing to the business service module 132;
[0095] The business service module 132 is used to perform business analysis on the target data and send the analyzed data to the Web end.
[0096] In this embodiment, the data service module 131 may be a single server, or a server cluster composed of multiple servers, or may be integrated as a functional module in the server 130 .
[0097] In this embodiment, the data service module 131 can receive the target message sent from the MQTT module 120. The target message contains the original power data collected by the power device 110, such as voltage, current, power, etc. The data service module 131 can parse the target message to extract the data in the target message and convert it into a format that can be further processed by the business service module 132. After parsing, the data service module 131 transmits the target data to the business service module 132.
[0098] In some embodiments, the data service module 131 needs to request to subscribe to a topic from the MQTT module 120. Figure 2 As shown, the data service module 131 can send a SUBSCRIBE message to the MQTT module 120 to request to subscribe to a topic; after receiving the SUBSCRIBE message, the MQTT module 120 will verify the format and content of the SUBSCRIBE message, including the legitimacy of the message identifier and the topic filter, and check whether the data service module 131 has the authority to subscribe to the requested topic. If the verification is successful, the MQTT module 120 will add the data service module 131 to the subscription list of the corresponding topic and send a SUBACK message as a response, indicating that the subscription is successful.
[0099] A heartbeat mechanism may be used between the data service module 131 and the MQTT module 120 to maintain the connection with the MQTT service. After receiving the PINGREQ message sent by the data service module 131, the MQTT module 120 returns a PINGREESP message as a heartbeat response to confirm that the connection is still valid.
[0100] In this embodiment, the business service module 132 may be a single server, or a server cluster composed of multiple servers, or may be integrated as a functional module in the server 130 .
[0101] In this embodiment, the business service module 132 may receive the target data obtained after parsing, and analyze the target data, which may include data aggregation, trend analysis, anomaly detection, etc. For example, the business service module 132 may analyze the power consumption data over a period of time to identify the peak and valley of energy use, or analyze abnormal behaviors such as equipment failure or power theft, etc., and may also analyze and organize the target data, etc. The business service module 132 sends the analyzed data to the Web end.
[0102] In this embodiment, by adopting a separate architecture of data service module and business service module on the server side, the data service module focuses on receiving the target message sent by the MQTT module and is responsible for parsing these messages, and can quickly pass the parsed data to the business service module, while the business service module can focus on the implementation of business logic without having to deal with the details of the underlying data parsing, making the process of data flow from collection to analysis and then to Web-side display smoother, reducing the delay of data processing and transmission. In addition, this separation architecture can also enable each module to be optimized and upgraded independently, thereby improving the flexibility and response speed of the system.
[0103] In some embodiments, the data service module 131 and the business service module 132 interact via Kafka middleware;
[0104] The data service module 131 is also used to deliver the target data obtained after parsing to the Kafka topic corresponding to the Kafka middleware;
[0105] The Kafka middleware is used to send the target data of the Kafka topic update to the business service module 132 subscribed to the Kafka topic in response to the update of the Kafka topic.
[0106] In this embodiment, Kafka middleware is a distributed stream processing platform, which is mainly used to build real-time data pipelines and streaming applications. In Kafka, different messages can be published to different or the same Kafka topics, and consumers subscribe to these Kafka topics to receive messages. Kafka topics can be regarded as classifications of messages, and Kafka topics are logical containers for messages in Kafka.
[0107] like Figure 3 As shown, after receiving the target message sent by the MQTT module 120, the data service module 131 will parse it and deliver the parsed target data to the Kafka topic corresponding to the Kafka middleware. Specifically, the data service module 131 can first parse the target message to obtain the target data, and then convert the target data into a format that can be processed by the Kafka middleware, and specify the Kafka topic name. For example, if the data service module 131 receives the voltage and current data of the power equipment 110, the target data can be encapsulated into a message and sent to a Kafka topic named "power_equipment_data". In some embodiments, different Kafka topic names can be set in advance according to the data type, and the data service module 131 can determine the Kafka topic name according to the type of target data.
[0108] When the Kafka middleware detects that a Kafka topic has been updated, it will send the updated target data in the Kafka topic to the business service module 132 that has subscribed to the Kafka topic. Specifically, the Kafka middleware uses the concept of consumer groups to manage the distribution of messages, so that consumers in each consumer group can receive messages in the Kafka topic. For example, a consumer group list can be maintained inside the Kafka middleware to record which business service modules 132 (consumers) have subscribed to which topics. When the Kafka middleware detects that a Kafka topic has been updated, it checks the consumer group list to find out the business service module 132 that has subscribed to the topic, and forwards the target data to the business service module 132 that has subscribed to the topic.
[0109] In this embodiment, the business service module 132 may receive the target data obtained after parsing, and analyze the target data, which may include data aggregation, trend analysis, anomaly detection, etc. For example, the business service module 132 may analyze the power consumption data over a period of time to identify the peak and valley of energy use, or analyze abnormal behaviors such as equipment failure or power theft, etc., and may also analyze and organize the target data, etc. The business service module 132 may send the analyzed data to the Web end.
[0110] In this embodiment, the interaction between the data service module and the business service module is realized by introducing Kafka middleware, which effectively utilizes Kafka's distributed architecture and partitioning mechanism. The two parties of data interaction agree on the interaction topics and data specifications, and adopt real-time message sending and real-time consumption monitoring methods to improve the timeliness of data interaction.
[0111] In some embodiments, parsing the target message includes:
[0112] Verify the target message;
[0113] If the verification is successful, the target message is parsed and the data in the target message is converted into target data in a preset format.
[0114] In this embodiment, by verifying the target message, it is possible to verify whether the received target message is legal and credible. Specifically, a series of checks can be performed on the target message, such as checking the integrity of the message to determine whether the target message has been tampered with or damaged during transmission. Verification can also include checking the source of the target message, confirming whether the target message comes from an authorized device, and checking whether the format of the target message meets the expected specifications. For example, the header of the target message can be detected to determine whether the target message complies with the MQTT protocol specification. Whether the target message comes from an authorized device can be confirmed by checking the device ID or using a digital signature.
[0115] If the verification is successful, the target message can be parsed and converted from the original format (such as binary, JSON, etc.) to a preset format. Specifically, the data fields in the target message can be extracted according to the preset protocol. For example, if the target message is in JSON format, the JSON object can be parsed, the key-value pairs therein can be extracted, and these key-value pairs can be converted into a preset format.
[0116] In this embodiment, by integrating the verification and parsing process of the target message in the data service module, the integrity and validity of the data can be checked, reducing the risk of erroneous or malicious data entering the system. If the verification is passed, the data service module will further parse the target message and convert the data into a preset format, making the data more standardized and facilitating subsequent business analysis and processing, thereby improving the accuracy and efficiency of data processing.
[0117] In some embodiments, performing business analysis on the target data includes:
[0118] Conduct business analysis on target data according to business needs; business analysis includes at least one of statistics, comparison, and prediction.
[0119] In this embodiment, the analysis target can be determined based on business requirements. For example, a power company may be interested in business requirements such as peak and valley periods of power consumption, equipment performance, and fault prediction. These business requirements can guide the direction and depth of business analysis.
[0120] Statistics can include summarizing and describing large amounts of data. For example, in a smart grid, the total amount of electricity consumption per region or time period can be counted to calculate average consumption or identify areas with unusually high consumption. Comparisons can include comparing different data sets to identify trends and patterns. For example, electricity consumption data for different time periods can be compared, such as comparing the current month's consumption to the same period last year to identify seasonal changes or growth trends. Forecasting can include predicting future events based on historical data and statistical models. For example, in a power monitoring system, machine learning algorithms can be used to predict future power demand or predict possible equipment failures.
[0121] In some embodiments, business analysis may also include identifying whether the target data is in a uniform format. For example, if the date formats in the target data are not uniform, these date formats may be converted to a uniform date format; if the target data contains measurements in non-standard units, these measurements may be converted to standard units. Business analysis may also include data cleaning of the target data, such as removing useless fields or correcting erroneous data.
[0122] In this embodiment, by integrating statistics, comparison, prediction and other analyses into the business service module, the analysis results can quickly respond to business needs, thereby improving the response speed of the system.
[0123] In some embodiments, the business service module 132 and the Web end interact using the WebSocket real-time interaction protocol.
[0124] In this embodiment, the Web end can send a handshake request to the business service module 132. After the business service module 132 responds, a WebSocket connection is established. After the connection is successfully established, when the business service module 132 receives data, the data can be immediately pushed to the Web end. Specifically, the Web end can send a special HTTP request to the business service module 132 to request an upgrade to the WebSocket protocol; the business service module 132 responds to this request, and if the upgrade is agreed, a special HTTP status code is returned to complete the handshake. For example, in the Web interface of the smart grid monitoring system, the JavaScript code will create a WebSocket connection. After the WebSocket connection is successfully established, the business service module 132 and the Web end can send and receive messages through this connection.
[0125] In one example, the process of real-time communication between the Web terminal and the business service module 132 via the WebSocket protocol is as follows: Figure 4As shown, the Web end first creates a WebSocket connection request through JavaScript or other client technology, and sends the request to the business service module 132. The business service module 132 will pre-set a listening socket, which is responsible for listening to the connection request from the Web end. When the request from the Web end arrives, the listening socket of the business end will receive the request. When the listening socket detects the connection request, the business service module 132 will wait and receive the request. After receiving the connection request from the Web end, the business service module 132 will create a new socket to handle the connection, and the new socket will be used exclusively for communication with the Web end.
[0126] After the connection is established, both the Web end and the business service module 132 can send and receive data through this socket. The Web end can send data to the business service module 132 through OutputStream, and the business service module 132 receives data through InputStream. Similarly, the business service module 132 can also send data to the Web end through OutputStream, and the Web end receives it through InputStream.
[0127] When the communication ends, whether it is because the user closes the Web page or because the logic of the business service module 132 needs to disconnect, the closing process will be triggered. The Web end and the business service module 132 will close their respective sockets and release the resources related to the connection.
[0128] In this embodiment, the WebSocket real-time interactive protocol is used to perform data interaction between the business service module and the Web end. The characteristics of the WebSocket protocol are utilized to actively push data to the Web end, so that the Web end can obtain the latest data in real time, achieve millisecond-level response, improve the speed of data transmission, and provide users with timely feedback.
[0129] The embodiment of the present application also provides a method for transmitting data information of an electric power device, wherein the method for transmitting data information of an electric power device can be applied to a terminal, and can be specifically executed by hardware or software in the terminal.
[0130] The terminal includes, but is not limited to, a portable communication device such as a mobile phone or tablet computer with a touch-sensitive surface (e.g., a touch screen display and / or a touch pad). It should also be understood that in some embodiments, the terminal may not be a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., a touch screen display and / or a touch pad).
[0131] In the following various embodiments, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, a mouse and a joystick.
[0132] The embodiment of the present application provides a method for transmitting data information of electric power equipment. The execution subject of the method can be an electronic device or a functional module or functional entity in the electronic device that can implement the method for transmitting data information of electric power equipment. The electronic devices mentioned in the embodiment of the present application include but are not limited to tablet computers, computers, servers, etc. The method for transmitting data information of electric power equipment provided in the embodiment of the present application is described below using the server as an example of the execution subject.
[0133] like Figure 5 As shown, the method for transmitting data information of electric power equipment includes: step 510, step 520 and step 530.
[0134] Step 510: Obtain a target message sent by the MQTT module in response to the update of the MQTT topic; wherein the target message is a message obtained by the power device after encapsulating the collected power data, and the target message is sent by the power device to the MQTT topic corresponding to the MQTT module;
[0135] Step 520: parse the target message to obtain target data;
[0136] Step 530: Send the target data to the Web end.
[0137] In the embodiments of the present application, power equipment refers to equipment used in power systems, which are responsible for the production, conversion, transmission, distribution and consumption of electric energy. For example, power equipment may include power generation equipment, such as generators, transformers, solar panels, inverters, etc.; power equipment may also include power consumption equipment, such as charging piles, electric vehicles, etc.; power equipment may also include energy storage equipment, such as energy storage batteries, battery management systems, energy management systems, etc. Of course, power equipment may also include other equipment, which is not limited in the embodiments of the present application.
[0138] Power data can be data related to the production, transmission, distribution and consumption of electric energy collected by various sensors and measuring devices in power equipment. For example, power data can include basic electrical parameters such as voltage, current, frequency, power consumption, etc. Power data can also include data related to the operating status of power equipment, such as temperature, pressure, etc. The embodiments of this application do not limit power data.
[0139] In the embodiment of the present application, the MQTT module is a middleware service, and the MQTT module works based on the MQTT (Message Queuing Telemetry Transport) protocol. MQTT is a lightweight message transmission protocol designed for the Internet of Things environment and is suitable for low-bandwidth, high-latency or unreliable network environments. The core of the MQTT protocol lies in MQTT topics and wildcards, which form the basis of the MQTT publish-subscribe model, enabling accurate communication in a complex Internet of Things ecosystem. The MQTT topic is an addressing mechanism for messages that enables devices and applications to organize and filter information flows. The MQTT topic provides a hierarchical structure that can represent different aspects of the Internet of Things system, such as device location, sensor type, and data category. The MQTT topic is similar to a URL (Uniform Resource Locator) path, and is layered using a slash " / ", such as sensor / 10 / temperature, where sensor represents the device type, 10 can represent the device ID or location, and temperature indicates the data type.
[0140] In the embodiment of the present application, after the electric power equipment collects the electric power data through the built-in sensors and measuring devices, the collected electric power data can be encapsulated into a target message according to the format specified by the MQTT protocol. For example, the electric power data can be converted into JSON or binary format, and the necessary MQTT message header and attributes can be set to form the target message. The electric power equipment publishes the encapsulated target message to the MQTT topic predefined in the MQTT module.
[0141] In the embodiment of the present application, the MQTT module can maintain a subscription list internally to record which servers have subscribed to which topics. When the target message arrives, the MQTT module will detect the updated topic, check the subscription list, find out the server that has subscribed to the topic, and forward the target message to the server that has subscribed to the topic.
[0142] In an embodiment of the present application, after receiving the target message, the server can parse the target message, and the parsing may include decoding the target message, format conversion, etc., to obtain target data; the parsing process may include analyzing the power data in the target message, such as the power data in the target message includes voltage, current, active power and power factor, and these data can be calculated to obtain the load data of the equipment, and the obtained load data can be determined as the target data.
[0143] In some embodiments, the server can establish a WebSocket connection with the Web terminal, and send the target data to the Web terminal through the WebSocket real-time interactive protocol. The Web terminal can be a user interface that allows users to access and interact through a browser. For example, the Web terminal can be a monitoring dashboard that can display real-time data, historical trends, and analysis results. Users can monitor the operating status of power equipment in real time through the Web interface and promptly discover and handle potential problems.
[0144] According to the power equipment data information transmission method of the present application, by using the MQTT protocol to interact between the power equipment and the server, the power equipment can directly encapsulate the collected power data into a message and actively send it to the topic corresponding to the MQTT module. The MQTT module responds quickly to the update of the topic and can instantly push the updated target message to the server that has subscribed to the topic. After receiving the target message, the server quickly parses it and sends the parsed data to the Web. Compared with the traditional request-response mode, this active push mechanism reduces the waiting time for requests from the Web and server, thereby reducing the delay in the power data interaction process and improving the timeliness of the interaction process.
[0145] In some embodiments, parsing the target message includes:
[0146] The target message is parsed through the data service module, and the target data obtained after parsing is sent to the business service module;
[0147] Send the target data to the Web client, including:
[0148] The business service module performs business analysis on the target data and sends the analyzed data to the Web end.
[0149] In this embodiment, the data service module can receive the target message sent from the MQTT module. The target message contains the original power data collected by the power equipment, such as voltage, current, power, etc. The data service module can parse the target message to extract the data in the target message and convert it into a format that can be further processed by the business service module. After parsing, the data service module transmits the target data to the business service module.
[0150] In this embodiment, the business service module may receive the target data obtained after parsing, and analyze the target data, which may include data aggregation, trend analysis, anomaly detection, etc. For example, the business service module may analyze the power consumption data over a period of time to identify the peak and valley of energy use, or analyze abnormal behaviors such as equipment failure or power theft, etc., and may also analyze and organize the target data, etc. The business service module sends the analyzed data to the Web end.
[0151] In this embodiment, by adopting a separate architecture of data service module and business service module, the data service module focuses on receiving the target message sent by the MQTT module and is responsible for parsing these messages, and can quickly pass the parsed data to the business service module, while the business service module can focus on the implementation of business logic without having to deal with the details of the underlying data parsing, making the process of data flow from collection to analysis and then to Web-side display smoother, reducing the delay of data processing and transmission. In addition, this separation architecture can also enable each module to be optimized and upgraded independently, thereby improving the flexibility and response speed of the system.
[0152] In some embodiments, parsing the target message by the data service module includes:
[0153] Verify the target message;
[0154] If the verification is successful, the target message is parsed and the data in the target message is converted into target data in a preset format.
[0155] In this embodiment, by verifying the target message, it is possible to verify whether the received target message is legal and credible. Specifically, a series of checks can be performed on the target message, such as checking the integrity of the message to determine whether the target message has been tampered with or damaged during transmission. Verification can also include checking the source of the target message, confirming whether the target message comes from an authorized device, and checking whether the format of the target message meets the expected specifications. For example, the header of the target message can be detected to determine whether the target message complies with the MQTT protocol specification. Whether the target message comes from an authorized device can be confirmed by checking the device ID or using a digital signature.
[0156] If the verification is successful, the target message can be parsed and converted from the original format (such as binary, JSON, etc.) to a preset format. Specifically, the data fields in the target message can be extracted according to the preset protocol. For example, if the target message is in JSON format, the JSON object can be parsed, the key-value pairs therein can be extracted, and these key-value pairs can be converted into a preset format.
[0157] In this embodiment, by integrating the verification and parsing process of the target message in the data service module, the integrity and validity of the data can be checked, reducing the risk of erroneous or malicious data entering the system. If the verification is passed, the data service module will further parse the target message and convert the data into a preset format, making the data more standardized and facilitating subsequent business analysis and processing, thereby improving the accuracy and efficiency of data processing.
[0158] In some embodiments, the business analysis of the target data is performed by the business service module, including:
[0159] Conduct business analysis on target data according to business needs; business analysis includes at least one of statistics, comparison, and prediction.
[0160] In this embodiment, the analysis target can be determined based on business requirements. For example, a power company may be interested in business requirements such as peak and valley periods of power consumption, equipment performance, and fault prediction. These business requirements can guide the direction and depth of business analysis.
[0161] Statistics can include summarizing and describing large amounts of data. For example, in a smart grid, the total amount of electricity consumption per region or time period can be counted to calculate average consumption or identify areas with unusually high consumption. Comparisons can include comparing different data sets to identify trends and patterns. For example, electricity consumption data for different time periods can be compared, such as comparing the current month's consumption to the same period last year to identify seasonal changes or growth trends. Forecasting can include predicting future events based on historical data and statistical models. For example, in a power monitoring system, machine learning algorithms can be used to predict future power demand or predict possible equipment failures.
[0162] In some embodiments, business analysis may also include identifying whether the target data is in a uniform format. For example, if the date formats in the target data are not uniform, these date formats may be converted to a uniform date format; if the target data contains measurements in non-standard units, these measurements may be converted to standard units. Business analysis may also include data cleaning of the target data, such as removing useless fields or correcting erroneous data.
[0163] In this embodiment, by integrating statistics, comparison, prediction and other analyses into the business service module, the analysis results can quickly respond to business needs, thereby improving the response speed of the system.
[0164] In some embodiments, the target data obtained after parsing is sent to the business service module 132, including:
[0165] The target data obtained after parsing is delivered to the Kafka topic corresponding to the Kafka middleware through the data service module;
[0166] In the case of a Kafka topic update, the target data of the Kafka topic update is sent to the business service module 132 that subscribes to the Kafka topic through the Kafka middleware.
[0167] In this embodiment, Kafka middleware is a distributed stream processing platform, which is mainly used to build real-time data pipelines and streaming applications. In Kafka, different messages can be published to different or the same Kafka topics, and consumers subscribe to these Kafka topics to receive messages. Kafka topics can be regarded as classifications of messages, and Kafka topics are logical containers for messages in Kafka.
[0168] When the Kafka middleware detects that a Kafka topic has been updated, it will send the updated target data in the Kafka topic to the business service module 132 that has subscribed to the Kafka topic. Specifically, the Kafka middleware uses the concept of consumer groups to manage the distribution of messages, so that consumers in each consumer group can receive messages in the Kafka topic. For example, a consumer group list can be maintained inside the Kafka middleware to record which business service modules 132 (consumers) have subscribed to which topics. When the Kafka middleware detects that a Kafka topic has been updated, it checks the consumer group list to find out the business service module 132 that has subscribed to the topic, and forwards the target data to the business service module 132 that has subscribed to the topic.
[0169] In this embodiment, the business service module 132 may receive the target data obtained after parsing, and analyze the target data, which may include data aggregation, trend analysis, anomaly detection, etc. For example, the business service module may analyze the power consumption data over a period of time to identify the peaks and valleys of energy use, or analyze abnormal behaviors such as equipment failure or power theft, etc., and may also analyze and organize the target data, etc. The business service module may send the analyzed data to the Web end.
[0170] In this embodiment, the interaction between the data service module and the business service module is realized by introducing Kafka middleware, which effectively utilizes Kafka's distributed architecture and partitioning mechanism. The two parties of data interaction agree on the interaction topics and data specifications, and adopt real-time message sending and real-time consumption monitoring methods to improve the timeliness of data interaction.
[0171] In some embodiments, sending the target data to a Web end includes:
[0172] The target data is sent to the Web end through the WebSocket real-time interaction protocol.
[0173] In this embodiment, the Web end can send a handshake request to the server. After the server responds, the WebSocket connection is established. After the connection is successfully established, when the server receives data, it can immediately push the data to the Web end. Specifically, the Web end can send a special HTTP request to the server to request an upgrade to the WebSocket protocol; the server responds to this request, and if it agrees to the upgrade, it returns a special HTTP status code to complete the handshake. For example, in the Web interface of the smart grid monitoring system, the JavaScript code will create a WebSocket connection. After the WebSocket connection is successfully established, the server and the Web end can send and receive messages through this connection.
[0174] In this embodiment, the WebSocket real-time interactive protocol is used to perform data interaction between the business service module and the Web end. The characteristics of the WebSocket protocol are utilized to actively push data to the Web end, so that the Web end can obtain the latest data in real time, achieve millisecond-level response, improve the speed of data transmission, and provide users with timely feedback.
[0175] The power equipment data information transmission method provided in the embodiment of the present application can be executed by a power equipment data information transmission device. In the embodiment of the present application, the power equipment data information transmission device executing the power equipment data information transmission method is taken as an example to illustrate the power equipment data information transmission device provided in the embodiment of the present application.
[0176] An embodiment of the present application also provides a device for transmitting data information of an electric power device.
[0177] like Figure 6 As shown, the power equipment data information transmission device includes:
[0178] The acquisition module 610 is used to acquire the target message sent by the MQTT module in response to the update of the MQTT topic; wherein the target message is a message obtained by the power device after encapsulating the collected power data, and the target message is sent by the power device to the MQTT topic corresponding to the MQTT module;
[0179] The parsing module 620 is used to parse the target message to obtain the target data;
[0180] The sending module 630 is used to send the target data to the Web end.
[0181] According to the power equipment data information transmission device of the present application, by using the MQTT protocol to interact between the power equipment and the server, the power equipment can directly encapsulate the collected power data into a message and actively send it to the topic corresponding to the MQTT module. The MQTT module responds quickly to the update of the topic, and can instantly push the updated target message to the server that has subscribed to the topic. After receiving the target message, the server quickly parses it and sends the parsed data to the Web. Compared with the traditional request-response mode, this active push mechanism reduces the waiting time for requests from the Web and server, thereby reducing the delay in the power data interaction process and improving the timeliness of the interaction process.
[0182] In some embodiments, the parsing module 620 is further configured to:
[0183] The target message is parsed through the data service module, and the target data obtained after parsing is sent to the business service module;
[0184] The sending module 630 is further used to: perform business analysis on the target data through the business service module, and send the analyzed data to the Web end.
[0185] In some embodiments, the parsing module 620 is further configured to:
[0186] Verify the target message;
[0187] If the verification is successful, the target message is parsed and the data in the target message is converted into target data in a preset format.
[0188] In some embodiments, the parsing module 620 is further configured to:
[0189] Conduct business analysis on target data according to business needs; business analysis includes at least one of statistics, comparison, and prediction.
[0190] In some embodiments, the parsing module 620 is further configured to:
[0191] The target data obtained after parsing is delivered to the Kafka topic corresponding to the Kafka middleware through the data service module;
[0192] In the case of Kafka topic update, the target data of the Kafka topic update is sent to the business service module subscribed to the Kafka topic through the Kafka middleware.
[0193] In some embodiments, the sending module 630 is further configured to:
[0194] The target data is sent to the Web end through the WebSocket real-time interaction protocol.
[0195] The power equipment data information transmission device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than the terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0196] The power equipment data information transmission device in the embodiment of the present application may be a device having an operating system. The operating system may be a Microsoft (Windows) operating system, an Android (Android) operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0197] In some embodiments, Figure 7 As shown, an embodiment of the present application also provides an electronic device 700, including a processor 701, a memory 702, and a computer program stored in the memory 702 and executable on the processor 701. When the program is executed by the processor 701, each process of the above-mentioned embodiment of the method for transmitting data information of power equipment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0198] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0199] An embodiment of the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned embodiment of the power equipment data information transmission method are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0200] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0201] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned power equipment data information transmission method when executed by a processor.
[0202] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0203] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned embodiment of the power equipment data information transmission method, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0204] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0205] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0206] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0207] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0208] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0209] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.
Claims
1. A power equipment data information transmission system, characterized in that: include: The power equipment is used to collect power data, encapsulate the power data into a target message and send it to the MQTT topic corresponding to the MQTT module; The MQTT module is used to send the target message of the MQTT topic update to the server subscribed to the MQTT topic in response to the update of the MQTT topic; The server is used to parse the target message and send the target data obtained after parsing to the Web end.
2. The system according to claim 1, characterized in that The server includes a data service module and a business service module; The data service module is used to receive the target message sent by the MQTT module, parse the target message, and send the target data obtained after parsing to the business service module; The business service module is used to perform business analysis on the target data and send the analyzed data to the Web end.
3. The system according to claim 2, characterized in that The data service module and the business service module interact through Kafka middleware; The data service module is also used to deliver the target data obtained after parsing to the Kafka topic corresponding to the Kafka middleware; The Kafka middleware is used to send the target data updated by the Kafka topic to the business service module subscribed to the Kafka topic in response to the update of the Kafka topic.
4. The system according to claim 2, characterized in that The parsing of the target message includes: Verifying the target message; If the verification is successful, the target message is parsed and the data in the target message is converted into target data in a preset format.
5. The system according to claim 2, characterized in that The performing business analysis on the target data includes: Perform business analysis on the target data according to business needs; the business analysis includes at least one of statistics, comparison, and prediction.
6. The system according to claim 2, characterized in that The business service module and the Web end interact using the WebSocket real-time interaction protocol.
7. A method for transmitting data information of electric power equipment, characterized in that: include: Obtaining a target message sent by the MQTT module in response to an update of the MQTT topic; wherein the target message is a message obtained by encapsulating the collected power data by the power device, and the target message is sent by the power device to the MQTT topic corresponding to the MQTT module; Parsing the target message to obtain target data; The target data is sent to the Web end.
8. The method according to claim 7, characterized in that The parsing of the target message includes: The target message is parsed by the data service module, and the target data obtained after parsing is sent to the business service module; The sending the target data to the Web end includes: The business service module performs business analysis on the target data and sends the analyzed data to the Web end.
9. The method according to claim 8, characterized in that The parsing of the target message by the data service module includes: Verifying the target message; If the verification is successful, the target message is parsed and the data in the target message is converted into target data in a preset format.
10. The method according to claim 8, characterized in that The performing business analysis on the target data by the business service module includes: Perform business analysis on the target data according to business needs; the business analysis includes at least one of statistics, comparison, and prediction.
11. The method according to claim 8, characterized in that The target data obtained after parsing is sent to the business service module, including: The target data obtained after parsing is delivered to the Kafka topic corresponding to the Kafka middleware through the data service module; In the case of a Kafka topic update, the target data of the Kafka topic update is sent to the business service module subscribed to the Kafka topic through the Kafka middleware.
12. The method according to claim 7, characterized in that The sending the target data to the Web end includes: The target data is sent to the Web end via the WebSocket real-time interactive protocol.
13. A data information transmission device for electric power equipment, characterized in that: include: An acquisition module, used to acquire a target message sent by the MQTT module in response to an update of the MQTT topic; wherein the target message is a message obtained by encapsulating the collected power data by the power device, and the target message is sent by the power device to the MQTT topic corresponding to the MQTT module; A parsing module, used for parsing the target message to obtain target data; The sending module is used to send the target data to the Web end.
14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 7 to 12 is implemented.
15. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 7 to 12 is implemented.