A self-service customer service data storage method for power service

By dynamically updating the probability distribution model and arithmetic coding algorithm, the problem of reduced compression rate caused by the non-stationary nature of power customer service data is solved, achieving more efficient data storage and transmission.

CN120856795BActive Publication Date: 2026-04-10FIBRLINK NETWORKS
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-19
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing adaptive arithmetic coding struggles to adapt quickly to changes in data distribution when faced with the non-stationary nature of electricity customer service interaction data. This leads to decreased compression ratios and wasted storage space, and it cannot effectively address contextual changes in electricity customer service data driven by factors such as time, season, and policy.

Method used

By acquiring a pool of historical probability distribution models, inheriting real-time probability distribution models and overall probability distribution models, calculating the degree of distribution deviation, selecting a suitable probability distribution model for encoding, and combining arithmetic coding algorithms, the probability distribution model is dynamically updated to adapt to changes in data characteristics, thereby improving the accuracy and compression rate of encoding.

Benefits of technology

It significantly improves the compression rate of power customer service data, reduces the waste of storage space, enhances data transmission efficiency, and ensures more efficient data storage while achieving lossless decompression.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120856795B_ABST
    Figure CN120856795B_ABST
Patent Text Reader

Abstract

The present application relates to the field of data processing, more particularly, the present application relates to a kind of self-service customer service data storage method for electric power business, method includes: obtaining the self-service customer service data sequence of electric power business handling;In succession, each data in self-service customer service data sequence is encoded and is handled, to realize data storage;The encoding process of any one data includes: calculate the distribution deviation degree of inheritance real-time probability distribution model, control real-time probability distribution model update according to the distribution deviation degree of inheritance real-time probability distribution model, obtain the real-time probability of the data coding based on real-time probability distribution model and overall probability distribution model and overall probability, the comprehensive probability of real-time probability and overall probability is obtained by weighted calculation;Based on comprehensive probability, the data is encoded and handled using arithmetic coding algorithm. Improve self-service customer service data compression effect.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of data processing. More specifically, the present application relates to a self-service customer service data storage method for power service handling. BACKGROUND

[0002] The power self-service customer service system operates all day and night without interruption, generating massive interactive data with obvious time sequence characteristics, covering business types, specific question texts, system response records, user click behavior sequences, and other aspects of user inquiries. To effectively reduce long-term storage costs and improve data transmission efficiency, efficient lossless compression of these massive data is a key link in the data storage system.

[0003] In the existing technical system, arithmetic coding has become an advanced entropy coding method in this field due to its characteristics of approaching the entropy limit of the source and achieving ultra-high compression ratio. To adapt to the statistical characteristics of different data, adaptive arithmetic coding has been widely used. It dynamically maintains a global probability model during the encoding process, continuously learns and adapts to the symbol distribution characteristics of the input data stream, so that it does not need to have complete statistical information of the data in advance.

[0004] However, when traditional adaptive arithmetic coding is applied to this specific scenario of power customer service interactive data, its inherent limitations become apparent. The core problem is that the interactive data stream of the power customer service system is essentially a typical non-stationary data source, and its statistical characteristics will fluctuate dramatically and frequently due to the influence of various factors. Specifically, from the perspective of periodicity, user consultation hotspots show significant daily, monthly, and seasonal patterns. For example, from the daily cycle, the consultation peak in the daytime is mostly concentrated in new electricity installation, service handling, etc., while at night, fault repair is the main concern. From the monthly cycle, at the end and beginning of the month, electricity bill inquiries and payment methods-related consultations dominate. From the event-driven perspective, external events can also cause sudden changes in data distribution. For example, when a power supply company introduces a new electricity price policy, related inquiries about the new electricity price, ladder electricity price calculation, and policy interpretation will become high-frequency content in the short term, while these words may have been cold symbols before. Similarly, regional power outages can also lead to an increase in inquiries about power outage reasons and repair progress.

