{'fraction_non_alphanumeric': 0.02482385711944945, 'fraction_numerical': 0.010404718990660332, 'mean_word_length': 4.706638616175783, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Mobile-edge computing framework with data compression for wireless network in energy internet

Under the situations of energy dilemma, energy Internet has become one of the most important technologies in international academic and industrial areas. However, massive small data from users, which are too scattered and unsuitable for compression, can easily exhaust computational resources and lower random access possibility, thereby reducing system performance. Moreover, electric substations are sensitive to transmission latency of user data, such as controlling information. However, the traditional energy Internet usually could not meet requirements. Integrating mobile-edge computing makes energy Internet convenient for data acquisition, processing, management, and accessing. In this paper, we propose a novel framework for energy Internet to improve random access possibility and reduce transmission latency. This framework utilizes the local area network to collect data from users and makes conducting data compression for energy Internet possible. Simulation results show that this architecture can enhance random access possibility by a large margin and reduce transmission latency without extra energy consumption overhead.

system to a distributed data center.

Mobile-edge computing for energy Internet
Mobile-Edge Computing (MEC) is an effective method to control a vast amount of data to achieve a reliable, robust, and efficient energy Internet environment [4] . MEC provides an IT service environment and cloudcomputing capabilities at the edge of the mobile network, within a radio access network, and in close proximity to subscribers. The aim of MEC is to reduce latency, ensure highly efficient network operation and service delivery, and offer an improved user experience [5] . Specifically, MEC adds computers in close proximity to users to help cloud data centers preprocess user data, thereby alleviating the computing burden of data centers. Moreover, because of MEC, the access points of a Local Area Network (LAN) can gather a large amount of data from users to facilitate data compression. With the help of data compression, we can further reduce the data amount and alleviate the communication burden of backhaul. To reduce extra overhead, we choose a LAN with 802.11 protocol, which is low cost, to assist data processing. The 802.11 protocol can provide users with adequate bandwidth for adjacent users [6] .
Integrating MEC makes energy Internet more efficient for data collection, processing, management, and access, and it improves the performance of the whole system. Although data compression at access points can increase extra computing overhead, it will also reduce communication overhead; in contrast to communication overhead, computing overhead for this method appears insignificant. These access points can control their transmitted power to trade off interference and random access possibility [7] .

MEC-E framework
Motivated by previous work, we introduce a new framework called MEC-E, a flexible and scalable information management framework for energy Internet based on MEC technology. Our basic idea is to build the framework at three hierarchical levels: cloud, access, and user layers. The first two layers consist of cloud computing centers and MEC servers, while the last layer contains smart terminal equipment. The cloud computing center is responsible for managing general devices and accumulation of data across the MEC servers, which are in the lower layer of the hierarchy. The MEC servers are, in turn, in charge of managing and processing data of intelligent devices, which are at a lower hierarchical layer than the regional cloud computing centers in specific regions.
The main contributions of this paper are as follows: (1) We propose a new framework with MEC for wireless network in energy Internet, which can increase random access possibility and reduce transmission latency without generating extra energy overhead. (2) We utilize the LAN with 802.11 protocol, which is inexpensive and can provide sufficient bandwidth for nearby users to relieve the burden of data center and backhaul. (3) We conduct an efficient data compression approach in the LAN to mitigate communication overhead.
This paper is organized as follows: Section 2 summarizes related work, including energy Internet information management and cloud computing for energy Internet. Section 3 describes the system model and the whole process of data transmission and processing. Section 4 details the data compression algorithm and compares different properties of the four spectral shape modeling methods. Section 5 shows the simulation results for the performance of our new architecture MEC-E, with the results of traditional energy Internet given for comparison. Section 6 presents the conclusion and challenges.

Related Work
In this section, we review related work on energy Internet information management and cloud computing combined with energy Internet.

Energy Internet information management
Energy Internet information management usually involves three basic tasks: information gathering, information processing, and information storing. For information gathering, given that energy Internet has to collect information from heterogeneous devices at different locations, the main research challenge is to build an efficient communication architecture. Several solutions have been proposed to address this challenge, and most of them can be found in recent surveys, such as Refs. [8][9][10][11]. In terms of information processing, data integration also presents a challenge because information can be received from a number of devices, which may use different data structures to handle the information. Fortunately, a proposal for standardization has recently been presented to address this issue of data interoperability [12] .

Cloud computing for energy Internet
How to process a large amount of data efficiently is always a big major challenge. Cloud computing appears to meet this demand and also satisfy the challenges of information storage. As a result, initial works on cloud computing and smart grids have been produced. In Ref. [13], the properties of smart grid and cloud computing make them good candidates for information management in smart grids. Similarly, in Ref. [14], a use case of a smart grid was discussed to understand detailed requirements of information management, and cloud computing properties were studied to show that they meet the requirements.
Our work is inspired by the above studies. However, unlike the previous studies, we provide a new framework based on MEC. To the best of our knowledge, no work has used MEC to help with energy Internet information management.

System Model
We consider a novel architecture called MEC-E with MEC technology for wireless network in energy Internet as shown in Fig. 1. N c LANs with 802.11 protocol are present, where users are intensively distributed and every LAN connects to a data center in the middle of the whole scope, which serves K n users. Each LAN is expressed by n, and we denote by C D fn W n D 1; 2; 3; : : : ; N c g the set of all LANs. i n denotes the user i belongs to the LAN n, and we denote by I D fi n W i D 1; 2; 3; : : : ; K n ; n D 1; 2; 3; : : : ; N c g the set of all the users. Each user i n has a computation task D .w i n ; d i n / [15][16][17] : the total CPU cycle w i n is used to accomplish the task and the size of computation input data d i n .bit/ to transfer the input parameters and program codes from the user to the data center. Each  computation task is transmitted to an adjacent access point of the LAN to be preprocessed first, and then the access points transfer the processed data to the data center [18,19] . Therefore, the whole process consists of three stages.

Stage 1: User to LAN
When users transmit tasks to the LAN, user i n incurs overhead of transmitting input data d i n to the adjacent access point, including latency and energy.
The uplink data rate of user i n can be written as where B i n .Hz/ denotes the occupied bandwidth of user i n , p i n is the transmission power of user i n , and ! 0 denotes the background noise power. H i n is the channel gain (related to path loss, Rayleigh fading, and lognormal shadowing standard deviation) from the user i n to the access point of the LAN. The total latency of user i n , T l , consists of two parts: where T l t and T l e are the transmission time and execution time of the LAN, respectively. T l t is given as T l e will be introduced in the following paragraph. The energy consumption of the user i n from user to access point is E l .J/. We consider both the upload energy consumption and the execution energy consumption for preprocessing:

Stage 2: Preprocessing at the MEC server
Network bandwidth is a scarce resource that should not be wasted or left unused. To take full advantage of network bandwidth, the data should be preprocessed before transferring. Compression is the final stage of processing before the data are sent to the cloud. Choosing an efficient compression algorithm is important to minimize the allocation time in communication channels and the amount of data to be transmitted [20][21][22][23] . Furthermore, given that this is a CPU-intensive stage, we run multiple instances of the compression algorithms in separate execution threads, sending segments to the threads in a round-robin fashion. This approach allows us to take advantage of all available cores and parallelizes well without requiring multi-threaded implementations of the compression algorithms.
If we knew exactly how much compression could be achieved and exactly how long this would take to transfer the modified Virtual Machine (VM) state for all algorithms and if the available bandwidth was guaranteed, then we could find a static configuration of processing stages to optimize the system utility. However, we cannot know all these details in advance because they are highly dependent on the actual data that need to be transferred. Furthermore, network bandwidth can fluctuate significantly over time as available processing resources. Thus, selecting the best processing parameters a priori is not practical, and in any case, a static configuration may not remain the best choice given that conditions change over the duration of compression. Moreover, the best static configuration for one workload might not work well for the other workloads because processing time and compression ratio vary depending on the workloads. Instead, our system employs continuous monitoring of channel condition and uses this information to dynamically adapt the processing stage settings to reduce transmission time and energy consumption.
These years, great contributions have been made to waveform coding with the use of orthogonal transforms. The paper employs wavelet transform to conduct data compression. The algorithm introduces a dynamic bit allocation and quantization using spectral shape modeling in the transform domain and entropy coding to minimize residual redundancy. This method adopts four different approaches to estimate the spectral shape and design a mechanism to dynamically choose the best method that performs well in the present situation, as detailed below. After spectral shape modeling, the Hoffman compress arithmetic code is used on the processed data and to compute compression ratio ratio, which could influence the transmission latency and energy consumption in Stage 3.
The latency of compression is T l e and the energy consumption can be written as below. However, the value is so low that it can be ignored.

Stage 3: LAN to data center
After preprocessing, such as data compression, in the LAN, the access point needs to transmit the processed data to the data center, which also introduces some latency and energy. Therefore, the uplink data rate of LAN n can be written as where B n .Hz/ denotes the occupied bandwidth of LAN n, p n is the transmission power of n, and H n is the channel gain from LAN n to the data center. Similar to Stage 1, the total latency in Stage 2, T r , can be written as where T r t is the transmission time and T r e is the execution time of the data center. T r t can be expressed as where d n denotes the data size that the access point will transmit and ratio is the compression ratio of the Huffman compression algorithm.
T r e can be written as The allocated computation from data center is f r n > 0 as well. The energy consumption of Stage 2 can be expressed by E r , and it consists of transmission and computation energy, where E exe denotes the computation energy consumption of the data center.

Redundancy Removal of User Data
This section will elaborate the process of derivation in Stage 2. A simplified block diagram describes the whole process of redundancy removal, as shown in Fig. 2. The original signal is segmented into fixed-length windows of N samples, and then finite-length sequences denoted by xOEn are produced [24] .

Bit allocation and quantization
Huffman code Shape modeling

S[m]
Data for transmiting Fig. 2 Simplified block diagram of the compression algorithm. x[n] is the input data; X[k] is the k-th transformed coefficient; X S OEk is the k-th quantized transformed coefficient; L and S are the input parameters, which define the largest and smallest word length, respectively; and S[m] is the output of the spectral shape modeling, which indicates the number of bits for coding each transformed coefficient in the m-th subband.
We use discrete wavelet transform to proceed timefrequency mapping. The output of this process is a sequence of transformed coefficients, which is represented as XOEk. Then, the spectrum is divided into subbands. The spectral shape is used to estimate the dynamic range of the spectrum to indicate the number of bits, which is used to quantize the coefficients of each subband, denoted by S OEm. As a result, we can obtain a sequence of quantized coefficients, denoted by X S OEk. A lossless compression technique, such as Huffman code, is applied to encode the quantized coefficients. Ultimately, data are packed into bitstreams and are then ready for transmission.
The purpose of using spectral shape modeling is to improve the coding efficiency, given that the transformed coefficients with greater energy are quantized with a higher number of bits. The efficiency of the bit allocation depends on the adaptation of the model to the spectral signature of the signal segment to be encoded. In the wavelet domain, the coefficients are normally divided into M subbands to construct a vector representation of spectral shape. The N M coefficients that belong to the same subband are represented with the same word length. For given M subbands, N M coefficients exist, which are mathematically related by Eq. (11).
The transformed coefficients are quantized in each subband, as shown in Eqs. (12) and (13).
D max.jXOEkj/; k D 0; 1; 2; : : : ; N 1 (12) where the operator trancatef g indicates the discarding of the fractional part of the representation, and˛and Â m are scale factors.˛is used to make sure that the variation of the coefficients does not exceed the quantizer range, whereas Â m is used to determine the value of the quantizer in each subband, that is to say,˛normalizes and Â m sets the new limits of the spectrum dynamic range. They are necessary to map the abrupt changes in the transform domain caused by disturbances in the time domain. We studied four approaches to estimate the spectral shape of the signal. These approaches, which are derived from analytical models represented by mathematical expressions are (1) Decreasing Linear bit Allocation shape (DLA); (2) Decreasing Quadratic bit Allocation shape (DQA); (3) Decreasing Exponential bit Allocation shape (DEA); and (4) Rotated Sigmoid bit Allocation shape (RSA). The S OEm terms are related to Â m by Eq. (14).
The L and S parameters represent the longest and shortest word length, respectively, for coding the transformed coefficients that change with the user.
(4) RSA: The RSA has the form y D aC b a 1 e c.x x 0 / , where a is the lower asymptote, b is the upper asymptote, c is the growth rate, and x 0 is the curve inflection point. A suggested idea is that m 0 D M 2 , which corresponds to half the number of subbands into which the spectrum is divided. The RSA model is shown in Eq. (18).
We set L D 8 bit, N D 1024 samples, and M D 8 subbands. Figure 3 shows the form of S OEm of the four models when samples increase. Each element of the S OEm corresponds to the number of bits required to represent the largest coefficient magnitude in each subband.
The quantized wavelet coefficients and overhead are compressed by Huffman coding. The redundancy can be minimized through Huffman coding, which improves the compression ratio. We can find that the code efficiency of DQA is greater than that of the other three models, as shown in Fig. 4. However,  when we take compression ratio into consideration, we find that code efficiency and compression ratio are frequently contrasting. From Fig. 5, we observe that the compression effect of DQA is relatively poor, but that of DEA is superior to others. Therefore, we need to design a mechanism to dynamically choose the most appropriate method whose overall performance, including code efficiency and compression effect, is the best. Considering that different systems have variable preferences in code efficiency and compression effect, we set preferred modulus , which represents the preference to code efficiency, so that the selection criteria can be expressed as Eq. (19).
where V represents the utility of selection criteria, that is to say, if the value of V in DLA is the greatest, then we choose DLA as our spectral shape modeling method.  Figure 6 describes the changing situation of utility of selection criteria V when the preference of code efficiency changes from 0.1 to 1. From Fig. 6, we can find that when is 0.6, the utilities of the four methods are close. However, the selection result is nearly inverse whether is greater than 0.6 or not. Thus, we can conclude that preferred modulus has a great influence on the selection result of the four methods and that setting the preferred modulus is necessary. Figure 7 indicates the changing situation of V when the longest word length L changes from 1 bit to 15 bit with D 0:3. We can conclude that the longest word length for coding has a certain influence on utility V .

Simulation and Analysis
In this section, we use MATLAB to evaluate the (1) MEC-E framework In our new architecture, the whole scope is 500 500 m 2 with a data center in the middle and 24 LANs, each of which has a radius of 50 m. The pass loss is 32:4 C 20 lg.f carrier =1 MHz/ C 20 lg.r=1 km/ and noise power equals 174 dBm/Hz. The Rayleigh fading is 20 dB and the log-normal shadowing standard deviation is 10 dB. The number of users is from 200 to 300, and the data size from each user is 250 byte, which needs 1 507 500 CPU cycles to accomplish. From the user to the access point of the LAN, the occupied bandwidth is set as 1 MHz, the computation ability is randomly assigned from 2 GHz to 3 GHz, the carrier frequency is set as 2:4 GHz and each user's transmitted power is 23 dBm.
The LAN can provide enough bandwidth and computation resources for adjacent users. Thus, we assume that all data can be transferred successfully to access points. In the LAN, we use Huffman compression algorithm to conduct data compression, and then compressed data will be transmitted to the data center. From the LAN to the data center, the occupied bandwidth is set as 2 MHz, the computation ability is randomly assigned from 1 GHz to 2 GHz, the carrier frequency is set as 900 MHz, and the transmitted power of each access point is 26 dBm. Finally, the minimum reception level is 110 dBm.
(2) Traditional architecture In traditional architecture, the whole scope is also 500 500 m 2 and the total number of users is the same as our new architecture, but no LANs are present. Thus, users transmit their tasks directly to the data center in the middle of the range. The occupied bandwidth, computation ability, the carrier frequency, and the minimum reception level are the same as the parameters from the LAN to the data center in our new architecture. The communication and computation parameters used in our simulations are summarized in Table 1.

Latency with varying number of users
We first evaluate the latency of the whole system as the number of users varies from 200 to 300. Note that we start from 200 users because it is closer to the actual condition. Figure 8 demonstrates a comparison between the MEC-E and the traditional architecture. The latency of both schemes has a nearly linear relation to the number of users. Furthermore, our new architecture introduces lower latency than the traditional one does because the preprocessing time in the LAN is less than the transmission time saved because of the reduced data. Figure 8 also shows a comparison between our architecture with and without data compression. The scheme with data compression performs better than the scheme without data compression in terms of latency. Although data compression consumes some computation resources and expends some time to process, it economizes communication resources such as occupied bandwidth and alleviates the burden of backhaul. Thus, from Fig. 8, we can conclude that data compression in our architecture is essential. Figure 9 shows a comparison of energy consumption between the MEC-E framework and the traditional one as the number of users varies from 200 to 300. Similarly, the energy consumption of the system has a linear relation to the number of users as well. Moreover, our new framework did not introduce more energy consumption than the traditional framework. This condition shows the difference, however narrow, between the schemes with and without data compression; the former is better than the latter. This finding further demonstrates that data  compression in our architecture is indispensable.

Random access possibility with varying
number of users Figure 10 shows a comparison of random access possibility between our architecture with MEC and the traditional architecture. As the number of users varies from 200 to 300, the access possibility of both architectures is approximately invariant. In addition, we can observe from Fig. 10 that the random access possibility of our new architecture is nearly 50 percent greater than the traditional one without MEC. As is well known, access possibility is relevant directly to QoE. A greater access possibility corresponds to better experience for users. Moreover, low random access possibility signifies more extra overhead because data has to retransmit. As a result, our new architecture is evidently distinctive. Figure 10 also demonstrates the difference of random access possibility between the schemes with and without data compression. We can easily find that our architecture with data compression has greater random access possibility, thereby providing users with a better experience.

Conclusion and Challenge
In this paper, we propose a new architecture called MEC-E, which conducts data compression in a LAN with 802.11 protocol for wireless network in energy Internet. The 802.11 protocol is low cost and can provide users with adequate bandwidth. We choose wavelet transform to conduct data compression, including dynamic bit allocation and quantization using  spectral shape modeling in the transform domain, as well as entropy coding, which improves the performance of data compression methods. Through simulation, we prove that our architecture offers nearly 50 percent more access possibility and provides users with a better experience with lower latency than the traditional architecture without introducing additional energy consumption. We also find that our proposed dynamic data compression method in the LAN is efficient and can improve the system performance in every aspect. In sum, our proposed new architecture is superior.
We are faced with some challenges as well. In this paper, we focus on the influence of noise and transmission power but omit the effect of interference, and we did not consider the problem of resource allocation. This issue will be explored in our future studies.