Abstract: In order to meet the needs of reform and development of the power industry and improve the level of electricity business management, a networked remote automatic meter reading system based on GPRS technology is proposed. The system first obtains the required flow through on-site measurements, and then combines GPRS communication technology, J2EE technology and database technology to develop a networked remote automatic meter reading system based on B/S structure. The overall structure and specific implementation of the system are introduced from the hardware and software aspects. The system adopts a connection pool mechanism to achieve efficient connection between the Web server and the database server, and uses xmlhttp technology to achieve real-time data display. The product has been applied in the actual meter reading system with good results.
Keywords: General Packet Radio Service; Remote Meter Reading; Database; J2EE Technology0
Introduction
For a long time, the power grid has relied on manpower to read commercial and domestic electricity data, which is extremely inefficient. The statistics of meter reading data mainly rely on manpower, the report generation cycle is long, the statistical results are slow to analyze, and the results obtained cannot reflect the distribution of system power demand in a timely manner. There is no reference value for the network optimization of the supply system, which seriously limits the improvement of the power supply efficiency and quality of the power supply system.
The traditional meter reading method relies on manual reading. The meter data reading cycle is long, and it is impossible to obtain the meter data of all users at the same time, which makes the acquisition of meter data inaccurate and the time period ambiguous, resulting in low credibility of the spatiotemporal distribution results of power grid power consumption, and thus unable to provide effective reference data and suggestions to the power supply management department.
The automatic meter reading system is an important means for the power supply system supervision department to monitor, manage and control industrial and domestic electricity consumption, as well as to conduct statistics and analysis on user electricity consumption. This paper proposes a solution that combines GPRS communication technology with J2EE technology and applies it to the design of the automatic meter reading system, forming a networked remote automatic meter reading system. In the underlying hardware design, an automatic data collection solution based on the general packet radio service GPRS (General Packet Ratio Service) wireless Internet access technology is adopted. In the upper-level software design, the J2EE (Java 2 Platform, Enterprise Edition) platform launched by Sun Microsystems of the United States is adopted. This product has been applied in the actual meter reading system with good results.
1 Overall structure and working principle of the system
1.1 Composition of the system
Figure 1 is the overall design of the system. The system consists of five parts: GPRS data acquisition module, communication server, database server, Web server, and client.
GPRS data acquisition module: It is the main hardware part of the system. After the GPRS module is powered on, it has a dynamic IP address and can communicate with the communication server through Socket. Its function is to send the detected power flow to the communication server in hexadecimal data format. The GPRS terminal can also accept commands from the communication server.
Communication server: It opens a port of the server, listens to and accepts UDP data packets sent by all GPRS terminals to the port, and then parses the data packets into data such as flow and writes them into the database. Another task of the communication server is to send commands to the GPRS terminal, that is, to send UDP data packets to the GRPS terminal.
Database server: The data obtained by the communication server from the GPRS terminal is stored on the database server, and the database server also needs to back up the data.
Web server: It connects the database server and the client. First, it provides Web services to the client. Respond to requests from the client, and obtain data from the database server according to the client's request, and then return the data to the client in HTML format, so that the client can browse the data it requested. The Web server can also directly make requests to the communication server, and the communication server sends commands to the GPRS terminal according to the Web server's request.
Client: It uses a thin client and only requires an Internet browser. The client's task is to send an http request to the Web server and then display the ht-ml format file returned by the Web server to the user.
1.2 System Functions
The system functions include: viewing historical data, reading real-time or hourly data.
View historical data: The client requests to view a certain period of historical data according to its own needs. The request is forwarded to the database server through the Web server. The database server returns the data to the client in html format through the Web server.
Read real-time or hourly data: The client requests to read real-time or hourly data. The Web server notifies the communication server according to the request, and then the communication server notifies the GPRS data acquisition module. The GPRS data acquisition module sends a data packet to the communication server through the GPRS network. When the communication server receives the data packet, it parses the data packet into traffic parameters and writes it to the database server. The database server then sends the data to the Web server, and then the Web server returns the data to the client in html format.
2 Design and function of GPRS communication module
2.5th generation communication technology GPRS (Geneal packet Radio Service) is the prelude to the third generation communication technology. GPRS technology is a new packet switching data bearer service developed on the basis of the existing GSM technology. It was proposed by the British BTCellent company in 1983. GSM technology mainly provides voice services, while GPRS technology provides packet transmission services between mobile terminals and routers of computer communication networks. This is the biggest difference between GPRS network and GSM network.
GPRS introduces packet switching technology into the existing GSM system to provide voice communication between mobile users and data networks. GPRS adopts packet switching technology and mainly provides non-voice data services. It is particularly suitable for intermittent, sudden, frequent and small data transmission, providing high-speed wireless IP and x.25 services to mobile users. GSM network adopts circuit switching and is also suitable for occasional large data transmission.
This system uses GPRS packet wireless service to connect to the automatic meter reading device on site through a wireless network for data measurement.
In the system, one of the key points is the choice of network protocol. There are currently two protocols, namely TCP protocol and UDP protocol. Compared with TCP protocol, UDP protocol has the following advantages: it is suitable for the transmission of small data volumes; it is easy to use and does not require a connection to be established. It is a connectionless communication method; it has high efficiency in data transmission and strong real-time performance.
Considering the above characteristics of UDP and the high requirements of the flow measurement system for real-time performance, this system adopts UDP protocol.
3 System Hardware Design
The electric energy flow measurement equipment has two working modes: one is to periodically collect user data at a pre-set time interval and transmit it to the database server in real time; the other is to respond to the control command from the communication server in real time and perform specific data collection tasks according to the control command. This requires the GPRS terminal as a data transmission module and terminal equipment control module to be able to parse and process various control commands in real time and provide the data transmission service with the highest possible throughput. In addition, considering the scalability of the system, the hardware design of this system did not adopt the traditional low-cost but high-development cost and performance and function-limited single-chip microcomputer plus GPRS communication module solution, but used a design solution with a high-performance embedded CPU chip as the core. The hardware composition and connection of the GPRS data transmission terminal are shown in Figure 2. The CPU uses the Samsung ARM7 4510B designed for network solutions. The GPRS module uses the currently popular Siemens MC35 series module.
The software of the transmission terminal uses an architecture with an embedded real-time operating system as the platform and network components with independent intellectual property rights as the core. The operating system uses μclinux. The biggest feature of μclinux is that it has no MMU, which is very suitable for ARM embedded microprocessors. The kernel version of μclinux is Linux 2.4, which has a complete embedded TCP/IP network protocol stack. The image file of all the codes of the operating system is less than 1 MB after compilation.
The system is based on the digital signal processor DSP and adopts AC sampling technology to continuously detect and count the relevant parameters of electricity.
The meter reading data terminal plays the role of managing and coordinating the GPRS network and meter data communication. Since wireless transmission is based on GPRS, the meter reading data transmission terminal can also be called a GPRS terminal, and the hardware and software design must be completed. The hardware design of the meter reading terminal generally uses a GPRS module produced by a world-renowned manufacturer as the middleware for connecting the meter reading terminal to the GPRS network to achieve the connection with the base station air interface, and uses a high-speed microprocessor to connect the meter and the GPRS module to handle the data communication problem between the two.
4 System Software Design
4.1 B/S Structure
At present, there are two main types of software structure design modes: one is the traditional Client/Server mode, which uses Intranet technology and is suitable for LAN environments with a limited number of connectable users. When the number of users increases, the performance will be significantly reduced, and the client must be installed. The other is the Browser/Server mode, which is constantly developing.
It uses Internet/Intranet technology and is suitable for WAN environments. It supports more customers and can dynamically configure Web servers and application servers according to the number of visits to ensure system performance. The client only needs a standard Internet browser.
Due to the complexity of the physical platform running the system, such as the differences in operating systems and database servers of different devices, various professional networks have their own different network architectures and implementation methods. Therefore, it is necessary to select an operating environment that can better support cross-platform development for design. In addition, considering that the personnel using the system are extensive and can view the details of the system at any time according to different permissions, if the traditional fixed C/S mode is still fully adopted, it is necessary to strictly set parameters for each client, which is obviously undesirable.
The software design of the system adopts a solution based on Web technology and a browser/server or B/S architecture. Compared with the traditional C/S model, the advantages of the B/S model are: the main work is the development of server-side programs. The server is mainly responsible for developing and maintaining online content and resources, and is responsible for information collection, storage, and release. There is no development and maintenance of client programs. The client directly uses the existing LAN or Internet connection, does not require special settings and installation, and uses a standard Internet browser to directly access the dedicated Web server page to view the real-time data of monitoring and analyzing power quality, and can query the required historical data.
4.2 System operating environment and tool selection
Considering the portability and cross-platform nature of the system, this system chooses the J2EE platform designed and developed by Sun, and uses JSP (Java Server Pages) as the development tool of the B/S model. J2EE (Java 2 Platform Enterprise Edition) is a Java platform with a new concept that supports multi-layer and distributed applications suitable for enterprise-level computing. It provides a good mechanism for building an enterprise information system with scalability, flexibility, and easy maintenance, and has incomparable advantages compared with the traditional Internet application model. J2EE is mainly oriented to network applications. It defines a series of standardized standards, so that Java programmers can follow these standards together to develop large-scale network-oriented projects. It also provides a huge development library and is an enterprise-level application platform for e-commerce development. Java has the characteristics of "write once, run everywhere". It can easily connect to various databases and call various APIs through JDBC, and protect the security mode of data in Internet applications. The platform solution of the system is summarized as follows:
computing mode: three-tier B/S mode; network operating system: Windows2000 Server; database server: Oracle 8i; Web server: Apache Tomcat 5.0; database driver interface: JDBC driver; main development environment and tools: J2EE, Java, JSP, Javascript.
4.3 Connection Pool Mechanism
The efficiency of the program is very important in the JSP programming process, that is, how to make limited computer system resources provide better services to more customers and ensure customer response speed and service quality. If many people visit the website, each Web request needs to establish a connection with the database. Then the database may have to handle many connection requests at the same time, which is a serious burden for the database server and Web Server, and may even cause resource exhaustion and crash.
This system uses the connection pool mechanism to solve this problem. The most basic idea of the connection pool is to pre-establish some connections and place them in the memory object for use. When the program needs to establish a connection with the database, it only needs to read from the connection pool without creating a new connection. When the program does not need the connection, it only needs to put the connection back into the connection pool for other programs or users to use. At the same time, the connection pool mechanism has the function of managing the connections in the pool, which increases the robustness of the connection with the database.
4.4 Remote management of the database
The database content includes: real-time data of field traffic parameters, historical data, unqualified data, personnel management, authority management, etc.
Database remote management is implemented according to the following process:
(1) The client issues a data query or modification instruction;
(2) The server receives the instruction and returns the result to the client;
(3) The client receives the result and displays the query data.
When the client requests to view real-time data, the client sends a request to the server. The server sends the real-time data to the client every 2 seconds, and the client receives and displays the data. This process is a typical database remote management process. The traditional technology is to refresh the page continuously to obtain new data so that users can see the constantly changing real-time data. However, the disadvantages of this method are that when the amount of data is large, it consumes a lot of server resources; second, users can clearly feel the continuous refreshing of the page, which has a great impact on the user's vision and hearing. This system uses the xmlhttp technology developed by Microsoft, which is a client/service communication channel protocol in the Microsoft xml parser (MSXML). Using xmlhttp can easily and conveniently realize database remote management. Because it transmits data in XML format, it greatly reduces the consumption of the server, and the use of xmlhttp protocol can realize the page without refreshing data update, making the interface more friendly.
5 Conclusion
This system uses GPRS communication module in hardware, B/S mode in software, and J2EE platform provided by Sun Company as the development tool to complete the system design. It can monitor and analyze the on-site power flow remotely, in real time and intuitively. Compared with other systems, it has the advantages of remote monitoring, maintenance-free client, easy maintenance on the server, safe and reliable system, simple and convenient operation, etc. This product has been applied in the actual meter reading system with good results.
Previous article:Greenhouse Intelligent Monitoring System Based on GPRS
Next article:Cement production line batching control system based on fuzzy control
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- The serial port sends 14k data at a time, how does the microcontroller receive it
- Time to order takeout~
- All the printed pictures are FF
- Can a 100Ω resistor solve the circuit oscillation problem?
- The USB device code generated by STM32 cubeMX is quite different from the sample code of sensor tile box.
- Do you have any plans to use HarmonyOS? Share: Get started with HarmonyOS quickly from official resources
- Engineers Modify iPhone to USB-C Port
- [GD32L233C-START Review] Unboxing
- Please help me, Abel.
- STM32 Summit Gift Pack - Patriot Power Bank Disassembly Diagram