[0005] In the face of non-stationary characteristics of data, the single global model and slow incremental updating mechanism adopted by traditional adaptive arithmetic coding are difficult to cope with. For example, when the data distribution suddenly switches from the daily mode to the new policy release mode, the probability model that has adapted to the daily mode will completely fail - it will misjudge the newly appearing high-frequency symbol as a low-probability event, and then allocate too long a code, resulting in a significant decrease in compression rate. After the encoder processes a large number of new symbols, it slowly and painstakingly adjusts its single model to adapt to the new data distribution. During this long re-adaptation process, a large amount of storage space is wasted; more seriously, since the consultation hotspots of power customer service will frequently switch, the system will fall into a continuous and inefficient re-learning cycle, and its overall compression performance is far from the theoretical optimal level.

[0006] Therefore, how to design a kind of active perception of power customer service data driven by time, season, policy and other factors Context changes, and quickly switch to the optimal probability model that matches the current context well, while ensuring lossless decompression, significantly improving the compression rate of such non-stationary time series log data, has become a key technical problem to be solved in this field. SUMMARY

[0007] To solve the problem of how to set accurate probability models for each stage of data to improve data compression, the present application proposes a self-service customer service data storage method for power business handling, which comprises the following steps:

[0008] Obtain the self-service customer service data sequence of power business handling;

[0009] Encode each data in the self-service customer service data sequence in turn to realize data storage;

[0010] The encoding process of any one data includes:

[0011] Obtain the historical probability distribution model pool, the inherited real-time probability distribution model and the overall probability distribution model; calculate the distribution deviation degree of the inherited real-time probability distribution model, if the distribution deviation degree of the inherited real-time probability distribution model is greater than the preset distribution deviation degree threshold, select a historical probability distribution model from the probability distribution model pool to replace the inherited real-time probability distribution model to obtain the real-time probability distribution model for encoding the data, if the distribution deviation degree of the inherited real-time probability distribution model is not greater than the preset distribution deviation degree threshold, update the inherited real-time probability distribution model using the last data to obtain the real-time probability distribution model for encoding the data;

[0012] Based on the data encoding real-time probability distribution model and the overall probability distribution model, the real-time probability and the overall probability of the data encoding are obtained, and the comprehensive probability is calculated by weighting the real-time probability and the overall probability; and the data is encoded by using the arithmetic encoding algorithm based on the comprehensive probability.

[0013] The application solves the problem that the overall probability model cannot accurately describe the probability distribution characteristics at each position due to the uneven data distribution characteristics in the self-service customer data sequence by updating the probability distribution model at each position in the self-service customer data sequence in time, thereby improving the compression effect; further, the probability distribution model obtained before is stored in the compression process, thereby providing data basis for subsequent timely updating of the probability distribution model; further, the probability distribution model is updated by using new data in the compression process, thereby introducing the data distribution characteristics into the probability distribution model in time and effectively improving the accuracy of the probability distribution model.

[0014] Preferably, the obtaining of the historical probability distribution model pool, the inherited real-time probability distribution model and the overall probability distribution model comprises:

[0015] All kinds of data in the self-service customer data sequence are counted, and the obtained probability distribution histogram is taken as the overall probability distribution model;

[0016] The real-time probability distribution model used in the previous data encoding process is taken as the inherited real-time probability distribution model;

[0017] A set of all kinds of real-time probability distribution models used in the previous encoding process is taken as the historical probability distribution model pool.

[0018] Preferably, if there is no other data before the data, the overall probability distribution model is taken as the inherited real-time probability distribution model for encoding the data.

[0019] Preferably, the calculation of the distribution deviation degree of the inherited real-time probability distribution model comprises:

[0020] A preset number of data after the data are obtained as subsequent data; the probability values of each subsequent data in the inherited real-time probability distribution model and the overall probability distribution model are respectively recorded as the real-time probability value and the overall probability value of each subsequent data, the absolute value of the difference between the real-time probability value and the overall probability value is added to the accumulation of a preset zero parameter, and the quotient of the real-time probability value of each subsequent data and the accumulation is taken as the individual distribution deviation degree, and the normalized value of the mean of the individual distribution deviation degrees of all subsequent data is taken as the distribution deviation degree of the inherited real-time probability distribution model.

