[go: up one dir, main page]

CN114254373B - An encrypted transmission method, device and system - Google Patents

An encrypted transmission method, device and system Download PDF

Info

Publication number
CN114254373B
CN114254373B CN202210189429.4A CN202210189429A CN114254373B CN 114254373 B CN114254373 B CN 114254373B CN 202210189429 A CN202210189429 A CN 202210189429A CN 114254373 B CN114254373 B CN 114254373B
Authority
CN
China
Prior art keywords
data
power station
new energy
distributed new
station data
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
CN202210189429.4A
Other languages
Chinese (zh)
Other versions
CN114254373A (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.)
State Grid Corp of China SGCC
China Electric Power Research Institute Co Ltd CEPRI
Information and Telecommunication Branch of State Grid Jiangsu Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
China Electric Power Research Institute Co Ltd CEPRI
Information and Telecommunication Branch of State Grid Jiangsu Electric Power 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 State Grid Corp of China SGCC, China Electric Power Research Institute Co Ltd CEPRI, Information and Telecommunication Branch of State Grid Jiangsu Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN202210189429.4A priority Critical patent/CN114254373B/en
Publication of CN114254373A publication Critical patent/CN114254373A/en
Application granted granted Critical
Publication of CN114254373B publication Critical patent/CN114254373B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S40/00Systems for electrical power generation, transmission, distribution or end-user application management characterised by the use of communication or information technologies, or communication or information technology specific aspects supporting them
    • Y04S40/20Information technology specific aspects, e.g. CAD, simulation, modelling, system security

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Bioethics (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Computing Systems (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Tourism & Hospitality (AREA)
  • Strategic Management (AREA)
  • Primary Health Care (AREA)
  • Quality & Reliability (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明应用于基于气象、电源、电网数据统一管理下的分布式新能源数据中台,涉及一种加密传输方法、装置和系统,包括:采集分布式新能源电站数据,得到第一电站数据;基于预先建立的元数据字典对所述第一电站数据进行替换处理,得到第二电站数据;将所述第二电站数据依据加密要求进行处理,得到第三电站数据;将所述第三电站数据组装成为Json文件并进行传输。本发明在保障新能源数据传输安全性的基础上,借助大数据中台实现数据空间无障碍交换,减少了对业务终端数据处理的压力。

Figure 202210189429

The invention is applied to a distributed new energy data middle station under the unified management of meteorological, power supply and power grid data, and relates to an encrypted transmission method, device and system, including: collecting distributed new energy power station data to obtain first power station data; The first power station data is replaced based on the pre-established metadata dictionary to obtain second power station data; the second power station data is processed according to encryption requirements to obtain third power station data; the third power station data is obtained Assemble into a Json file and transfer it. On the basis of ensuring the security of new energy data transmission, the invention realizes barrier-free exchange of data space with the help of a big data middle platform, and reduces the pressure on data processing of business terminals.

Figure 202210189429

Description

一种加密传输方法、装置和系统An encrypted transmission method, device and system

技术领域technical field

本发明涉及电力系统数据处理领域,具体涉及一种加密传输方法、装置和系统。The invention relates to the field of power system data processing, in particular to an encrypted transmission method, device and system.

背景技术Background technique

一方面,电力系统的信息系统已全面覆盖企业经营、电网运行和客户服务等业务领域及各层级应用,为各项业务有效运转提供了有力支撑。另一方面,伴随着移动互联网和物联网的迅猛发展,大数据技术逐步推广应用,根据中国信息通信研究院发布的中国大数据发展调查报告:2017年中国大数据总体规模为4700亿元人民币,2018年大数据产业规模已经突破6000亿元人民币,增长迅速,预计2019年大数据市场规模可超过7150亿元人民币。在大数据方面,国内60%以上的企业开展了包括数据挖掘、机器学习、数据资产管理、智能决等大数据技术研究与应用,企业对数据分析的重视程度进一步提高。企业应用大数据后能够更好地管理风险。On the one hand, the information system of the power system has fully covered business areas such as enterprise operation, power grid operation and customer service and applications at all levels, providing strong support for the effective operation of various businesses. On the other hand, with the rapid development of the mobile Internet and the Internet of Things, big data technology has been gradually promoted and applied. According to the survey report on the development of big data in China released by the China Academy of Information and Communications Technology, the overall scale of big data in China in 2017 was 470 billion yuan. In 2018, the scale of the big data industry has exceeded 600 billion yuan, with rapid growth. It is estimated that the size of the big data market in 2019 will exceed 715 billion yuan. In terms of big data, more than 60% of domestic enterprises have carried out research and application of big data technologies including data mining, machine learning, data asset management, and intelligent decision-making, and enterprises have further increased their emphasis on data analysis. Enterprises can better manage risk after applying big data.

可以看出,数字经济时代的到来使得数字和能源的深度融合成为能源电力行业重要的发展趋势,但也存在一些突出问题,主要表现在数据的复用化程度低、主数据集中度低、缺乏统一的数据质量管理体系。数据资源利用和数据及服务共享适应性地采用了各种可用的主流技术。从早期电力系统自动化采用的大主机模式,到基于分布式网络,再到建设调控云、采用分布式计算和大数据技术建立企业级海量数据平台、大数据平台,以及建立基于统一公共信息模型的对象化在线监测或配用电网全域数据平台等,一定程度上消除了业务系统数据的“数据孤岛”效应,促进了信息共享。其中,数据中台技术的出现打破“数据孤岛”,提供安全、可靠、高效的数据交换服务,为电网企业提供了一个全域化、智能化、敏捷式的多功能平台,实现基于气象、电源、电网数据统一管理下的分布式新能源数据中台信息交换服务,将有效增强对电网末梢设备、能源产销行为、资源环境的感知能力和互动能力,可显著提升自动化系统的技术支撑水平。在利用大数据服务于新能源电力行业中时,需要经由不同渠道将数据采集进来,基于存储技术将这些数据快速、安全、分类、有序地存储起来,再基于计算技术对这些数据进行加工、处理,将数据转化有用信息,其中,数据采集是大数据应用的基础,而数据交换才是在基础之上迈出的第一步,是大数据应用的关键。It can be seen that the advent of the digital economy era has made the deep integration of digital and energy an important development trend in the energy and power industry, but there are also some outstanding problems, mainly manifested in the low degree of data reuse, low concentration of main data, lack of Unified data quality management system. Data resource utilization and data and service sharing adaptively adopt various available mainstream technologies. From the large mainframe model adopted in the early power system automation, to the distributed network-based, to the construction of the control cloud, the use of distributed computing and big data technology to establish an enterprise-level massive data platform, a big data platform, and the establishment of a unified public information model based Object-oriented online monitoring or distribution grid global data platform, etc., to a certain extent, eliminates the "data island" effect of business system data and promotes information sharing. Among them, the emergence of data middle-station technology breaks the "data island", provides safe, reliable and efficient data exchange services, and provides a global, intelligent and agile multi-functional platform for power grid enterprises. The distributed new energy data middle-office information exchange service under the unified management of power grid data will effectively enhance the ability to perceive and interact with the terminal equipment of the power grid, energy production and sales behavior, and resource environment, and can significantly improve the technical support level of the automation system. When using big data to serve the new energy power industry, it is necessary to collect data through different channels, store these data in a fast, safe, classified and orderly manner based on storage technology, and then process these data based on computing technology. Processing, transforming data into useful information. Among them, data collection is the basis of big data application, and data exchange is the first step on the basis, which is the key to big data application.

目前主流的数据交换方式主要分为文件式的数据交换、接口式的数据交换和协议式的数据交换三种,其中数据中台中应用最为广泛的是接口式的restAPI方式,该方法基于json(JavaScriptObjectNotation,JS对象简谱)格式进行信息交换,该格式具有数据格式简单,易于读写,支持多种语言,便于服务端解析的优点,同时也存在一些问题,比如数据本身是基于字符串,导致数据本身较大,同时敏感信息的安全性不高。如何在进行新能源数据交换的过程中,在降低通信数据的数据量的同时提高安全性,从而最终提高新能源电力行业的效益效率,是急待解决的问题。At present, the mainstream data exchange methods are mainly divided into three types: file-type data exchange, interface-type data exchange and protocol-type data exchange. Among them, the interface-type restAPI method is the most widely used in the data center. , JS object notation) format for information exchange, this format has the advantages of simple data format, easy to read and write, supports multiple languages, and is convenient for server parsing, but there are also some problems, such as the data itself is based on strings, resulting in the data itself Larger, and the security of sensitive information is not high. How to reduce the data volume of communication data while improving security in the process of new energy data exchange, so as to ultimately improve the efficiency of the new energy power industry, is an urgent problem to be solved.

发明内容SUMMARY OF THE INVENTION

为了克服上述缺陷,本发明提出了一种加密传输方法、装置和系统。In order to overcome the above-mentioned defects, the present invention provides an encrypted transmission method, device and system.

第一方面,提供一种加密传输方法,所述方法包括:In a first aspect, an encrypted transmission method is provided, the method comprising:

采集分布式新能源电站数据,得到第一电站数据;Collect distributed new energy power station data to obtain the first power station data;

基于预先建立的元数据字典对所述第一电站数据进行替换处理,得到第二电站数据;performing replacement processing on the first power station data based on a pre-established metadata dictionary to obtain second power station data;

将所述第二电站数据依据加密要求进行处理,得到第三电站数据;processing the second power station data according to encryption requirements to obtain third power station data;

将所述第三电站数据组装成为特定格式并进行传输。The third power plant data is assembled into a specific format and transmitted.

进一步的,所述元数据字典的建立,包括:Further, the establishment of the metadata dictionary includes:

基于分布式新能源信息交换的业务需求,将分布式新能源数据传输过程中出现频次超过频次阈值或长度超过长度阈值的字符串设置为元数据,并分别为各元数据设置不同替换字符;Based on the business requirements of distributed new energy information exchange, set the strings whose frequency exceeds the frequency threshold or the length exceeds the length threshold in the process of distributed new energy data transmission as metadata, and set different replacement characters for each metadata respectively;

基于各元数据及对应的替换字符构成元数据字典。A metadata dictionary is formed based on each metadata and the corresponding replacement characters.

进一步的,所述利用预先建立的元数据字典对所述第一电站数据进行元数据替换处理,得到第二电站数据,包括:Further, performing metadata replacement processing on the first power station data by using a pre-established metadata dictionary to obtain second power station data, including:

判断所述第一电站数据中是否存在所述元数据字典中的元数据:Determine whether the metadata in the metadata dictionary exists in the first power station data:

当存在时,利用所述元数据字典对所述第一电站数据中的元数据进行替换,得到第二电站数据;When it exists, use the metadata dictionary to replace the metadata in the first power station data to obtain second power station data;

否则,保持所述第一电站数据,并作为第二电站数据。Otherwise, the first power station data is kept as the second power station data.

进一步的,所述将所述第二电站数据依据加密要求进行处理,得到第三电站数据,包括:Further, processing the second power station data according to the encryption requirements to obtain third power station data, including:

当所述第二电站数据需要加密时,利用二次加密法对所述第二电站数据进行加密,得到第三电站数据,否则将所述第二电站数据作为第三电站数据。When the second power station data needs to be encrypted, the second power station data is encrypted by using a secondary encryption method to obtain third power station data; otherwise, the second power station data is used as the third power station data.

进一步的,所述利用二次加密法对所述第二电站数据进行加密,包括:Further, the encrypting the second power station data by using a secondary encryption method includes:

基于TripleDes算法对所述第二电站数据进行一次加密,得到一次加密数据;Encrypt the data of the second power station once based on the TripleDes algorithm to obtain the encrypted data once;

对所述一次加密数据中所有字母与数字分别进行替换,得到二次加密数据。All letters and numbers in the primary encrypted data are respectively replaced to obtain secondary encrypted data.

进一步的,所述对所述一次加密数据中所有字母与数字分别进行替换,包括:Further, replacing all letters and numbers in the one-time encrypted data, including:

对所述一次加密数据中所有字母进行大小写字母转换;Perform uppercase and lowercase letter conversion on all letters in the one-time encrypted data;

对所述一次加密数据中所有数字,基于预设计算式对所述数字进行替换。For all numbers in the one-time encrypted data, the numbers are replaced based on a preset calculation formula.

进一步的,对所述数字进行替换的计算式如下:Further, the calculation formula for replacing the numbers is as follows:

x=a-n x = a - n ;

其中,x为替换后的数字,n为一次加密数据中的数字,a为预设常数。Among them, x is the number after the replacement, n is the number in the one-time encrypted data, and a is a preset constant.

进一步的,所述采集分布式新能源电站数据,得到第一电站数据,包括:Further, the collection of distributed new energy power station data to obtain the first power station data includes:

在各分布式新能源电站数据的源端采集分布式新能源电站数据;Collect distributed new energy power station data at the source end of each distributed new energy power station data;

分别对各源端的分布式新能源电站数据进行统一清洗;Unified cleaning of the distributed new energy power station data at each source end;

将统一清洗后的所述分布式新能源电站数据进行格式一致化处理;Format uniform processing of the distributed new energy power station data after unified cleaning;

通过分布式新能源数据传输模型,并基于云端的消息总线服务接口,将格式一致化处理后的分布式新能源电站数据作为第一电站数据。Through the distributed new energy data transmission model and based on the cloud-based message bus service interface, the distributed new energy power station data after the format consistency processing is used as the first power station data.

进一步的,所述将统一清洗后的所述分布式新能源电站数据进行格式一致化处理,包括:Further, the unified format processing of the distributed new energy power station data after unified cleaning includes:

基于非冗余、稳定、一致和易用的原则,将统一清洗后的所述分布式新能源电站数据按照设备模型、拓扑模型以及业务规则数据模型的形式进行格式一致化处理。Based on the principles of non-redundancy, stability, consistency and ease of use, the uniformly cleaned distributed new energy power station data is processed in a consistent format in the form of an equipment model, a topology model and a business rule data model.

进一步的,所述分布式新能源电站数据包括下述中至少一种:分布式新能源电站的运行数据;气象数据;电量数据;台账数据。Further, the distributed new energy power station data includes at least one of the following: operation data of the distributed new energy power station; meteorological data; electricity data; ledger data.

进一步的,所述将所述分布式新能源电站数据、替换数据或二次加密数据组装成为特定格式并进行传输之前,还包括:Further, before assembling the distributed new energy power station data, replacement data or secondary encrypted data into a specific format and transmitting, it also includes:

对请求分布式新能源电站数据的新接口进行鉴权与授权,并对完成鉴权与授权的新接口进行注册;Authenticate and authorize the new interface requesting distributed new energy power station data, and register the new interface that completes the authentication and authorization;

对经过所述新接口传输的请求,判断所述请求是否为业务终端的实际请求,并判断业务终端的签名与预先存储的对应签名是否一致:若两个判断结果均为是,则所述请求通过验证,否则,则所述请求未通过验证并拒绝所述请求。For the request transmitted through the new interface, judge whether the request is the actual request of the service terminal, and judge whether the signature of the service terminal is consistent with the corresponding pre-stored signature: if both judgment results are yes, then the request Pass validation, otherwise, the request fails validation and rejects the request.

第二方面,本发明提供一种加密传输装置,所述装置包括:In a second aspect, the present invention provides an encrypted transmission device, the device comprising:

采集模块,用于采集分布式新能源电站数据,得到第一电站数据;The acquisition module is used to collect the data of the distributed new energy power station to obtain the data of the first power station;

一次加密模块,用于基于预先建立的元数据字典对所述第一电站数据进行替换处理,得到第二电站数据;a primary encryption module, configured to perform replacement processing on the first power station data based on a pre-established metadata dictionary to obtain second power station data;

二次加密模块,用于将所述第二电站数据依据加密要求进行处理,得到第三电站数据;a secondary encryption module, configured to process the second power station data according to encryption requirements to obtain third power station data;

传输模块,用于将所述第三电站数据组装成为特定格式并进行传输。The transmission module is used to assemble the data of the third power station into a specific format and transmit it.

进一步的,所述元数据字典的建立,包括:Further, the establishment of the metadata dictionary includes:

基于分布式新能源信息交换的业务需求,将分布式新能源数据传输过程中出现频次超过频次阈值或长度超过长度阈值的字符串设置为元数据,并分别为各元数据设置不同替换字符;Based on the business requirements of distributed new energy information exchange, set the strings whose frequency exceeds the frequency threshold or the length exceeds the length threshold in the process of distributed new energy data transmission as metadata, and set different replacement characters for each metadata respectively;

基于各元数据及对应的替换字符构成元数据字典。A metadata dictionary is formed based on each metadata and the corresponding replacement characters.

进一步的,所述一次加密模块具体用于:Further, the one-time encryption module is specifically used for:

判断所述第一电站数据中是否存在所述元数据字典中的元数据:Determine whether the metadata in the metadata dictionary exists in the first power station data:

当存在时,利用所述元数据字典对所述第一电站数据中的元数据进行替换,得到第二电站数据;When it exists, use the metadata dictionary to replace the metadata in the first power station data to obtain second power station data;

否则,保持所述第一电站数据,并作为第二电站数据。Otherwise, the first power station data is kept as the second power station data.

进一步的,所述二次加密模块具体用于:Further, the secondary encryption module is specifically used for:

当所述第二电站数据需要加密时,利用二次加密法对所述第二电站数据进行加密,得到第三电站数据,否则将所述第二电站数据作为第三电站数据。When the second power station data needs to be encrypted, the second power station data is encrypted by using a secondary encryption method to obtain third power station data; otherwise, the second power station data is used as the third power station data.

进一步的,所述采集模块具体用于:在各分布式新能源电站数据的源端采集分布式新能源电站数据;Further, the collection module is specifically used for: collecting distributed new energy power station data at the source end of each distributed new energy power station data;

分别对各源端的分布式新能源电站数据进行统一清洗;Unified cleaning of the distributed new energy power station data at each source end;

将统一清洗后的所述分布式新能源电站数据进行格式一致化处理;Format uniform processing of the distributed new energy power station data after unified cleaning;

通过分布式新能源数据传输模型,并基于云端的消息总线服务接口,将格式一致化处理后的分布式新能源电站数据作为第一电站数据。Through the distributed new energy data transmission model and based on the cloud-based message bus service interface, the distributed new energy power station data after the format consistency processing is used as the first power station data.

第三方面,本发明还提供一种加密传输方法,包括:In a third aspect, the present invention also provides an encrypted transmission method, comprising:

分布式新能源数据中台利用数据鉴权方式采集分布式新能源电站数据,得到第一电站数据;The distributed new energy data center collects the data of the distributed new energy power station by means of data authentication, and obtains the data of the first power station;

分布式新能源数据中台基于预先建立的元数据字典对所述第一电站数据进行替换处理,得到第二电站数据;将所述第二电站数据依据加密要求进行处理,得到第三电站数据;将所述第三电站数据组装成为特定格式并进行传输。The distributed new energy data center performs replacement processing on the first power station data based on the pre-established metadata dictionary to obtain second power station data; and processes the second power station data according to encryption requirements to obtain third power station data; The third power plant data is assembled into a specific format and transmitted.

进一步,所述分布式新能源数据中台利用数据鉴权方式采集分布式新能源电站数据,包括:Further, the distributed new energy data center collects the distributed new energy power station data by means of data authentication, including:

分布式新能源数据中台提供API登录方式,接受通过API登录分布式新能源数据中台;The distributed new energy data center provides an API login method, and accepts API logins to the distributed new energy data center;

分布式新能源数据中台在完成用户鉴权之后返回登录成功消息,同时发送加密参数api_key和security_key;The distributed new energy data center returns a successful login message after completing the user authentication, and sends the encryption parameters api_key and security_key at the same time;

分布式新能源数据中台对业务终端返回的api_key进行鉴权,鉴权正确后解密业务终端上传的加密key数据,得到json参数api_key和security_key,并调用业务接口以获取分布式新能源电站数据。The distributed new energy data center authenticates the api_key returned by the business terminal, decrypts the encrypted key data uploaded by the business terminal after the authentication is correct, obtains the json parameters api_key and security_key, and calls the business interface to obtain the distributed new energy power station data.

第四方面,本发明提供一种加密传输系统,所述系统包括:业务终端和分布式新能源数据中台;In a fourth aspect, the present invention provides an encrypted transmission system, the system comprising: a service terminal and a distributed new energy data center;

所述业务终端,用于基于分布式新能源数据中台提供的API登录分布式新能源数据中台;The business terminal is used to log in to the distributed new energy data center based on the API provided by the distributed new energy data center;

所述分布式新能源数据中台,用于提供API采集业务终端提供的新能源电站数据,得到第一电站数据;The distributed new energy data middle station is used to provide the new energy power station data provided by the API collection service terminal, and obtain the first power station data;

所述分布式新能源数据中台还用于基于预先建立的元数据字典对所述第一电站数据进行替换处理,得到第二电站数据;将所述第二电站数据依据加密要求进行处理,得到第三电站数据;将所述第三电站数据组装成为特定格式并进行传输。The distributed new energy data center is further configured to perform replacement processing on the first power station data based on a pre-established metadata dictionary to obtain second power station data; and process the second power station data according to encryption requirements to obtain Third power station data; assembling the third power station data into a specific format and transmitting.

进一步,所述分布式新能源数据中台包括API界面模块;所述业务终端包括:客户端界面模块和客户端加密模块;Further, the distributed new energy data center includes an API interface module; the business terminal includes: a client interface module and a client encryption module;

所述API界面模块,用于提供API界面,使得业务终端能够通过API登录的方式登录分布式新能源数据中台;The API interface module is used to provide an API interface, so that the business terminal can log in to the distributed new energy data center by means of API login;

所述客户端界面模块,用于使得业务终端通过登录API登录分布式新能源数据中台;The client interface module is used to enable the business terminal to log in to the distributed new energy data center through the login API;

所述客户端加密模块,用于使得使用分布式新能源数据中台预先发布的加密方法对加密参数api_key和security_key进行加密后调用所述API界面模块。The client-side encryption module is configured to use the encryption method pre-released by the distributed new energy data center to encrypt the encryption parameters api_key and security_key and then call the API interface module.

进一步,所述分布式新能源数据中台,还包括:Further, the distributed new energy data center also includes:

鉴权模块,用于完成用户鉴权,并返回登录成功消息;返回登录成功消息的同时发送所获取的加密参数api_key和security_key;The authentication module is used to complete the user authentication and return the login success message; while returning the login success message, the obtained encryption parameters api_key and security_key are sent;

业务数据获取模块,用于对业务终端返回的api_key进行鉴权,鉴权正确后解密json参数api_key和security_key;The service data acquisition module is used to authenticate the api_key returned by the service terminal, and decrypt the json parameters api_key and security_key after the authentication is correct;

采集模块,用于采集分布式新能源电站数据,得到第一电站数据;The acquisition module is used to collect the data of the distributed new energy power station to obtain the data of the first power station;

一次加密模块,用于基于预先建立的元数据字典对所述第一电站数据进行替换处理,得到第二电站数据;a primary encryption module, configured to perform replacement processing on the first power station data based on a pre-established metadata dictionary to obtain second power station data;

二次加密模块,用于将所述第二电站数据依据加密要求进行处理,得到第三电站数据;a secondary encryption module, configured to process the second power station data according to encryption requirements to obtain third power station data;

传输模块,用于将所述第三电站数据组装成为特定格式并进行传输,并调用业务接口以获取新能源电站数据;a transmission module, configured to assemble the third power station data into a specific format and transmit it, and call a business interface to obtain the new energy power station data;

新能源数据库,包括:静态数据库、运行数据库、预测数据库和评估数据库。New energy database, including: static database, operation database, forecast database and evaluation database.

进一步,分布式新能源数据中台的业务接口通过业务数据库提供的数据接口访问新能源数据库,从而获取新能源数据库中存储的新能源数据。Further, the business interface of the distributed new energy data middle station accesses the new energy database through the data interface provided by the business database, so as to obtain the new energy data stored in the new energy database.

第五方面,本发明提供一种处理器,所述处理器用于运行程序,其中,所述程序运行时执行所述的加密传输方法。In a fifth aspect, the present invention provides a processor for running a program, wherein the encrypted transmission method is executed when the program is running.

第六方面,本发明提供一种执行设备,所述执行设备包括处理器,所述处理器和存储器耦合,所述存储器存储有程序指令,当所述存储器存储的程序指令被所述处理器执行时实现所述的加密传输方法。In a sixth aspect, the present invention provides an execution device, the execution device includes a processor, the processor is coupled to a memory, the memory stores program instructions, and when the program instructions stored in the memory are executed by the processor When implementing the encryption transmission method described.

第七方面,本发明提供一种计算机可读存储介质,所述计算机可读存储介质包括程序,当其在计算机上运行时,使得计算机执行所述的加密传输方法。In a seventh aspect, the present invention provides a computer-readable storage medium, the computer-readable storage medium comprising a program, which, when executed on a computer, causes the computer to execute the encrypted transmission method.

本发明上述一个或多个技术方案,至少具有如下一种或多种有益效果:在保留restAPI优点的同时压缩数据,并对敏感信息进行加密,生成的密文上提前进行了替换,从而通过数据双重加密,最终在实现压缩的同时提高了安全性。在保障安全性的基础上,借助大数据中台实现数据随时随地交换,减少了对业务终端数据处理的压力。The above one or more technical solutions of the present invention have at least one or more of the following beneficial effects: compressing data while retaining the advantages of restAPI, encrypting sensitive information, and replacing the generated ciphertext in advance, so as to pass the data Double encryption, which ultimately increases security while achieving compression. On the basis of ensuring security, with the help of the big data middle platform, data can be exchanged anytime and anywhere, reducing the pressure on business terminal data processing.

附图说明Description of drawings

图1是本发明提供的加密传输方法的流程图;Fig. 1 is the flow chart of the encrypted transmission method provided by the present invention;

图2是本发明提供的加密传输方法中的密文转换示意图;Fig. 2 is the ciphertext conversion schematic diagram in the encryption transmission method provided by the present invention;

图3是本发明提供的加密传输方法一个具体实施例的流程示意图;3 is a schematic flowchart of a specific embodiment of an encrypted transmission method provided by the present invention;

图4是本发明提供的一种加密传输装置示意图;4 is a schematic diagram of an encrypted transmission device provided by the present invention;

图5是本发明提供的另一个加密传输方法流程示意图;5 is a schematic flowchart of another encrypted transmission method provided by the present invention;

图6是本发明提供的另一个加密传输方法具体示例的流程示意图;6 is a schematic flowchart of another specific example of an encrypted transmission method provided by the present invention;

图7是本发明提供的一种加密传输系统示意图;7 is a schematic diagram of an encrypted transmission system provided by the present invention;

图8是本发明提供的一种实施方式中新能源数据库示意图。FIG. 8 is a schematic diagram of a new energy database in an embodiment provided by the present invention.

具体实施方式Detailed ways

下面结合附图对本发明的具体实施方式作进一步的详细说明。The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

目前主流的数据交换方式主要分为文件式的数据交换、接口式的数据交换和协议式的数据交换三种,其中数据中台中应用最为广泛的是接口式的restAPI方式,该方法基于json(JavaScript Object Notation, JS 对象简谱)格式进行信息交换,该格式具有数据格式简单, 易于读写,支持多种语言,便于服务端解析的优点,同时也存在一些问题,比如数据本身是基于字符串,导致数据本身较大,同时敏感信息的安全性不高。如何在进行新能源数据交换的过程中,在降低通信数据的数据量的同时提高安全性,从而最终提高新能源电力行业的效益效率,是急待解决的问题。本发明在保障安全性的基础上,借助大数据中台实现数据随时随地交换,减少了对业务终端数据处理的压力。At present, the mainstream data exchange methods are mainly divided into three types: file-type data exchange, interface-type data exchange and protocol-type data exchange. Among them, the interface-type restAPI method is most widely used in the data center, which is based on json (JavaScript Object Notation, JS Object Notation) format for information exchange, this format has the advantages of simple data format, easy to read and write, supports multiple languages, and is convenient for server parsing, but there are also some problems, such as the data itself is based on strings, which leads to The data itself is large, and the security of sensitive information is not high. How to reduce the data volume of communication data while improving security in the process of new energy data exchange, so as to ultimately improve the efficiency of the new energy power industry, is an urgent problem to be solved. On the basis of ensuring security, the invention realizes data exchange anytime and anywhere with the help of the big data middle platform, and reduces the pressure on the data processing of the business terminal.

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

实施例1:Example 1:

本发明提供了一种加密传输方法,如附图1所示,包括:The present invention provides an encrypted transmission method, as shown in Figure 1, comprising:

步骤S1:采集分布式新能源电站数据,得到第一电站数据;Step S1: collecting distributed new energy power station data to obtain first power station data;

步骤S2:基于预先建立的元数据字典对所述第一电站数据进行替换处理,得到第二电站数据;Step S2: performing replacement processing on the first power station data based on a pre-established metadata dictionary to obtain second power station data;

步骤S3:将所述第二电站数据依据加密要求进行处理,得到第三电站数据;Step S3: processing the second power station data according to the encryption requirements to obtain third power station data;

步骤S4:将所述第三电站数据组装成为特定格式并进行传输。Step S4: Assemble the third power station data into a specific format and transmit it.

优选的:所述特定格式为Json文件格式;所述特定格式是在进行中台数据交换中通常采用的格式;Preferably: the specific format is a Json file format; the specific format is a format commonly used in data exchange between the middle and the platform;

作为一种方式,所述元数据字典的建立,包括:基于分布式新能源信息交换的业务需求,将分布式新能源数据传输过程中出现频次超过频次阈值或长度超过长度阈值的字符串设置为元数据,并分别为各元数据设置不同替换字符;基于各元数据及对应的替换字符构成元数据字典。其中:元数据作为顶层抽象控制层,对中台内的数据和服务进行全方位管控。As a method, the establishment of the metadata dictionary includes: based on the business requirements of distributed new energy information exchange, setting the string whose frequency exceeds the frequency threshold or the length exceeds the length threshold in the process of distributed new energy data transmission as metadata, and set different replacement characters for each metadata; form a metadata dictionary based on each metadata and the corresponding replacement characters. Among them: Metadata, as the top-level abstract control layer, comprehensively controls the data and services in the middle platform.

优选的:元数据主要内容包括 :①基础数据描述。即业务数据导入、整合到中台后形成的基础数据的模式信息。有按关系或对象模式管理的结构化数据,也有大量非结构化数据。②数据服务描述,包括中台基础数据服务和分析结果数据服务描述两部分;本发明中,业务数据即为新能源电站数据。Preferred: The main contents of metadata include: ① Basic data description. That is, the pattern information of the basic data formed after the business data is imported and integrated into the middle office. There is structured data managed in relational or object schemas, and there is a lot of unstructured data. ②The description of the data service includes two parts: the basic data service of the middle station and the description of the analysis result data service; in the present invention, the business data is the new energy power station data.

优选的:元数据的获取采用自动和手动获取两种方式。自动获取是利用元数据获取接口(如数据库访问库表结构的接口)或导入标准化文件格式的方式获取存储的信息模型。Preferably: the metadata is acquired in two ways: automatic and manual. Automatic acquisition is to use the metadata acquisition interface (such as the interface for accessing the database table structure of the database) or import the standardized file format to acquire the stored information model.

作为一种方式,按照业务需求,为信息交换中高频出现的json中的key/value建立元数据字典库。As a way, according to business requirements, establish a metadata dictionary library for the key/value in json that frequently appears in information exchange.

优选的:所述利用预先建立的元数据字典对所述第一电站数据进行元数据替换处理,得到第二电站数据,包括:判断所述第一电站数据中是否存在所述元数据字典中的元数据:当存在时,利用所述元数据字典对所述第一电站数据中的元数据进行替换,得到第二电站数据;否则,保持所述第一电站数据,并作为第二电站数据。Preferably: performing metadata replacement processing on the first power station data by using a pre-established metadata dictionary to obtain second power station data includes: judging whether the first power station data exists in the metadata dictionary Metadata: when it exists, use the metadata dictionary to replace the metadata in the first power station data to obtain second power station data; otherwise, keep the first power station data and use it as the second power station data.

所述预先建立的元数据字典,具体包括如下步骤:The pre-established metadata dictionary specifically includes the following steps:

步骤SUB_A1:获取新能源数据中台中交换所涉及的数据对象;Step SUB_A1: Obtain the data objects involved in Taichung Exchange in the new energy data;

步骤SUB_A2:通过数据接口访问数据对象以获取该数据对象的历史交换信息;Step SUB_A2: Access the data object through the data interface to obtain the historical exchange information of the data object;

步骤SUB_A3:对历史交换信息所对应的json文件中key和value进行对比和分析,确定高频次出现以及长字符串的key和value,将所述高频词出现的key和value存入元数据字典库;Step SUB_A3: Compare and analyze the key and value in the json file corresponding to the historical exchange information, determine the key and value of the high-frequency occurrence and the long string, and store the key and value of the high-frequency word occurrence in the metadata dictionary library;

一个具体的实施方式为:假设数据对象A的原始json文件A_json为:A specific implementation is: Assume that the original json file A_json of the data object A is:

A_json :A_json:

[[

{{

id:'122',id:'122',

name:'江苏电力'name:'Jiangsu Electric Power'

},},

{{

id:'123',id:'123',

name:'上海电力'name:'Shanghai Electric Power'

}}

{{

id:'124',id:'124',

name:'上海风电'name:'Shanghai Wind Power'

}}

]]

假设数据的元数据为:Suppose the metadata of the data is:

元数据字段NoMetadata field No 元数据字段英文名Metadata field English name 11 idid 22 namename

假设字符串的字典为:Suppose the dictionary of strings is:

字符串序号String serial number 字符串string 上海Shanghai 11 江苏Jiangsu 22 电力electricity 33 风电wind power 44

替换后的A_json为:The replaced A_json is:

A_json:[A_json: [

{{

1:'122',1:'122',

2:'23'2:'23'

},},

{{

1:'123',1:'123',

2:'13'2:'13'

}}

{{

1:'124',1:'124',

2:'14'2:'14'

}]}]

优选的:所述将所述第二电站数据依据加密要求进行处理,得到第三电站数据,包括:当所述第二电站数据需要加密时,利用二次加密法对所述第二电站数据进行加密,得到第三电站数据,否则将所述第二电站数据作为第三电站数据。Preferably, the processing of the second power station data according to the encryption requirements to obtain the third power station data includes: when the second power station data needs to be encrypted, using a secondary encryption method to perform the second power station data encryption Encryption to obtain the third power station data, otherwise, the second power station data is used as the third power station data.

优选的:所述利用二次加密法对所述第二电站数据进行加密,包括:基于TripleDes算法对所述第二电站数据进行一次加密,得到一次加密数据;对所述一次加密数据中所有字母与数字分别进行替换,得到二次加密数据。对于需加密传输的信息使用TripleDES算法进行加密,并将密文进行再加密处理。Preferably: encrypting the data of the second power station by using a secondary encryption method includes: encrypting the data of the second power station once based on the TripleDes algorithm to obtain encrypted data once; encrypting all letters in the encrypted data once Substitute with numbers to obtain secondary encrypted data. For the information to be encrypted and transmitted, use the TripleDES algorithm to encrypt, and then re-encrypt the ciphertext.

信息数据在通信传输的过程中为了防止信息被不应该获取、不允许获取的人得到,比如类似用户密码等敏感信息,可使用一些加密算法对信息进行加密处理。TripleDES作为一种加强了的DES加密算法,加密端主要通过私钥,经过数学运算进行加密。解密端也需要相同的私钥进行解密,但是这样理论上仍存在被破解的风险,为了进一步加强安全性,本发明在生成的密文上提前进行了替换,从而通过数据双重加密,在实现压缩的同时提高了安全性。In the process of communication and transmission of information data, in order to prevent the information from being obtained by people who should not or are not allowed to obtain it, such as sensitive information such as user passwords, some encryption algorithms can be used to encrypt the information. TripleDES is an enhanced DES encryption algorithm. The encryption end mainly uses the private key to encrypt through mathematical operations. The decryption end also needs the same private key for decryption, but there is still a risk of being cracked in theory. In order to further strengthen the security, the present invention replaces the generated ciphertext in advance, so that the data is double encrypted and compressed. while improving safety.

一个具体的实施方式为:针对上述被替换后的A_json,被替换后的A_json中的信息“上海风电”已经被替换成“14”,而“14”的密文为:“U2FsdGVkX1+TJ75ELrbDRp5b1nb4v8MB”;对上述密文进行进一步加密,例如:所有字符大写字母转小写,小写转大写。数字0转换成9,数字9转换成0,数字1转换成8,数字8转换成1,依此类推;然后从第5位开始逆序。按照这个算法,上述密文变为:“u7fSDgvKx8+tj24elRBdrP4B8NB5V1mb”。A specific implementation is: for the replaced A_json, the information "Shanghai Wind Power" in the replaced A_json has been replaced with "14", and the ciphertext of "14" is: "U2FsdGVkX1+TJ75ELrbDRp5b1nb4v8MB"; The above ciphertext is further encrypted, for example, all characters are converted from uppercase to lowercase, and lowercase to uppercase. The number 0 is converted to 9, the number 9 is converted to 0, the number 1 is converted to 8, the number 8 is converted to 1, and so on; According to this algorithm, the above ciphertext becomes: "u7fSDgvKx8+tj24elRBdrP4B8NB5V1mb".

如附图2所示,作为一种方式,密文转换仅涉及字母和数字,其余特殊字符保持不变;As shown in Figure 2, as a way, the ciphertext conversion only involves letters and numbers, and the remaining special characters remain unchanged;

优选的:所有字符大写字母转小写,小写转大写。所有数字按9-n进行处理,比如9转为0,8转为1,以此类推,从5开始逆序。对于无需加密且元数据字典中未定义的数据,按原始信息组装json并进行信息交换。Preferred: All characters uppercase to lowercase, lowercase to uppercase. All numbers are processed according to 9-n, such as 9 to 0, 8 to 1, and so on, starting from 5 in reverse order. For data that does not require encryption and is not defined in the metadata dictionary, assemble json according to the original information and exchange information.

优选的:所述对所述一次加密数据中所有字母与数字分别进行替换,包括:对所述一次加密数据中所有字母进行大小写字母转换;对所述一次加密数据中所有数字,基于预设计算式对所述数字进行替换。Preferably: the replacing all letters and numbers in the one-time encrypted data respectively includes: converting all letters in the one-time encrypted data to upper and lower case letters; for all the numbers in the one-time encrypted data, based on preset A calculation replaces the numbers.

优选的:对所述数字进行替换的计算式如下:Preferably: the calculation formula for replacing the numbers is as follows:

x=a-n x = a - n ;

其中,x为替换后的数字,n为一次加密数据中的数字,a为预设常数。Among them, x is the number after the replacement, n is the number in the one-time encrypted data, and a is a preset constant.

优选的:所述采集分布式新能源电站数据,得到第一电站数据,包括:在各分布式新能源电站数据的源端采集分布式新能源电站数据;分别对各源端的分布式新能源电站数据进行统一清洗;将统一清洗后的所述分布式新能源电站数据进行格式一致化处理;通过分布式新能源数据传输模型,并基于云端的消息总线服务接口,将格式一致化处理后的分布式新能源电站数据作为第一电站数据。第一电站数据还可进一步同步至云端。Preferably: the collecting of distributed new energy power station data to obtain the first power station data includes: collecting distributed new energy power station data at the source end of each distributed new energy power station data; The data is uniformly cleaned; the uniformly cleaned distributed new energy power station data is processed in a consistent format; through the distributed new energy data transmission model, and based on the cloud-based message bus service interface, the format is uniformly processed. Type new energy power station data as the first power station data. The data of the first power station can be further synchronized to the cloud.

作为一种方式,先汇集由数据采集模块所采集的分布式新能源电站的各类数据,通过构建分布式新能源数据传输模型,基于省地云消息总线服务接口,实现源端到省地云的数据同步;再基于边缘计算思想提供初步的数据治理和数据预处理功能,降低后台数据分析计算压力。As a method, first collect all kinds of data of distributed new energy power stations collected by the data acquisition module, and build a distributed new energy data transmission model based on the provincial cloud message bus service interface to realize the source end to the provincial cloud. Based on the idea of edge computing, it provides preliminary data governance and data preprocessing functions to reduce the pressure on background data analysis and calculation.

其中:数据治理和采集数据预处理操作包括:1)设备量测数据统一清洗,对死值、越限值、非法值等按照事先设定的规则和治理强度,进行告警、修复等数据治理操作;2)数据预处理:转换系数、基值、合理上限、合理下限、默认值、按时间软积分(秒级时间间隔)等处理环节。Among them: data governance and collected data preprocessing operations include: 1) Unified cleaning of equipment measurement data, and data governance operations such as alarms and repairs for dead values, over-limit values, and illegal values according to pre-set rules and governance strengths ;2) Data preprocessing: conversion coefficient, base value, reasonable upper limit, reasonable lower limit, default value, soft integration by time (second-level time interval) and other processing links.

