Abstract
With the continuous deepening of the construction of the electric power pot market, it is necessary to optimize the operation mechanism of the spot market according to the operation of the spot market, study the information interaction and data integration technology of the spot market to support the coordinated operation of multiple markets, and design the overall architecture, application architecture, functional architecture of the information interaction and data integration platform of the spot market for the coordinated operation of multiple markets Hardware architecture and security protection system provide technical support for information interaction and data integration of multiple market coordinated operation of the power spot market. Through data visualization technology, this paper realizes the data visualization and background management of the provincial power spot market operation detection system, which is convenient for decision-makers to carry out data analysis and management.
You have full access to this open access chapter, Download conference paper PDF
Similar content being viewed by others
Keywords
1 Introduction
With a large number of new energy connected to the grid and the rapid growth of electricity demand in some areas, China’s power supply structure and supply and demand situation has changed, which puts forward a greater demand to solve the problem of system peak regulation and trans-provincial surplus and deficiency regulation. Therefore, it is urgent to further deepen inter-provincial spot transactions, optimize the allocation of resources in a wider range, discover the time and space value of electric energy, and realize the sharing of peak regulation resources and inter-provincial surplus and deficiency adjustment by market means.
At the same time, with the continuous deepening of the construction of the spot market, it is necessary to optimize the operation mechanism of the spot market according to the operation of the spot market, study the information interaction and data integration technology of the spot market to support the coordinated operation of multiple markets, and design the overall architecture, application architecture, functional architecture, and data integration platform of the spot market for the coordinated operation of multiple markets Hardware architecture and security protection system provide technical support for information interaction and data integration of multi market coordinated operation of the power spot market.
In order to support the construction of inter provincial electricity spot market, it is necessary to develop a visual system with perfect function and friendly interface on the basis of technology research and development.
The minimum configuration of front-end display hardware recommended by this system is CPU Intel i7-7700k, memory 8GB DDR4, disk 300 gb, graphics card GTX 1060, display standard resolution 1920 × 1080. The minimum configuration of database server is CPU Intel Xeon e5–4650, memory above 16 GB DDR4 and disk 1 TB.
The required software environment includes: Microsoft operating system, HTML5 standard browser, PHP development environment, Apache server environment, relational database.
2 System Design
The whole system is divided into front-end visualization system and background data management system, as shown in Fig. 1.
The front end of the system has two major functional modules, data overview and operation data. All modules are developed with HTML5 technology such as webgl and canvas, and the mainstream web framework is used. The data interface is provided by the background of PHP to obtain the data of MySQL database for visualization.
The system is divided into 11 pages: login page, transaction statistics, channel path, declaration status, declaration statistics, declaration details, channel available capacity, node transaction result, channel transaction result, path transaction result and personal center. The front end structure is shown in Fig. 2.
The background of this system uses the mainstream Web back-end framework. The data interface is provided by the background of PHP to obtain the data of MySQL database for visual presentation.
The system is divided into 11 pages: login page, area management, channel management, applicant management, declaration data management, channel available capacity management, channel clearance management, channel clearance path management, personal center, log management.
Because of the huge and complex data of the power system, the data source of this system is provided by the management personnel in the background through the way of importing Excel files. The Excel file is uploaded and submitted by the provinces, and then imported by the backstage management personnel according to the unit of day.
The detailed structural design of this system is shown in Fig. 3.
3 The Specific Implementation
This system content is more, limited to the length, this paper after the Taiwan management system as an example, detailed introduction of the implementation of specific functions.
3.1 Import of Excel File
The background management part of this system is developed by PHP7.3. In PHP7, the best way to import Excel is to use third-party plug-ins. PHPSpreadsheet is one of the most powerful and easy to use plug-ins and is recommended for use.
PHPSpreadsheet is a library written in pure PHP that provides a set of classes that allow you to read and write different spreadsheet file formats. PHPSpreadsheet provides a rich API that allows you to set up many cell and document properties, including styles, images, dates, functions, etc. You can use it in any Excel spreadsheet you want. The document formats supported by PHPSpreadsheet are shown in Table 1.
To use phpSpreadsheet, your system requires a PHP version greater than 7.2. In your project, you can use Composer to install PHPSpreadsheet with the following command:
![figure a](http://media.springernature.com/lw685/springer-static/image/chp%3A10.1007%2F978-981-19-2456-9_35/MediaObjects/520720_1_En_35_Figa_HTML.png)
After reading the contents of the file, the next step is to verify that the table header, row, and column data are correct according to the template requirements. After all the data is correct, it can be written to the appropriate database.
In the operation of the database, due to the complex structure of the Excel file, there are a lot of data to be verified. There will be several operations on the database, and there will be correlation between each other. In order to maintain the consistency of data, we use the transaction mechanism of PDO to deal with this part of content.
The transaction mechanism of PDO supports four characteristics: atomicity, consistency, isolation, and persistence. In general terms, any operation performed within a transaction, even if performed in stages, is guaranteed to be applied to the database safely and without interference from other connections at commit time. Transactional operations can also be undone automatically on request (assuming they haven’t been committed), which makes it easier to handle errors in the script.
We can use Begin Transaction to enable transactions, Commit to commit changes, and roll Back to and from operations. Here’s the relevant demo code:
![figure b](http://media.springernature.com/lw685/springer-static/image/chp%3A10.1007%2F978-981-19-2456-9_35/MediaObjects/520720_1_En_35_Figb_HTML.png)
3.2 Editing of Imported Data
After the Excel data is imported into the data, it should be possible to edit and modify the data according to the user’s needs. Due to the large quantity, in order to facilitate editing and modification, we use the DataGrid in the EasyUI framework for processing.
EasyUI is a set of user interface plug-ins based on jQuery. Using easyUI can greatly simplify our code and save the time and scale of master web development. While EasyUI is simple, it is powerful.
The EasyUI front-end framework contains many commonly used front-end components, among which the DataGrid is distinctive. The EASYUI Data Grid (DataGrid) displays data in a tabular format and provides rich support for selecting, sorting, grouping, and editing data. Data grids are designed to reduce development time and do not require specific knowledge of the developer. It’s lightweight, but feature-rich. Its features include cell merging, multi-column headers, frozen columns and footers, and more. For back-end data editing on our system, the DataGrid is best suited.
We use JS to generate the static content of the data table, and then request the data interface through Ajax, and then render the data table after getting the data, so as to get the results we want.
This system focuses on the use of data table editor, you can achieve online editing table data. To edit the data, when initializing the DagGrid, you need to add an edit button in the last column using the formatting function, as follows:
![figure c](http://media.springernature.com/lw685/springer-static/image/chp%3A10.1007%2F978-981-19-2456-9_35/MediaObjects/520720_1_En_35_Figc_HTML.png)
After editing is complete, you can change the database through the event OnAfterEdit.
4 Conclusion
By connecting MySQL database with PHP and cooperating with DataGrid of Easy UI, we completed the design and implementation of the background management system of the operation and detection system of the electric spot market. The key content of this system is to use PHP to import Excel files, and verify the validity of data format and content, and then use the transaction mechanism of PDO to complete the data writing. Data is displayed through the data network function of Easy UI, and the editor is used to complete the data editing.
With the data, in the front end can be through the API interface, access to background data, and display in the front end.
References
Tatroe, K., MacIntyre, P.: PHP Programming. Electronic Industry Press (2021)
Zandstra, M.: An In-Depth Look at PHP Object Orientation, Patterns, and Practices. Posts and Telecommunications Press (2019)
Yu, G.: PHP Programming from Entry to Practice. Posts and Telecommunications Press (2021)
Tang, Q.: Practical Application of PHP Web Security Development. Tsinghua University Press (2018)
Lei, C.: PHP 7 Low-Level Design and Source Code Implementation. China Machine Press (2018)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.
Copyright information
© 2022 The Author(s)
About this paper
Cite this paper
Zeng, M., Mu, Q. (2022). Design of the Electric Power Spot Market Operation Detection System. In: Qian, Z., Jabbar, M., Li, X. (eds) Proceeding of 2021 International Conference on Wireless Communications, Networking and Applications. WCNA 2021. Lecture Notes in Electrical Engineering. Springer, Singapore. https://doi.org/10.1007/978-981-19-2456-9_35
Download citation
DOI: https://doi.org/10.1007/978-981-19-2456-9_35
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-19-2455-2
Online ISBN: 978-981-19-2456-9
eBook Packages: EngineeringEngineering (R0)