[0021] The application introduces real-time probability values to determine whether the original probability distribution model meets the current data distribution characteristics, and uses the difference between the real-time probability values and the overall probability values to exclude the interference of the current data distribution characteristics, thereby realizing accurate distribution deviation degree measurement.

[0022] Preferably, the real-time probability distribution model of the data code is obtained by replacing the inherited real-time probability distribution model with a historical probability distribution model in the probability distribution model pool, including:

[0023] A historical probability distribution model is selected from the probability distribution model pool, the probability values of the context data are obtained in the historical probability distribution model, the distribution deviation degree of the historical probability distribution model is calculated according to the probability values of all context data in the historical probability distribution model, and if the minimum value of the distribution deviation degree of all probability distribution models is not greater than a preset distribution deviation degree threshold, the historical probability distribution model corresponding to the minimum value of the distribution deviation degree is used to replace the inherited real-time probability distribution model to obtain the real-time probability distribution model of the data code.

[0024] The application selects a probability distribution model from the historical probability distribution model pool based on the distribution regularity reproducibility to realize fast updating of the probability distribution model, reduces the construction process of the probability distribution model, and guarantees the reliability of the probability distribution model.

[0025] Preferably, if the minimum value of the distribution deviation degree of all probability distribution models is greater than the preset distribution deviation degree threshold, the overall probability distribution model is used as the real-time probability distribution model of the data code.

[0026] Preferably, the real-time probability distribution model of the data code is obtained by updating the inherited real-time probability distribution model with the last data, including:

[0027] After the last data is added, the data is re-counted, and the probability distribution histogram obtained by the re-counting is used as the real-time probability distribution model of the data code.

[0028] The application introduces new data into the probability distribution model to make the real-time probability distribution model more consistent with the probability distribution characteristics of the data position.

[0029] Preferably, the real-time probability and the overall probability of the data code are obtained based on the real-time probability distribution model of the data code and the overall probability distribution model, including:

[0030] The probability of the current coding data is obtained in the real-time probability distribution model of the data code and the overall probability distribution model, and is recorded as the real-time probability and the overall probability of the current data code.

[0031] Preferably, the comprehensive probability is calculated by weighting the real-time probability and the overall probability, including:

[0032] The unbalance degree of the probability distribution is calculated, a normalized value of the unbalance degree of the probability distribution is used as the weight of the real-time probability, a difference between one and the normalized value of the unbalance degree is used as the weight of the overall probability, and the comprehensive probability is calculated by weighting the real-time probability and the overall probability based on the corresponding weights.

[0033] Preferably, the unbalance degree of the probability distribution is calculated, including:

[0034] The self-service customer service data sequence is evenly divided into a preset number of data segments.

[0035] The probability density functions of the data segments are obtained by statistics, and a mean value of the KL divergences of the probability density functions of all the two data segments is used as the unbalance degree of the probability distribution.

[0036] The application accurately reflects the unbalance of the probability distribution by analyzing the distribution difference between different data segments, thereby providing a basis for accurately setting the weights of the real-time probability distribution model and the overall probability distribution model.

[0037] The application has the following beneficial effects:

[0038] The application solves the problem that the overall probability model cannot accurately describe the probability distribution characteristics at each position due to the unbalanced data distribution characteristics in the self-service customer service data sequence by timely updating the probability distribution model of the data at each position in the self-service customer service data sequence, thereby improving the compression effect.

[0039] Further, in the compression process, the probability distribution model obtained previously is stored, thereby providing a data basis for subsequent timely updating of the probability distribution model.

[0040] Further, in the compression process, the probability distribution model is continuously updated by using new data as the compression proceeds, thereby timely introducing the data distribution characteristics into the probability distribution model and effectively improving the accuracy of the probability distribution model. BRIEF DESCRIPTION OF DRAWINGS

