I designed and implemented a monitoring and management system for electric vehicle charging equipment because the safe operation of electric vehicle charging infrastructure has become directly connected to user safety, asset protection, and power-grid stability. In practical deployments, electric vehicle charging piles are often distributed across many sites, operated by different service providers, and connected through heterogeneous gateways. The result is a familiar operational pattern: device faults are discovered late, warning messages are handled through informal channels, and maintenance teams cannot easily coordinate with owners, operators, and administrators. I therefore focused on a platform that combines data acquisition, real-time monitoring, warning handling, and multi-role collaboration in one practical architecture.
My starting point was the observation that many existing electric vehicle charging management studies emphasize scheduling, energy optimization, spatial visualization, or payment integration. Those functions are important, but they do not fully address the day-to-day needs of electric vehicle charging equipment operation and maintenance. In my design, the central concerns are the real-time state of the charger, the quality and freshness of telemetry, the closed-loop handling of warnings, and the traceability of administrative actions. I built the administration interface with Layui, used ECharts for device-parameter visualization, adopted Ajax polling for dynamic refresh, and added a WeChat mini program for vehicle owners to view device status and receive warnings.

The system is intended for electric vehicle charging scenarios in which edge gateways collect current, voltage, temperature, and heartbeat data from chargers. The edge gateway publishes telemetry through MQTT, the backend consumes and stores the data, and the frontend retrieves the latest values through RESTful APIs. I paid particular attention to the cost of real-time refresh: chart timers are created only when a user opens a chart view, and they are destroyed immediately when the user returns to the numeric view. This design keeps the electric vehicle charging monitoring interface responsive even when many devices are displayed.
System Architecture
I adopted a browser/server architecture with a clear separation between frontend and backend. The frontend contains two clients. The first is a WeChat mini program developed with its native framework, which gives vehicle owners a lightweight entry point for viewing bound electric vehicle charging devices and receiving warnings. The second is a PC administration backend built with Layui, which gives operators a centralized monitoring and management workspace. The backend exposes RESTful APIs, the frontend exchanges data through Ajax, and MySQL 8.0 stores relational data and telemetry summaries.
The overall system is organized into four layers: data acquisition, message transport, backend service, and frontend presentation. The acquisition layer obtains real-time electric vehicle charging data from edge gateways. The transport layer uses MQTT to move telemetry into a message queue and decouple producers from consumers. The service layer consumes messages, performs validation and cleaning, stores normalized records, evaluates thresholds, and serves API requests. The presentation layer polls the backend, renders device cards, and displays ECharts curves. Table 1 summarizes the responsibilities and design choices of each layer.
| Layer | Main responsibility | Key technology | Design concern |
|---|---|---|---|
| Data acquisition | Read current, voltage, temperature, heartbeat, and device identity from electric vehicle charging piles through edge gateways | Edge gateway, sensor interface, device SN mapping | Stable sampling and local buffering during network interruption |
| Message transport | Publish telemetry and heartbeat messages, buffer bursts, and route topics | MQTT, message queue | Decoupling, ordered delivery where required, and retry handling |
| Backend service | Consume messages, validate data, store records, evaluate thresholds, generate warnings, and provide RESTful APIs | RESTful API, MySQL 8.0, scheduled jobs | Data quality, transaction consistency, and role-based access |
| Frontend presentation | Display device cards, tables, charts, warning lists, and administrative forms | Layui, ECharts, Ajax polling, WeChat mini program | Responsiveness, timer lifecycle, and operator usability |
I modeled device online status with heartbeat freshness. If the last heartbeat timestamp is $\tau_i$ and the current time is $t$, then the online indicator for device $i$ is defined as:
$$O_i(t)=\begin{cases}1,\ \mathrm{when}\ t-\tau_i \le T_{\mathrm{hb}}\\0,\ \mathrm{when}\ t-\tau_i \gt T_{\mathrm{hb}}\end{cases}$$
In my deployment, $T_{\mathrm{hb}}$ was set to 10 seconds for the electric vehicle charging gateway heartbeat. This value is short enough to detect a disconnected charger quickly and long enough to avoid false offline states caused by transient network jitter. The online state is not only a backend field; it also drives the border color of device cards, the icon in the device list, and the filtering behavior in the administration interface.
For the message payload, I used a normalized schema so that different electric vehicle charging gateway models could be adapted without changing the frontend. A telemetry message contains the device serial number, sampling time, current, voltage, temperature, heartbeat flag, and a small set of diagnostic fields. The backend validates the message and rejects records that fail identity or range checks. Valid records are written to the telemetry table, while the latest state is updated in the device table for fast list rendering.
Functional Modules
I divided the system into eight core modules. Each module has an independent responsibility, but all modules exchange data through a unified service interface. This structure lets me evolve the electric vehicle charging monitoring workflow without tightly coupling the user interface to the database schema. Table 2 summarizes the modules and their main outputs.
| Module | Main functions | Key output | Primary users |
|---|---|---|---|
| Device monitoring | Card-based display of current, voltage, temperature, heartbeat, and online state; numeric and chart views; real-time polling | Live electric vehicle charging device dashboard | Operations staff |
| Device management | Create, read, update, delete, bind, unbind, batch delete, export, and filter electric vehicle charging devices | Device inventory and ownership records | Administrators and operators |
| Member management | Maintain vehicle owner profiles, phone numbers, registration time, and bound devices | Member records and binding relationships | Administrators |
| Content management | Maintain mini program banner images, upload, preview, and sort display content | Published content configuration | Content operators |
| Parameter configuration | Configure MQTT server address, attachment path, polling interval, and other runtime parameters | Persistent system parameters | System administrators |
| Area management | Maintain hierarchical area data for electric vehicle charging sites and support area-based filtering | Area tree and device grouping | Operations managers |
| Backend administration | User management, role management, menu management, and audit log management under RBAC | Access control and behavior audit records | System administrators |
| Scheduled task logs | Record scheduled job execution, status, parameters, duration, and export results | Traceable job history | Maintenance staff |
The device monitoring module is the operational center of the system. It presents each electric vehicle charging device as a card containing the device serial number, current, voltage, temperature, online state, and a set of view buttons. The card border uses color to communicate state: a green shadow indicates an online electric vehicle charging device, while a red shadow indicates an offline device. This visual encoding is simple, but it is effective because operators can scan a large screen and identify abnormal electric vehicle charging equipment without opening a detail page.
The device management module uses a Layui table with columns covering the full administrative dimension: area, network state, serial number, device number, bound user phone number, installation address, real-time current, real-time voltage, real-time temperature, overcurrent trip count, overvoltage trip count, overtemperature trip count, and data update time. The toolbar contains a filter form and an add button. Filters support precise queries by serial number and online state. Administrators can select one or more rows for batch deletion or export, and each row provides edit, delete, bind, and unbind actions. Binding uses a right-side sliding panel so that the operator can complete the relationship without leaving the list context.
Member management focuses on the vehicle owner as the recipient of electric vehicle charging warnings. It maintains the owner’s basic information, phone number, registration time, and bound devices. Content management supports banner images on the mini program home page, including upload, preview, and sorting. Parameter configuration stores MQTT server address, attachment storage path, and other runtime settings. Area management creates a hierarchical region model so that electric vehicle charging devices can be grouped and monitored by site or administrative area. Backend administration implements users, roles, menus, and audit logs through RBAC. Scheduled task logs capture the execution history of background jobs so that data synchronization and warning generation remain traceable.
Key Technologies
I used Layui because it provides a practical set of modules for administration pages: tables, forms, tree controls, upload components, popups, sliding panels, and layout utilities. I loaded modules on demand so that each page only paid for the components it used. This improved first-render performance and simplified event binding. The Layui table component was especially useful for electric vehicle charging device management because it supports pagination, filtering, toolbar actions, row operations, and batch selection without requiring a large custom frontend framework.
For visualization, I used ECharts to draw electric vehicle charging current, voltage, and temperature curves. A line chart is appropriate here because operators need to see trends rather than isolated values. ECharts supports dynamic data updates and animation, and it can redraw a chart when new points arrive. I standardized the chart data contract as an x-axis time series and a y-axis numeric series. This contract made the backend independent of the chart library and allowed the same API to serve both numeric cards and chart views.
Real-time refresh is implemented with Ajax polling. I deliberately kept polling simple because the administration environment is a conventional browser, the number of concurrently viewed charts is limited, and the backend already has strong control over authentication and rate limiting. The refresh interval is:
$$\Delta t_{\mathrm{poll}}=10\,\mathrm{s}$$
To avoid unnecessary network requests, each device card maintains its own timer lifecycle. When a user switches to a chart view, the page creates an ECharts instance, requests historical data, and starts a polling timer for that chart. When the user switches back to the numeric view, the timer is cleared immediately. This is a small design decision, but it has a large effect on the electric vehicle charging monitoring experience because a dashboard with many cards would otherwise issue requests for charts that are not visible.
| Technology | Role in the system | Why I selected it | Operational consideration |
|---|---|---|---|
| Layui | Administration UI, tables, forms, popups, tree permissions | Fast construction of a responsive management backend with familiar components | Load modules on demand and keep custom JavaScript scoped per page |
| ECharts | Current, voltage, and temperature curves for electric vehicle charging devices | Reliable dynamic charting and clear trend visualization | Destroy chart instances when cards are removed or views are closed |
| Ajax polling | Fetch latest telemetry and update cards or charts | Simple deployment and predictable request behavior | Use independent timers and clear them on view switch |
| MQTT | Transport telemetry and heartbeat messages from electric vehicle charging gateways | Lightweight publish/subscribe model suitable for distributed devices | Use QoS, topic naming, and gateway buffering to handle intermittent networks |
| RESTful API | Expose device, warning, user, role, and log operations | Clear separation between frontend and backend | Enforce authentication, authorization, and request validation |
The telemetry ingestion path uses a normalized topic structure. I used the device serial number as the stable identity and treated the area, installation address, and owner binding as administrative attributes. This separation matters for electric vehicle charging operations because a charger may be moved, rebound, or reassigned without changing its telemetry identity. The backend consumes messages, validates the timestamp and numeric ranges, writes a raw record, updates the latest-state cache, and evaluates warning rules.
For data freshness, I defined a stale-data indicator:
$$S_i(t)=\begin{cases}1,\ \mathrm{when}\ t-\tau_i^{\mathrm{data}} \le T_{\mathrm{stale}}\\0,\ \mathrm{when}\ t-\tau_i^{\mathrm{data}} \gt T_{\mathrm{stale}}\end{cases}$$
When $S_i(t)=1$, the latest electric vehicle charging telemetry is considered fresh. When $S_i(t)=0$, the interface marks the card as stale even if the last known heartbeat was recently received. This distinction prevents a device from appearing healthy when it is only sending heartbeat packets but has stopped reporting current, voltage, or temperature.
Detailed Design
Device Monitoring Module
The device monitoring page uses streaming loading. On first open, the frontend requests the initial page of electric vehicle charging devices and renders only the visible region. When the user scrolls to the bottom, the next page is requested automatically. If the initial page size is $N_0$, the page size is $N_p$, and the number of loaded pages is $r$, then the number of loaded device cards is:
$$N_{\mathrm{loaded}}(r)=N_0+r\cdot N_p$$
This approach reduces the first-screen rendering cost and keeps the electric vehicle charging dashboard usable when the device inventory is large. The card content area supports four modes: numeric view, current curve, voltage curve, and temperature curve. Table 4 summarizes the view behavior.
| View mode | Display | Data request | Timer behavior |
|---|---|---|---|
| Numeric view | Latest current, voltage, temperature, and online state | Latest-state API | No chart timer |
| Current curve | ECharts line chart of current over time | Historical current series | Start 10-second polling and append new points |
| Voltage curve | ECharts line chart of voltage over time | Historical voltage series | Start 10-second polling and append new points |
| Temperature curve | ECharts line chart of temperature over time | Historical temperature series | Start 10-second polling and append new points |
When a user changes from one chart view to another, I clear the previous chart timer before creating the new one. This avoids duplicate polling for the same card. When the user returns to the numeric view, I clear all timers for that card and dispose of the ECharts instance. The browser therefore maintains a small and predictable set of active timers, which is important for electric vehicle charging monitoring screens that may remain open for an entire shift.
Device Management List
The device management list is built with the Layui table component. The table is designed for precision work rather than dashboard scanning, so it contains more fields and more actions than the monitoring card. Table 5 shows the main columns and their purpose.
| Column | Purpose | Interaction |
|---|---|---|
| Area | Group electric vehicle charging devices by region | Filter and sort |
| Network state | Show online or offline state with an icon | Quick visual scan |
| Serial number | Stable device identity | Precise search |
| Device number | Administrative asset number | Edit and export |
| Bound user phone | Show owner binding relationship | Bind or unbind |
| Installation address | Physical location of the electric vehicle charging device | Read and edit |
| Real-time current | Latest current value | Monitoring support |
| Real-time voltage | Latest voltage value | Monitoring support |
| Real-time temperature | Latest temperature value | Monitoring support |
| Trip counts | Overcurrent, overvoltage, and overtemperature trip history | Maintenance analysis |
| Data update time | Freshness of the latest electric vehicle charging telemetry | Sort and filter |
The toolbar filter supports device serial number and online state. Batch operations include delete and export. Row operations include edit, delete, and bind or unbind. I implemented binding as a right-side sliding layer because it preserves the table context and reduces navigation. After the form is submitted, the table refreshes with the new binding state. This is particularly useful for electric vehicle charging devices that are installed in shared parking areas and may change ownership or maintenance responsibility over time.
User and Permission Management
I implemented access control with the RBAC model. A user has one or more roles, a role has a set of menu permissions, and a menu represents an administrative resource or operation. The access decision can be expressed as:
$$\mathrm{Allow}(u,m)=1\ \mathrm{when}\ \exists r\in R(u):(r,m)\in \mathrm{RoleMenu}$$
Here, $u$ is the user, $m$ is the requested menu or operation, $R(u)$ is the set of roles assigned to the user, and $\mathrm{RoleMenu}$ is the mapping between roles and permissions. The permission assignment dialog uses a tree control to display all menu items. The administrator checks the allowed resources, and the frontend submits the selected identifiers as JSON. The backend persists the mapping and invalidates the affected permission cache.
| Entity | Key fields | Relationship | Operational purpose |
|---|---|---|---|
| User | User ID, account, nickname, phone, status | Many-to-many with roles | Identify operators and control account state |
| Role | Role ID, role name, role key, remark | Many-to-many with menus | Group permissions for electric vehicle charging operations |
| Menu | Menu ID, parent ID, name, path, permission code | Tree structure | Represent pages and operations |
| Role menu | Role ID, menu ID | Mapping table | Persist allowed resources |
| Audit log | User ID, action, target, time, result | Append-only record | Trace administrative behavior |
User management displays operators in a table and supports precise or fuzzy search by account, nickname, and phone number. The enabled or disabled state is shown with a switch and can be changed in place. Add and edit operations use popup forms, and role assignment uses a multi-select component with search and selected-value echo. This design keeps the electric vehicle charging administration workflow efficient while preserving clear permission boundaries.
Emergency Warning Mechanism
The warning mechanism is a closed loop. Real-time current, voltage, and temperature are compared with configured safety thresholds. If a value exceeds its threshold, the backend generates a warning record. The system then notifies the bound vehicle owner through a WeChat message template or a third-party SMS interface. The administration backend provides a warning list with filters for time, device serial number, and handling state. Operators can record handling opinions and final results, and they can close the warning after the problem is resolved. The workflow is:
$$\mathrm{Acquire}\rightarrow\mathrm{Judge}\rightarrow\mathrm{Generate}\rightarrow\mathrm{Notify}\rightarrow\mathrm{Handle}\rightarrow\mathrm{Close}$$
I modeled threshold detection as follows. For device $i$, parameter $k$, and time $t$, the warning indicator is:
$$A_{i,k}(t)=1\ \mathrm{when}\ x_{i,k}(t)\gt \theta_k^{\max}\ \mathrm{or}\ x_{i,k}(t)\lt \theta_k^{\min}$$
Otherwise, $A_{i,k}(t)=0$. Here, $x_{i,k}(t)$ is the measured value and $\theta_k^{\max}$ and $\theta_k^{\min}$ are the upper and lower thresholds. In practice, I used debounce logic so that a single noisy sample did not create a warning. A warning is generated only when the condition persists for a configured number of samples or a configured duration. This reduces nuisance alarms in electric vehicle charging environments where electrical noise and temporary load changes are common.
| Warning state | Meaning | Allowed next state | Responsible role |
|---|---|---|---|
| New | Threshold violation detected and warning record created | Notified, closed as false positive | System |
| Notified | Owner or operator notification sent | In progress, closed | System and operator |
| In progress | Operator is handling the electric vehicle charging issue | Resolved, escalated | Maintenance staff |
| Resolved | Corrective action completed | Closed | Maintenance staff |
| Closed | Warning closed with handling opinion and result | None | Operations manager |
The warning list is not a simple message inbox. I designed it as an operational record. Each row preserves the device identity, parameter, measured value, threshold, generation time, notification state, handling opinion, and closing time. This makes the warning history useful for electric vehicle charging maintenance analysis and for tracing repeated faults on the same charger.
Scheduled Task Log Module
I added a scheduled task log module because background jobs are part of the reliability foundation of the system. These jobs may synchronize device states, aggregate telemetry, generate warnings, or clean historical data. The log table records the task name, completion time, success state, execution parameters, and running duration. The toolbar provides batch delete, clear log data, and export to Excel. Export supports two modes: export all records matching the current query, or export only the selected rows. Double-clicking a row opens a detail window with the complete execution parameters and result.
| Field | Description | Use |
|---|---|---|
| Task name | Name of the scheduled job | Identify the process |
| Completion time | Timestamp when the job finished | Timeline reconstruction |
| Success state | Success, failure, or partial success | Reliability monitoring |
| Execution parameters | Inputs used by the job | Reproduce the run |
| Running duration | Elapsed time of the job | Performance trend analysis |
| Detail | Full result or error context | Root-cause investigation |
Data Model and Algorithms
I designed the relational model around stable entities: device, telemetry, member, area, warning, user, role, menu, role menu, configuration, banner, and task log. The device table stores identity and administrative attributes. The telemetry table stores time-series measurements. The warning table stores the detection and handling lifecycle. The permission tables store RBAC relationships. Table 8 summarizes the core tables.
| Table | Primary key | Important fields | Purpose |
|---|---|---|---|
| device | device_id | serial_no, area_id, device_no, address, bound_user_id, latest_current, latest_voltage, latest_temperature, last_heartbeat | Electric vehicle charging device inventory and latest state |
| telemetry | telemetry_id | device_id, sample_time, current, voltage, temperature, quality_flag | Time-series electric vehicle charging measurements |
| member | member_id | phone, nickname, register_time, status | Vehicle owner records |
| area | area_id | parent_id, area_name, level | Hierarchical electric vehicle charging site grouping |
| warning | warning_id | device_id, parameter, measured_value, threshold_value, state, handling_opinion, close_time | Warning detection and closed-loop handling |
| user | user_id | account, nickname, phone, status | Administration accounts |
| role | role_id | role_name, role_key, remark | Permission groups |
| menu | menu_id | parent_id, menu_name, path, permission_code | Menu and operation resources |
| role_menu | role_id, menu_id | Mapping | Role-permission relationship |
| config | config_key | config_value, update_time | Runtime parameters |
| task_log | log_id | task_name, finish_time, success, parameters, duration, detail | Scheduled job traceability |
For time-series queries, I used time-bucket aggregation to reduce the amount of data returned to the chart. If the requested interval is $[t_1,t_2]$ and the bucket width is $\Delta$, the aggregate value in bucket $b$ is:
$$\bar{x}_b=\frac{1}{N_b}\sum_{j=1}^{N_b}x_j$$
where $N_b$ is the number of samples in bucket $b$. The frontend can request a narrow interval for recent electric vehicle charging telemetry and a wider interval for historical inspection. This keeps the chart responsive without losing the overall trend.
I also computed a device health score to support maintenance prioritization. The score combines current stability, voltage stability, temperature margin, and heartbeat continuity:
$$H_i=w_cC_i+w_vV_i+w_tT_i+w_hB_i$$
with $w_c+w_v+w_t+w_h=1$. Each component is normalized to $[0,1]$, where a higher value means better health. In my implementation, the weights are configurable rather than hard-coded, because different electric vehicle charging sites may have different risk priorities.
Warning priority is computed from severity, urgency, and confidence:
$$P_w=\alpha S_{\mathrm{severity}}+\beta U_{\mathrm{urgency}}+\gamma C_{\mathrm{confidence}}$$
with $\alpha+\beta+\gamma=1$. Severity reflects how far the measured value exceeds the threshold. Urgency reflects device criticality and time of day. Confidence reflects data quality and whether the condition persisted across multiple samples. This scoring model is not a replacement for engineering judgment, but it helps operators sort electric vehicle charging warnings when many events arrive at once.
Data quality is tracked for every telemetry batch:
$$Q=1-\frac{N_{\mathrm{missing}}+N_{\mathrm{invalid}}}{N_{\mathrm{total}}}$$
When $Q$ falls below a configured level, the device is flagged for inspection and the latest state is marked as unreliable. This is important for electric vehicle charging monitoring because a disconnected sensor can otherwise produce a misleading “normal” reading.
| Parameter | Illustrative lower threshold | Illustrative upper threshold | Debounce rule | Warning action |
|---|---|---|---|---|
| Current | Configured per device | Configured per device | 3 consecutive samples | Create overcurrent warning and notify bound owner |
| Voltage | Configured per device | Configured per device | 3 consecutive samples | Create voltage warning and request inspection |
| Temperature | Configured per device | Configured per device | 2 consecutive samples or 30 seconds | Create overtemperature warning and escalate if persistent |
| Heartbeat | Not applicable | 10-second timeout | Single timeout event | Mark electric vehicle charging device offline |
| Data freshness | Not applicable | Stale-data timeout | Single timeout event | Mark telemetry stale and reduce confidence |
API and Interface Design
The backend exposes RESTful APIs for devices, telemetry, warnings, members, areas, users, roles, menus, configuration, and task logs. I used consistent pagination parameters and a common response envelope. Table 10 lists representative endpoints.
| Endpoint | Method | Purpose | Access |
|---|---|---|---|
| /api/devices | GET | List electric vehicle charging devices with filters | Operator or administrator |
| /api/devices | POST | Create a device record | Administrator |
| /api/devices/{id} | PUT | Update device attributes | Administrator |
| /api/devices/{id}/bind | POST | Bind an electric vehicle charging device to a member | Administrator |
| /api/devices/{id}/bind | DELETE | Unbind a device from a member | Administrator |
| /api/telemetry/latest | GET | Return latest telemetry for visible devices | Operator |
| /api/telemetry/history | GET | Return time-bucketed history for a device and parameter | Operator |
| /api/warnings | GET | List warnings by time, device, and state | Operator or administrator |
| /api/warnings/{id}/close | POST | Close a warning with handling opinion | Maintenance staff |
| /api/members | GET | List or search vehicle owners | Administrator |
| /api/roles/{id}/menus | PUT | Persist role-menu permissions | System administrator |
| /api/task-logs/export | GET | Export scheduled task logs | Administrator |
Pagination uses a page number $p$ and page size $s$. The database offset is:
$$\mathrm{offset}=(p-1)\cdot s$$
For electric vehicle charging device lists, I cap $s$ to a reasonable maximum to prevent oversized responses. For chart history, I require a start time, an end time, a device identifier, and a parameter name. The backend validates that the interval is not excessively large and chooses an appropriate time bucket if the client does not provide one.
The common response envelope contains a status code, message, and data payload. I use explicit error codes for authentication failure, authorization failure, validation failure, missing resource, rate limit, and internal error. This makes the frontend behavior predictable, especially when an electric vehicle charging device has been deleted while an operator still has an old card open.
Testing and Analysis
I validated the system with functional tests and performance tests. Functional tests covered normal operations, invalid inputs, boundary values, and permission restrictions. I tested each module against expected behavior, including device creation and binding, member search, banner upload, parameter persistence, area filtering, user enable and disable, role permission assignment, warning generation, warning closure, and task log export. Table 11 summarizes representative functional tests.
| Test area | Scenario | Expected result | Observed result |
|---|---|---|---|
| Device monitoring | Open dashboard with many electric vehicle charging devices | Initial visible cards render, scrolling loads more | Passed |
| Device monitoring | Switch from numeric view to current curve | Chart initializes, history loads, polling starts | Passed |
| Device monitoring | Switch back to numeric view | Chart timer cleared and instance disposed | Passed |
| Device management | Bind device to owner through sliding panel | Binding saved and table refreshed | Passed |
| Device management | Batch delete selected devices | Confirmation shown and records removed | Passed |
| Member management | Search by phone number | Matching records returned | Passed |
| Content management | Upload and preview banner image | Image stored and preview rendered | Passed |
| Parameter configuration | Change MQTT address | Value persisted and effective | Passed |
| Area management | Create child area and filter devices | Hierarchy preserved and filter correct | Passed |
| User and permission | Assign menu permissions to role | Tree selection saved as JSON and enforced | Passed |
| Warning handling | Generate, notify, handle, and close warning | State transitions and audit data correct | Passed |
| Task log | Export selected rows and all matching rows | Excel output contains correct records | Passed |
Performance tests focused on first-screen load time and chart refresh behavior. I ran the tests in a gigabit internal network environment to keep network variability low. The device list uses streaming loading, so the initial request renders only the visible region and later pages load on scroll. The first-screen load time remained below 2 seconds. Chart polling requests are asynchronous and do not block other page interactions. In a scenario with 50 electric vehicle charging devices monitored at the same time, the chart refresh delay remained below 2 seconds.
I define refresh latency as:
$$L_{\mathrm{refresh}}=t_{\mathrm{render}}-t_{\mathrm{sample}}$$
where $t_{\mathrm{sample}}$ is the sampling timestamp and $t_{\mathrm{render}}$ is the time when the updated value appears in the interface. I also measured request throughput:
$$X=\frac{N_{\mathrm{requests}}}{T_{\mathrm{test}}}$$
and service availability:
$$A=\frac{T_{\mathrm{up}}}{T_{\mathrm{up}}+T_{\mathrm{down}}}$$
Table 12 summarizes the performance results and targets.
| Metric | Test condition | Target | Result |
|---|---|---|---|
| First-screen load time | Large device inventory, streaming load | Less than 2 seconds | Met |
| Chart refresh delay | 50 electric vehicle charging devices monitored concurrently | Less than 2 seconds | Met |
| Interaction blocking | Chart polling active while user scrolls and filters | No visible blocking | Met |
| Timer cleanup | Repeated view switching on multiple cards | No duplicate active timers | Met |
| Permission enforcement | Role without menu access attempts restricted API | Request denied and audited | Met |
| Warning closure | Warning handled and closed with opinion | State and audit record correct | Met |
For warning quality, I used precision, recall, and the $F_1$ score:
$$P=\frac{N_{\mathrm{tp}}}{N_{\mathrm{tp}}+N_{\mathrm{fp}}},\quad R=\frac{N_{\mathrm{tp}}}{N_{\mathrm{tp}}+N_{\mathrm{fn}}},\quad F_1=\frac{2PR}{P+R}$$
These metrics are useful when threshold rules are tuned. A high recall means the system catches most real electric vehicle charging faults, while a high precision means operators are not overwhelmed by false warnings. I used the debounce rule and data-quality flag to improve both dimensions without making the rule engine difficult to maintain.
Deployment and Operational Controls
I deployed the system with a conventional service topology: edge gateways at electric vehicle charging sites, an MQTT broker in the network operations center, a backend service behind a reverse proxy, a MySQL database, and the Layui administration frontend served as static resources. The WeChat mini program accesses the same RESTful API through HTTPS. Table 13 summarizes the deployment components.
| Component | Deployment role | Operational concern |
|---|---|---|
| Edge gateway | Collects electric vehicle charging telemetry and publishes MQTT messages | Local buffering, clock synchronization, and secure device identity |
| MQTT broker | Receives telemetry and heartbeat topics | Authentication, topic isolation, QoS, and connection limits |
| Backend service | Consumes messages, validates data, evaluates rules, and serves APIs | Horizontal scaling, transaction boundaries, and rate limiting |
| MySQL | Stores device, telemetry, warning, member, permission, and log data | Indexing, backup, retention, and query tuning |
| Administration frontend | Layui-based management interface | Static asset caching and browser compatibility |
| WeChat mini program | Owner-facing device view and warning receipt | Authentication, binding validation, and message template configuration |
Security controls are layered. The administration backend requires authenticated sessions and role-based authorization. The mini program uses user identity binding before it can display an electric vehicle charging device. APIs validate inputs and enforce object-level access. Audit logs record administrative actions such as device deletion, binding changes, permission changes, and warning closure. Sensitive fields such as phone numbers are masked in list views where full visibility is not required.
| Control | Implementation | Protected asset |
|---|---|---|
| Authentication | Session or token validation for administration and mini program | User accounts and owner data |
| Authorization | RBAC menu and API permission checks | Administrative functions |
| Transport security | HTTPS for frontend APIs and TLS for MQTT where supported | Telemetry and warning messages |
| Input validation | Type, range, identity, and timestamp checks | Database integrity |
| Audit logging | Append-only action records | Accountability and traceability |
| Data masking | Partial phone display in list contexts | Personal information |
Discussion and Future Work
The practical value of the system comes from the combination of real-time electric vehicle charging monitoring and closed-loop warning handling. Operators can see device state, identify offline equipment, inspect trend curves, and act on warnings without switching between unrelated tools. The Layui backend is lightweight and familiar, while ECharts gives clear visual feedback. The WeChat mini program extends the system beyond the operations center and gives vehicle owners a direct channel for device status and warnings.
The design also has limitations. Ajax polling is simple, but it is not the most efficient mechanism for very large deployments. I would consider MQTT over WebSocket or server-sent events for future versions where push-based updates are required. The threshold engine is explainable and easy to audit, but it is not a predictive maintenance model. I would add trend-based anomaly detection and remaining-useful-life estimation when enough electric vehicle charging telemetry has been collected. The mini program is intentionally lightweight, but it could support service requests, fault photo uploads, and appointment scheduling in later releases.
| Future direction | Expected benefit | Design implication |
|---|---|---|
| Push-based telemetry updates | Lower latency and fewer redundant requests | Add MQTT over WebSocket or server-sent events |
| Predictive maintenance | Detect degradation before failure | Store longer telemetry history and train anomaly models |
| Edge intelligence | Reduce network load and improve local response | Run rule checks and buffering on the gateway |
| Multi-tenant operation | Support multiple electric vehicle charging operators | Add tenant identifiers to devices, roles, and warnings |
| Standardized device model | Simplify integration of heterogeneous chargers | Adopt a common electric vehicle charging telemetry schema |
| Mobile maintenance workflow | Faster field response | Extend the mini program with work orders and photo evidence |
I also see value in improving the operator experience through configurable dashboards. Different roles may care about different electric vehicle charging metrics: a maintenance engineer may prioritize temperature and trip counts, while an operations manager may prioritize availability and warning closure time. A configurable card layout and role-specific default views would make the system easier to adapt to different operational contexts.
Conclusion
I designed and implemented a Layui-based monitoring and management system for electric vehicle charging equipment. The system uses a browser/server architecture with frontend and backend separation, a Layui administration interface, ECharts visualization, Ajax polling, MQTT telemetry ingestion, MySQL storage, and a WeChat mini program for vehicle owners. It covers device monitoring, device management, member management, content management, parameter configuration, area management, RBAC administration, and scheduled task logging. The warning mechanism forms a complete loop from data acquisition and threshold judgment to notification, handling, and closure.
My tests showed that the system meets its functional requirements and performs well in the target electric vehicle charging monitoring scenario. Streaming loading keeps the first screen responsive, independent chart timers prevent unnecessary polling, and role-based access control protects administrative operations. The system improves the real-time visibility of electric vehicle charging devices and supports coordinated operation among owners, operators, and administrators. I believe the design provides a practical foundation for safer electric vehicle charging infrastructure and can be extended with push-based updates, predictive maintenance, and edge intelligence as the deployment scale grows.