所述清洗还包括源端数据质量控制,所述源端数据质量控制,具体为:利用分布式新能源管控业务所涉及各类数据的通用质量控制规则,对源端数据实现数据清洗与数据质量统计、告警。其中:质量控制规则包括对数据越限、死值、缺测、数据跳变或逻辑异常等数据质量所限定的规则。The cleaning also includes source-end data quality control, and the source-end data quality control is specifically: using general quality control rules for various types of data involved in distributed new energy management and control services to implement data cleaning and data quality on source-end data. Statistics and alarms. Among them, the quality control rules include the rules that limit the data quality such as data out-of-limit, dead value, missing test, data jump or logical abnormality.

优选的:源端数据包括:气象因子监测数据、数值预报数据、分布式新能源资源分析数据、分布式新能源电站运行数据和/或管理数据等。Preferably, the source-end data includes: meteorological factor monitoring data, numerical forecast data, distributed new energy resource analysis data, distributed new energy power station operation data and/or management data, and the like.

优选的:所述将统一清洗后的所述分布式新能源电站数据进行格式一致化处理,包括:Preferably: the unified format processing of the distributed new energy power station data after unified cleaning includes:

基于非冗余、稳定、一致和易用的原则,将统一清洗后的所述分布式新能源电站数据按照设备模型、拓扑模型以及业务规则数据模型的形式进行格式一致化处理。Based on the principles of non-redundancy, stability, consistency and ease of use, the uniformly cleaned distributed new energy power station data is processed in a consistent format in the form of an equipment model, a topology model and a business rule data model.

优选的:所述分布式新能源电站数据包括:分布式新能源电站的运行数据、气象数据、电量数据和台账数据。Preferably, the distributed new energy power station data includes: operation data, meteorological data, electricity data and ledger data of the distributed new energy power station.

优选的:所述将所述分布式新能源电站数据、替换数据或二次加密数据组装成为Json文件并进行传输之前,还包括:Preferably: before the distributed new energy power station data, replacement data or secondary encrypted data are assembled into a Json file and transmitted, the method further includes:

对请求分布式新能源电站数据的新接口进行鉴权与授权,并对完成鉴权与授权的新接口进行注册;Authenticate and authorize the new interface requesting distributed new energy power station data, and register the new interface that completes the authentication and authorization;

对经过所述新接口传输的请求,判断所述请求是否为业务终端的实际请求,并判断业务终端的签名与预先存储的对应签名是否一致:若两个判断结果均为是,则所述请求通过验证,否则,则所述请求未通过验证并拒绝所述请求。For the request transmitted through the new interface, judge whether the request is the actual request of the service terminal, and judge whether the signature of the service terminal is consistent with the corresponding pre-stored signature: if both judgment results are yes, then the request Pass validation, otherwise, the request fails validation and rejects the request.

优选的:对非正常状态(禁用、停用、黑名单等)的应用,或者调用次数、调用频率、并发数超额的业务终端采取熔断机制,即直接抛异常不允许访问。对合法的应用请求,利用数据替换和加密后的json报文响应其请求。Preferred: use a circuit breaker mechanism for applications in abnormal states (disabled, deactivated, blacklisted, etc.), or service terminals with excessive invocation times, invocation frequency, and concurrency, that is, directly throwing exceptions and not allowing access. For legitimate application requests, use data replacement and encrypted json messages to respond to their requests.

上述包括各步骤细节的加密传输方法如图3所示。The above encrypted transmission method including the details of each step is shown in FIG. 3 .

实施例2:Example 2:

基于同一发明构思,本发明提供一种加密传输装置,如图4所示,所述装置包括:Based on the same inventive concept, the present invention provides an encrypted transmission device, as shown in FIG. 4 , the device includes:

采集模块,用于采集分布式新能源电站数据,得到第一电站数据;The acquisition module is used to collect the data of the distributed new energy power station to obtain the data of the first power station;

一次加密模块,用于基于预先建立的元数据字典对所述第一电站数据进行替换处理,得到第二电站数据;a primary encryption module, configured to perform replacement processing on the first power station data based on a pre-established metadata dictionary to obtain second power station data;

二次加密模块,用于将所述第二电站数据依据加密要求进行处理,得到第三电站数据;a secondary encryption module, configured to process the second power station data according to encryption requirements to obtain third power station data;

传输模块,用于将所述第三电站数据组装成为特定格式并进行传输。The transmission module is used to assemble the data of the third power station into a specific format and transmit it.

其中,元数据字典的建立,包括:Among them, the establishment of metadata dictionary, including:

基于分布式新能源信息交换的业务需求,将分布式新能源数据传输过程中出现频次超过频次阈值或长度超过长度阈值的字符串设置为元数据,并分别为各元数据设置不同替换字符;Based on the business requirements of distributed new energy information exchange, set the strings whose frequency exceeds the frequency threshold or the length exceeds the length threshold in the process of distributed new energy data transmission as metadata, and set different replacement characters for each metadata respectively;

基于各元数据及对应的替换字符构成元数据字典。A metadata dictionary is formed based on each metadata and the corresponding replacement characters.

其中,一次加密模块具体用于:Among them, the one-time encryption module is specifically used for:

判断所述第一电站数据中是否存在所述元数据字典中的元数据:Determine whether the metadata in the metadata dictionary exists in the first power station data:

当存在时,利用所述元数据字典对所述第一电站数据中的元数据进行替换,得到第二电站数据;When it exists, use the metadata dictionary to replace the metadata in the first power station data to obtain second power station data;

否则,保持所述第一电站数据,并作为第二电站数据。Otherwise, the first power station data is kept as the second power station data.

其中,二次加密模块具体用于:Among them, the secondary encryption module is specifically used for:

当所述第二电站数据需要加密时,利用二次加密法对所述第二电站数据进行加密,得到第三电站数据,否则将所述第二电站数据作为第三电站数据。When the second power station data needs to be encrypted, the second power station data is encrypted by using a secondary encryption method to obtain third power station data; otherwise, the second power station data is used as the third power station data.

其中,利用二次加密法对所述第二电站数据进行加密,包括:Wherein, using the secondary encryption method to encrypt the data of the second power station, including:

基于TripleDes算法对所述第二电站数据进行一次加密,得到一次加密数据;Encrypt the data of the second power station once based on the TripleDes algorithm to obtain the encrypted data once;

对所述一次加密数据中所有字母与数字分别进行替换,得到二次加密数据。All letters and numbers in the primary encrypted data are respectively replaced to obtain secondary encrypted data.

其中,对所述一次加密数据中所有字母与数字分别进行替换,包括:Wherein, all letters and numbers in the one-time encrypted data are respectively replaced, including:

对所述一次加密数据中所有字母进行大小写字母转换;Perform uppercase and lowercase letter conversion on all letters in the one-time encrypted data;

对所述一次加密数据中所有数字,基于预设计算式对所述数字进行替换。For all numbers in the one-time encrypted data, the numbers are replaced based on a preset calculation formula.

其中,对所述数字进行替换的计算式如下:Wherein, the calculation formula for replacing the numbers is as follows:

x=a-n x = a - n ;

其中,x为替换后的数字,n为一次加密数据中的数字,a为预设常数。Among them, x is the number after the replacement, n is the number in the one-time encrypted data, and a is a preset constant.

其中,采集模块具体用于:Among them, the acquisition module is specifically used for:

在各分布式新能源电站数据的源端采集分布式新能源电站数据;Collect distributed new energy power station data at the source end of each distributed new energy power station data;

分别对各源端的分布式新能源电站数据进行统一清洗;Unified cleaning of the distributed new energy power station data at each source end;

将统一清洗后的所述分布式新能源电站数据进行格式一致化处理;Format uniform processing of the distributed new energy power station data after unified cleaning;

通过分布式新能源数据传输模型,并基于云端的消息总线服务接口,将格式一致化处理后的分布式新能源电站数据作为第一电站数据。第一电站数据还可进一步同步至云端。Through the distributed new energy data transmission model and based on the cloud-based message bus service interface, the distributed new energy power station data after the format consistency processing is used as the first power station data. The data of the first power station can be further synchronized to the cloud.

其中,将统一清洗后的所述分布式新能源电站数据进行格式一致化处理,包括:Among them, the unified format of the distributed new energy power station data after unified cleaning is processed, including:

基于非冗余、稳定、一致和易用的原则,将统一清洗后的所述分布式新能源电站数据按照设备模型、拓扑模型以及业务规则数据模型的形式进行格式一致化处理。Based on the principles of non-redundancy, stability, consistency and ease of use, the uniformly cleaned distributed new energy power station data is processed in a consistent format in the form of an equipment model, a topology model and a business rule data model.

其中,分布式新能源电站数据包括:分布式新能源电站的运行数据、气象数据、电量数据和台账数据。Among them, the distributed new energy power station data includes: operation data, meteorological data, electricity data and ledger data of the distributed new energy power station.

其中,传输模块将所述第三电站数据组装成为特定格式并进行传输之前,还需要:Wherein, before the transmission module assembles the third power station data into a specific format and transmits it, it also needs:

对请求分布式新能源电站数据的新接口进行鉴权与授权,并对完成鉴权与授权的新接口进行注册;Authenticate and authorize the new interface requesting distributed new energy power station data, and register the new interface that completes the authentication and authorization;

对经过所述新接口传输的请求,判断所述请求是否为业务终端的实际请求,并判断业务终端的签名与预先存储的对应签名是否一致:若两个判断结果均为是,则所述请求通过验证,否则,则所述请求未通过验证并拒绝所述请求。For the request transmitted through the new interface, judge whether the request is the actual request of the service terminal, and judge whether the signature of the service terminal is consistent with the corresponding pre-stored signature: if both judgment results are yes, then the request Pass validation, otherwise, the request fails validation and rejects the request.

实施例3:Example 3:

基于同一发明构思,作为一种方式,如图5所示,本发明实施例中的加密传输方法;主要包括以下步骤:Based on the same inventive concept, as a way, as shown in FIG. 5 , the encrypted transmission method in the embodiment of the present invention mainly includes the following steps:

步骤S10:分布式新能源数据中台利用数据鉴权方式采集分布式新能源电站数据,得到第一电站数据;Step S10: the distributed new energy data middle station collects the data of the distributed new energy power station by using the data authentication method, and obtains the first power station data;

步骤S11:分布式新能源数据中台基于预先建立的元数据字典对所述第一电站数据进行替换处理,得到第二电站数据;将所述第二电站数据依据加密要求进行处理,得到第三电站数据;将所述第三电站数据组装成为特定格式并进行传输。Step S11: The distributed new energy data middle station performs replacement processing on the first power station data based on the pre-established metadata dictionary to obtain the second power station data; processes the second power station data according to the encryption requirements to obtain the third power station data. Power station data; the third power station data is assembled into a specific format and transmitted.

步骤S10中,分布式新能源数据中台利用数据鉴权方式采集分布式新能源电站数据,包括:In step S10, the distributed new energy data center collects the distributed new energy power station data by means of data authentication, including:

步骤S100:分布式新能源数据中台提供API登录方式,接受通过API登录分布式新能源数据中台;Step S100 : the distributed new energy data middle station provides an API login method, and accepts to log in to the distributed new energy data middle station through the API;

优选的:用户采用的业务终端上运行安卓、苹果或windows等通用操作系统;Preferably: the service terminal used by the user runs a general operating system such as Android, Apple or Windows;

步骤S200:分布式新能源数据中台在完成用户鉴权之后返回登录成功消息,同时发送加密参数api_key和security_key;Step S200: After completing the user authentication, the distributed new energy data center returns a login success message, and simultaneously sends the encryption parameters api_key and security_key;

步骤S300:分布式新能源数据中台对业务终端返回的api_key进行鉴权,鉴权正确后解密业务终端上传的加密key数据,得到json参数api_key和security_key,并调用业务接口以获取业务数据;Step S300: the distributed new energy data middle station authenticates the api_key returned by the service terminal, decrypts the encrypted key data uploaded by the service terminal after the authentication is correct, obtains json parameters api_key and security_key, and calls the service interface to obtain service data;

其中,加密key数据的确定过程,包括:Among them, the determination process of encrypted key data includes:

业务终端从分布式新能源数据中台获取加密参数api_key和security_key;The business terminal obtains the encryption parameters api_key and security_key from the distributed new energy data center;

业务终端使用分布式新能源数据中台预先发布的加密方法对加密参数api_key和security_key进行加密,得到加密key数据。The business terminal encrypts the encryption parameters api_key and security_key using the encryption method pre-published by the distributed new energy data center to obtain encrypted key data.

步骤11中,对获取的业务数据进行二次加密;这里所采用的二次加密方法是前面介绍过的加密传输方法;上述加密传输方法的详细流通如图6所示。In step 11, secondary encryption is performed on the acquired service data; the secondary encryption method used here is the encryption transmission method described above; the detailed flow of the above encryption transmission method is shown in FIG. 6 .

作为一种方式,面向分布式新能源数据中台的信息交换方法,具体为:移动端或者PC端的客户端即业务终端向服务端请求数据时,先调用登录API,从服务端获取api_key和security_key,并使用分布式新能源数据中台预先发布的加密方法对参数进行加密后调用业务API。服务端鉴权正确后,解密json参数并调用业务接口,加密获取数据,并将密文返回给请求端即客户端。客户端收到数据后调用解密方法将json中的数据解为明文,并提供数据给业务应用。本实施例中,服务端为分布式新能源数据中台。As a method, the information exchange method for the distributed new energy data center, specifically: when the client of the mobile terminal or the PC, that is, the business terminal, requests data from the server, first call the login API, and obtain the api_key and security_key from the server. , and use the encryption method pre-published by the distributed new energy data center to encrypt the parameters and call the business API. After the authentication of the server is correct, it decrypts the json parameters and calls the business interface, encrypts and obtains the data, and returns the ciphertext to the requester, that is, the client. After receiving the data, the client calls the decryption method to decipher the data in json into plaintext, and provides the data to the business application. In this embodiment, the server is a distributed new energy data center.

客户端的解密和解析流程包括:The decryption and parsing process on the client side includes:

对获取的业务数据进行解密以得到明文json文件;Decrypt the acquired business data to obtain a plaintext json file;

解析明文json文件以得到业务数据。Parse plaintext json files to get business data.

实施例4:Example 4:

基于同一发明构思,作为一种方式,本发明还提供一种加密传输系统,该系统如图7所示,包括:业务终端和分布式新能源数据中台;Based on the same inventive concept, as a way, the present invention also provides an encrypted transmission system, as shown in FIG. 7 , the system includes: a service terminal and a distributed new energy data center;

实施例中的分布式新能源数据中台包括:包括API界面模块、鉴权模块、业务数据获取模块、采集模块、一次加密模块、二次加密模块、传输模块和新能源数据库;The distributed new energy data middle station in the embodiment includes: an API interface module, an authentication module, a business data acquisition module, a collection module, a primary encryption module, a secondary encryption module, a transmission module and a new energy database;

其中:面向分布式新能源数据中台的业务接口通过业务数据库提供的数据接口访问新能源数据库,从而获取新能源数据库中存储的新能源数据;Among them: the business interface facing the distributed new energy data center accesses the new energy database through the data interface provided by the business database, so as to obtain the new energy data stored in the new energy database;

其中,所述API界面模块,用于提供API界面,使得业务终端能够通过API登录的方式登录分布式新能源数据中台;Wherein, the API interface module is used to provide an API interface, so that the business terminal can log in to the distributed new energy data center by means of API login;

鉴权模块,用于完成用户鉴权,并返回登录成功消息;返回登录成功消息的同时发送所获取的加密参数api_key和security_key;The authentication module is used to complete the user authentication and return the login success message; while returning the login success message, the obtained encryption parameters api_key and security_key are sent;

业务数据获取模块,用于对业务终端返回的api_key进行鉴权,鉴权正确后解密json参数api_key和security_key;The service data acquisition module is used to authenticate the api_key returned by the service terminal, and decrypt the json parameters api_key and security_key after the authentication is correct;

采集模块,用于采集分布式新能源电站数据,得到第一电站数据;The acquisition module is used to collect the data of the distributed new energy power station to obtain the data of the first power station;

一次加密模块,用于基于预先建立的元数据字典对所述第一电站数据进行替换处理,得到第二电站数据;a primary encryption module, configured to perform replacement processing on the first power station data based on a pre-established metadata dictionary to obtain second power station data;

二次加密模块,用于将所述第二电站数据依据加密要求进行处理,得到第三电站数据;a secondary encryption module, configured to process the second power station data according to encryption requirements to obtain third power station data;

传输模块,用于将所述第三电站数据组装成为特定格式并进行传输,并调用业务接口以获取新能源电站数据。The transmission module is used to assemble the data of the third power station into a specific format and transmit it, and call the service interface to obtain the data of the new energy power station.

如附图8所示,所述新能源数据库包括:静态数据库、运行数据库、预测数据库和评估数据库;As shown in Figure 8, the new energy database includes: a static database, a running database, a prediction database and an evaluation database;

其中,业务终端,用于基于分布式新能源数据中台提供的API登录分布式新能源数据中台;该业务终端包括:客户端界面模块和客户端加密模块;Among them, the business terminal is used to log in to the distributed new energy data center based on the API provided by the distributed new energy data center; the business terminal includes: a client interface module and a client encryption module;

所述客户端界面模块,用于使得业务终端通过登录API登录分布式新能源数据中台;The client interface module is used to enable the business terminal to log in to the distributed new energy data center through the login API;

所述客户端加密模块,用于使得使用分布式新能源数据中台预先发布的加密方法对加密参数api_key和security_key进行加密后调用所述API界面模块。The client-side encryption module is configured to use the encryption method pre-released by the distributed new energy data center to encrypt the encryption parameters api_key and security_key and then call the API interface module.

其中,业务终端为一个或者多个。Wherein, there are one or more service terminals.

其中,分布式新能源数据中台部署于云平台上,所述云平台包括一个或多个服务器。Wherein, the distributed new energy data center is deployed on a cloud platform, and the cloud platform includes one or more servers.

进一步,API界面模块、鉴权模块、业务数据获取模块、采集模块、一次加密模块、二次加密模块和传输模块部署于第一服务器上,新能源数据库部署于第二服务器上。Further, an API interface module, an authentication module, a business data acquisition module, a collection module, a primary encryption module, a secondary encryption module and a transmission module are deployed on the first server, and the new energy database is deployed on the second server.

云平台利用计算机集群构成统一协调的计算服务器资源,为业务终端提供按需、便捷访问共享资源池(计算设施、存储设备、应用程序等)的服务。云计算平台的核心服务层提供的服务包括基础设施即服务(IaaS,infrastructure as aservice)、平台即服务(PaaS,platform as a service)、软件即服务(SaaS,software as a service)。其中 IaaS提供实体或虚拟的计算、存储和网络服务,PaaS 提供应用程序部署与管理服务,SaaS 提供应用程序。业务终端所属企业可以租用进行信息交换处理。The cloud platform uses computer clusters to form a unified and coordinated computing server resource, providing business terminals with on-demand and convenient access to shared resource pools (computing facilities, storage devices, applications, etc.) services. The services provided by the core service layer of the cloud computing platform include infrastructure as a service (IaaS, infrastructure as a service), platform as a service (PaaS, platform as a service), and software as a service (SaaS, software as a service). Among them, IaaS provides physical or virtual computing, storage and network services, PaaS provides application deployment and management services, and SaaS provides applications. The enterprise to which the service terminal belongs can be rented for information exchange processing.

优选的:所述第二服务器利用云计算基础设施提供的大数据分析能力,对新能源数据库内的数据进行了有针对性的分析,包括生产运行日志统计分析、生产业务流程活动分析、资产台账专题分析、资产分析、装备缺陷统计、资产数据质量分析等,分析的结果回写到中台,成为其他业务终端涉及类型可以直接利用的数据资源。Preferably: the second server uses the big data analysis capability provided by the cloud computing infrastructure to carry out targeted analysis on the data in the new energy database, including statistical analysis of production operation logs, production business process activity analysis, asset desk Account thematic analysis, asset analysis, equipment defect statistics, asset data quality analysis, etc., the analysis results are written back to the middle office and become a data resource that can be directly used by other business terminal types.

业务终端和服务器通常彼此远离且典型地通过通信网络交互。业务终端和服务器的关系借助运行在各个计算机上的计算机程序而发生,且彼此具有业务终端-服务器关系。在一些实施方式中,服务器发送数据(例如HTML页)到业务终端设备(例如,用于显示数据给与业务终端设备交互的用户以及接收来自用户的输入)。在业务终端设备上生成的数据(例如用户交互的结果)能够在服务器上从业务终端设备接收。Service terminals and servers are usually remote from each other and typically interact through a communication network. The relationship of service terminal and server occurs by means of computer programs running on the respective computers, and have a service terminal-server relationship to each other. In some embodiments, the server sends data (eg, HTML pages) to the business end device (eg, for displaying data to a user interacting with the business end device and receiving input from the user). Data generated on the service end device (eg the results of user interactions) can be received on the server from the service end device.

术语“数据处理装置”、“数据处理系统”、“用户设备”或“计算设备”包涵用于处理数据的所有种类的装置、设备和机器,举例包括可编程处理器、计算机、片上系统、或者上述中的多个或其组合。所述装置能够包括专用逻辑电路,例如FPGA(现场可编程门阵列)或ASIC(专用集成电路)。除了硬件,所述装置还可以包括代码,创建用于所述计算机程序的执行环境,例如,构成处理器固件、协议栈、数据库管理系统、操作系统、跨平台运行环境、虚拟机或上述一个或多个的组合的代码。该装置和执行环境可以实现各种不同计算模型基础设施,诸如web服务、分布式计算、和网格计算基础设施。The terms "data processing apparatus," "data processing system," "user equipment," or "computing device" encompass all kinds of apparatus, devices, and machines for processing data, including, by way of example, programmable processors, computers, systems on a chip, or More than one or a combination of the above. The apparatus can include special purpose logic circuitry, such as an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit). In addition to hardware, the apparatus may also include code that creates an execution environment for the computer program, for example, constituting processor firmware, protocol stacks, database management systems, operating systems, cross-platform runtime environments, virtual machines, or one or more of the above Multiple combined codes. The apparatus and execution environment may implement a variety of different computing model infrastructures, such as web services, distributed computing, and grid computing infrastructures.

计算机程序(也被称为程序、软件、软件应用、脚本或代码)能够以编程语言的任何形式来撰写,包括汇编或解释语言、说明或过程性语言,且其可以以任何形式部署,包括作为单机程序或者作为模块、组件、子例程、对象或适于在计算环境中使用的其他单元。计算机程序可以但不必与文件系统中的文件相对应。程序能够存储在保持其他程序或数据(例如存储在标记语言文档中的一个或多个脚本)的文件的一部分中,在专用于所述程序的单个文件中,或者在多个协同文件中(例如,存储一个或多个模块、子例程或代码部分的文件)。计算机程序可以部署为在一个计算机上或位于一个站点或跨多个站点分布且由通信网络互连的多个计算机上执行。A computer program (also referred to as a program, software, software application, script, or code) can be written in any form of programming language, including assembly or interpreted language, instructional or procedural language, and it can be deployed in any form, including as A stand-alone program or as a module, component, subroutine, object, or other unit suitable for use in a computing environment. Computer programs may, but need not, correspond to files in the file system. A program can be stored in part of a file that holds other programs or data (such as one or more scripts stored in a markup language document), in a single file dedicated to the program, or in multiple cooperating files (such as , a file that stores one or more modules, subroutines, or sections of code). A computer program can be deployed to be executed on one computer or on multiple computers located at one site or distributed across multiple sites and interconnected by a communication network.

本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本发明是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block in the flowcharts and/or block diagrams, and combinations of flows and/or blocks in the flowcharts and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in one or more of the flowcharts and/or one or more blocks of the block diagrams.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions An apparatus implements the functions specified in a flow or flows of the flowcharts and/or a block or blocks of the block diagrams.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in one or more of the flowcharts and/or one or more blocks of the block diagrams.

最后应当说明的是:以上实施例仅用以说明本发明的技术方案而非对其限制,尽管参照上述实施例对本发明进行了详细的说明,所属领域的普通技术人员应当理解:依然可以对本发明的具体实施方式进行修改或者等同替换,而未脱离本发明精神和范围的任何修改或者等同替换,其均应涵盖在本发明的权利要求保护范围之内。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: the present invention can still be Modifications or equivalent replacements are made to the specific embodiments of the present invention, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention shall be included within the protection scope of the claims of the present invention.

Claims (12)

1. An encrypted transmission method, comprising:
the distributed new energy data center station acquires data of a distributed new energy power station by using a data authentication mode to obtain first power station data;
the distributed new energy data center platform carries out replacement processing on the first power station data based on a pre-established metadata dictionary to obtain second power station data;
processing the second power station data according to encryption requirements to obtain third power station data;
assembling the third power station data into a specific format and transmitting the data;
the distributed new energy data center station acquires distributed new energy power station data by using a data authentication mode to obtain first power station data, and the method comprises the following steps:
the distributed new energy data center station provides an API login mode and receives login of the distributed new energy data center station through the API;
the distributed new energy data middle platform returns a login success message after completing user authentication, and simultaneously sends encryption parameters api _ key and security _ key;
authenticating the api _ key returned by the service terminal by the distributed new energy data center, decrypting the encrypted key data uploaded by the service terminal after the authentication is correct to obtain json parameters api _ key and security _ key, and calling a service interface to obtain distributed new energy power station data;
uniformly cleaning the distributed new energy power station data of each source end respectively;
carrying out format consistency processing on the uniformly cleaned distributed new energy power station data;
the distributed new energy power station data after format unification processing is used as first power station data through a distributed new energy data transmission model and based on a message bus service interface of a cloud;
the uniformly cleaned data of the distributed new energy power station are subjected to format consistency processing, and the method comprises the following steps:
based on the principles of non-redundancy, stability, consistency and easiness in use, carrying out format consistency processing on the uniformly cleaned distributed new energy power station data according to the forms of an equipment model, a topology model and a business rule data model;
the distributed new energy power station data comprises at least one of the following data: operating data of the distributed new energy power station; meteorological data; electricity quantity data; standing book data;
before the third power station data is assembled into a specific format and transmitted, the method further includes:
the new interface requesting the data of the distributed new energy power station is authenticated and authorized, and the new interface completing authentication and authorization is registered;
for the request transmitted by the new interface, judging whether the request is the actual request of the service terminal, and judging whether the signature of the service terminal is consistent with the corresponding signature stored in advance: if the two judgment results are both yes, the request passes the verification, otherwise, the request does not pass the verification and the request is rejected.
2. The method of claim 1, wherein the establishing of the metadata dictionary comprises:
setting character strings with frequency exceeding a frequency threshold or length exceeding a length threshold in the transmission process of distributed new energy data as metadata based on service requirements of distributed new energy information exchange, and setting different replacement characters for each metadata respectively;
a metadata dictionary is constructed based on each metadata and the corresponding replacement character.
3. The method of claim 2, wherein said replacing said first plant data based on a pre-established metadata dictionary to obtain second plant data comprises:
judging whether the first power station data contains metadata in the metadata dictionary or not:
when the first power station data exists, replacing the metadata in the first power station data by using the metadata dictionary to obtain second power station data;
otherwise, the first power station data is kept and used as second power station data.
4. The method of claim 1, wherein said processing said second station data in accordance with encryption requirements to obtain third station data comprises:
and when the second power station data needs to be encrypted, encrypting the second power station data by using a secondary encryption method to obtain third power station data, otherwise, taking the second power station data as the third power station data.
5. The method of claim 4 wherein said encrypting said second station data using quadratic encryption comprises:
performing primary encryption on the second power station data based on a TripleDes algorithm to obtain primary encrypted data;
and respectively replacing all letters and numbers in the primary encrypted data to obtain secondary encrypted data.
6. The method as claimed in claim 5, wherein said separately replacing all the letters and numbers in said once-encrypted data comprises:
carrying out capital letter and lower letter conversion on all letters in the primary encrypted data;
and replacing all the digits in the primary encrypted data based on a preset calculation formula.
7. The method of claim 6, wherein the substitution of the number is calculated as follows:
x=a-n
wherein,xin order to be a number after the replacement,nin order to encrypt the numbers in the data at a time,ais a preset constant.
8. An encryption transmission apparatus, comprising:
the acquisition module is used for acquiring the data of the distributed new energy power station by using a data authentication mode through the distributed new energy data middle station to obtain first power station data;
the primary encryption module is used for replacing the first power station data through a distributed new energy data middle station based on a pre-established metadata dictionary to obtain second power station data;
the secondary encryption module is used for processing the second power station data according to encryption requirements to obtain third power station data;
the transmission module is used for assembling the third power station data into a specific format and transmitting the third power station data;
the method for acquiring the data of the distributed new energy power station by the distributed new energy data middle station in a data authentication mode to obtain the data of the first power station comprises the following steps:
providing an API login mode through the distributed new energy data center, and receiving login of the distributed new energy data center through the API;
returning a login success message after user authentication is completed through the distributed new energy data middle station, and simultaneously sending encryption parameters api _ key and security _ key;
authenticating the api _ key returned by the service terminal through the distributed new energy data center, decrypting the encrypted key data uploaded by the service terminal after the authentication is correct to obtain json parameters api _ key and security _ key, and calling a service interface to obtain distributed new energy power station data;
uniformly cleaning the distributed new energy power station data of each source end respectively;
carrying out format consistency processing on the uniformly cleaned distributed new energy power station data;
the distributed new energy power station data after format unification processing is used as first power station data through a distributed new energy data transmission model and based on a message bus service interface of a cloud;
the uniformly cleaned data of the distributed new energy power station are subjected to format consistency processing, and the method comprises the following steps:
based on the principles of non-redundancy, stability, consistency and easiness in use, carrying out format consistency processing on the uniformly cleaned distributed new energy power station data according to the forms of an equipment model, a topology model and a business rule data model;
the distributed new energy power station data comprises at least one of the following data: operating data of the distributed new energy power station; meteorological data; electricity quantity data; standing book data;
before the third power station data is assembled into a specific format and transmitted, the method further includes:
the new interface requesting the data of the distributed new energy power station is authenticated and authorized, and the new interface completing authentication and authorization is registered;
for the request transmitted by the new interface, judging whether the request is an actual request of the service terminal, and judging whether the signature of the service terminal is consistent with the corresponding signature stored in advance: if the two judgment results are yes, the request passes the verification, otherwise, the request fails the verification and the request is rejected.
9. The apparatus of claim 8, wherein the one-time encryption module is specifically configured to obtain the metadata dictionary in a manner comprising:
setting character strings with frequency exceeding a frequency threshold or length exceeding a length threshold in the transmission process of distributed new energy data as metadata based on service requirements of distributed new energy information exchange, and setting different replacement characters for each metadata respectively;
a metadata dictionary is constructed based on each metadata and the corresponding replacement character.
10. The apparatus of claim 9, wherein the primary encryption module is specifically configured to:
judging whether the first power station data contains metadata in the metadata dictionary or not:
when the first power station data exists, replacing the metadata in the first power station data by using the metadata dictionary to obtain second power station data;
otherwise, the first power station data is kept and used as second power station data.
11. The apparatus of claim 8, wherein the secondary encryption module is specifically configured to:
and when the second power station data needs to be encrypted, encrypting the second power station data by using a secondary encryption method to obtain third power station data, otherwise, taking the second power station data as the third power station data.
12. The apparatus of claim 8, wherein the acquisition module is specifically configured to: collecting distributed new energy power station data at a source end of each distributed new energy power station data;
uniformly cleaning the distributed new energy power station data of each source end respectively;
carrying out format consistency processing on the uniformly cleaned distributed new energy power station data;
and taking the distributed new energy power station data subjected to format unification processing as first power station data through a distributed new energy data transmission model and based on a message bus service interface at the cloud.
CN202210189429.4A 2022-03-01 2022-03-01 An encrypted transmission method, device and system Active CN114254373B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210189429.4A CN114254373B (en) 2022-03-01 2022-03-01 An encrypted transmission method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210189429.4A CN114254373B (en) 2022-03-01 2022-03-01 An encrypted transmission method, device and system

Publications (2)

Publication Number Publication Date
CN114254373A CN114254373A (en) 2022-03-29
CN114254373B true CN114254373B (en) 2022-07-08

Family

ID=80800116

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210189429.4A Active CN114254373B (en) 2022-03-01 2022-03-01 An encrypted transmission method, device and system

Country Status (1)

Country Link
CN (1) CN114254373B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117767272B (en) * 2023-11-22 2025-03-18 国网冀北电力有限公司智能配电网中心 New energy consumption capacity assessment system and assessment method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109088870A (en) * 2018-08-14 2018-12-25 国网甘肃省电力公司电力科学研究院 A kind of method of new energy plant stand generator unit acquisition terminal secure accessing platform
CN111212105A (en) * 2019-12-09 2020-05-29 国网江苏省电力有限公司电力科学研究院 Remote safe transmission method and system for wind and light storage data
CN111552931A (en) * 2020-04-30 2020-08-18 平安科技(深圳)有限公司 Method and system for adding shell of java code
CN112202729A (en) * 2020-09-11 2021-01-08 微梦创科网络科技(中国)有限公司 Dynamic obfuscated encryption and decryption method and device
CN112367342A (en) * 2020-12-04 2021-02-12 国网江苏省电力有限公司南京供电分公司 Encryption transmission method and system for distributed photovoltaic operation and maintenance data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8898468B2 (en) * 2009-12-08 2014-11-25 Bae Systems Information And Electronic Systems Integration Inc. Method for ensuring security and privacy in a wireless cognitive network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109088870A (en) * 2018-08-14 2018-12-25 国网甘肃省电力公司电力科学研究院 A kind of method of new energy plant stand generator unit acquisition terminal secure accessing platform
CN111212105A (en) * 2019-12-09 2020-05-29 国网江苏省电力有限公司电力科学研究院 Remote safe transmission method and system for wind and light storage data
CN111552931A (en) * 2020-04-30 2020-08-18 平安科技(深圳)有限公司 Method and system for adding shell of java code
CN112202729A (en) * 2020-09-11 2021-01-08 微梦创科网络科技(中国)有限公司 Dynamic obfuscated encryption and decryption method and device
CN112367342A (en) * 2020-12-04 2021-02-12 国网江苏省电力有限公司南京供电分公司 Encryption transmission method and system for distributed photovoltaic operation and maintenance data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
分布式新能源公共服务平台混合云架构研究;郭雅娟等;《电力需求侧管理》;20180320(第02期);第47-50、56页 *

Also Published As

Publication number Publication date
CN114254373A (en) 2022-03-29

Similar Documents

Publication Publication Date Title
TW201947446A (en) Blockchain-based information supervision method and device
CN109361517A (en) A kind of virtualization cloud cipher machine system and its implementation based on cloud computing
CN108234451A (en) Electric power intranet and extranet request forwarding Proxy Method and computer readable storage medium
CN114218322B (en) Data display method, device, equipment and medium based on ciphertext transmission
CN109474583B (en) Data security management system
CN118690396B (en) Data storage method and system based on block chain
CN111680900A (en) Work order issuing method and device, electronic equipment and storage medium
CN103457802A (en) Information transmission system and method
CN115859362A (en) Data storage system, method, device and medium based on block chain side chain
CN115102786A (en) E-government domestic cloud password service platform based on information-creation environment
CN114254373B (en) An encrypted transmission method, device and system
CN115118751B (en) A blockchain-based supervision system, method, device and medium
CN106529216B (en) A software authorization system and software authorization method based on a public storage platform
CN118862146A (en) Power data sharing method and device based on privacy computing
WO2025001468A1 (en) Decentralized identity authentication method and related device
CN113127109A (en) Interface calling method and device, electronic equipment and readable storage medium
CN117395068A (en) SSH account encryption or decryption method, automatic network equipment configuration method and equipment
CN117729008A (en) Data security protection method and device, electronic equipment and storage medium
WO2024216923A1 (en) Message processing method, apparatus, product, device and medium
CN110691071A (en) Mass data processing system and method with privacy protection
CN116233058A (en) An identification resolution method, device and medium supporting multi-system identification sharing
CN116346486A (en) Combined login method, device, equipment and storage medium
CN110602074B (en) A method, device and system for using business identity based on master-slave association
CN115277252B (en) Data authorization method based on multi-signature mechanism
CN111224930B (en) Data security transmission method, system, computer equipment and readable 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