[0041] Figure 1 is a step flow chart of a self-service customer service data storage method for power service handling provided by embodiment 1 of the application. DETAILED DESCRIPTION

[0042] Embodiment 1:

[0043] Please refer to Figure 1Fig. 1 shows a flow chart of a self-service data storage method for power service handling according to an embodiment of the present application, which comprises the following steps:

[0044] S1: obtaining a self-service data sequence for power service handling.

[0045] Specifically, historical service data is obtained in a self-service system for power service handling, and the text data in the historical service data is converted into digital data by using an ASCII code table. The historical service data after digital conversion is arranged in time sequence, and the obtained sequence is recorded as a self-service data sequence for power service handling.

[0046] S2: sequentially encoding each data in the self-service data sequence to realize data storage.

[0047] S20: sequentially encoding each data in the self-service data sequence.

[0048] It should be noted that the self-service data is a non-stationary data source, and the distribution laws of each region in the self-service data sequence are different. In order to improve the compression amount, the probability distribution model needs to be switched in time according to the law variation during the encoding process of the data.

[0049] It should be further noted that the distribution law of the self-service data generally has interval recurrence, for example, the distribution law of the self-service data at night is different from that of the self-service data during the day, but the self-service data at night may be similar to that of the previous night. Therefore, the probability distribution model of the self-service data of the previous night can be used for reference when encoding the self-service data at night. Based on this feature, the probability distribution characteristics of each data can be obtained faster by using the historical probability distribution model for reference, thereby improving the compression effect.

[0050] Preferably, as an example, the encoding process of any one data comprises:

[0051] Step one: obtaining a historical probability distribution model pool, an inherited real-time probability distribution model and an overall probability distribution model.

[0052] Preferably, as an example, obtaining the historical probability distribution model pool, the inherited real-time probability distribution model and the overall probability distribution model comprises:

[0053] Statistically analyzing all kinds of data in the self-service data sequence, and taking the obtained probability distribution histogram as the overall probability distribution model;

[0054] Taking the real-time probability distribution model used in the previous data encoding process as the inherited real-time probability distribution model;

[0055] Specifically, if there is no other data before the data, the overall probability distribution model is taken as the inherited real-time probability distribution model.

[0056] The set of all real-time probability distribution models used in the previous encoding process is taken as the historical probability distribution model pool.

[0057] For ease of understanding, a specific example is described below.

[0058] The data of each value in the self-service customer service data sequence is counted to obtain the occurrence probability of the data of each value, and the histogram composed of the occurrence probabilities of all values is taken as the overall probability distribution model. Z .

[0059] If the real-time probability distribution model used in the previous data encoding process is , the is taken as the real-time probability distribution. If there is no other data before the data, the overall probability distribution model Z is taken as the inherited real-time probability distribution model.

[0060] The real-time probability distribution model used in the previous encoding process is , and the set of all real-time probability distribution models is taken as the historical probability distribution model pool .

[0061] Further, by storing the probability distribution model formed by the previous encoding process, when other probability distribution rules are reproduced subsequently, the probability distribution model stored is directly selected, thereby reducing the time for constructing the probability distribution model.

[0062] Step two: calculate the distribution deviation degree of the inherited real-time probability distribution model.

[0063] Preferably, as an example, the distribution deviation degree of the inherited real-time probability distribution model is calculated, including:

[0064] The preset number of data from the data is taken as the subsequent data; the probability values of each subsequent data in the inherited real-time probability distribution model and the overall probability distribution model are respectively recorded as the real-time probability value and the overall probability value of each subsequent data, the difference absolute value between the real-time probability value and the overall probability value is calculated, and the cumulative sum of the preset zero parameter is added, the quotient of the real-time probability value of each subsequent data and the cumulative sum is taken as the individual distribution deviation degree, and the normalized value of the mean of the individual distribution deviation degrees of all subsequent data is taken as the distribution deviation degree of the inherited real-time probability distribution model.

