CN115685816A - Energy data subscription and control system based on websocket - Google Patents

Energy data subscription and control system based on websocket Download PDF

Info

Publication number
CN115685816A
CN115685816A CN202211255235.6A CN202211255235A CN115685816A CN 115685816 A CN115685816 A CN 115685816A CN 202211255235 A CN202211255235 A CN 202211255235A CN 115685816 A CN115685816 A CN 115685816A
Authority
CN
China
Prior art keywords
data
service center
instruction
subscription
websocket
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211255235.6A
Other languages
Chinese (zh)
Inventor
曹道柱
周淑华
张璐
任亚恒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Lianhong Smart Energy Co ltd
Original Assignee
Jiangsu Lianhong Smart Energy Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Lianhong Smart Energy Co ltd filed Critical Jiangsu Lianhong Smart Energy Co ltd
Priority to CN202211255235.6A priority Critical patent/CN115685816A/en
Publication of CN115685816A publication Critical patent/CN115685816A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses an energy data subscription and control system based on websocket, which comprises the following steps: s1, designing a module, and dividing a system into three modules; s2, setting an instruction and defining the instruction; s3, defining a theme, and determining a data item required by the module through the theme; s4, defining the message; s5, completing system construction, starting the system, and performing data interaction; compared with the prior art, the invention supports web configuration software, self-defines interactive instructions and topic subscription modes, solves the problem of multi-channel processing of one data source, is convenient for summarizing and analyzing multi-source data and mining big data, and can realize unattended monitoring and alarming.

Description

