CN110557374B - Power data acquisition method and device, computer equipment and storage medium - Google Patents

Power data acquisition method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110557374B
CN110557374B CN201910705882.4A CN201910705882A CN110557374B CN 110557374 B CN110557374 B CN 110557374B CN 201910705882 A CN201910705882 A CN 201910705882A CN 110557374 B CN110557374 B CN 110557374B
Authority
CN
China
Prior art keywords
power
program
internal
file
external
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910705882.4A
Other languages
Chinese (zh)
Other versions
CN110557374A (en
Inventor
庄文德
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southern Power Grid Digital Grid Research Institute Co Ltd
Original Assignee
Southern Power Grid Digital Grid Research Institute 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 Southern Power Grid Digital Grid Research Institute Co Ltd filed Critical Southern Power Grid Digital Grid Research Institute Co Ltd
Priority to CN201910705882.4A priority Critical patent/CN110557374B/en
Publication of CN110557374A publication Critical patent/CN110557374A/en
Application granted granted Critical
Publication of CN110557374B publication Critical patent/CN110557374B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to a power data acquisition method, a power data acquisition device, computer equipment and a storage medium. The method comprises the following steps: after receiving a power data transmission request of an external application program, calling an external isolation penetration program; the external isolation penetration program is provided with a first data transmission port; receiving a TCP power data stream of the external application through the first data transmission port; converting the TCP power data stream according to a preset data format to obtain an effective power file; and transmitting the effective power file to an internal isolation penetration program for analysis and storage through preset isolation equipment, so that an internal application program can call the effective power file stored in the internal isolation penetration program. By adopting the method, system service logic and interfaces are not required to be modified, seamless trans-regional transmission between data is realized, the efficiency, convenience and reusability of trans-regional data transmission are improved, and the development cost and time cost of trans-regional data can be greatly saved.

Description

电力数据采集方法、装置、计算机设备和存储介质Power data acquisition method, device, computer equipment and storage medium

技术领域technical field

本申请涉及电力系统数据采集领域,特别是涉及一种电力数据采集方法、装置、计算机设备和存储介质。The present application relates to the field of power system data acquisition, and in particular, to a power data acquisition method, device, computer equipment and storage medium.

背景技术Background technique

目前,越来越多的电力系统为了能够满足新的安全防护要求,均采用安全分区、网络专用、横向隔离、纵向认证的原则进行全面建设。At present, in order to meet the new security protection requirements, more and more power systems are comprehensively constructed using the principles of security partitioning, dedicated network, horizontal isolation, and vertical authentication.

现有的电力网络数据传输方法,通常在横向隔离方面采用了专用网络隔离设备进行部署,设备通过物理隔离技术的应用实现对电力系统的网络防护。In the existing power network data transmission methods, special network isolation equipment is usually used for horizontal isolation, and the equipment realizes the network protection of the power system through the application of physical isolation technology.

然而,由于现有的电力网络结构复杂,程序调用耦合度较高,若应用于不同系统的应用场景,均需通过程序定制开发,导致基于该结构采用的电力网络数据传输方法传输效率低。However, due to the complex structure of the existing power network and the high degree of program call coupling, if it is applied to application scenarios of different systems, it needs to be developed through program customization, resulting in low transmission efficiency of the power network data transmission method based on this structure.

因此,现有的电力网络数据传输方法存在着数据传输效率低的问题。Therefore, the existing power network data transmission methods have the problem of low data transmission efficiency.

发明内容SUMMARY OF THE INVENTION

基于此,有必要针对上述电力网络数据传输方法存在着数据传输效率低的技术问题,提供一种能够合理解决上述技术问题的一种电力数据采集方法、装置、计算机设备和存储介质。Based on this, it is necessary to provide a power data acquisition method, device, computer equipment and storage medium that can reasonably solve the above technical problem in view of the technical problem of low data transmission efficiency in the above-mentioned power network data transmission method.

一种电力数据采集方法,包括如下步骤:A method for collecting power data, comprising the following steps:

在接收到外部应用程序的电力数据传输请求后,调用外部隔离穿透程序;所述外部隔离穿透程序具有第一数据传输端口;After receiving the power data transmission request from the external application, call the external isolation penetration program; the external isolation penetration program has a first data transmission port;

通过所述第一数据传输端口,接收所述外部应用程序的TCP电力数据流;Receive the TCP power data stream of the external application through the first data transmission port;

将所述TCP电力数据流按照预设数据格式进行转换,得到有效电力文件;Converting the TCP power data stream according to a preset data format to obtain a valid power file;

通过预置隔离设备,将所述有效电力文件传输至内部隔离穿透程序进行解析存储,供内部应用程序调用存储于所述内部隔离穿透程序中的有效电力文件。By presetting the isolation device, the valid power file is transmitted to the internal isolation penetration program for parsing and storage, so that the internal application program can call the valid power file stored in the internal isolation penetration program.

在其中一个实施例中,所述将所述TCP电力数据流按照预设数据格式进行转换,得到有效电力文件,包括:In one embodiment, converting the TCP power data stream according to a preset data format to obtain a valid power file, including:

确定所述第一数据传输端口的端口输入参数;determining a port input parameter of the first data transmission port;

根据所述端口输入参数,并结合预设Hash算法,将所述TCP电力数据流按照预设数据格式进行转换,得到有效电力文件。According to the port input parameters, combined with a preset Hash algorithm, the TCP power data stream is converted according to the preset data format to obtain a valid power file.

在其中一个实施例中,所述预置隔离设备包括外部隔离设备和内部隔离设备,所述通过预置隔离设备,将所述有效电力文件传输至内部隔离穿透程序进行解析存储,包括:In one embodiment, the preset isolation device includes an external isolation device and an internal isolation device, and the effective power file is transmitted to the internal isolation penetration program through the preset isolation device for parsing and storage, including:

将所述有效电力文件分别通过所述外部隔离设备、所述内部隔离设备,传输至所述内部隔离穿透程序的第二数据传输端口,以使所述内部隔离穿透程序针对所述有效电力文件进行解析存储。The effective power file is respectively transmitted through the external isolation device and the internal isolation device to the second data transmission port of the internal isolation penetration program, so that the internal isolation penetration program can target the effective power The file is parsed and stored.

在其中一个实施例中,所述外部隔离设备和所述内部隔离设备之间设置有电力通讯模块,所述将所述有效电力文件分别通过所述外部隔离设备、所述内部隔离设备,传输至所述内部隔离穿透程序的第二数据传输端口,包括:In one embodiment, a power communication module is provided between the external isolation device and the internal isolation device, and the effective power file is transmitted to the external isolation device and the internal isolation device respectively through the external isolation device and the internal isolation device. The second data transmission port of the internal isolation penetrating program includes:

将所述有效电力文件通过所述外部隔离设备传输至所述电力通讯模块;transmitting the valid power file to the power communication module through the external isolation device;

通过所述电力通信模块,将所述有效电力文件按照消息队列的传输方式传输至所述内部隔离设备,进而传输至所述内部隔离穿透程序进行解析存储。Through the power communication module, the effective power file is transmitted to the internal isolation device according to the transmission mode of the message queue, and then transmitted to the internal isolation penetration program for analysis and storage.

在其中一个实施例中,在所述通过预置隔离设备,将所述有效电力文件传输至内部隔离穿透程序之后,还包括:In one embodiment, after the effective power file is transmitted to the internal isolation penetration program through the preset isolation device, the method further includes:

提取所述有效电力文件的端口输入参数;所述端口输入参数包括文件格式、socket句柄、IP地址中的至少一项;Extract the port input parameters of the effective power file; the port input parameters include at least one of file format, socket handle, and IP address;

根据所述端口输入参数,将所述有效电力文件转换为TCP电力数据流;所述TCP电力数据流存储于所述内部隔离穿透程序中,供所述内部应用程序进行调用。According to the port input parameters, the valid power file is converted into a TCP power data stream; the TCP power data stream is stored in the internal isolation penetration program for the internal application program to call.

在其中一个实施例中,所述电力通讯模块包括NBIOT通讯模块。In one of the embodiments, the power communication module includes an NBIOT communication module.

在其中一个实施例中,所述第一数据传输端口包括API接口。In one of the embodiments, the first data transmission port includes an API interface.

一种电力数据采集装置,所述装置包括:A power data acquisition device, the device includes:

请求接收模块,用于在接收到外部应用程序的电力数据传输请求后,调用外部隔离穿透程序;所述外部隔离穿透程序具有第一数据传输端口;a request receiving module, configured to call an external isolation penetration program after receiving a power data transmission request from an external application; the external isolation penetration program has a first data transmission port;

数据接收模块,用于通过所述第一数据传输端口,接收所述外部应用程序的TCP电力数据流;a data receiving module, configured to receive the TCP power data stream of the external application through the first data transmission port;

数据转换模块,用于将所述TCP电力数据流按照预设数据格式进行转换,得到有效电力文件;a data conversion module, configured to convert the TCP power data stream according to a preset data format to obtain a valid power file;

数据传输模块,用于通过预置隔离设备,将所述有效电力文件传输至内部隔离穿透程序进行解析存储,供内部应用程序调用存储于所述内部隔离穿透程序中的有效电力文件。The data transmission module is used to transmit the valid power file to the internal isolation penetration program for analysis and storage through the preset isolation device, so that the internal application program can call the valid power file stored in the internal isolation penetration program.

一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:A computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

在接收到外部应用程序的电力数据传输请求后,调用外部隔离穿透程序;所述外部隔离穿透程序具有第一数据传输端口;After receiving the power data transmission request from the external application, call the external isolation penetration program; the external isolation penetration program has a first data transmission port;

通过所述第一数据传输端口,接收所述外部应用程序的TCP电力数据流;Receive the TCP power data stream of the external application through the first data transmission port;

将所述TCP电力数据流按照预设数据格式进行转换,得到有效电力文件;Converting the TCP power data stream according to a preset data format to obtain a valid power file;

通过预置隔离设备,将所述有效电力文件传输至内部隔离穿透程序进行解析存储,供内部应用程序调用存储于所述内部隔离穿透程序中的有效电力文件。By presetting the isolation device, the valid power file is transmitted to the internal isolation penetration program for parsing and storage, so that the internal application program can call the valid power file stored in the internal isolation penetration program.

一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

在接收到外部应用程序的电力数据传输请求后,调用外部隔离穿透程序;所述外部隔离穿透程序具有第一数据传输端口;After receiving the power data transmission request from the external application, call the external isolation penetration program; the external isolation penetration program has a first data transmission port;

通过所述第一数据传输端口,接收所述外部应用程序的TCP电力数据流;Receive the TCP power data stream of the external application through the first data transmission port;

将所述TCP电力数据流按照预设数据格式进行转换,得到有效电力文件;Converting the TCP power data stream according to a preset data format to obtain a valid power file;

通过预置隔离设备,将所述有效电力文件传输至内部隔离穿透程序进行解析存储,供内部应用程序调用存储于所述内部隔离穿透程序中的有效电力文件。By presetting the isolation device, the valid power file is transmitted to the internal isolation penetration program for parsing and storage, so that the internal application program can call the valid power file stored in the internal isolation penetration program.

上述电力数据采集方法、装置、计算机设备和存储介质,电力服务器在接收到外部应用程序的电力数据传输请求后,响应于该请求调用外部隔离穿透程序,并通过外部隔离穿透程序的第一数据传输端口接收外部应用程序上传的TCP电力数据流,进而将TCP电力数据流按照预设数据格式转换为有效电力文件,之后通过预置隔离设备,将有效电力文件传输至内部隔离穿透程序进行解析存储,供内部应用程序调用存储于内部隔离穿透程序中的有效电力文件。采用本方法,电力系统外部区域与内部区域之间的数据传输无需修改业务逻辑及接口,实现了数据之间的无缝跨区传输,提升了数据跨区传输的效率、便利性和可复用性,可大大节省数据跨区的开发成本和时间成本。The above power data collection method, device, computer equipment and storage medium, after receiving the power data transmission request of the external application, the power server calls the external isolation penetration program in response to the request, and passes the first of the external isolation penetration program. The data transmission port receives the TCP power data stream uploaded by the external application, and then converts the TCP power data stream into a valid power file according to the preset data format, and then transmits the valid power file to the internal isolation penetration program through the preset isolation device. Parse and store for internal applications to call valid power files stored in the internal isolation penetration program. By adopting this method, the data transmission between the external area and the internal area of the power system does not need to modify the business logic and interface, realizes the seamless cross-regional transmission of data, and improves the efficiency, convenience and reusability of data cross-regional transmission. It can greatly save the development cost and time cost of data spanning.

附图说明Description of drawings

图1为一个实施例中电力数据采集方法的应用环境图;Fig. 1 is the application environment diagram of the electric power data acquisition method in one embodiment;

图2为一个实施例中电力数据采集方法的流程示意图;2 is a schematic flowchart of a method for collecting power data in one embodiment;

图3为一个实施例中电力数据采集装置的结构框图;3 is a structural block diagram of a power data acquisition device in one embodiment;

图4为一个实施例中计算机设备的内部结构图。FIG. 4 is a diagram of the internal structure of a computer device in one embodiment.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.

本发明所提供的一种电力数据采集方法,可以应用于如图1所示的应用环境中。在一个电力数据采集系统中,包括有内部终端102、电力服务器104和外部终端106。其中,电力服务器104配置有外部隔离穿透程序和内部隔离穿透程序,且分别配置有程序链接端口,外部终端106与内部终端102分别可通过对应的程序链接端口与电力服务器104上的程序建立通信连接,进而实现数据传输。同时,内部终端102、外部终端106分别通过网络与电力服务器104进行网络通信,内部终端102、外部终端106可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,电力服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The power data acquisition method provided by the present invention can be applied to the application environment shown in FIG. 1 . In a power data acquisition system, an internal terminal 102 , a power server 104 and an external terminal 106 are included. The power server 104 is configured with an external isolation penetrating program and an internal isolation penetrating program, and is respectively configured with a program link port, and the external terminal 106 and the internal terminal 102 can respectively establish a program on the power server 104 through the corresponding program link port. Communication connection, and then realize data transmission. At the same time, the internal terminal 102 and the external terminal 106 respectively perform network communication with the power server 104 through the network. The internal terminal 102 and the external terminal 106 can be, but are not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices. , the power server 104 can be implemented by an independent server or a server cluster composed of multiple servers.

在一个实施例中,如图2所示,提供了一种电力数据采集方法,以该方法应用于图1中的电力服务器104为例进行说明,包括以下步骤:In one embodiment, as shown in FIG. 2 , a method for collecting power data is provided, which is described by taking the method applied to the power server 104 in FIG. 1 as an example, including the following steps:

步骤S210,在接收到外部应用程序的电力数据传输请求后,调用外部隔离穿透程序;所述外部隔离穿透程序具有第一数据传输端口。Step S210, after receiving the power data transmission request from the external application, call the external isolation penetration program; the external isolation penetration program has a first data transmission port.

其中,外部应用程序装置于电力服务器104中,具体为电力服务器104所运行电力系统框架中的安全三区,该外部应用程序可以是包括电力基本应用、采集管理、数据管理、运维监控等业务应用程序。Among them, the external application program is installed in the power server 104, specifically the security three areas in the power system framework run by the power server 104, and the external application program may include basic power application, collection management, data management, operation and maintenance monitoring and other services application.

具体实现中,电力服务器104中装置的外部隔离穿透程序与外部应用程序通过端口连接,电力服务器104基于该端口接收到外部应用程序发送的电力数据传输请求之后,响应于该请求调用外部隔离穿透程序。In the specific implementation, the external isolation penetration program of the device in the power server 104 is connected with the external application program through a port. After receiving the power data transmission request sent by the external application program based on the port, the power server 104 calls the external isolation penetration program in response to the request. through the program.

其中,第一数据传输端口可以是程序仿真接口,用于实现数据通信。Wherein, the first data transmission port may be a program emulation interface for realizing data communication.

然而,需要说明的是,电力服务器104在接收到外部应用程序发送的电力数据传输请求之前,可以是首先基于内部需求生成一个数据采集请求,并将该请求发送至外部隔离穿透程序,以使外部隔离穿透程序获取外部应用程序上传的电力数据。However, it should be noted that, before the power server 104 receives the power data transmission request sent by the external application program, it may first generate a data collection request based on internal requirements, and send the request to the external isolation penetration program, so that the The external isolation penetration program obtains the power data uploaded by the external application.

步骤S220,通过所述第一数据传输端口,接收所述外部应用程序的TCP电力数据流。Step S220, receiving the TCP power data stream of the external application through the first data transmission port.

其中,第一数据传输端口可以是API(Application Programming Interface)应用程序接口。Wherein, the first data transmission port may be an API (Application Programming Interface) application program interface.

其中,TCP(Transmission Control Protocol)是一种面向连接的、可靠的、基于字节流的传输层通信协议,TCP电力数据流在本实施例以及其他实施例中可以是适用于TCP协议传输方式的电力数据集合。Among them, TCP (Transmission Control Protocol) is a connection-oriented, reliable, byte stream-based transport layer communication protocol, and the TCP power data stream may be applicable to the TCP protocol transmission method in this embodiment and other embodiments. Electricity data collection.

具体实现中,电力服务器104在调用外部隔离穿透程序之后,将通过外部隔离穿透程序具有的第一数据传输端口,接收由外部应用程序上传的TCP电力数据流。In a specific implementation, after calling the external isolation penetration program, the power server 104 will receive the TCP power data stream uploaded by the external application program through the first data transmission port possessed by the external isolation penetration program.

需要说明的是,在本实施例或是其他实施例中,外部应用程序不仅可上传TCP数据流,还可上传UDP(User Datagram Protocol)数据流。It should be noted that, in this embodiment or other embodiments, the external application can not only upload a TCP data stream, but also upload a UDP (User Datagram Protocol) data stream.

步骤S230,将所述TCP电力数据流按照预设数据格式进行转换,得到有效电力文件。Step S230, converting the TCP power data stream according to a preset data format to obtain a valid power file.

其中,有效电力文件是指文件格式适应于预置隔离设备进行传输的电力文件。The valid power file refers to the power file whose file format is suitable for transmission by the preset isolation device.

具体实现中,电力服务器104接收到外部应用程序上传的TCP电力数据流之后,进一步根据TCP电力数据流中所包括的端口输入参数,并结合Hash算法将TCP电力数据流转换为有效电力文件。In a specific implementation, after receiving the TCP power data stream uploaded by the external application, the power server 104 further converts the TCP power data stream into a valid power file according to the port input parameters included in the TCP power data stream and combined with the Hash algorithm.

步骤S240,通过预置隔离设备,将所述有效电力文件传输至内部隔离穿透程序进行解析存储,供内部应用程序调用存储于所述内部隔离穿透程序中的有效电力文件。Step S240 , by presetting the isolation device, the valid power file is transmitted to the internal isolation penetration program for analysis and storage, so that the internal application program can call the valid power file stored in the internal isolation penetration program.

其中,预置隔离设备可以是电力专用的正向/反向网络隔离设备。The preset isolation device may be a forward/reverse network isolation device dedicated to power.

具体实现中,电力服务器104中的外部隔离穿透程序得到有效电力文件之后,将通过预置隔离设备将有效电力文件传输至内部隔离穿透程序,具体通过内部隔离穿透程序的第二数据传输端口,将有效电力文件传输至内部隔离穿透程序,内部隔离穿透程序接收到有效电力文件之后,将根据有效电力文件中包括的解析参数,将其反向转换为TCP电力数据流,以使内部应用程序可实时调用该TCP电力数据流,实现电力系统中的主站与终端的数据双向实时交互。In the specific implementation, after the external isolation penetration program in the power server 104 obtains the valid power file, it will transmit the valid power file to the internal isolation penetration program through the preset isolation device, specifically through the second data transmission of the internal isolation penetration program port to transmit the valid power file to the internal isolation penetration program. After the internal isolation penetration program receives the valid power file, it will reversely convert it into a TCP power data stream according to the parsing parameters included in the valid power file, so that the The internal application program can call the TCP power data stream in real time to realize the two-way real-time data interaction between the master station and the terminal in the power system.

上述电力数据采集方法中,电力服务器在接收到外部应用程序的电力数据传输请求后,响应于该请求调用外部隔离穿透程序,并通过外部隔离穿透程序的第一数据传输端口接收外部应用程序上传的TCP电力数据流,进而将TCP电力数据流按照预设数据格式转换为有效电力文件,之后通过预置隔离设备,将有效电力文件传输至内部隔离穿透程序进行解析存储,供内部应用程序调用存储于内部隔离穿透程序中的有效电力文件。采用本方法,电力系统外部区域与内部区域之间的数据传输无需修改业务逻辑及接口,实现了数据之间的无缝跨区传输,提升了数据跨区传输的效率、便利性和可复用性,可大大节省数据跨区的开发成本和时间成本。In the above power data collection method, after receiving the power data transmission request from the external application, the power server calls the external isolation penetration program in response to the request, and receives the external application through the first data transmission port of the external isolation penetration program. The uploaded TCP power data stream, and then the TCP power data stream is converted into a valid power file according to the preset data format, and then the valid power file is transmitted to the internal isolation penetration program through the preset isolation device for analysis and storage for internal applications. Recall the valid power file stored in the internal isolation penetration program. By adopting this method, the data transmission between the external area and the internal area of the power system does not need to modify the business logic and interface, realizes the seamless cross-regional transmission of data, and improves the efficiency, convenience and reusability of data cross-regional transmission. It can greatly save the development cost and time cost of data spanning.

在一个实施例中,所述将所述TCP电力数据流按照预设数据格式进行转换,得到有效电力文件,包括:In one embodiment, converting the TCP power data stream according to a preset data format to obtain a valid power file, including:

确定所述第一数据传输端口的端口输入参数;根据所述端口输入参数,并结合预设Hash算法,将所述TCP电力数据流按照预设数据格式进行转换,得到有效电力文件。Determine the port input parameters of the first data transmission port; according to the port input parameters, combined with a preset Hash algorithm, convert the TCP power data stream according to a preset data format to obtain a valid power file.

其中,端口输入参数可以是定义文件传输方式的参数、定义TCP电力数据流的socket句柄的参数、TCP电力数据流的接收设备IP地址等。The port input parameter may be a parameter defining a file transmission mode, a parameter defining a socket handle of the TCP power data stream, an IP address of a receiving device of the TCP power data stream, and the like.

其中,Hash算法是指能计算出一个数字消息所对应到的,长度固定的字符串的算法。Among them, the Hash algorithm refers to an algorithm that can calculate a string of fixed length corresponding to a digital message.

具体实现中,电力服务器104中装置的外部隔离穿透程序得到TCP电力数据流之后,首先确定端口输入参数,进而根据端口输入参数,并结合预设的Hash算法,将TCP电力数据流进行格式转换,即转换为电力系统可传输运行的预设进制数有效字符串,得到有效电力文件。In the specific implementation, after the external isolation penetration program of the device in the power server 104 obtains the TCP power data stream, it first determines the port input parameters, and then according to the port input parameters, combined with the preset Hash algorithm, format conversion of the TCP power data stream is performed , that is, converted into a valid string of preset decimal numbers that the power system can transmit and run to obtain a valid power file.

在一个实施例中,所述预置隔离设备包括外部隔离设备和内部隔离设备,所述通过预置隔离设备,将所述有效电力文件传输至内部隔离穿透程序进行解析存储,包括:In one embodiment, the preset isolation device includes an external isolation device and an internal isolation device, and the effective power file is transmitted to the internal isolation penetration program through the preset isolation device for parsing and storage, including:

将所述有效电力文件分别通过所述外部隔离设备、所述内部隔离设备,传输至所述内部隔离穿透程序的第二数据传输端口,以使所述内部隔离穿透程序针对所述有效电力文件进行解析存储。The effective power file is respectively transmitted through the external isolation device and the internal isolation device to the second data transmission port of the internal isolation penetration program, so that the internal isolation penetration program can target the effective power The file is parsed and stored.

具体实现中,电力服务器104的外部隔离穿透程序在得到有效电力文件之后,将通过预置隔离设备,将有效电力文件进行数据实时跨区传输,即首先按顺序依次通过外部隔离设备、内部隔离设备以及内部隔离穿透程序的第二数据传输端口,将有效电力文件传输至内部隔离穿透程序中进行存储并实时分析,以得到内部应用程序可随时调用的TCP电力数据流。In the specific implementation, after the external isolation penetration program of the power server 104 obtains the valid power file, it will transmit the valid power file data across regions in real time through the preset isolation device, that is, firstly pass through the external isolation device, the internal isolation device and the internal isolation device in sequence. The device and the second data transmission port of the internal isolation penetration program transmit the valid power file to the internal isolation penetration program for storage and real-time analysis, so as to obtain the TCP power data stream that the internal application program can call at any time.

在一个实施例中,所述外部隔离设备和所述内部隔离设备之间设置有电力通讯模块,所述将所述有效电力文件分别通过所述外部隔离设备、所述内部隔离设备,传输至所述内部隔离穿透程序的第二数据传输端口,包括:In one embodiment, a power communication module is provided between the external isolation device and the internal isolation device, and the effective power file is transmitted to the external isolation device and the internal isolation device respectively through the external isolation device and the internal isolation device. The second data transmission port of the internal isolation penetration program, including:

将所述有效电力文件通过所述外部隔离设备传输至所述电力通讯模块;通过所述电力通信模块,将所述有效电力文件按照消息队列的传输方式传输至所述内部隔离设备,进而传输至所述内部隔离穿透程序进行解析存储。The effective power file is transmitted to the power communication module through the external isolation device; through the power communication module, the effective power file is transmitted to the internal isolation device in a message queue transmission mode, and then transmitted to The internal isolation penetrating program is parsed and stored.

其中,电力通讯模块可以是连接于外部隔离设备与内部隔离设备之间,实现内、外区域的数据通信,电力通讯模块可以是任意具有数据通讯功能的介质模块。Wherein, the power communication module can be connected between the external isolation device and the internal isolation device to realize data communication between the internal and external areas, and the power communication module can be any medium module with data communication function.

具体实现中,外部隔离设备与内部隔离设备之间可设置有通讯模块,实现有效电力文件按消息队列方式传输的目的。In a specific implementation, a communication module may be set between the external isolation device and the internal isolation device, so as to achieve the purpose of transmitting effective power files in a message queue mode.

在一个实施例中,在所述通过预置隔离设备,将所述有效电力文件传输至内部隔离穿透程序之后,还包括:In one embodiment, after the effective power file is transmitted to the internal isolation penetration program through the preset isolation device, the method further includes:

提取所述有效电力文件的端口输入参数;所述端口输入参数包括文件格式、socket句柄、IP地址中的至少一项;根据所述端口输入参数,将所述有效电力文件转换为TCP电力数据流;所述TCP电力数据流存储于所述内部隔离穿透程序中,供所述内部应用程序进行调用。Extract the port input parameters of the valid power file; the port input parameters include at least one of file format, socket handle, and IP address; according to the port input parameters, convert the valid power file into a TCP power data stream ; The TCP power data stream is stored in the internal isolation penetration program for the internal application program to call.

具体实现中,内部隔离穿透程序接收到有效电力文件之后,将根据有效电力文件中的端口输入参数,将有效电力文件反向转换为TCP电力数据流,已供内部应用程序进行调用。In the specific implementation, after the internal isolation penetration program receives the valid power file, it will reversely convert the valid power file into a TCP power data stream according to the port input parameters in the valid power file, which has been called by the internal application program.

在一个实施例中,所述电力通讯模块包括NBIOT通讯模块。In one embodiment, the power communication module includes an NBIOT communication module.

其中,NBIOT(Narrow Band Internet of Things,NBIOT)通讯模块,可以直接部署于GSM(Global System For Mobile Communications,GSM)网络、UMTS(Universal MobileTelecommunications System,UMTS)网络或LTE(Long Term Evolution,LTE)网络内,具有低功耗、通信可靠、成本低以及可在有无公网的任何区域随意部署特点。Among them, NBIOT (Narrow Band Internet of Things, NBIOT) communication module can be directly deployed in GSM (Global System For Mobile Communications, GSM) network, UMTS (Universal Mobile Telecommunications System, UMTS) network or LTE (Long Term Evolution, LTE) network It has the characteristics of low power consumption, reliable communication, low cost and can be deployed in any area with or without public network.

具体实现中,外部隔离设备与内部隔离设备之间装置的电力通讯模块不仅可以是NBIOT通讯模块,还可以是其他具有跨区数据传输功能的通讯模块。In a specific implementation, the power communication module installed between the external isolation device and the internal isolation device may not only be an NBIOT communication module, but also other communication modules with cross-regional data transmission functions.

在一个实施例中,所述第一数据传输端口包括API接口。In one embodiment, the first data transfer port includes an API interface.

具体实现中,第一数据传输端口可以是API接口,以确保程序之间的数据通信可行性。In specific implementation, the first data transmission port may be an API interface to ensure the feasibility of data communication between programs.

根据本发明实施例提供的方案,电力系统外部区域与内部区域之间的数据传输无需修改业务逻辑及接口,实现了数据之间的无缝跨区传输,提升了数据跨区传输的效率、便利性和可复用性,可大大节省数据跨区的开发成本和时间成本。According to the solution provided by the embodiment of the present invention, the data transmission between the external area and the internal area of the power system does not need to modify the business logic and interface, realizes the seamless cross-regional transmission of data, and improves the efficiency and convenience of data cross-regional transmission. It can greatly save the development cost and time cost of data spanning.

应该理解的是,虽然图2的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序并非必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flowchart of FIG. 2 are shown in sequence according to the arrows, these steps are not necessarily executed in the sequence shown by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in FIG. 2 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. The execution sequence of these sub-steps or stages It does not have to be performed sequentially, but may be performed alternately or alternately with other steps or at least a portion of sub-steps or stages of other steps.

在一个实施例中,如图3所示,提供了一种电力数据采集装置,包括请求接收模块310、数据接收模块320、数据转换模块330和数据传输模块340,其中:In one embodiment, as shown in FIG. 3, a power data acquisition device is provided, including a request receiving module 310, a data receiving module 320, a data conversion module 330 and a data transmission module 340, wherein:

请求接收模块310,用于在接收到外部应用程序的电力数据传输请求后,调用外部隔离穿透程序;所述外部隔离穿透程序具有第一数据传输端口;The request receiving module 310 is configured to call an external isolation penetration program after receiving a power data transmission request from an external application; the external isolation penetration program has a first data transmission port;

数据接收模块320,用于通过所述第一数据传输端口,接收所述外部应用程序的TCP电力数据流;a data receiving module 320, configured to receive the TCP power data stream of the external application through the first data transmission port;

数据转换模块330,用于将所述TCP电力数据流按照预设数据格式进行转换,得到有效电力文件;a data conversion module 330, configured to convert the TCP power data stream according to a preset data format to obtain a valid power file;

数据传输模块340,同于通过预置隔离设备,将所述有效电力文件传输至内部隔离穿透程序进行解析存储,供内部应用程序调用存储于所述内部隔离穿透程序中的有效电力文件。The data transmission module 340 transmits the valid power file to the internal isolation penetration program for parsing and storage through the preset isolation device, so that the internal application program can call the valid power file stored in the internal isolation penetration program.

根据本发明实施例提供的方案,电力服务器在接收到外部应用程序的电力数据传输请求后,响应于该请求调用外部隔离穿透程序,并通过外部隔离穿透程序的第一数据传输端口接收外部应用程序上传的TCP电力数据流,进而将TCP电力数据流按照预设数据格式转换为有效电力文件,之后通过预置隔离设备,将有效电力文件传输至内部隔离穿透程序进行解析存储,供内部应用程序调用存储于内部隔离穿透程序中的有效电力文件。采用本方案,电力系统外部区域与内部区域之间的数据传输无需修改业务逻辑及接口,实现了数据之间的无缝跨区传输,提升了数据跨区传输的效率、便利性和可复用性,可大大节省数据跨区的开发成本和时间成本。According to the solution provided by the embodiment of the present invention, after receiving the power data transmission request from the external application, the power server calls the external isolation penetration program in response to the request, and receives the external isolation penetration program through the first data transmission port of the external isolation penetration program. The TCP power data stream uploaded by the application, and then the TCP power data stream is converted into a valid power file according to the preset data format, and then the valid power file is transmitted to the internal isolation penetration program through the preset isolation device for analysis and storage for internal use. The application calls the valid power file stored in the internal isolation penetration program. Using this solution, the data transmission between the external area and the internal area of the power system does not need to modify the business logic and interface, realizes the seamless cross-regional transmission of data, and improves the efficiency, convenience and reusability of data cross-regional transmission. It can greatly save the development cost and time cost of data spanning.

在一个实施例中,所述数据转换模块330包括:In one embodiment, the data conversion module 330 includes:

参数确定子模块,用于确定所述第一数据传输端口的端口输入参数;文件获取子模块,用于根据所述端口输入参数,并结合预设Hash算法,将所述TCP电力数据流按照预设数据格式进行转换,得到有效电力文件。The parameter determination sub-module is used to determine the port input parameters of the first data transmission port; the file acquisition sub-module is used to input the parameters according to the port, combined with a preset Hash algorithm, to determine the TCP power data flow according to the preset Hash algorithm. Set the data format for conversion to obtain a valid power file.

在一个实施例中,所述预置隔离设备包括外部隔离设备和内部隔离设备,所述数据传输模块340还用于将所述有效电力文件分别通过所述外部隔离设备、所述内部隔离设备,传输至所述内部隔离穿透程序的第二数据传输端口,以使所述内部隔离穿透程序针对所述有效电力文件进行解析存储。In one embodiment, the preset isolation device includes an external isolation device and an internal isolation device, and the data transmission module 340 is further configured to pass the valid power file through the external isolation device and the internal isolation device, respectively, It is transmitted to the second data transmission port of the internal isolation penetrating program, so that the internal isolation penetrating program can parse and store the valid power file.

在一个实施例中,所述外部隔离设备和所述内部隔离设备之间设置有电力通讯模块,所述数据传输模块340还用于将所述有效电力文件通过所述外部隔离设备传输至所述电力通讯模块;通过所述电力通信模块,将所述有效电力文件按照消息队列的传输方式传输至所述内部隔离设备,进而传输至所述内部隔离穿透程序进行解析存储。In one embodiment, a power communication module is provided between the external isolation device and the internal isolation device, and the data transmission module 340 is further configured to transmit the valid power file to the external isolation device through the external isolation device. Power communication module; through the power communication module, the effective power file is transmitted to the internal isolation device according to the transmission mode of message queue, and then transmitted to the internal isolation penetration program for analysis and storage.

在一个实施例中,所述装置还包括:In one embodiment, the apparatus further includes:

参数提取模块,用于提取所述有效电力文件的端口输入参数;所述端口输入参数包括文件格式、socket句柄、IP地址中的至少一项;数据流转换模块,用于根据所述端口输入参数,将所述有效电力文件转换为TCP电力数据流;所述TCP电力数据流存储于所述内部隔离穿透程序中,供所述内部应用程序进行调用。A parameter extraction module for extracting the port input parameters of the valid power file; the port input parameters include at least one of file format, socket handle, and IP address; a data stream conversion module for inputting parameters according to the port , converting the valid power file into a TCP power data stream; the TCP power data stream is stored in the internal isolation penetration program for the internal application program to call.

在一个实施例中,所述电力通讯模块包括NBIOT通讯模块。In one embodiment, the power communication module includes an NBIOT communication module.

在一个实施例中,所述第一数据传输端口包括API接口。In one embodiment, the first data transfer port includes an API interface.

根据本发明实施例提供的方案,电力系统外部区域与内部区域之间的数据传输无需修改业务逻辑及接口,实现了数据之间的无缝跨区传输,提升了数据跨区传输的效率、便利性和可复用性,可大大节省数据跨区的开发成本和时间成本。According to the solution provided by the embodiment of the present invention, the data transmission between the external area and the internal area of the power system does not need to modify the business logic and interface, realizes seamless cross-area transmission between data, and improves the efficiency and convenience of data cross-area transmission. It can greatly save the development cost and time cost of data spanning.

在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图4所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储标识信息和设备信息。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时实现一种电力数据采集方法。In one embodiment, a computer device is provided, and the computer device may be a server, and its internal structure diagram may be as shown in FIG. 4 . The computer device includes a processor, memory, a network interface, and a database connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The nonvolatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium. The computer device's database is used to store identification information and device information. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program implements a power data acquisition method when executed by the processor.

本领域技术人员可以理解,图4中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 4 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.

在一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现以下步骤:In one embodiment, a computer device is provided, including a memory and a processor, a computer program is stored in the memory, and the processor implements the following steps when executing the computer program:

在接收到外部应用程序的电力数据传输请求后,调用外部隔离穿透程序;所述外部隔离穿透程序具有第一数据传输端口;After receiving the power data transmission request from the external application, call the external isolation penetration program; the external isolation penetration program has a first data transmission port;

通过所述第一数据传输端口,接收所述外部应用程序的TCP电力数据流;Receive the TCP power data stream of the external application through the first data transmission port;

将所述TCP电力数据流按照预设数据格式进行转换,得到有效电力文件;Converting the TCP power data stream according to a preset data format to obtain a valid power file;

通过预置隔离设备,将所述有效电力文件传输至内部隔离穿透程序进行解析存储,供内部应用程序调用存储于所述内部隔离穿透程序中的有效电力文件。By presetting the isolation device, the valid power file is transmitted to the internal isolation penetration program for parsing and storage, so that the internal application program can call the valid power file stored in the internal isolation penetration program.

在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor further implements the following steps when executing the computer program:

确定所述第一数据传输端口的端口输入参数;根据所述端口输入参数,并结合预设Hash算法,将所述TCP电力数据流按照预设数据格式进行转换,得到有效电力文件。Determine the port input parameters of the first data transmission port; according to the port input parameters, combined with a preset Hash algorithm, convert the TCP power data stream according to a preset data format to obtain a valid power file.

在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor further implements the following steps when executing the computer program:

将所述有效电力文件分别通过所述外部隔离设备、所述内部隔离设备,传输至所述内部隔离穿透程序的第二数据传输端口,以使所述内部隔离穿透程序针对所述有效电力文件进行解析存储。The effective power file is respectively transmitted through the external isolation device and the internal isolation device to the second data transmission port of the internal isolation penetration program, so that the internal isolation penetration program can target the effective power The file is parsed and stored.

在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor further implements the following steps when executing the computer program:

将所述有效电力文件通过所述外部隔离设备传输至所述电力通讯模块;通过所述电力通信模块,将所述有效电力文件按照消息队列的传输方式传输至所述内部隔离设备,进而传输至所述内部隔离穿透程序进行解析存储。The effective power file is transmitted to the power communication module through the external isolation device; through the power communication module, the effective power file is transmitted to the internal isolation device according to the transmission mode of the message queue, and then transmitted to The internal isolation penetrating program is parsed and stored.

在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor further implements the following steps when executing the computer program:

提取所述有效电力文件的端口输入参数;所述端口输入参数包括文件格式、socket句柄、IP地址中的至少一项;根据所述端口输入参数,将所述有效电力文件转换为TCP电力数据流;所述TCP电力数据流存储于所述内部隔离穿透程序中,供所述内部应用程序进行调用。Extract the port input parameters of the valid power file; the port input parameters include at least one of file format, socket handle, and IP address; according to the port input parameters, convert the valid power file into a TCP power data stream ; The TCP power data stream is stored in the internal isolation penetration program for the internal application program to call.

在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:In one embodiment, a computer-readable storage medium is provided on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

在接收到外部应用程序的电力数据传输请求后,调用外部隔离穿透程序;所述外部隔离穿透程序具有第一数据传输端口;After receiving the power data transmission request from the external application, call the external isolation penetration program; the external isolation penetration program has a first data transmission port;

通过所述第一数据传输端口,接收所述外部应用程序的TCP电力数据流;Receive the TCP power data stream of the external application through the first data transmission port;

将所述TCP电力数据流按照预设数据格式进行转换,得到有效电力文件;Converting the TCP power data stream according to a preset data format to obtain a valid power file;

通过预置隔离设备,将所述有效电力文件传输至内部隔离穿透程序进行解析存储,供内部应用程序调用存储于所述内部隔离穿透程序中的有效电力文件。By presetting the isolation device, the valid power file is transmitted to the internal isolation penetration program for parsing and storage, so that the internal application program can call the valid power file stored in the internal isolation penetration program.

在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program further implements the following steps when executed by the processor:

确定所述第一数据传输端口的端口输入参数;根据所述端口输入参数,并结合预设Hash算法,将所述TCP电力数据流按照预设数据格式进行转换,得到有效电力文件。Determine the port input parameters of the first data transmission port; according to the port input parameters, combined with a preset Hash algorithm, convert the TCP power data stream according to a preset data format to obtain a valid power file.

在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program further implements the following steps when executed by the processor:

将所述有效电力文件分别通过所述外部隔离设备、所述内部隔离设备,传输至所述内部隔离穿透程序的第二数据传输端口,以使所述内部隔离穿透程序针对所述有效电力文件进行解析存储。The effective power file is respectively transmitted through the external isolation device and the internal isolation device to the second data transmission port of the internal isolation penetration program, so that the internal isolation penetration program can target the effective power The file is parsed and stored.

在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program further implements the following steps when executed by the processor:

将所述有效电力文件通过所述外部隔离设备传输至所述电力通讯模块;通过所述电力通信模块,将所述有效电力文件按照消息队列的传输方式传输至所述内部隔离设备,进而传输至所述内部隔离穿透程序进行解析存储。The effective power file is transmitted to the power communication module through the external isolation device; through the power communication module, the effective power file is transmitted to the internal isolation device in a message queue transmission mode, and then transmitted to The internal isolation penetrating program is parsed and stored.

在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program further implements the following steps when executed by the processor:

提取所述有效电力文件的端口输入参数;所述端口输入参数包括文件格式、socket句柄、IP地址中的至少一项;根据所述端口输入参数,将所述有效电力文件转换为TCP电力数据流;所述TCP电力数据流存储于所述内部隔离穿透程序中,供所述内部应用程序进行调用。Extract the port input parameters of the valid power file; the port input parameters include at least one of file format, socket handle, and IP address; according to the port input parameters, convert the valid power file into a TCP power data stream ; The TCP power data stream is stored in the internal isolation penetration program for the internal application program to call.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other medium used in the various embodiments provided in this application may include non-volatile and/or volatile memory. Nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Road (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features It is considered to be the range described in this specification.

以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only represent several embodiments of the present application, and the descriptions thereof are specific and detailed, but should not be construed as a limitation on the scope of the invention patent. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the scope of protection of the patent of the present application shall be subject to the appended claims.

Claims (10)

1.一种电力数据采集方法,其特征在于,包括如下步骤:1. a power data acquisition method, is characterized in that, comprises the steps: 在接收到外部应用程序的电力数据传输请求后,调用外部隔离穿透程序;所述外部隔离穿透程序具有第一数据传输端口;After receiving the power data transmission request from the external application, call the external isolation penetration program; the external isolation penetration program has a first data transmission port; 通过所述第一数据传输端口,接收所述外部应用程序的TCP电力数据流;Receive the TCP power data stream of the external application through the first data transmission port; 根据所述第一数据传输端口的端口输入参数,将所述TCP电力数据流按照预设数据格式进行转换,得到有效电力文件;According to the port input parameters of the first data transmission port, the TCP power data stream is converted according to a preset data format to obtain a valid power file; 通过外部隔离设备与内部隔离设备之间的电力通讯模块,将所述有效电力文件传输至内部隔离穿透程序进行解析存储,以使所述内部隔离穿透程序根据所述有效电力文件中包括的解析参数,将所述有效电力文件转换为TCP电力数据流,供内部应用程序调用存储于所述内部隔离穿透程序中的有效电力文件。Through the power communication module between the external isolation device and the internal isolation device, the effective power file is transmitted to the internal isolation penetration program for analysis and storage, so that the internal isolation penetration program can The parameters are parsed, and the valid power file is converted into a TCP power data stream for the internal application program to call the valid power file stored in the internal isolation penetration program. 2.根据权利要求1所述的方法,其特征在于,所述根据所述第一数据传输端口的端口输入参数,将所述TCP电力数据流按照预设数据格式进行转换,得到有效电力文件,包括:2. The method according to claim 1, wherein, according to the port input parameters of the first data transmission port, the TCP power data stream is converted according to a preset data format to obtain a valid power file, include: 确定所述第一数据传输端口的端口输入参数;determining a port input parameter of the first data transmission port; 根据所述端口输入参数,并结合预设Hash算法,将所述TCP电力数据流按照预设数据格式进行转换,得到有效电力文件。According to the port input parameters, combined with a preset Hash algorithm, the TCP power data stream is converted according to the preset data format to obtain a valid power file. 3.根据权利要求1所述的方法,其特征在于,所述通过外部隔离设备与内部隔离设备之间的电力通讯模块,将所述有效电力文件传输至内部隔离穿透程序进行解析存储,包括:3 . The method according to claim 1 , wherein the effective power file is transmitted to the internal isolation penetration program for analysis and storage through the power communication module between the external isolation device and the internal isolation device, comprising: 3 . : 将所述有效电力文件分别通过所述外部隔离设备、所述电力通讯模块以及所述内部隔离设备,传输至所述内部隔离穿透程序的第二数据传输端口,以使所述内部隔离穿透程序针对所述有效电力文件进行解析存储。The valid power file is respectively transmitted to the second data transmission port of the internal isolation penetration program through the external isolation device, the power communication module and the internal isolation device, so that the internal isolation penetration The program parses and stores the valid power file. 4.根据权利要求3所述的方法,其特征在于,所述将所述有效电力文件分别通过所述外部隔离设备、所述电力通讯模块以及所述内部隔离设备,传输至所述内部隔离穿透程序的第二数据传输端口,包括:4 . The method according to claim 3 , wherein the effective power file is transmitted to the internal isolation through the external isolation device, the power communication module and the internal isolation device, respectively. 5 . The second data transmission port of the transparent program, including: 将所述有效电力文件通过所述外部隔离设备传输至所述电力通讯模块;transmitting the valid power file to the power communication module through the external isolation device; 通过所述电力通讯 模块,将所述有效电力文件按照消息队列的传输方式传输至所述内部隔离设备,进而传输至所述内部隔离穿透程序进行解析存储。Through the power communication module, the effective power file is transmitted to the internal isolation device according to the transmission mode of the message queue, and then transmitted to the internal isolation penetration program for analysis and storage. 5.根据权利要求1所述的方法,其特征在于,在所述通过外部隔离设备与内部隔离设备之间的电力通讯模块,将所述有效电力文件传输至内部隔离穿透程序之后,还包括:5 . The method according to claim 1 , wherein after the effective power file is transmitted to the internal isolation penetration program through the power communication module between the external isolation device and the internal isolation device, the method further comprises: 6 . : 提取所述有效电力文件的端口输入参数;所述端口输入参数包括文件格式、socket句柄、IP地址中的至少一项;Extract the port input parameters of the effective power file; the port input parameters include at least one of file format, socket handle, and IP address; 根据所述端口输入参数,将所述有效电力文件转换为TCP电力数据流;所述TCP电力数据流存储于所述内部隔离穿透程序中,供所述内部应用程序进行调用。According to the port input parameters, the valid power file is converted into a TCP power data stream; the TCP power data stream is stored in the internal isolation penetration program for the internal application program to call. 6.根据权利要求4所述的方法,其特征在于,所述电力通讯模块包括NBIOT通讯模块。6. The method of claim 4, wherein the power communication module comprises an NBIOT communication module. 7.根据权利要求1所述的方法,其特征在于,所述第一数据传输端口包括API接口。7. The method of claim 1, wherein the first data transmission port comprises an API interface. 8.一种电力数据采集装置,其特征在于,所述装置包括:8. A power data acquisition device, wherein the device comprises: 请求接收模块,用于在接收到外部应用程序的电力数据传输请求后,调用外部隔离穿透程序;所述外部隔离穿透程序具有第一数据传输端口;a request receiving module, configured to call an external isolation penetration program after receiving a power data transmission request from an external application; the external isolation penetration program has a first data transmission port; 数据接收模块,用于通过所述第一数据传输端口,接收所述外部应用程序的TCP电力数据流;a data receiving module, configured to receive the TCP power data stream of the external application through the first data transmission port; 数据转换模块,用于根据所述第一数据传输端口的端口输入参数,将所述TCP电力数据流按照预设数据格式进行转换,得到有效电力文件;a data conversion module, configured to convert the TCP power data stream according to a preset data format according to the port input parameters of the first data transmission port to obtain a valid power file; 数据传输模块,用于通过外部隔离设备与内部隔离设备之间的电力通讯模块,将所述有效电力文件传输至内部隔离穿透程序进行解析存储,以使所述内部隔离穿透程序根据所述有效电力文件中包括的解析参数,将所述有效电力文件转换为TCP电力数据流,供内部应用程序调用存储于所述内部隔离穿透程序中的有效电力文件。The data transmission module is used to transmit the valid power file to the internal isolation penetration program through the power communication module between the external isolation equipment and the internal isolation equipment for analysis and storage, so that the internal isolation penetration program can be parsed and stored according to the The parsing parameters included in the valid power file convert the valid power file into a TCP power data stream for the internal application program to call the valid power file stored in the internal isolation penetration program. 9.一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至7中任一项所述方法的步骤。9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when the processor executes the computer program . 10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至7中任一项所述的方法的步骤。10. A computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
CN201910705882.4A 2019-08-01 2019-08-01 Power data acquisition method and device, computer equipment and storage medium Active CN110557374B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910705882.4A CN110557374B (en) 2019-08-01 2019-08-01 Power data acquisition method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910705882.4A CN110557374B (en) 2019-08-01 2019-08-01 Power data acquisition method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110557374A CN110557374A (en) 2019-12-10
CN110557374B true CN110557374B (en) 2020-06-16

Family

ID=68736974

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910705882.4A Active CN110557374B (en) 2019-08-01 2019-08-01 Power data acquisition method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110557374B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111614618A (en) * 2020-04-17 2020-09-01 国网上海能源互联网研究院有限公司 A method and system for cross-regional data transmission for physical isolation devices

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10084747B2 (en) * 2013-11-13 2018-09-25 Allied Telesis Holdings Kabushiki Kaisha External address space compression
CN108965283A (en) * 2018-07-06 2018-12-07 中国电力财务有限公司 A kind of means of communication, device, application server and communication system
CN109936532A (en) * 2017-12-17 2019-06-25 陕西合度电子信息科技有限公司 A kind of data bus transmission security protection system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9197417B2 (en) * 2009-04-24 2015-11-24 Microsoft Technology Licensing, Llc Hosted application sandbox model
CN102006307A (en) * 2010-12-16 2011-04-06 中国电子科技集团公司第三十研究所 Application proxy-based network management system isolation control device
CN102843352B (en) * 2012-05-15 2015-04-22 广东电网公司茂名供电局 Cross-physical isolation data transparent transmission system and method between intranet and extranet
CN203734701U (en) * 2013-11-27 2014-07-23 国家电网公司 Security zone crossing enterprise service bus transmission system
CN104270355A (en) * 2014-09-25 2015-01-07 国电南瑞科技股份有限公司 Cross-safety-zone data transmission method based on network bus
CN106209801A (en) * 2016-06-28 2016-12-07 广东电网有限责任公司信息中心 Mobile solution platform and inner-external network data safety switching plane integrated system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10084747B2 (en) * 2013-11-13 2018-09-25 Allied Telesis Holdings Kabushiki Kaisha External address space compression
CN109936532A (en) * 2017-12-17 2019-06-25 陕西合度电子信息科技有限公司 A kind of data bus transmission security protection system
CN108965283A (en) * 2018-07-06 2018-12-07 中国电力财务有限公司 A kind of means of communication, device, application server and communication system

Also Published As

Publication number Publication date
CN110557374A (en) 2019-12-10

Similar Documents

Publication Publication Date Title
CN108256114B (en) Document online preview method and device, computer equipment and storage medium
CN108156210B (en) Target resource acquisition method and device
CN110602445B (en) Video monitoring data acquisition method and device, computer equipment and storage medium
CN111614761B (en) Block chain message transmission method, device, computer and readable storage medium
CN111107051A (en) Message transmission method and device, computer equipment and storage medium
CN111629342B (en) Method and device for mapping Beidou short message terminal number
CN114501593B (en) Network slice access method, device, system and storage medium
CN110716989A (en) Dimension data processing method and device, computer equipment and storage medium
CN110166450B (en) Data transmission method and device based on industrial Ethernet and communication equipment
CN111212446A (en) Data processing method, data processing device, computer equipment and storage medium
CN110557374B (en) Power data acquisition method and device, computer equipment and storage medium
US10506392B1 (en) Stream-processing of telecommunication diameter event records
CN115202800A (en) Edge cloud service data processing method and device, computer equipment and storage medium
Azzara et al. The icsi m2m middleware for iot-based intelligent transportation systems
CN103440714B (en) A kind of POS terminal and network collocating method thereof and system
US20250097313A1 (en) Communication method, apparatus, and system
CN112287265B (en) Asynchronous event driven based file conversion method and system
CN104618320A (en) Systems and methods for secure file transfers
CN108833500B (en) Service calling method, service providing method, data transmission method and server
CN108810633A (en) Barrage method for message transmission, device, equipment and storage medium
EP4104413A1 (en) Improved packet transfer
CN110365649B (en) Data transmission method, data access device, data output device and system
CN109474386B (en) Signaling tracking method, system, network element equipment and storage medium
CN117278628A (en) Data transmission method, device, system, computer equipment and storage medium
CN111193641B (en) Terminal network testing method, device, base station equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Room 86, room 406, No.1, Yichuang street, Zhongxin Guangzhou Knowledge City, Huangpu District, Guangzhou City, Guangdong Province

Patentee after: Southern Power Grid Digital Grid Research Institute Co.,Ltd.

Country or region after: China

Address before: Room 406-86, No.1 Yichuang Street, Zhongxin Guangzhou Knowledge City, Huangpu District, Guangzhou City, Guangdong Province

Patentee before: Southern Power Grid Digital Grid Research Institute Co.,Ltd.

Country or region before: China