[0065] For ease of understanding, a specific example is described below:

[0066] Assuming that the real-time probability values of the 5 following data are 0.01, 0.03, 0.02, 0.04, 0 respectively, the overall probability values are 0.3, 0.12, 0.11, 0.20, 0.21 respectively, and the distribution deviation degrees of the 5 following data based on the 5 following data are 0.29, 0.12, 0.11, 0.20, 0.21 respectively.

[0067] .

[0068] It can be understood that the probability values of the continuous data after the data in the inherited real-time probability distribution model are small, which indicates that the data after the data are more new data relative to the inherited real-time probability distribution model, and thus the context information has changed from the data, and the original inherited real-time probability distribution model is not accurate for encoding. Further, the greater the absolute value of the difference between the real-time probability value and the overall probability value, the greater the possibility that the real-time probability value obtained by using the inherited real-time probability distribution model is an accurate probability value, and thus the greater the possibility that the inherited real-time probability distribution model deviates from the distribution characteristics of the data and the data after the data.

[0069] Step three: if the distribution deviation degree of the inherited real-time probability distribution model is greater than the preset distribution deviation degree threshold, a historical probability distribution model is selected from the probability distribution model pool to replace the inherited real-time probability distribution model to obtain the real-time probability distribution model for encoding the data, and if the distribution deviation degree of the inherited real-time probability distribution model is not greater than the preset distribution deviation degree threshold, the inherited real-time probability distribution model is updated by using the previous data to obtain the real-time probability distribution model for encoding the data.

[0070] Preferably, as an example, if the distribution deviation degree of the inherited real-time probability distribution model is greater than the preset distribution deviation degree threshold, a historical probability distribution model is selected from the probability distribution model pool to replace the inherited real-time probability distribution model to obtain the real-time probability distribution model for encoding the data, and if the distribution deviation degree of the inherited real-time probability distribution model is not greater than the preset distribution deviation degree threshold, the inherited real-time probability distribution model is updated by using the previous data to obtain the real-time probability distribution model for encoding the data, including:

[0071] If the distribution deviation degree of the inherited real-time probability distribution model is greater than the preset distribution deviation degree threshold, an optional historical probability distribution model in the probability distribution model pool is selected, the probability values of each context data are obtained in the historical probability distribution model, and the distribution deviation degree of the historical probability distribution model is calculated according to the probability values of all context data in the historical probability distribution model. If the minimum value of the distribution deviation degrees of all probability distribution models is not greater than the preset distribution deviation degree threshold, the historical probability distribution model corresponding to the minimum value of the distribution deviation degrees is used to replace the inherited real-time probability distribution model to obtain the real-time probability distribution model of the data coding. If the minimum value of the distribution deviation degrees of all probability distribution models is greater than the preset distribution deviation degree threshold, the overall probability distribution model is used as the real-time probability distribution model of the data coding.

[0072] If the distribution deviation degree of the inherited real-time probability distribution model is not greater than the preset distribution deviation degree threshold, the data is re-counted after the last data is added, and the probability distribution histogram obtained by the re-counting is used as the real-time probability distribution model of the data coding.

[0073] In order to facilitate understanding, a specific example is used for illustration as follows:

[0074] Suppose that the distribution deviation degree of the inherited real-time probability distribution model is 0.87, which is greater than the preset distribution deviation degree threshold 0.6. Then the distribution deviation degrees of each historical probability distribution model are calculated. If the minimum value of the distribution deviation degrees of all historical probability distribution models is 0.5, which is not greater than the preset distribution deviation degree threshold, the historical probability distribution model corresponding to the minimum value of the distribution deviation degrees of all historical probability distribution models is used to replace the inherited real-time probability distribution model to obtain the real-time probability distribution model of the data coding.