Energy data subscription and control system based on websocket
Technical Field
The invention relates to the field of energy control, in particular to an energy data subscription and control system based on websocket.
Background
The traditional energy consumption real-time monitoring and control system is realized based on secondary development of desktop configurations such as InTouch, PCVue and the like. The desktop configuration software is bound with the variable in the energy consumption data acquisition unit, so that data display and control instruction issuing are realized. The energy consumption management system must open another historical data acquisition channel again, carries out data acquisition, gathers to energy consumption analysis.
When the system is implemented, an industrial personal computer is generally deployed in a machine room or a power distribution room and used for displaying energy data in real time and feeding back the state of the energy data. And managers also need to guard at the side of the industrial personal computer at any time for monitoring and managing.
The following problems exist by adopting the traditional desktop configuration software:
1. the desktop configuration is desktop software, and if a plurality of clients exist, each client must be installed and deployed, and each upgrade and maintenance needs to be synchronized.
2. The desktop configuration has a data link for communicating with the energy consumption data collector, but the data cannot be transmitted to the energy management system.
3. Once the system is closed or the operating system is restarted, data communication cannot be carried out, and real-time alarm cannot be given out when a fault is found.
4. Historical data cannot be collected, and the historical data needs to be provided with a data collection channel additionally by an energy system.
5. Desktop configurations are mostly monopolized abroad and are expensive, and a single form cannot meet the requirements of diversified customers.
6. And the energy management service of the mobile terminal is not supported.
7. The data are scattered in each device, and large data analysis is not facilitated.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention aims to provide an energy data subscription and control system which is convenient for the summarization and analysis of multi-source data and the mining of big data and is realized based on websocket.
In order to achieve the above object, the present invention adopts the following technical solutions:
a system for subscribing and controlling energy data based on websocket is characterized by comprising the following steps: s1, designing a module, and dividing a system into three modules; s2, setting an instruction and defining the instruction; s3, defining a theme, and determining a data item required by the module through the theme; s4, defining the message; and S5, completing system construction, starting the system, and performing data interaction.
As a further preferred aspect of the present invention, in step S1, a system data service center, a data collector, and a web are configured;
the data service center is used for collecting, summarizing, calculating and storing energy data;
the data collector is used for carrying out data communication with the bottom layer equipment and comprises data collection and control instruction issuing;
the web configuration is used for displaying the energy data in real time and providing a human-computer interaction interface for issuing a control instruction to the equipment data service center.
As a further preferred aspect of the present invention, the instructions in step S2 include a verification instruction Verify, a Send data instruction Send, a subscribe data instruction Sub, a subscribe return instruction SubBack, a unsubscribe execution Cancel, a control instruction Set, and a control return instruction SetBack;
the verification instruction Verify is used for the collector and the web configuration to establish a communication request to a websocket server of the data service center and Verify client information;
sending a data instruction Send to be used for the collector to Send the collected data to a data service center;
the subscription data instruction Sub is used for subscribing data from the web configuration to the data service center, and the data service center pushes the data configuration once the subscribed data is changed;
a subscription return instruction subBack is used for a data service center to push changed data to a web configuration in real time;
canceling subscription execution Cancel for web configuration cancellation of real-time data subscription;
the control instruction Set is used for sending a control request to the data service center by the web configuration, and the data service center forwards the request to the data acquisition unit;
the control return instruction SetBack is used for feedback of the user control result.
As a further preferred embodiment of the present invention, the subject format in step S3 is set as item number/data type/data point/data attribute; example (c): 1/D/pm100e. Epsum/Real;
wherein, the item number is in a digital format and is used for representing the distributed item number;
the data types comprise equipment D and energy consumption summary data R;
the data attribute comprises 1, when the data is in the device data, the data is coded by the device; 2. when the energy consumption summarizes the data, the data is represented by an energy consumption summarizing relation ID;
the data attributes comprise Real-time data Real, the amount of the current Hour Hour, the amount of the last Hour Lhour, the amount of the current Day Day, the amount of the last Day Lday, the amount of the current Month Month, the amount of the last Month Lmonth, the amount of the current Year Year and the amount of the last Year LYear.
As a further preferred embodiment of the present invention, the communication packet in step S4 adopts a json format, which is flexible and convenient to expand; the message includes: verify instructions, send instructions, sub instructions, cancel instructions, and Set instructions.
As a further preferred aspect of the present invention, the specific steps in step S5 are as follows:
s5.1, when the system runs, the data service center starts a websocket server;
s5.2, starting the data acquisition unit again, establishing websocket connection with the data service center, and pushing the acquired data in real time;
s5.3, after the web configuration is started, establishing websocket communication, and subscribing real-time data and energy consumption summary data to be displayed to a data service center;
s5.4, the data service center pushes the received data to the web configuration according to subscription requirements;
and S5.5, during control, the web configuration issues a control instruction to the data service center, the data service center sends the control instruction to the data collector, and the web configuration monitoring control returns a result.
The invention has the advantages that: the invention supports web configuration software, defines interactive instructions and topic subscription modes, solves the problem of multi-channel processing of one data source, is convenient for summarizing and analyzing multi-source data and mining big data, and can realize unattended monitoring and alarming; by adopting a websocket protocol, the three modules of the data service center, the web configuration and the data acquisition unit can be decoupled, and distributed deployment is realized. After the web configuration is used, the browser and the mobile terminal can be used for performing related activities of energy management anytime and anywhere, the customer experience is greatly improved, and the hardware investment of multiple customers can be reduced. The data is concentrated to the data service center, so that the summarization and analysis of multi-source data and the mining of big data are facilitated. The flexible instruction and theme design is convenient for system expansion, and the diversified customer requirements can be met by matching with the open design of the web configuration.
Drawings
FIG. 1 is a block diagram of the modules of the present invention.
Detailed Description
The invention is described in detail below with reference to the figures and the embodiments.
A websocket-based energy data subscription and control system is characterized by comprising the following steps:
s1, designing a module, and dividing the system into three modules.
And configuring a data service center, a data acquisition unit and a web of the system.
The data service center is used for collecting, summarizing, calculating and storing energy data.
The data collector is used for carrying out data communication with the bottom layer equipment, and comprises data collection and control instruction issuing.
The web configuration is used for displaying the energy data in real time and providing a human-computer interaction interface for issuing a control instruction to the equipment data service center.
And S2, setting a command and defining the command.
The command comprises a verification command Verify, a data sending command Send, a data subscribing command Sub, a data subscribing returning command subBack, a unsubscribing execution Cancel, a control command Set and a control returning command SetBack;
and the verification instruction Verify is used for establishing a communication request to a websocket server of the data service center by the collector and the web configuration and verifying the client information.
And sending a data instruction Send for the collector to Send the collected data to the data service center.
The subscription data instruction Sub is used for subscribing data from the web configuration to the data service center, and the data service center can push the data to the web configuration as long as the subscribed data change once.
And a subscription return instruction subBack is used for the data service center to push the changed data to the web configuration in real time.
Canceling the subscription, executing Cancel, and canceling the subscription of the real-time data by the web configuration.
The control instruction Set is used for sending a control request to the data service center by the web configuration, and the data service center forwards the request to the data collector.
The control return instruction SetBack is used for feedback of the user control result.
And S3, defining the theme, and determining the data items required by the module through the theme.
The theme format is set as item number/data type/data point/data attribute in step S3; example (c): 1/D/PM100E.
Wherein the item number is in a numeric format for indicating the assigned item number.
The data types include device D, energy consumption summary data R.
The data attribute comprises 1, when the data is in the device data, the data is coded by the device; 2. and when the energy consumption summarizes the data, the data is represented by an energy consumption summary relation ID.
The data attributes comprise Real-time data Real, the Hour dosage Hour, the Hour dosage Lhour, the Day dosage Day, the Day dosage Lday, the Month dosage Month, the Month dosage Lmonth, the Year dosage Year and the Year dosage LYear.
And S4, defining the message.
The communication message adopts a json format, and is flexible and convenient to expand; the message includes: verify instructions, send instructions, sub instructions, cancel instructions, and Set instructions.
(1) Verify instruction
Sending a message format: { "type": verify "," value ": web" }
And returning a message format: non-return message
Description of message data items:
type: validating instructions
value: value, expressed as user name for this instruction
And after the verification is successful, no message is returned, the verification is unsuccessful, and the data service center connects the terminal with the websocket.
(2) Send instruction
Sending a message format: { "type": send "," topic ": 1/D/PM100E. Epsum/Real", "value":456}
And returning a message format: non-return message
Description of message data items:
type: sending instructions
topic: data topics
value: value of
(3) Sub instruction
Sending a message format: { "type": sub "," topic ": 1/D/PM100E. Epsum/Real" }
And returning a message format: { "type": subBack "," topic ": 1/D/PM100E. Epsum/Real", "value":456}
Description of message data items:
type: subscription instructions
topic: data topics
value: value of
(4) Cancel instruction
Sending a message format: { "type": cancel "," topoc ": 1/D/PM100E. Epsum/Real" }
And returning a message format: non-return message
Description of message data items:
type: cancelling instruction
topic: data topics
(5) Set instruction
Sending a message format: { "type": set "," topoic ": 1/D/PM100E. Epsum/Real", "value":456}
And returning a message instruction: { "type": setBack "," topic ": 1/D/PM100E. Epsum/Real", "value": true "," mark ": result description" }
Description of message data items:
type: control instruction
topic: data topics
value: value, being a control result
And (4) marking: and (6) describing the result.
And (5) completing system construction by combining the images of the figure 1 and the figure 5, and starting the system to perform data interaction.
The method comprises the following specific steps:
s5.1, when the system runs, the data service center starts a websocket server;
s5.2, starting the data acquisition unit again, establishing websocket connection with the data service center, and pushing the acquired data in real time;
s5.3, after the web configuration is started, establishing websocket communication, and subscribing real-time data and energy consumption summary data to be displayed to a data service center;
s5.4, the data service center pushes the received data to the web configuration according to subscription requirements;
and S5.5, during control, the web configuration issues a control instruction to the data service center, the data service center sends the control instruction to the data collector, and the web configuration monitoring control returns a result.
The invention has the advantages that: the invention supports web configuration software, defines interactive instructions and topic subscription modes, solves the problem of multi-channel processing of one data source, is convenient for summarizing and analyzing multi-source data and mining big data, and can realize unattended monitoring and alarming. By adopting a websocket protocol, the three modules of the data service center, the web configuration and the data acquisition unit can be decoupled, and distributed deployment is realized. After the web configuration is used, the browser and the mobile terminal can be used for performing related activities of energy management anytime and anywhere, the customer experience is greatly improved, and the hardware investment of multiple customers can be reduced. The data is concentrated to the data service center, so that the summarization and analysis of multi-source data and the mining of big data are facilitated. The flexible instruction and theme design is convenient for system expansion, and the diversified customer requirements can be met by matching with the open design of the web configuration.
The foregoing illustrates and describes the principles, general features, and advantages of the present invention. It should be understood by those skilled in the art that the above embodiments do not limit the present invention in any way, and all technical solutions obtained by using equivalent alternatives or equivalent variations fall within the scope of the present invention.

