CN113344731B - Automatic collection and integration system and method for randomly reporting scattered data - Google Patents
Automatic collection and integration system and method for randomly reporting scattered data Download PDFInfo
- Publication number
- CN113344731B CN113344731B CN202110358673.4A CN202110358673A CN113344731B CN 113344731 B CN113344731 B CN 113344731B CN 202110358673 A CN202110358673 A CN 202110358673A CN 113344731 B CN113344731 B CN 113344731B
- Authority
- CN
- China
- Prior art keywords
- data
- file
- information
- program
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION 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/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/06—Energy or water supply
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
-
- Y—GENERAL 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
- Y04—INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
- Y04S—SYSTEMS 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
- Y04S10/00—Systems supporting electrical power generation, transmission or distribution
- Y04S10/50—Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Economics (AREA)
- General Physics & Mathematics (AREA)
- Water Supply & Treatment (AREA)
- Marketing (AREA)
- Primary Health Care (AREA)
- Strategic Management (AREA)
- Tourism & Hospitality (AREA)
- Human Resources & Organizations (AREA)
- General Business, Economics & Management (AREA)
- General Health & Medical Sciences (AREA)
- Public Health (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本发明是一种用于随机报送零散数据的自动收集与整合系统,其特点是:它包括微信群、微信自动处理模块、信息报送与格式规范、外部网络电脑上的文件设置与程序控制、传递文件生成模块、网络切换和融合与应用模块。其自动收集与整合方法是:建立微信群及报送数据、外部网络电脑程序、网络切换和内部网络电脑程序。适用于将原由人工随机零散电话报送数据改为自动收集与整合的场景,具有实用性、经济性和基层单位的便捷性,让一线人员更好用、更愿用,为基层班组减负的优点。
The present invention is an automatic collection and integration system for randomly reporting scattered data, and its characteristics are: it includes WeChat group, WeChat automatic processing module, information reporting and format specification, file setting and program control on external network computer, transmission file generation module, network switching and integration and application module. Its automatic collection and integration method is: establishing WeChat group and reporting data, external network computer program, network switching and internal network computer program. It is suitable for the scene of changing the original manual random scattered telephone reporting data to automatic collection and integration, and has the advantages of practicality, economy and convenience of grassroots units, making it easier and more willing for front-line personnel to use it, and reducing the burden on grassroots teams.
Description
技术领域Technical Field
本发明涉及计算机和微信,是一种用于随机报送零散数据的自动收集与整合系统及其方法。The present invention relates to computers and WeChat, and is an automatic collection and integration system and method for randomly reporting scattered data.
背景技术Background technique
在传统电网调度系统中,上夜班的地区调度员接班以后,其所辖的各发电厂、变电站和大用户(以下简称“厂站户”)值班人员便随机陆续用电话把相关数据报送给调度,值班调度员通过电话接收数据后手工记录到表格上,这几十上百个随机零散电话需一直持续到0:30分左右才能结束。之后,调度员再将这些收集到的数据通过一系列的运算,最后逐一录入到上报系统的网页中。此项工作每日都要从前半夜持续到凌晨,正是常人深睡之时,人工操作非常辛苦且极易产生纰漏和错误。In the traditional power grid dispatching system, after the regional dispatcher on night shift takes over, the duty personnel of the power plants, substations and large users (hereinafter referred to as "plants, substations and users") under his jurisdiction will randomly report the relevant data to the dispatcher by phone. The duty dispatcher receives the data by phone and records it manually on the form. These dozens or hundreds of random and scattered calls need to continue until about 0:30. After that, the dispatcher will perform a series of calculations on the collected data and finally enter them one by one into the webpage of the reporting system. This work lasts from the first half of the night to the early morning every day, when ordinary people are deep asleep. Manual operation is very hard and prone to omissions and errors.
随着电网调度自动化水平的不断提高,目前已经有相当一部分数据可以从能量管理系统、电量计费系统和用户用电信息采集系统等应用系统中查询获取了,但仍有一部分数据在各应用系统中均无采集,还需要各厂站户值班人员通过电话来报送。这种传统的用电话随机报送与接收零散数据的方法已经严重限制了电网调度自动化水平的提高了,本发明正是为解决这一瓶颈问题应运而生。With the continuous improvement of the automation level of power grid dispatching, a considerable part of data can be queried and obtained from application systems such as energy management system, electricity billing system and user electricity information collection system, but there is still a part of data that is not collected in each application system and needs to be reported by the duty personnel of each plant and station by phone. This traditional method of randomly reporting and receiving scattered data by phone has seriously limited the improvement of the automation level of power grid dispatching. The present invention comes into being to solve this bottleneck problem.
发明内容Summary of the invention
本发明所要解决的技术问题是:改厂站户电话报送数据的方式为微信报送,调度端在外网电脑上登录微信,用RPA程序与各厂站户微信群自动交互、判断与反馈,收集、整合其所报数据,并通过可变密钥编码,密文存储、纯文本传递。The technical problem to be solved by the present invention is: to change the way of reporting data by telephone of plant and station users to reporting via WeChat, the dispatching end logs in to WeChat on the external network computer, uses the RPA program to automatically interact, judge and feedback with the WeChat groups of each plant and station user, collects and integrates the reported data, and encodes it with a variable key, stores it in ciphertext, and transmits it in plain text.
本发明解决技术问题的方案之一是:一种用于随机报送零散数据的自动收集与整合系统,其特征是:它包括微信群、微信自动处理模块、信息报送与格式规范、外部网络电脑上的文件设置与程序控制、传递文件生成模块、网络切换和融合与应用模块:One of the solutions to the technical problem of the present invention is: an automatic collection and integration system for randomly reporting scattered data, which is characterized by: it includes a WeChat group, a WeChat automatic processing module, information reporting and format specifications, file settings and program control on an external network computer, a transfer file generation module, and a network switching and fusion and application module:
所述微信群是在调度微信应用中为每一个厂站户创建一个包含其报送数据值班员的微信群,用于将需要报送的数据按要求格式在微信群中报送。The WeChat group is created for each plant or station user in the dispatching WeChat application, and includes the data reporting duty officer, so as to report the data to be reported in the WeChat group in the required format.
所述微信自动处理模块是在调度端利用RPA程序监测与控制运行在外部网络电脑上的Windows版微信应用,用于与各厂站户微信群自动交互、判断与反馈,收集、整合其所报数据,包括程序准备与初始化、信息的监测与收集、未读信息群名数组生成、数据读取与存储和密文编码,是用于在外部网络电脑上实时监控各厂站户群中发来的新信息,并对新信息进行读取、判断、存储或回复的程序。The WeChat automatic processing module is a Windows version of WeChat application that uses RPA program to monitor and control running on external network computers at the dispatch end. It is used to automatically interact, judge and feedback with the WeChat groups of each plant and station user, collect and integrate their reported data, including program preparation and initialization, information monitoring and collection, unread information group name array generation, data reading and storage and ciphertext encoding. It is a program used to monitor new information sent from each plant and station user group in real time on an external network computer, and read, judge, store or reply to the new information.
所述信息报送与格式规范包含报送数据的时间、信息格式和数据单位的要求,用于规范各厂站户报送数据的微信群、群员以及在群中报送数据的时间、信息格式和数据单位等要求。The information submission and format specifications include requirements for the time, information format and data units for submitting data, and are used to standardize the WeChat groups, group members and the time, information format and data units for submitting data in the groups of each plant, station and household.
所述外部网络电脑上的文件设置与程序控制是在外部网络电脑的硬盘上设置一个文件夹,其中包括设置文件、数据文件和传递文件,在RPA程序文件夹中设置一个流程文件和控制面板、监测收集、数据传递三个文件,用于设置与存放数据报送单位的编号、群名与运行状态,自动生成程序运行过程中存放的各数据报送单位所报数据的文件,在采取了物理隔离措施的网络电脑间传输纯文本的数据文件,并通过控制面板对文件设置与程序控制进行设置。The file setting and program control on the external network computer is to set up a folder on the hard disk of the external network computer, which includes setting files, data files and transfer files, and set up a process file and three files, control panel, monitoring collection, and data transfer, in the RPA program folder. They are used to set and store the number, group name and running status of the data reporting unit, automatically generate files for storing the data reported by each data reporting unit during the program operation, transmit plain text data files between network computers that have taken physical isolation measures, and set file settings and program control through the control panel.
所述传递文件生成模块是用来将密文的xlsx格式的WPS文件转换为Dat格式的存文本文件的子程序。The transfer file generation module is a subroutine used to convert a WPS file in the encrypted xlsx format into a text file in the Dat format.
所述网络切换包括KVM切换器和数据传递U盘,用于运行在两个或多个采取了物理隔离措施的网络电脑间数据的快速传递。The network switch includes a KVM switch and a data transmission USB disk, which is used for fast data transmission between two or more network computers that have taken physical isolation measures.
所述融合与应用模块由运行在内部网络电脑上的密文解码子程序和数据融合与应用子程序构成,用于将完整的数据文件与从EMS系统、电能量采集系统和用户用电信息采集系统分别采集到的数据文件相融合,得到地区电网调度完整的运行数据,为地区电网调度分析和报表提供完整的数据源支撑。The fusion and application module is composed of a ciphertext decoding subroutine and a data fusion and application subroutine running on an internal network computer, and is used to fuse the complete data file with the data files collected from the EMS system, the electric energy collection system and the user electricity consumption information collection system, so as to obtain complete operating data of the regional power grid dispatching, and provide complete data source support for regional power grid dispatching analysis and reporting.
进一步,所述信息报送与格式规范具体包括以下项目:Furthermore, the information submission and format specifications specifically include the following items:
⑴在调度微信应用上分别建立以厂站户名为群名的微信群,微信群包含该厂站户报送数据的全部值班员,各数据报送人员不得修改群名,但是允许修改备注;微信群名和数量与设置文件的内容相统一,数据报送人员按照规定时间每天将需要报送的数据在微信群中报送,报送数据中必须含有“日期”关键字,这是微信自动处理模块收集数据时的唯一信息标识码;⑴ On the dispatching WeChat application, WeChat groups are established with the plant and station account name as the group name. The WeChat group includes all the on-duty personnel who report data for the plant and station account. The data reporting personnel are not allowed to modify the group name, but are allowed to modify the remarks; the WeChat group name and number are consistent with the content of the setting file. The data reporting personnel shall report the data to be reported in the WeChat group every day at the specified time. The reported data must contain the "date" keyword, which is the unique information identification code when the WeChat automatic processing module collects data;
⑵数据信息报送格式要求分行录入,名称与数据间用冒号分隔,冒号不分中英文、且不得省略;第一行为数据日期,日期为8位数字,前4位为公元年份,第5、6位为月份,第7、8位为日数,若月份和日数小于10,则在十位上补0;以下各行为报送数据,电量单位为千瓦时;⑵ The data information reporting format requires entry in separate lines, with the name and data separated by a colon. The colon is not distinguished between Chinese and English and cannot be omitted; the first line is the data date, which is an 8-digit number. The first 4 digits are the year, the 5th and 6th digits are the month, and the 7th and 8th digits are the day. If the month and day are less than 10, add 0 to the tens digit; the following lines are reported data, and the unit of electricity is kilowatt-hour;
⑶在微信自动处理模块中,对信息标识码设置了若干种容错格式,将报送信息中可能出现的日期长短格式、横杠、斜杠连接符等进行逐一枚举,并进行容错修正,当确实无法识别时,微信自动处理模块便模拟微信发送过程向该群自动回复信息令其重发,以确保数据完整。⑶ In the WeChat automatic processing module, several fault-tolerant formats are set for the information identification code. The date length format, horizontal bar, slash connector, etc. that may appear in the reported information are enumerated one by one, and fault-tolerant corrections are performed. When it is indeed impossible to identify, the WeChat automatic processing module simulates the WeChat sending process to automatically reply to the group and ask it to resend the message to ensure data integrity.
进一步,所述外部网络电脑上的文件设置与程序控制是在外部网络电脑的硬盘上设置一个文件夹,其包括设置文件、数据文件和传递文件,在RPA程序文件夹中设置一个流程文件和控制面板、监测收集、数据传递三个文件:Furthermore, the file setting and program control on the external network computer is to set up a folder on the hard disk of the external network computer, which includes setting files, data files and transfer files, and set up a process file and three files including control panel, monitoring collection and data transfer in the RPA program folder:
(1)设置文件(1) Setting file
所述设置文件全名为数据报送单位群名设置文件,是一个xlsx格式的WPS文件,用于设置与存放数据报送单位的编号、群名与运行状态;编号用于决定该单位报送的数据在数据文件中的存放位置,运行状态有运行和暂停两种选择,当该户为暂停状态时,程序运行时自动跳过该单位;The full name of the setting file is the data reporting unit group name setting file, which is a WPS file in xlsx format, used to set and store the number, group name and operation status of the data reporting unit; the number is used to determine the storage location of the data reported by the unit in the data file, and the operation status has two options: running and paused. When the household is in the paused state, the unit will be automatically skipped when the program is running;
(2)数据文件(2) Data files
所述数据文件是一个xlsx格式的WPS文件,是程序运行过程中自动生成的存放各数据报送单位所报数据的文件,为了数据安全起见,该文件设置开启权限保护,并且所存数据为编码后的密文;The data file is a WPS file in xlsx format, which is automatically generated during the program running process to store the data reported by each data reporting unit. For the sake of data security, the file is set to open permission protection, and the stored data is encoded ciphertext;
(3)传递文件(3) Transferring documents
所述传递文件是一个dat格式的Txt文件,通过程序由完整的数据文件自动生成的、用于在采取了物理隔离措施的网络电脑间传输数据的纯文本文件;该文本文件中存放的是一个二维数组转换而来的Json字符串,其中的数据为编码后的密文;The transfer file is a Txt file in dat format, which is a plain text file automatically generated by a program from a complete data file and used to transmit data between network computers that have taken physical isolation measures; the text file stores a Json string converted from a two-dimensional array, in which the data is encoded ciphertext;
(4)控制面板(4) Control Panel
所述控制面板是一个用户交互设置界面程序模块,通过运行该程序模块,用户能够方便的设置WeChat.exe安装路径、工作目录、监测频度、U盘盘符、U盘密码、U盘数据存放区、日期变更时间、定时自动运行时间、用户在设置文件中的存放区域、数据是明文还是密文存储与传输等信息;这些信息通过控制面板录入或修改后,便会以字典Json字符串的形式保存在一个名为Config.Cfg的文本文件中,以备程序运行中随时调用,这是程序适应不同用户个性化设置参数的一个手段;同时,RPA程序文件夹中还设置一个名为ybhRet.Rec的文本文件,其中存放的是监控程序临时中断时的已报用户名称和中断时间的数据字典。The control panel is a user interactive setting interface program module. By running the program module, the user can conveniently set the WeChat.exe installation path, working directory, monitoring frequency, U disk drive letter, U disk password, U disk data storage area, date change time, scheduled automatic operation time, user storage area in the setting file, whether the data is stored and transmitted in plain text or cipher text, and other information; after this information is entered or modified through the control panel, it will be saved in the form of a dictionary Json string in a text file named Config.Cfg, so that it can be called at any time during program operation. This is a means for the program to adapt to personalized setting parameters for different users; at the same time, a text file named ybhRet.Rec is also set in the RPA program folder, which stores a data dictionary of reported user names and interruption times when the monitoring program is temporarily interrupted.
进一步,所述微信自动处理模块包括程序准备与初始化、信息的监测与收集、未读信息群名数组生成、数据读取与存储和密文编码,用于实时监控各厂站户群中发来的新信息,并对新信息进行读取、判断、存储或回复的程序,它包括以下子程序:Furthermore, the WeChat automatic processing module includes program preparation and initialization, information monitoring and collection, unread information group name array generation, data reading and storage, and ciphertext encoding, which is used to monitor new information sent from each plant and station user group in real time, and read, judge, store or reply to the new information. It includes the following subroutines:
⑴程序准备与初始化:⑴Program preparation and initialization:
①初始化变量:程序开始先定义了各相关变量和数组、读取Config.Cfg和ybhRet.Rec文件中的保存信息作为程序执行的初始状态,已使程序运行能与上次的中断完美衔接;① Initialize variables: At the beginning of the program, various related variables and arrays are defined, and the saved information in the Config.Cfg and ybhRet.Rec files is read as the initial state of the program execution, so that the program operation can be perfectly connected with the last interruption;
②启动微信应用:判断Windows版微信应用是否已运行,若未运行则在此开启,并且在手机上确认用电脑登录微信;② Start WeChat application: Check whether the Windows version of WeChat application is running. If not, start it here and confirm on the phone that you have logged into WeChat using the computer.
③调整设置程序窗口:调整微信窗口大小使其占居屏幕左侧1/3,调整RPA程序运行窗口大小使其占居屏幕右侧2/3,并使其输出信息占居右下侧一定面积的窗口,用于实时显示程序工作的输出消息;③ Adjust the program window: adjust the size of the WeChat window so that it occupies 1/3 of the left side of the screen, adjust the size of the RPA program running window so that it occupies 2/3 of the right side of the screen, and make the output information occupy a certain area of the lower right side of the window to display the output messages of the program in real time;
④使微信窗口处于激活状态:在RPA窗口写屏提示“监控程序运行中”,使微信窗口处于激活状态;④ Make the WeChat window active: Write a prompt "Monitoring program is running" on the RPA window to make the WeChat window active;
⑵信息的监测与收集:定时循环检测未读信息,把试读成功的信息解读后经密文编码子程序进行编码后存储,同时向视图输出窗口输出本次循环读取成功的厂站户数据、截至此时已成功读取的厂站户群名集合以及还有哪些厂站户尚未报送数据,对试读失败的信息自动回复令其检查后重新报送;(2) Monitoring and collection of information: Regularly cycle to detect unread information, decode the information that has been successfully read, encode it through the ciphertext encoding subroutine and store it, and output the plant and station household data that has been successfully read in this cycle, the plant and station household group name set that has been successfully read up to this point, and which plants and stations have not yet submitted data to the view output window, and automatically reply to the information that failed to be read and ask it to check and resubmit;
⑶未读信息群名数组生成:自动搜索未读信息并将发送这些未读信息的厂站户群名收入定义好的数组中;⑶ Unread message group name array generation: automatically search for unread messages and store the group names of the users who sent these unread messages into a defined array;
⑷数据读取与存储:对未读信息群名数组的群名逐一在对话框中对各条信息进行搜索,并对最后一条含有信息标识的文本进行获取和字符串切割,再将所得字符串经过密钥编码后存于数据文件,同时,将该厂站户群名记入已报户集合;(4) Data reading and storage: Search each message in the dialog box one by one for the group name in the unread message group name array, obtain the last text containing the message identifier and cut the string, then store the obtained string in the data file after key encoding, and at the same time, record the plant station user group name in the reported user set;
⑸密文编码:通过时间函数与控制面板中的设置经运算后得到一个编码密钥,将抓取到的数据转换为ASCII码,再将转换后的ASCII码与密钥叠加生成密文编码,将密文编码以背景色存于数据文件中并隐藏WPS编编辑栏;通过读取工作表区域命令将数据文件转换为二维数组,再将该二维数组转换为Json字符串,然后写入到传递文件,从而生成了纯文本密文传递文件.dat。⑸ Ciphertext encoding: Get a coding key through the calculation of the time function and the settings in the control panel, convert the captured data into ASCII code, and then superimpose the converted ASCII code with the key to generate the ciphertext code, save the ciphertext code in the data file with the background color and hide the WPS editing bar; convert the data file into a two-dimensional array through the read worksheet area command, and then convert the two-dimensional array into a Json string, and then write it to the transfer file, thereby generating a plain text ciphertext transfer file .dat.
进一步,所述网络切换包括KVM切换器和数据传递U盘,用KVM切换器将两个网络电脑连在一起,通过内网U盘将传递文件以内部网络和外部网络隔离的方式拷入内部网络电脑,为了保证数据安全,传递文件采用了纯文本密文文件。Furthermore, the network switching includes a KVM switch and a data transfer USB flash drive. The two network computers are connected together using the KVM switch, and the transfer files are copied to the internal network computer through the internal network USB flash drive in a manner that isolates the internal network and the external network. In order to ensure data security, the transfer files use plain text encrypted files.
进一步,所述融合与应用模块由运行在内部网络电脑上的密文解码子程序和数据融合与应用子程序构成:Furthermore, the fusion and application module is composed of a ciphertext decoding subroutine and a data fusion and application subroutine running on an internal network computer:
⑴所述密文解码子程序为:传递文件在内部网络电脑上进行解码,其解码过程是编码过程的逆过程,即首先读取传递文件到Json字符串变量,再将其转换为对象,形成二维数组;获取该数组最大下标,通过双重循环,将数组元素按编码逆运算算法逐一进行解码后再构造成一个新的数组;将构造的新数组通过写入区域命令写入WPS表格文件,从而得到了完整的解码数据文件;⑴ The ciphertext decoding subroutine is as follows: the transmitted file is decoded on the internal network computer, and the decoding process is the inverse process of the encoding process, that is, first read the transmitted file into a Json string variable, and then convert it into an object to form a two-dimensional array; obtain the maximum subscript of the array, and through a double loop, decode the array elements one by one according to the encoding inverse operation algorithm and then construct a new array; write the constructed new array into the WPS table file through the write area command, thereby obtaining a complete decoded data file;
⑵所述数据融合与应用子程序:传递文件经过解码后便在内部网络电脑上得到了完整的WPS格式的数据文件,将该文件与从EMS系统、电能量采集系统和用户用电信息采集系统分别采集到的WPS格式的数据文件相融合,便会得到地区电网调度完整的运行数据,这将为地区电网调度分析和报表提供完整的数据源支撑。⑵The data fusion and application subroutine: after the transmission file is decoded, a complete WPS format data file is obtained on the internal network computer. By integrating this file with the WPS format data files collected from the EMS system, the electric energy collection system and the user electricity consumption information collection system respectively, the complete operation data of the regional power grid dispatching can be obtained, which will provide complete data source support for the regional power grid dispatching analysis and reporting.
本发明解决技术问题的方案之二是:一种用于随机报送零散数据的自动收集与整合方法,其特征是:它包括建立微信群及报送数据、外部网络电脑程序运行、网络切换和内部网络电脑程序运行,具体步骤如下:The second solution to the technical problem of the present invention is: a method for automatically collecting and integrating randomly reported scattered data, which is characterized in that it includes establishing a WeChat group and reporting data, running an external network computer program, network switching and running an internal network computer program. The specific steps are as follows:
1)建立微信群及报送数据1) Establish WeChat group and submit data
在调度微信应用中为每一个厂站户创建一个包含其报送数据值班员的微信群,报送数据的值班员将需要报送的数据按要求格式在微信群中报送;In the dispatching WeChat application, a WeChat group is created for each plant and station user, including the duty officer who reports the data. The duty officer who reports the data will report the data to be reported in the WeChat group in the required format;
2)外部网络电脑程序运行2) External network computer program running
所述外部网络电脑程序运行包括:The external network computer program operation includes:
⑴程序准备与初始化;⑴Program preparation and initialization;
⑵定时循环检测未读信息;⑵ Regular cycle detection of unread messages;
⑶生成未读消息群名数组;⑶ Generate an array of unread message group names;
⑷信息试读;(4) Information trial reading;
⑸密文编码与存储;⑸Ciphertext encoding and storage;
⑹全部读完未读信息或人为终止;⑹ Read all unread messages or terminate manually;
⑺传递文件生成;⑺Transfer file generation;
3)网络切换3) Network switching
用KVM切换器将两个网络电脑连在一起,通过内网U盘将传递文件以内部网络和外部网络隔离的方式拷入内部网络电脑;Use a KVM switch to connect two network computers together, and copy the transfer files to the internal network computer through the internal network USB flash drive in a way that the internal network and the external network are isolated;
4)内部网络电脑程序运行4) Internal network computer program operation
所述内部网络电脑程序运行包括:The internal network computer program operation includes:
⑴传递文件解码;⑴Decode the transfer file;
⑵数据融合;(2) Data fusion;
⑶数据应用。⑶Data application.
进一步,所述步骤2)外部网络电脑程序运行具体包括:Furthermore, the step 2) running the external network computer program specifically includes:
⑴程序准备与初始化⑴Program preparation and initialization
⑵定时循环检测未读信息⑵Timed loop detection of unread messages
设置一个大的循环定时循环检测未读信息,其循环间隔时间由控制面板中的检测频度设定,每间隔设定时间检测一次;Set a large cycle to detect unread messages. The cycle interval is set by the detection frequency in the control panel. The detection is performed once every set interval.
⑶生成未读消息群名数组⑶ Generate an array of unread message group names
自动搜索未读信息并将发送这些未读信息的厂站户群名收入定义好的数组中;Automatically search for unread messages and store the names of the user groups that sent these unread messages into a defined array;
⑷信息试读⑷ Information Reading
对循环检测的未读信息试读,把试读成功的信息解读后传递到密文编码子程序,同时向视图输出窗口输出本次循环读取成功的厂站户数据、至此已成功读取的厂站户群名集合以及还有哪些厂站户尚未报送数据,对试读失败的信息自动回复令其检查后重新报送;Trial read the unread information of the loop detection, and pass the successfully read information to the ciphertext encoding subroutine after decoding. At the same time, output the plant and station household data that have been successfully read in this cycle, the plant and station household group name set that has been successfully read so far, and which plants and stations households have not yet submitted data to the view output window. Automatically reply to the information that failed to be trial read and ask it to check and resubmit;
⑸密文编码与存储⑸Ciphertext encoding and storage
把试读成功的信息解读后传递到密文编码子程序,由密文编码子程序进行编码后存储;The successfully read information is decoded and passed to the ciphertext encoding subroutine, which encodes it and stores it;
⑹全部读完未读信息或人为终止⑹ Read all unread messages or terminate manually
把循环检测的未读信息全部读完,或者根据需要人为终止信息读取;Read all the unread messages in the loop detection, or manually terminate the message reading as needed;
⑺传递文件生成⑺Transfer file generation
将密文编码以背景色存于数据文件中并隐藏WPS编编辑栏;通过读取工作表区域命令将数据文件转换为二维数组,再将该二维数组转换为Json字符串,然后写入到传递文件,从而生成了纯文本密文传递文件.dat。The ciphertext is encoded and stored in the data file with a background color and the WPS editing bar is hidden; the data file is converted into a two-dimensional array through the read worksheet area command, and then the two-dimensional array is converted into a Json string, and then written into the transfer file, thereby generating a plain text ciphertext transfer file .dat.
进一步,所述步骤⑴程序准备与初始化具体如下:Further, the step (1) program preparation and initialization are specifically as follows:
①初始化变量:程序开始先定义了各相关变量和数组、读取Config.Cfg和ybhRet.Rec文件中的保存信息作为程序执行的初始状态,已使程序运行能与上次的中断完美衔接;① Initialize variables: At the beginning of the program, various related variables and arrays are defined, and the saved information in the Config.Cfg and ybhRet.Rec files is read as the initial state of the program execution, so that the program operation can be perfectly connected with the last interruption;
②启动微信应用:判断Windows版微信应用是否已运行,若未运行则在此开启,并且在手机上确认用电脑登录微信;② Start WeChat application: Check whether the Windows version of WeChat application is running. If not, start it here and confirm on the phone that you have logged into WeChat using the computer.
③调整设置程序窗口:调整微信窗口大小使其占居屏幕左侧1/3,调整RPA程序运行窗口大小使其占居屏幕右侧2/3,并使其输出信息占居右下侧一定面积的窗口,用于实时显示程序工作的输出消息;③ Adjust the program window: adjust the size of the WeChat window so that it occupies 1/3 of the left side of the screen, adjust the size of the RPA program running window so that it occupies 2/3 of the right side of the screen, and make the output information occupy a certain area of the lower right side of the window to display the output messages of the program in real time;
④使微信窗口处于激活状态:在RPA窗口写屏提示“监控程序运行中”,使微信窗口处于激活状态。④ Make the WeChat window active: Write a prompt "Monitoring program is running" on the RPA window to make the WeChat window active.
进一步,所述步骤2)所述内部网络电脑程序运行包括:Furthermore, the internal network computer program operation in step 2) includes:
⑴传递文件解码⑴Delivery file decoding
传递文件在内部网络电脑上进行解码,首先读取传递文件到Json字符串变量,再将其转换为对象,形成二维数组;获取该数组最大下标,通过双重循环,将数组元素按编码逆运算算法逐一进行解码后再构造成一个新的数组;将构造的新数组通过写入区域命令写入WPS文件,从而得到了完整的解码数据文件;The transferred file is decoded on the internal network computer. First, the transferred file is read into a Json string variable, and then converted into an object to form a two-dimensional array. The maximum subscript of the array is obtained, and through a double loop, the array elements are decoded one by one according to the encoding inverse operation algorithm and then constructed into a new array. The constructed new array is written into the WPS file through the write area command, thereby obtaining a complete decoded data file.
⑵数据融合(2) Data fusion
传递文件经过解码后在内部网络电脑上得到了完整的WPS格式的数据文件,将该文件与从EMS系统、电能量采集系统和用户用电信息采集系统分别采集到的WPS格式的数据文件相融合;After the transmission file is decoded, a complete WPS format data file is obtained on the internal network computer, and the file is integrated with the WPS format data files collected from the EMS system, the electric energy collection system and the user electricity consumption information collection system;
⑶数据应用⑶Data application
将解码后得到的完整的WPS格式的数据文件与从EMS系统、电能量采集系统和用户用电信息采集系统分别采集到的WPS格式的数据文件相融合,便会得到地区电网调度完整的运行数据,这将为地区电网调度分析和报表提供完整的数据源支撑。By integrating the complete WPS format data file obtained after decoding with the WPS format data files collected from the EMS system, electric energy collection system and user electricity consumption information collection system, we can obtain the complete operation data of the regional power grid dispatching, which will provide complete data source support for regional power grid dispatching analysis and reporting.
本发明的有益效果是:The beneficial effects of the present invention are:
(1)能使夜班调度员平均每天减少接听电话60余次;(1) It can reduce the number of calls that night shift dispatchers answer by an average of more than 60 times per day;
(2)平均每天减少记录数据200余条;(2) On average, more than 200 records of data were reduced every day;
(3)减轻了夜班调度员的心理压力;(3) Reduce the psychological pressure of night shift dispatchers;
(4)提高了数据的准确性;(4) Improved data accuracy;
(5)提高了调度办公自动化水平和工作效率。(5) Improved the level of dispatch office automation and work efficiency.
本发明适用于将原由人工随机零散电话报送数据改为自动收集与整合的场景,具有实用性、经济性和基层单位的便捷性,让一线人员更好用、更愿用,为基层班组减负的优点。The present invention is applicable to the scenario where the data originally reported by manual random and scattered telephone calls are changed to automatic collection and integration. It has the advantages of practicality, economy and convenience for grass-roots units, making it easier and more willing for front-line personnel to use it, thus reducing the burden on grass-roots teams.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本发明用于随机报送零散数据的自动收集与整合系统的结构框图;FIG1 is a block diagram of a system for automatically collecting and integrating randomly reported scattered data according to the present invention;
图2为本发明用于随机报送零散数据的自动收集与整合系统的外部网络电脑结构框图;FIG2 is a block diagram of an external network computer structure of the automatic collection and integration system for randomly reported scattered data of the present invention;
图3为本发明用于随机报送零散数据的自动收集与整合系统的微信自动处理模块结构框图;FIG3 is a block diagram of the WeChat automatic processing module of the automatic collection and integration system for randomly reporting scattered data of the present invention;
图4为本发明用于随机报送零散数据的自动收集与整合方法的流程框图。FIG4 is a flowchart of the method for automatically collecting and integrating randomly reported scattered data according to the present invention.
具体实施方式Detailed ways
下面结合附图和实施例对本发明进一步说明。The present invention is further described below in conjunction with the accompanying drawings and embodiments.
参见图1~图4,实施例1,本实施例一种用于随机报送零散数据的自动收集与整合系统,它包括微信群、微信自动处理模块、信息报送与格式规范、外部网络电脑上的文件设置与程序控制、传递文件生成模块、网络切换和融合与应用模块:Referring to Figures 1 to 4, Example 1, this embodiment is an automatic collection and integration system for randomly reporting scattered data, which includes a WeChat group, a WeChat automatic processing module, information reporting and format specifications, file settings and program control on an external network computer, a transfer file generation module, and a network switching and fusion and application module:
所述微信群是在调度微信应用中为每一个厂站户创建一个包含其报送数据值班员的微信群,用于将需要报送的数据按要求格式在微信群中报送。The WeChat group is created for each plant or station user in the dispatching WeChat application, and includes the data reporting duty officer, so as to report the data to be reported in the WeChat group in the required format.
所述微信自动处理模块是在调度端利用RPA程序监测与控制运行在外部网络电脑上的Windows版微信应用,用于与各厂站户微信群自动交互、判断与反馈,收集、整合其所报数据。包括程序准备与初始化、信息的监测与收集、未读信息群名数组生成、数据读取与存储和密文编码,是用于在外部网络电脑上实时监控各厂站户群中发来的新信息,并对新信息进行读取、判断、存储或回复的程序。The WeChat automatic processing module is a Windows version of WeChat application that uses RPA program to monitor and control the operation on the external network computer at the dispatch end, and is used to automatically interact, judge and feedback with the WeChat groups of each plant and station user, and collect and integrate the reported data. It includes program preparation and initialization, information monitoring and collection, unread information group name array generation, data reading and storage, and ciphertext encoding. It is a program used to monitor new information sent from each plant and station user group in real time on the external network computer, and read, judge, store or reply to the new information.
所述信息报送与格式规范包含报送数据的时间、信息格式和数据单位的要求,用于规范各厂站户报送数据的微信群、群员以及在群中报送数据的时间、信息格式和数据单位等要求。The information submission and format specifications include requirements for the time, information format and data units for submitting data, and are used to standardize the WeChat groups, group members and the time, information format and data units for submitting data in the groups of each plant, station and household.
所述外部网络电脑上的文件设置与程序控制是在外部网络电脑的硬盘上设置一个文件夹,其包括设置文件、数据文件和传递文件,在RPA程序文件夹中设置一个流程文件和控制面板、监测收集、数据传递三个文件,用于设置与存放数据报送单位的编号、群名与运行状态,自动生成程序运行过程中存放的各数据报送单位所报数据的文件,在采取了物理隔离措施的网络电脑间传输纯文本的数据文件,并通过控制面板对文件设置与程序控制进行设置。The file setting and program control on the external network computer is to set up a folder on the hard disk of the external network computer, which includes setting files, data files and transfer files. A process file and three files, control panel, monitoring collection, and data transfer, are set in the RPA program folder to set and store the number, group name and operation status of the data reporting unit, automatically generate files for storing the data reported by each data reporting unit during the program operation, transmit plain text data files between network computers that have taken physical isolation measures, and set file settings and program control through the control panel.
所述传递文件生成模块是用来将密文的xlsx格式的WPS文件转换为Dat格式的存文本文件的子程序。The transfer file generation module is a subroutine used to convert a WPS file in the encrypted xlsx format into a text file in the Dat format.
所述网络切换包括KVM切换器和数据传递U盘,用于运行在两个或多个采取了物理隔离措施的网络电脑间数据的快速传递。The network switch includes a KVM switch and a data transmission USB disk, which is used for fast data transmission between two or more network computers that have taken physical isolation measures.
所述融合与应用模块由运行在内部网络电脑上的密文解码子程序和数据融合与应用子程序构成,用于将完整的数据文件与从EMS系统、电能量采集系统和用户用电信息采集系统分别采集到的数据文件相融合,得到地区电网调度完整的运行数据,为地区电网调度分析和报表提供完整的数据源支撑。The fusion and application module is composed of a ciphertext decoding subroutine and a data fusion and application subroutine running on an internal network computer, and is used to fuse the complete data file with the data files collected from the EMS system, the electric energy collection system and the user electricity consumption information collection system, so as to obtain complete operating data of the regional power grid dispatching, and provide complete data source support for regional power grid dispatching analysis and reporting.
所述信息报送与格式规范具体包括以下项目:The information submission and format specifications specifically include the following items:
⑴在调度微信应用上分别建立以厂站户名为群名的微信群,微信群包含该厂站户报送数据的全部值班员,各数据报送人员不得修改群名,但是允许修改备注;微信群名和数量与设置文件的内容相统一,数据报送人员按照规定时间每天将需要报送的数据在微信群中报送,报送数据中必须含有“日期”关键字,这是微信自动处理模块收集数据时的唯一信息标识码;⑴ On the dispatching WeChat application, WeChat groups are established with the plant and station account name as the group name. The WeChat group includes all the on-duty personnel who report data for the plant and station account. The data reporting personnel are not allowed to modify the group name, but are allowed to modify the remarks; the WeChat group name and number are consistent with the content of the setting file. The data reporting personnel shall report the data to be reported in the WeChat group every day at the specified time. The reported data must contain the "date" keyword, which is the unique information identification code when the WeChat automatic processing module collects data;
⑵数据信息报送格式要求分行录入,名称与数据间用冒号分隔,冒号不分中英文、且不得省略;第一行为数据日期,日期为8位数字,前4位为公元年份,第5、6位为月份,第7、8位为日数,若月份和日数小于10,则在十位上补0;以下各行为报送数据,电量单位为千瓦时;⑵ The data information reporting format requires entry in separate lines, with the name and data separated by a colon. The colon is not distinguished between Chinese and English and cannot be omitted; the first line is the data date, which is an 8-digit number. The first 4 digits are the year, the 5th and 6th digits are the month, and the 7th and 8th digits are the day. If the month and day are less than 10, add 0 to the tens digit; the following lines are reported data, and the unit of electricity is kilowatt-hour;
例如某用户2021年1月8日电量为1688888千瓦时,则发送信息应为:For example, if a user's electricity consumption on January 8, 2021 is 1688888 kWh, the information to be sent should be:
日期:20210108Date: 20210108
电量:1688888Battery: 1688888
若该用户仅报一个电量数据,也可简化为If the user only reports one power data, it can also be simplified as
20210108:168888820210108:1688888
某电厂2020年12月8日机端电量:22166千瓦时、上网电量:22156千瓦时、最大:988千瓦、最小:886千瓦、负荷率:93.4%,则发送信息应为:On December 8, 2020, the power consumption of a power plant was 22,166 kWh, the online power consumption was 22,156 kWh, the maximum power was 988 kW, the minimum power was 886 kW, and the load rate was 93.4%. The information to be sent should be:
日期:20201208Date: 20201208
机端:22166Terminal: 22166
上网:22156Internet access: 22156
最大:988Max: 988
最小:886Minimum: 886
负荷率:93.4Load factor: 93.4
⑶微信自动处理模块中,对信息标识码设置了多达20种容错格式,将报送信息中可能出现的日期长短格式、横杠、斜杠连接符等进行逐一枚举,并进行容错修正。如:对于“20201208”这个“日期”信息标识,无论报送者写成2020128、2020-12-08、2020-12-8、2020/12/08、2020/12/8等等那种形式,程序都能自动识别。当确实无法识别时,微信自动处理模块便模拟微信发送过程向该群自动回复信息令其重发,以确保数据完整。⑶ In the WeChat automatic processing module, up to 20 error-tolerant formats are set for the information identification code, and the date length format, horizontal bar, slash connector, etc. that may appear in the submitted information are enumerated one by one, and error-tolerant corrections are made. For example: for the "date" information identifier "20201208", no matter whether the reporter writes it as 2020128, 2020-12-08, 2020-12-8, 2020/12/08, 2020/12/8, etc., the program can automatically recognize it. When it is indeed impossible to recognize, the WeChat automatic processing module simulates the WeChat sending process to automatically reply to the group to ask it to resend to ensure the integrity of the data.
所述外部网络电脑上的文件设置与程序控制是在外部网络电脑的硬盘上设置一个文件夹,其名称是由控制面板中的“工作目录”确定,其包括设置文件.xlsx、数据文件.xlsx和传递文件.dat,在RPA程序文件夹中设置一个flow流程文件和控制面板、监测收集、数据传递三个task文件。The file setting and program control on the external network computer is to set up a folder on the hard disk of the external network computer, whose name is determined by the "working directory" in the control panel, which includes the setting file .xlsx, the data file .xlsx and the transfer file .dat, and set a flow process file and three task files of control panel, monitoring collection, and data transfer in the RPA program folder.
(1)设置文件(1) Setting file
所述设置文件全名为数据报送单位群名设置文件,是一个xlsx格式的WPS文件,用于设置与存放数据报送单位的编号、群名与运行状态;编号用于决定该单位报送的数据在数据文件中的存放位置,运行状态有运行和暂停两种选择,当该户为暂停状态时,程序运行时自动跳过该单位;The full name of the setting file is the data reporting unit group name setting file, which is a WPS file in xlsx format, used to set and store the number, group name and operation status of the data reporting unit; the number is used to determine the storage location of the data reported by the unit in the data file, and the operation status has two options: running and paused. When the household is in the paused state, the unit will be automatically skipped when the program is running;
(2)数据文件(2) Data files
所述数据文件是一个xlsx格式的WPS文件,是程序运行过程中自动生成的存放各数据报送单位所报数据的文件,为了数据安全起见,该文件设置开启权限保护,并且所存数据为编码后的密文;The data file is a WPS file in xlsx format, which is automatically generated during the program running process to store the data reported by each data reporting unit. For the sake of data security, the file is set to open permission protection, and the stored data is encoded ciphertext;
(3)传递文件(3) Transferring documents
所述传递文件是一个dat格式的Txt文件,通过程序由完整的数据文件自动生成的、用于在采取了物理隔离措施的网络电脑间传输数据的纯文本文件;该文本文件中存放的是一个二维数组转换而来的Json字符串,其中的数据为编码后的密文;The transfer file is a Txt file in dat format, which is a plain text file automatically generated by a program from a complete data file and used to transmit data between network computers that have taken physical isolation measures; the text file stores a Json string converted from a two-dimensional array, in which the data is encoded ciphertext;
(4)控制面板(4) Control Panel
所述控制面板是一个用户交互设置界面程序模块,通过运行该程序模块,用户能够方便的设置WeChat.exe安装路径、工作目录、监测频度、U盘盘符、U盘密码、U盘数据存放区、日期变更时间、定时自动运行时间、用户在设置文件中的存放区域、数据是明文还是密文存储与传输等信息;这些信息通过控制面板录入或修改后,便会以字典Json字符串的形式保存在一个名为Config.Cfg的文本文件中,以备程序运行中随时调用,这是程序适应不同用户个性化设置参数的一个手段;同时,RPA程序文件夹中还设置一个名为ybhRet.Rec的文本文件,其中存放的是监控程序临时中断时的已报用户名称和中断时间的数据字典。The control panel is a user interactive setting interface program module. By running the program module, the user can conveniently set the WeChat.exe installation path, working directory, monitoring frequency, U disk drive letter, U disk password, U disk data storage area, date change time, scheduled automatic operation time, user storage area in the setting file, whether the data is stored and transmitted in plain text or cipher text, and other information; after this information is entered or modified through the control panel, it will be saved in the form of a dictionary Json string in a text file named Config.Cfg, so that it can be called at any time during program operation. This is a means for the program to adapt to personalized setting parameters for different users; at the same time, a text file named ybhRet.Rec is also set in the RPA program folder, which stores a data dictionary of reported user names and interruption times when the monitoring program is temporarily interrupted.
所述微信自动处理模块包括程序准备与初始化、信息的监测与收集、未读信息群名数组生成、数据读取与存储和密文编码,用于实时监控各厂站户群中发来的新信息,并对新信息进行读取、判断、存储或回复的程序,它包括以下子程序:The WeChat automatic processing module includes program preparation and initialization, information monitoring and collection, unread information group name array generation, data reading and storage, and ciphertext encoding. It is used to monitor new information sent from each plant and station user group in real time, and read, judge, store or reply to the new information. It includes the following subroutines:
⑴程序准备与初始化:⑴Program preparation and initialization:
①初始化变量:程序开始先定义了各相关变量和数组、读取Config.Cfg和ybhRet.Rec文件中的保存信息作为程序执行的初始状态,已使程序运行能与上次的中断完美衔接;① Initialize variables: At the beginning of the program, various related variables and arrays are defined, and the saved information in the Config.Cfg and ybhRet.Rec files is read as the initial state of the program execution, so that the program operation can be perfectly connected with the last interruption;
②启动微信应用:判断Windows版微信应用是否已运行,若未运行则在此开启,并且在手机上确认用电脑登录微信;② Start WeChat application: Check whether the Windows version of WeChat application is running. If not, start it here and confirm on the phone that you have logged into WeChat using the computer.
③调整设置程序窗口:调整微信窗口大小使其占居屏幕左侧1/3,调整RPA程序运行窗口大小使其占居屏幕右侧2/3,并使其输出信息占居右下侧一定面积的窗口,用于实时显示程序工作的输出消息;③ Adjust the program window: adjust the size of the WeChat window so that it occupies 1/3 of the left side of the screen, adjust the size of the RPA program running window so that it occupies 2/3 of the right side of the screen, and make the output information occupy a certain area of the lower right side of the window to display the output messages of the program in real time;
④使微信窗口处于激活状态:在RPA窗口写屏提示“监控程序运行中”,使微信窗口处于激活状态;④ Make the WeChat window active: Write a prompt "Monitoring program is running" on the RPA window to make the WeChat window active;
⑵信息的监测与收集:设置一个大的循环,定时循环检测未读信息,每隔1或2分钟(其间隔分钟数由控制面板中“检测频度”的设置数值决定)检测一次,将“未读信息群名数组生成子程序”和“数据读取与存储子程序”依次置于循环之中。前一个子程序通过循环检查微信聊天列表窗口中带“红圈数字”的群名构造成数组,后一个子程序在微信窗口的搜索栏中对未读信息群名进行依次搜索,并对其对话窗口中最新未读信息进行试读、解读或回复。循环结束前,把试读成功的信息解读后经密文编码子程序进行编码后存储,同时向视图输出窗口输出本次循环读取成功的厂站户数据、至此已成功读取的厂站户群名集合以及还有哪些厂站户尚未报送数据,对试读失败的信息自动回复令其检查后重新报送;⑵ Monitoring and collection of information: Set up a large loop to periodically detect unread messages, once every 1 or 2 minutes (the number of minutes between each detection is determined by the setting value of the "detection frequency" in the control panel), and place the "unread message group name array generation subroutine" and "data reading and storage subroutine" in the loop in sequence. The former subroutine constructs an array by cyclically checking the group names with "red circle numbers" in the WeChat chat list window, and the latter subroutine searches for the unread message group names in the search bar of the WeChat window in turn, and tries to read, interpret or reply to the latest unread messages in its dialogue window. Before the end of the loop, the information that has been successfully read is interpreted and encoded by the ciphertext encoding subroutine and then stored. At the same time, the plant and station user data that has been successfully read in this cycle, the set of plant and station user group names that have been successfully read so far, and which plant and station users have not yet submitted data are output to the view output window. The information that failed to be read is automatically replied to request that it be checked and resubmitted;
⑶未读信息群名数组生成:该子程序能在电脑微信窗口的聊天列表中自动搜索未读信息,并将发送这些未读信息的厂站户群名收入定义好的数组中;实现方法如下:用循环语句和“获取文本”命令按倒序依次读取屏幕上显示的聊天列表中的前15个记录(Idx属性=0~14)的元素文本。在元素文本中查找用正则表达式表示的“0:00”~“23:59”的子字符串出现的位置,如出现的位置不为1,则表示该群中有未读信息,若出现的位置为1,则在元素文本字符串变量前加上“0\t”子字符串(\t为制表符);替换元素文本字符串中的“\r\n”为“\t”;用“\t”去切割替换后的元素文本字符串则可得到15个聊天列表数组;再用正则表达式查找测试聊天列表数组中的第3个元素在厂站户群数组中是否存在;若不存在则用异常捕获命令将厂站户群判断变量标记为“假”;最后将聊天列表数组中第1个元素不等于0且厂站户群判断变量为“真”的聊天列表数组中的第3个元素构造成未读信息群名数组;⑶ Generation of unread message group name array: This subroutine can automatically search for unread messages in the chat list of the computer WeChat window, and collect the group names of the users who sent these unread messages into a defined array; the implementation method is as follows: use a loop statement and the "Get Text" command to read the element text of the first 15 records (Idx attribute = 0~14) in the chat list displayed on the screen in reverse order. Search the position of the substring "0:00" to "23:59" represented by the regular expression in the element text. If the position is not 1, it means that there are unread messages in the group. If the position is 1, add the "0\t" substring (\t is a tab character) before the element text string variable; replace the "\r\n" in the element text string with "\t"; use "\t" to cut the replaced element text string to get 15 chat list arrays; then use the regular expression to find whether the third element in the test chat list array exists in the plant station user group array; if not, use the exception capture command to mark the plant station user group judgment variable as "false"; finally, construct the third element in the chat list array whose first element in the chat list array is not equal to 0 and the plant station user group judgment variable is "true" into an unread message group name array;
⑷数据读取与存储:该子程序能在电脑微信窗口的搜索栏中用循环命令逐一搜索其属性参数数组中的厂站户群名,从而在对话窗口中得到与该厂站户群的近期对话信息。该子程序的属性参数就是未读信息群名数组。程序根据控制面板中的“日期变更时间”得到欲抓取数据“日期”信息标识的20种兼容格式,用“在目标中判断文本是否存在”命令对未读信息群名数组的群名逐一在对话框中对各条信息进行搜索,如果20种“日期”信息标识格式均未搜到,程序便模拟微信发送过程向该群回复“信息无法自动识别,请核对后重发”的信息,令其重新发送,否则程序继续进行;⑷Data reading and storage: This subroutine can use a loop command in the search bar of the computer WeChat window to search the factory, station and user group names in its attribute parameter array one by one, so as to obtain the recent conversation information with the factory, station and user group in the conversation window. The attribute parameter of this subroutine is the array of unread message group names. The program obtains 20 compatible formats of the "date" information identifier of the data to be captured based on the "date change time" in the control panel, and uses the "determine whether the text exists in the target" command to search for each message in the dialog box for the group name in the unread message group name array. If none of the 20 "date" information identification formats are found, the program simulates the WeChat sending process and replies to the group with the message "The message cannot be automatically identified, please check and resend", asking it to resend, otherwise the program continues;
用“点击文本”命令去双击窗口中最后一条含有“日期”信息标识的文本,使目标文本处于全选状态;用“模拟按键Ctrl+C”命令将目标文本复制到剪贴板,再用“获取剪贴板文本”命令将目标文本赋值给目标字符串变量;接下来是对得到的目标字符串变量进行一系列处理,包括替换其中的中文冒号、分号、逗号、顿号等标点为英文冒号,替换空格、横杠、斜杠为空字符,替换字母o为数字0、替换字母l为数字1等容错操作;再接下来是用换行符“\n”对处理后的目标字符串进行切割,再用英文冒号“:”对用换行符切割后的字符串进行切割,然后将所得字符串经过密钥编码后构造出目标数组,最后将该数组用“写入行”命令写入打开的“数据文件”工作簿中的“零散数据”工作表,其写入位置行数与该厂站户群在“设置文件”中的单位编号数相同,从而完成数据的读取与存储,同时,将该厂站户群名记入“已报户集合”;Use the "Click Text" command to double-click the last text in the window containing the "Date" information mark to make the target text in the full selection state; use the "Simulate Key Ctrl+C" command to copy the target text to the clipboard, and then use the "Get Clipboard Text" command to assign the target text to the target string variable; next, a series of processing is performed on the obtained target string variable, including replacing the Chinese colon, semicolon, comma, semicolon and other punctuation marks with English colons, replacing spaces, horizontal bars, and slashes with empty characters, replacing the letter o with the number 0, replacing the letter l with the number 1, and other fault-tolerant operations; next, the processed target string is cut with the line feed character "\n", and then the string cut with the line feed character is cut with the English colon ":", and then the obtained string is encoded with the key to construct the target array, and finally the array is written into the "Scattered Data" worksheet in the opened "Data File" workbook with the "Write Row" command. The number of rows in the write position is the same as the number of unit numbers of the plant station household group in the "Setting File", thereby completing the reading and storage of data, and at the same time, the name of the plant station household group is recorded in the "Reported Household Collection";
⑸密文编码:数据监测收集程序在对各厂站户报送数据抓取过程中,首先将抓取到的数据通过密钥进行编码,然后再将其编码存于数据文件中,最后将数据文件转换为传递文件。⑸ Ciphertext encoding: When capturing data reported by each plant and station user, the data monitoring and collection program first encodes the captured data using a key, then stores the encoded data in a data file, and finally converts the data file into a transmission file.
具体过程如下:The specific process is as follows:
首先通过时间函数获取数据抓取时刻的年、月、日数据,与控制面板中设置的“日期变更时间”通过加密多项式运算后得到一个确定的编码密钥;将抓取到的数据转换为ASCII码,再将转换后的ASCII码与密钥叠加生成密文编码;将密文编码以背景色存于数据文件中并隐藏WPS编编辑栏;通过“读取工作表区域”命令将数据文件转换为二维数组,再将该二维数组转换为Json字符串,然后写入到传递文件,这样就生成了纯文本密文“传递文件.dat”,该文件可通过内网U盘拷入内网电脑。First, the year, month, and day data of the data capture time are obtained through the time function, and a certain encoding key is obtained after the encryption polynomial operation with the "Date Change Time" set in the control panel; the captured data is converted into ASCII code, and then the converted ASCII code and the key are superimposed to generate a ciphertext code; the ciphertext code is stored in the data file with a background color and the WPS editing bar is hidden; the data file is converted into a two-dimensional array through the "Read Worksheet Area" command, and then the two-dimensional array is converted into a Json string, and then written to the transfer file, thus generating a plain text ciphertext "Transfer File.dat", which can be copied to the intranet computer through the intranet U disk.
所述网络切换包括KVM切换器和数据传递U盘,按照国网公司数据安全策略的要求,内外网电脑是物理隔离的。为了实现用户使用一套键盘、鼠标、显示器去访问和操作内外网两台电脑主机,这里将内外网电脑用KVM切换器将两个网络电脑连在一起,使得内外网两个电脑共用一套键盘、鼠标、显示器和内网U盘。零散数据监控与收集程序运行在外网电脑上。为了保证数据安全,工作在外网电脑上的数据文件设置权限保护且用密文存储。又为了避免病毒的传播,用于向内网电脑传递数据的传递文件采用了纯文本密文文件。外网拷入U盘、U盘考入内网的操作均由程序调用“文件复制”子程序一键完成。The network switch includes a KVM switch and a data transfer USB flash drive. According to the requirements of the State Grid Corporation's data security policy, the internal and external network computers are physically isolated. In order to enable users to use a set of keyboards, mice, and monitors to access and operate two computer hosts on the internal and external networks, the internal and external network computers are connected together with a KVM switch, so that the two computers on the internal and external networks share a set of keyboards, mice, monitors, and internal network USB flash drives. The scattered data monitoring and collection program runs on the external network computer. In order to ensure data security, the data files working on the external network computer are set with permission protection and stored in ciphertext. In order to avoid the spread of viruses, the transfer file used to transfer data to the internal network computer uses a plain text ciphertext file. The operations of copying the external network into the USB flash drive and the USB flash drive into the internal network are completed by calling the "file copy" subroutine with one click by the program.
所述融合与应用模块由运行在内部网络电脑上的密文解码子程序和数据融合与应用子程序构成:The fusion and application module is composed of a ciphertext decoding subroutine and a data fusion and application subroutine running on an internal network computer:
⑴所述密文解码子程序为:传递文件在内部网络电脑上进行解码,其过程解码是编码过程的逆过程,即首先读取传递文件到Json字符串变量,再将其转换为对象,形成二维数组;获取该数组最大下标,通过双重循环,将数组元素按编码逆运算算法逐一进行解码后再构造成一个新的数组;将构造的新数组通过写入区域命令写入WPS文件,从而得到了完整的解码数据文件;⑴ The ciphertext decoding subroutine is: the transmitted file is decoded on the internal network computer, and the decoding process is the inverse process of the encoding process, that is, first read the transmitted file into the Json string variable, and then convert it into an object to form a two-dimensional array; obtain the maximum subscript of the array, and through a double loop, decode the array elements one by one according to the encoding inverse operation algorithm and then construct a new array; write the constructed new array into the WPS file through the write area command, thereby obtaining a complete decoded data file;
⑵所述数据融合与应用子程序:传递文件经过解码后便在内部网络电脑上得到了完整的WPS格式的数据文件,将该文件与从EMS系统、电能量采集系统和用户用电信息采集系统分别采集到的WPS格式的数据文件相融合,便会得到地区电网调度完整的运行数据,这将为地区电网调度分析和报表提供完整的数据源支撑。⑵The data fusion and application subroutine: after the transmission file is decoded, a complete WPS format data file is obtained on the internal network computer. By integrating this file with the WPS format data files collected from the EMS system, the electric energy collection system and the user electricity consumption information collection system respectively, the complete operation data of the regional power grid dispatching can be obtained, which will provide complete data source support for the regional power grid dispatching analysis and reporting.
本实施例用于随机报送零散数据的自动收集与整合方法,它包括建立微信群及报送数据、外部网络电脑程序运行、网络切换和内部网络电脑程序运行,具体步骤如下:This embodiment is used for the automatic collection and integration method of randomly reported scattered data, which includes establishing a WeChat group and reporting data, running an external network computer program, network switching and running an internal network computer program. The specific steps are as follows:
1)建立微信群及报送数据1) Establish WeChat group and submit data
在调度微信应用中为每一个厂站户创建一个包含其报送数据值班员的微信群,报送数据的值班员将需要报送的数据按要求格式在微信群中报送;In the dispatching WeChat application, a WeChat group is created for each plant and station user, including the duty officer who reports the data. The duty officer who reports the data will report the data to be reported in the WeChat group in the required format;
2)外部网络电脑程序运行2) External network computer program running
所述外部网络电脑程序运行包括:The external network computer program operation includes:
⑴程序准备与初始化;⑴Program preparation and initialization;
⑵定时循环检测未读信息;⑵ Regular cycle detection of unread messages;
⑶生成未读消息群名数组;⑶ Generate an array of unread message group names;
⑷信息试读;(4) Information trial reading;
⑸密文编码与存储;⑸Ciphertext encoding and storage;
⑹全部读完未读信息或人为终止;⑹ Read all unread messages or terminate manually;
⑺传递文件生成;⑺Transfer file generation;
3)网络切换3) Network switching
用KVM切换器将两个网络电脑连在一起,通过内网U盘将传递文件以内部网络和外部网络隔离的方式拷入内部网络电脑;Use a KVM switch to connect two network computers together, and copy the transfer files to the internal network computer through the internal network USB flash drive in a way that the internal network and the external network are isolated;
4)内部网络电脑程序运行4) Internal network computer program operation
所述内部网络电脑程序运行包括:The internal network computer program operation includes:
⑴传递文件解码;⑴Decode the transfer file;
⑵数据融合;(2) Data fusion;
⑶数据应用。⑶Data application.
进一步,所述步骤2)外部网络电脑程序运行具体包括:Furthermore, the step 2) running the external network computer program specifically includes:
⑴程序准备与初始化⑴Program preparation and initialization
⑵定时循环检测未读信息⑵Timed loop detection of unread messages
设置一个大的循环定时循环检测未读信息,其循环间隔时间由控制面板中的检测频度设定,每间隔设定时间检测一次;Set a large cycle to detect unread messages. The cycle interval is set by the detection frequency in the control panel. The detection is performed once every set interval.
⑶生成未读消息群名数组⑶ Generate an array of unread message group names
自动搜索未读信息并将发送这些未读信息的厂站户群名收入定义好的数组中;Automatically search for unread messages and store the names of the user groups that sent these unread messages into a defined array;
⑷信息试读⑷ Information Reading
对循环检测的未读信息试读,把试读成功的信息解读后传递到密文编码子程序,同时向视图输出窗口输出本次循环读取成功的厂站户数据、至此已成功读取的厂站户群名集合以及还有哪些厂站户尚未报送数据,对试读失败的信息自动回复令其检查后重新报送;Trial read the unread information of the loop detection, and pass the successfully read information to the ciphertext encoding subroutine after decoding. At the same time, output the plant and station household data that have been successfully read in this cycle, the plant and station household group name set that has been successfully read so far, and which plants and stations households have not yet submitted data to the view output window. Automatically reply to the information that failed to be trial read and ask it to check and resubmit;
⑸密文编码与存储⑸Ciphertext encoding and storage
把试读成功的信息解读后传递到密文编码子程序,由密文编码子程序进行编码后存储;The successfully read information is decoded and passed to the ciphertext encoding subroutine, which encodes it and stores it;
(6)全部读完未读信息或人为终止(6) Read all unread messages or terminate manually
把循环检测的未读信息全部读完,或者根据需要人为终止信息读取;Read all the unread messages in the loop detection, or manually terminate the message reading as needed;
⑺传递文件生成⑺Transfer file generation
将密文编码以背景色存于数据文件中并隐藏WPS编编辑栏;通过读取工作表区域命令将数据文件转换为二维数组,再将该二维数组转换为Json字符串,然后写入到传递文件,从而生成了纯文本密文传递文件.dat。The ciphertext is encoded and stored in the data file with a background color and the WPS editing bar is hidden; the data file is converted into a two-dimensional array through the read worksheet area command, and then the two-dimensional array is converted into a Json string, and then written into the transfer file, thereby generating a plain text ciphertext transfer file .dat.
所述步骤⑴程序准备与初始化具体如下:The steps (1) of program preparation and initialization are as follows:
①初始化变量:程序开始先定义了各相关变量和数组、读取Config.Cfg和ybhRet.Rec文件中的保存信息作为程序执行的初始状态,已使程序运行能与上次的中断完美衔接;① Initialize variables: At the beginning of the program, various related variables and arrays are defined, and the saved information in the Config.Cfg and ybhRet.Rec files is read as the initial state of the program execution, so that the program operation can be perfectly connected with the last interruption;
②启动微信应用:判断Windows版微信应用是否已运行,若未运行则在此开启,并且在手机上确认用电脑登录微信;② Start WeChat application: Check whether the Windows version of WeChat application is running. If not, start it here and confirm on the phone that you have logged into WeChat using the computer.
③调整设置程序窗口:调整微信窗口大小使其占居屏幕左侧1/3,调整RPA程序运行窗口大小使其占居屏幕右侧2/3,并使其输出信息占居右下侧一定面积的窗口,用于实时显示程序工作的输出消息;③ Adjust the program window: adjust the size of the WeChat window so that it occupies 1/3 of the left side of the screen, adjust the size of the RPA program running window so that it occupies 2/3 of the right side of the screen, and make the output information occupy a certain area of the lower right side of the window to display the output messages of the program in real time;
④使微信窗口处于激活状态:在RPA窗口写屏提示“监控程序运行中”,使微信窗口处于激活状态。④ Make the WeChat window active: Write a prompt "Monitoring program is running" on the RPA window to make the WeChat window active.
所述步骤2)所述内部网络电脑程序运行包括:The step 2) of running the internal network computer program includes:
⑴传递文件解码⑴Delivery file decoding
传递文件在内部网络电脑上进行解码,首先读取传递文件到Json字符串变量,再将其转换为对象,形成二维数组;获取该数组最大下标,通过双重循环,将数组元素按编码逆运算算法逐一进行解码后再构造成一个新的数组;将构造的新数组通过写入区域命令写入WPS文件,从而得到了完整的解码数据文件;The transferred file is decoded on the internal network computer. First, the transferred file is read into a Json string variable, and then converted into an object to form a two-dimensional array. The maximum subscript of the array is obtained, and through a double loop, the array elements are decoded one by one according to the encoding inverse operation algorithm and then constructed into a new array. The constructed new array is written into the WPS file through the write area command, thereby obtaining a complete decoded data file.
⑵数据融合(2) Data fusion
传递文件经过解码后在内部网络电脑上得到了完整的WPS格式的数据文件,将该文件与从EMS系统、电能量采集系统和用户用电信息采集系统分别采集到的WPS格式的数据文件相融合;After the transmission file is decoded, a complete WPS format data file is obtained on the internal network computer, and the file is integrated with the WPS format data files collected from the EMS system, the electric energy collection system and the user electricity consumption information collection system;
⑶数据应用⑶Data application
将解码后得到的完整的WPS格式的数据文件与从EMS系统、电能量采集系统和用户用电信息采集系统分别采集到的WPS格式的数据文件相融合,便会得到地区电网调度完整的运行数据,这将为地区电网调度分析和报表提供完整的数据源支撑。By integrating the complete WPS format data file obtained after decoding with the WPS format data files collected from the EMS system, electric energy collection system and user electricity consumption information collection system, we can obtain the complete operation data of the regional power grid dispatching, which will provide complete data source support for regional power grid dispatching analysis and reporting.
本发明不局限于本具体实施方式,对于本领域技术人员来说,不经过创造性劳动的简单复制和改进均属于本发明权利要求所保护的范围。The present invention is not limited to this specific implementation mode. For those skilled in the art, simple duplication and improvement without creative work all fall within the scope of protection of the claims of the present invention.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110358673.4A CN113344731B (en) | 2021-04-02 | 2021-04-02 | Automatic collection and integration system and method for randomly reporting scattered data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110358673.4A CN113344731B (en) | 2021-04-02 | 2021-04-02 | Automatic collection and integration system and method for randomly reporting scattered data |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113344731A CN113344731A (en) | 2021-09-03 |
CN113344731B true CN113344731B (en) | 2024-04-05 |
Family
ID=77467862
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110358673.4A Active CN113344731B (en) | 2021-04-02 | 2021-04-02 | Automatic collection and integration system and method for randomly reporting scattered data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113344731B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7181438B1 (en) * | 1999-07-21 | 2007-02-20 | Alberti Anemometer, Llc | Database access system |
CN102681518A (en) * | 2012-05-28 | 2012-09-19 | 辽宁省电力有限公司沈阳供电公司 | Cable network running integrated management system and intelligent control platform |
CN106227636A (en) * | 2016-07-20 | 2016-12-14 | 国网安徽省电力公司信息通信分公司 | A kind of data center based on IPMI outband management system |
CN107257314A (en) * | 2017-06-05 | 2017-10-17 | 成都知道创宇信息技术有限公司 | A kind of message statistics analysis method based on wechat group |
CN111177177A (en) * | 2019-12-02 | 2020-05-19 | 国网吉林省电力有限公司吉林供电公司 | Automatic reporting system and method based on multi-source heterogeneous data fusion |
-
2021
- 2021-04-02 CN CN202110358673.4A patent/CN113344731B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7181438B1 (en) * | 1999-07-21 | 2007-02-20 | Alberti Anemometer, Llc | Database access system |
CN102681518A (en) * | 2012-05-28 | 2012-09-19 | 辽宁省电力有限公司沈阳供电公司 | Cable network running integrated management system and intelligent control platform |
CN106227636A (en) * | 2016-07-20 | 2016-12-14 | 国网安徽省电力公司信息通信分公司 | A kind of data center based on IPMI outband management system |
CN107257314A (en) * | 2017-06-05 | 2017-10-17 | 成都知道创宇信息技术有限公司 | A kind of message statistics analysis method based on wechat group |
CN111177177A (en) * | 2019-12-02 | 2020-05-19 | 国网吉林省电力有限公司吉林供电公司 | Automatic reporting system and method based on multi-source heterogeneous data fusion |
Non-Patent Citations (1)
Title |
---|
基于多系统交互的电力调度应急信息自动统计报送模式;林志贤;;大众用电(第04期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113344731A (en) | 2021-09-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104317843B (en) | A kind of data syn-chronization ETL system | |
CN102033798B (en) | Method for simulating intelligent electronic device IEC61850/MMS (Microsoft media server) server | |
CN113890830B (en) | IEC104 master station simulation system | |
CN105786998A (en) | Database middleware system and method for processing data through database middleware system | |
CN112311098B (en) | Substation equipment is in same direction as accuse function debug system | |
CN109495290B (en) | Operation and maintenance system main station and sub station interaction method and system | |
CN110689238B (en) | Method and system for realizing MMS (multimedia message service) information simulation and point-to-point of intelligent substation | |
CN118228158A (en) | Hardware fault analysis method and application server based on power system network | |
CN110752670A (en) | A kind of intelligent inspection system and inspection method for relay protection of intelligent substation | |
CN106330661A (en) | Data centralized processing method | |
CN104883378A (en) | Electric appliance equipment state information inquiry method and system, and social network server | |
CN113904928B (en) | Remote signaling configuration rapid checking system and method for remote device | |
CN113344731B (en) | Automatic collection and integration system and method for randomly reporting scattered data | |
CN105933396B (en) | A kind of each canalization interface of collaboration realizes the method and system of long flow | |
CN107885156A (en) | Intelligent front end multimedia information acquisition system for lean monitoring power station equipment | |
CN108829376A (en) | A kind of operation monitoring system of the scheduling station system based on comprehensive diagnos platform | |
CN119051255A (en) | Automatic checking and accepting method, device, equipment and medium for substation one-key sequential control without power failure | |
CN103023137A (en) | Electrical power regulation and control real-time information wireless remote monitoring system | |
CN117749603A (en) | Automatic network fault repairing method and device, electronic equipment and medium | |
CN113691016B (en) | A three-remote integrated debugging method and system based on distribution automation management system | |
CN212519046U (en) | A collaborative platform for power transmission and transformation projects | |
CN214253224U (en) | Internal and external network data bidirectional transmission device | |
CN109840184B (en) | Scheduling method, system and equipment for operation display of power grid equipment | |
CN114493836A (en) | Credit reporting method, credit reporting platform, data reporting platform and application | |
Zhao et al. | Research on mobile terminal technology supporting intelligent maintenance of substation |
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 |