[0075] It can be understood that the distribution deviation degree of the inherited real-time probability distribution model reflects the situation that the subsequent data conforms to the inherited probability distribution model. The greater the distribution deviation degree, the greater the degree of deviation of the subsequent data from the inherited probability distribution model. Therefore, if the distribution deviation degree is greater than the threshold, it means that the inherited probability distribution model does not conform to the probability distribution characteristics of the subsequent data, and a new probability distribution model is needed to replace the inherited real-time probability distribution model. If the distribution deviation degree is not greater than the preset threshold, it means that the inherited probability distribution model still conforms to the probability distribution characteristics of the subsequent data, and only the new data needs to be used to update the model.

[0076] ​Further, since the probability distribution has reproducibility, there is a high probability that the probability distribution model of the subsequent data exists in the historical probability distribution model pool, so that the historical probability distribution model meeting the requirements is screened out in the historical probability distribution model pool to replace the inherited real-time probability distribution model. Of course, there may be no probability distribution model in the historical probability distribution model pool, at this time, the overall probability distribution model is taken as a benchmark to re-construct a new probability distribution model.

[0077] The above embodiments relate to the historical probability distribution model pool and the distribution deviation degree under the historical probability distribution model, and the determination method of the historical probability distribution model pool and the distribution deviation degree under the historical probability distribution model is described below.

[0078] The construction method of the historical probability distribution model pool includes:

[0079] If the inherited real-time probability distribution model is replaced by the historical probability distribution model, the replaced inherited real-time probability distribution model is stored in the historical probability distribution model pool as a kind of historical probability distribution model.

[0080] In order to facilitate understanding, a specific example is described below:

[0081] Suppose the distribution deviation degree of the inherited real-time probability distribution model is greater than the preset distribution deviation degree threshold, the historical probability distribution model corresponding to the minimum value of the distribution deviation degree is selected from the historical probability distribution model pool to replace the inherited real-time probability distribution model , and the replaced inherited real-time probability distribution model is stored in the historical probability distribution model pool as a kind of historical probability distribution model.

[0082] In particular, for the initial stage, if there is no historical probability distribution model in the historical probability distribution model pool, it is not necessary to screen the historical probability distribution model in the historical probability distribution model pool to replace the inherited real-time probability distribution model, and the probability distribution model is directly re-constructed based on the overall probability distribution model by continuous updating.

[0083] In addition, the distribution deviation degree under the historical probability distribution model is calculated according to the probability value of all subsequent data under the historical probability distribution model, including:

[0084] The absolute value of the difference between the real-time probability value of each context data under the historical probability distribution model and the overall probability value is added to the accumulation of the preset zero prevention parameter, and the quotient of the real-time probability value of each context data under the historical probability distribution model and the accumulation is taken as the individual distribution deviation degree of each context data under the historical probability distribution model. The normalized value of the mean of the individual distribution deviation degrees of all context data under the historical probability distribution model is taken as the distribution deviation degree of the historical probability distribution model.

[0085] Step four: obtaining the real-time probability and the overall probability of the data coding based on the real-time probability distribution model and the overall probability distribution model of the data coding, and calculating the comprehensive probability by weighting the real-time probability and the overall probability.

[0086] Preferably, as an example, the real-time probability and the overall probability of the data coding are obtained based on the real-time probability distribution model and the overall probability distribution model of the data coding, and the comprehensive probability is calculated by weighting the real-time probability and the overall probability, including:

[0087] The probability of the current coding data is obtained in the real-time probability distribution model and the overall probability distribution model of the data coding, which is recorded as the real-time probability and the overall probability of the current data coding.

[0088] The self-service customer service data sequence is uniformly divided into a preset number of data segments, and the probability density functions of the data segments are obtained by statistical analysis. The mean of the KL divergences of the probability density functions of all two data segments is taken as the unevenness of the probability distribution, the normalized value of the unevenness of the probability distribution is taken as the weight of the real-time probability, the difference between one and the normalized value of the unevenness is taken as the weight of the overall probability, and the comprehensive probability is calculated by weighting the real-time probability and the overall probability based on the corresponding weights.

[0089] It can be understood that the unevenness of the probability distribution reflects the uneven distribution of each region in the self-service customer service data sequence. The more uneven the distribution, the greater the probability distribution difference of each region in the self-service customer service data sequence, and the worse the compression effect obtained by using the probability value of the overall probability distribution model for compression. Therefore, it is necessary to refer to the real-time probability distribution model, and the decision degree of the overall probability distribution model and the real-time probability distribution model on the coding process is adjusted based on the unevenness of the probability distribution, so as to obtain a better coding effect and improve the data compression amount.

[0090] Step five: encoding the data by using an arithmetic coding algorithm based on the comprehensive probability.

[0091] Preferably, as an example, the data is encoded by using an arithmetic coding algorithm based on the comprehensive probability, including:

[0092] The latest comprehensive probability of each value is obtained, the comprehensive probability of the data is used to replace the original comprehensive probability of the corresponding value of the data, the proportion of the comprehensive probability of each value is calculated as the probability of each value based on the replaced comprehensive probability of the corresponding value of the data, and the data is encoded by using an arithmetic coding algorithm based on the probability of each value.

[0093] The data is encoded by using an arithmetic coding algorithm based on the probability of each value, which is prior art and will not be described here.

[0094] In order to facilitate understanding, a specific example is used for illustration as follows:

[0095] Suppose that there are 5 values in the self-service customer service data sequence, and the latest comprehensive probability of each value is 0.1, 0.4, 0.3, 0.1, and 0.1 respectively, the calculated comprehensive probability of the data is 0.2, the original comprehensive probability of the corresponding value is 0.3, 0.2 is used to replace the original comprehensive probability 0.3, and the probability of each value is calculated as 0.11, 0.44, 0.22, 0.11, and 0.11 respectively.

[0096] The data is encoded by using an arithmetic coding algorithm based on the probability of each value.

[0097] S21: data storage is realized.

[0098] Preferably, as an example, data storage is realized, including:

[0099] The encoding sequence obtained from the self-service customer service data sequence is stored.

[0100] Thus, the embodiment is completed.

[0101] Embodiment 2:

[0102] The embodiment is a specific embodiment of a self-service customer service data storage method for power service handling.

[0103] In order to illustrate the technical effect of the embodiment 1 of the present application, the technical effect of the technical solution will be illustrated by combining some experimental process data.

[0104] Experimental goal: to verify the compression effect of the algorithm.

[0105] Experimental effect display:

[0106] The storage size of the self-service customer data sequence used in the experiment is 4000 bytes. The self-service customer data sequence is compressed by using the method in embodiment 1 and arithmetic coding respectively. After the self-service customer data sequence is compressed by using the method in embodiment 1, the storage size is 53 bytes, and the corresponding compression ratio is 75.47:1. After the self-service customer data sequence is compressed by using the arithmetic coding algorithm, the storage size is 284 bytes, and the corresponding compression ratio is 14.08:1. It is found by comparison that the compression effect of the method in embodiment 1 is better than that of the arithmetic coding algorithm.

[0107] The above merely describes preferred embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A self-service customer data storage method for power service, characterized by, The application relates to a power service self-service data sequence acquisition method and device. The data in the self-service data sequence is sequentially coded to realize data storage. The coding process of any data comprises the following steps: The probability distribution histogram obtained by counting all the data in the self-service data sequence is used as the overall probability distribution model. The real-time probability distribution model used in the previous data coding process is used as the inherited real-time probability distribution model; all the real-time probability distribution models used in the previous coding process form a historical probability distribution model pool. The distribution deviation degree of the inherited real-time probability distribution model is calculated; if the distribution deviation degree of the inherited real-time probability distribution model is greater than a preset distribution deviation degree threshold, a historical probability distribution model in the probability distribution model pool is selected to replace the inherited real-time probability distribution model to obtain the real-time probability distribution model for coding the data; if the distribution deviation degree of the inherited real-time probability distribution model is not greater than the preset distribution deviation degree threshold, the inherited real-time probability distribution model is updated by using the previous data to obtain the real-time probability distribution model for coding the data. The real-time probability and the overall probability of the data coding are obtained based on the real-time probability distribution model and the overall probability distribution model; the comprehensive probability is obtained by weighting the real-time probability and the overall probability; and the data is coded by using the arithmetic coding algorithm based on the comprehensive probability. If there is no other data before the data, the overall probability distribution model is used as the inherited real-time probability distribution model for coding the data.

2. The self-service customer data storage method for power service according to claim 1, wherein, The distribution deviation degree of the inherited real-time probability distribution model is calculated by the following steps:

3. The self-service customer data storage method for power service handling according to claim 1, wherein, The preset number of data after the data are obtained as context data; the probability values of the context data in the inherited real-time probability distribution model and the overall probability distribution model are respectively recorded as real-time probability values and overall probability values of the context data; the absolute value difference between the real-time probability values and the overall probability values is calculated; a preset zero parameter is added to obtain an accumulation; the real-time probability values of the context data are divided by the accumulation to obtain individual distribution deviation degrees; and the normalized value of the mean of the individual distribution deviation degrees is used as the distribution deviation degree of the inherited real-time probability distribution model. The historical probability distribution model in the probability distribution model pool is selected to replace the inherited real-time probability distribution model to obtain the real-time probability distribution model for coding the data by the following steps:

4. The self-service customer data storage method for power service according to claim 3, wherein, The historical probability distribution model in the probability distribution model pool is selected; the probability values of the context data in the historical probability distribution model are obtained; the distribution deviation degrees of the historical probability distribution model are calculated according to the probability values of all the context data in the historical probability distribution model; if the minimum value of the distribution deviation degrees of all the probability distribution models is not greater than the preset distribution deviation degree threshold, the historical probability distribution model corresponding to the minimum value is used to replace the inherited real-time probability distribution model to obtain the real-time probability distribution model for coding the data. If the minimum value of the distribution deviation degrees of all the probability distribution models is greater than the preset distribution deviation degree threshold, the overall probability distribution model is used as the real-time probability distribution model for coding the data.

5. The self-service customer data storage method for power service handling according to claim 4, wherein, ​ 6. The self-service customer data storage method for power service handling according to claim 1, wherein, The real-time probability distribution model coded by the data is obtained by updating the last data inheritance real-time probability distribution model, comprising: After adding the last data, the data is re-counted, and the probability distribution histogram obtained by re-counting is taken as the real-time probability distribution model coded by the data.

7. The self-service customer data storage method for power service handling according to claim 1, wherein, The real-time probability and the overall probability coded by the data are obtained based on the real-time probability distribution model coded by the data and the overall probability distribution model, comprising: The probability of the current coding data is obtained in the real-time probability distribution model coded by the data and the overall probability distribution model, and is recorded as the real-time probability and the overall probability coded by the data.

8. The self-service customer data storage method for power service handling according to claim 1, wherein, The comprehensive probability is obtained by weighted calculation of the real-time probability and the overall probability, comprising: The unbalance degree of the probability distribution is calculated, the normalized value of the unbalance degree of the probability distribution is taken as the weight of the real-time probability, the difference between one and the normalized value of the unbalance degree is taken as the weight of the overall probability, and the real-time probability and the overall probability are weighted calculated based on the corresponding weights to obtain the comprehensive probability.

9. The self-service customer data storage method for power service handling according to claim 8, wherein, The unbalance degree of the probability distribution is calculated, comprising: The self-service customer service data sequence is uniformly divided into a preset number of data segments; The probability density function of each data segment is obtained by counting each data segment, and the mean value of the KL divergence of the probability density functions of all two data segments is taken as the unbalance degree of the probability distribution.

Citation Information

Patent Citations

  • Remote channel message compression method and system for electricity consumption collection system

    CN105553625A

  • Probability estimation in multi-symbol entropy coding

    CN119946311A