Claims (6)

1. A websocket-based energy data subscription and control system is characterized by comprising the following steps: s1, designing a module, and dividing a system into three modules; s2, setting an instruction and defining the instruction; s3, defining a theme, and determining a data item required by the module through the theme; s4, defining the message; and S5, completing system construction, starting the system, and performing data interaction.
2. The websocket-based energy data subscription and control system of claim 1, wherein in step S1, a system data service center, a data collector, and a web are configured;
the data service center is used for collecting, summarizing, calculating and storing energy data;
the data collector is used for carrying out data communication with the bottom layer equipment and comprises data collection and control instruction issuing;
the web configuration is used for displaying the energy data in real time and providing a human-computer interaction interface for issuing a control instruction to the equipment data service center.
3. The websocket-based energy data subscription and control system as claimed in claim 1, wherein the instructions in step S2 include a verification instruction Verify, a Send data instruction Send, a subscribe data instruction Sub, a subscribe return instruction SubBack, a unsubscribe execution Cancel, a control instruction Set, and a control return instruction SetBack;
the verification instruction Verify is used for the collector and the web configuration to establish a communication request to a websocket server of the data service center and Verify client information;
sending a data instruction Send to be used for the collector to Send the collected data to a data service center;
the subscription data instruction Sub is used for subscribing data from the web configuration to the data service center, and the data service center pushes the data configuration once the subscribed data is changed;
a subscription return instruction subBack is used for a data service center to push changed data to a web configuration in real time;
canceling subscription execution Cancel for web configuration cancellation of real-time data subscription;
the control instruction Set is used for sending a control request to the data service center by the web configuration, and the data service center forwards the request to the data acquisition unit;
the control return instruction SetBack is used for feedback of the user control result.
4. The websocket-based energy data subscription and control system as claimed in claim 1, wherein the topic format in step S3 is set as item number/data type/data point/data attribute;
wherein, the item number is in a digital format and is used for representing the distributed item number;
the data types comprise equipment D and energy consumption summary data R;
the data attribute comprises 1, when the data is in the device data, the data is coded by the device; 2. when the energy consumption summarizes the data, the data is represented by an energy consumption summarizing relation ID;
the data attributes comprise Real-time data Real, the Hour dosage Hour, the Hour dosage Lhour, the Day dosage Day, the Day dosage Lday, the Month dosage Month, the Month dosage Lmonth, the Year dosage Year and the Year dosage LYear.
5. The websocket-based energy data subscription and control system as claimed in claim 1, wherein the communication packet in step S4 is in json format, flexible and convenient to expand; the message includes: verify instructions, send instructions, sub instructions, cancel instructions, and Set instructions.
6. The websocket-based energy data subscription and control system as claimed in claim 1, wherein the specific steps in step S5 are as follows:
s5.1, when the system runs, the data service center starts a websocket server;
s5.2, starting the data acquisition unit again, establishing websocket connection with the data service center, and pushing the acquired data in real time;
s5.3, after the web configuration is started, establishing websocket communication, and subscribing real-time data and energy consumption summary data to be displayed to a data service center;
s5.4, the data service center pushes the received data to the web configuration according to subscription requirements;
and S5.5, during control, the web configuration issues a control instruction to the data service center, the data service center sends the control instruction to the data collector, and the web configuration monitoring control returns a result.
CN202211255235.6A 2022-10-13 2022-10-13 Energy data subscription and control system based on websocket Pending CN115685816A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211255235.6A CN115685816A (en) 2022-10-13 2022-10-13 Energy data subscription and control system based on websocket

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211255235.6A CN115685816A (en) 2022-10-13 2022-10-13 Energy data subscription and control system based on websocket

Publications (1)

Publication Number Publication Date
CN115685816A true CN115685816A (en) 2023-02-03

Family

ID=85065455

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211255235.6A Pending CN115685816A (en) 2022-10-13 2022-10-13 Energy data subscription and control system based on websocket

Country Status (1)

Country Link
CN (1) CN115685816A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116166862A (en) * 2023-04-25 2023-05-26 国网信息通信产业集团有限公司 Multi-source data fusion method, system and equipment based on configuration editor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116166862A (en) * 2023-04-25 2023-05-26 国网信息通信产业集团有限公司 Multi-source data fusion method, system and equipment based on configuration editor

Similar Documents

Publication Publication Date Title
CN109067618B (en) Distributed real-time data IOT acquisition system and method
CN106487585A (en) Equipment complex monitoring system framework
CN101751032B (en) Method and system for managing automatic control system and video monitoring system
CN108255127A (en) A kind of industry spot remote control administrative system and method based on industrial human-computer interface
CN103067230A (en) Method for achieving hyper text transport protocol (http) service monitoring through embedding monitoring code
CN102255386A (en) Operation management system of client distribution equipment
CN101482960A (en) Method and system for marketing in bank hall
CN108845798A (en) A kind of visualization big data task cradle and processing method
CN102821414A (en) System and method for managing CWSN (cloud wireless sensor network) communication data based on GUI (graphical user interface)
CN111143167B (en) Alarm merging method, device, equipment and storage medium for multiple platforms
CN102004989A (en) Electric power business service system
CN102238023A (en) Method and device for generating warning data of network management system
CN115685816A (en) Energy data subscription and control system based on websocket
CN102724164A (en) Multi-communication protocol transmission apparatus of electric power control system and method thereof
CN102916987A (en) Data acquisition and management system based on cloud computing framework
CN104793570A (en) Portable motor train unit fault processing support equipment and portable motor train unit fault processing support system
CN101640813A (en) Method and device for implementing use plan of predetermined value-added service
CN102541539B (en) Method for designing intelligent panel of supply chain based on M2M (Machine to Machine)
CN113255026B (en) CAD collaborative design method based on semantic information exchange
CN115687523A (en) MES system broken network data processing method, device and system
CN108345650A (en) Electronic invoice business monitors method for early warning and system in real time
CN114379620A (en) Rail transit network centralized alarm system and method
CN201371835Y (en) Railway transportation centralized alarm management system
CN201869220U (en) Electric power business service system
CN202085001U (en) Operating system of user-side power equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination