CN109067775A - A kind of communication data compression, decompressing method, apparatus and system - Google Patents

A kind of communication data compression, decompressing method, apparatus and system Download PDF

Info

Publication number
CN109067775A
CN109067775A CN201811057233.XA CN201811057233A CN109067775A CN 109067775 A CN109067775 A CN 109067775A CN 201811057233 A CN201811057233 A CN 201811057233A CN 109067775 A CN109067775 A CN 109067775A
Authority
CN
China
Prior art keywords
data
phasor
frame
data frame
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811057233.XA
Other languages
Chinese (zh)
Other versions
CN109067775B (en
Inventor
谢伟
陶维青
马梦宇
张勇
方陈
时志雄
刘舒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei University of Technology
State Grid Shanghai Electric Power Co Ltd
Original Assignee
Hefei University of Technology
State Grid Shanghai Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei University of Technology, State Grid Shanghai Electric Power Co Ltd filed Critical Hefei University of Technology
Priority to CN201811057233.XA priority Critical patent/CN109067775B/en
Publication of CN109067775A publication Critical patent/CN109067775A/en
Application granted granted Critical
Publication of CN109067775B publication Critical patent/CN109067775B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • H04L67/5651Reducing the amount or size of exchanged application data

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention discloses a kind of communication data compression, decompressing method, apparatus and system, method includes: to receive configuration frame, data frame;Data frame is divided into data frame set, judges whether it is first frame data of this wheel compression;If so, the numerical value of the SYNC field of present frame is changed to preset field, using the next frame of present frame as present frame;If it is not, carrying out variable compression to present frame obtains variable section Δ DATA_Frame;Judge whether compressed data frame reaches the compression upper limit according to compressometer number Count_byte;Judge that compression is time-consuming and whether is greater than or equal to default time limit T;By DATA_Frame1, the combination of compressometer number Count_byte and variable section Δ DATA_Frame is sent in WAMS system the main website of data transmitted by sending device for receiving data as compressed data.Using the embodiment of the present invention, the transmitting efficiency of information can be improved.

Description

A kind of communication data compression, decompressing method, apparatus and system
Technical field
The present invention relates to a kind of compression of communication data and decompressing methods, are more particularly to a kind of compression of communication data, decompression Method, apparatus and system.
Background technique
Power distribution network WAMS (Wide Area Measurement System, wide-area monitoring systems) is to be applied to power distribution network Wide-area monitoring systems, using synchronized phasor measurement technology, by arranging distribution line PDC in each distribution line outlet head end (Phasor Data Concentrator, phasor data concentrator), in each section of arrangement distribution line PMU of distribution line (Phasor Measurement Unit, synchronous phasor measurement unit) is realized main to distribution line synchronized phasor and power distribution network The real time high-speed rate of data acquires.Power distribution network WAMS system includes the PMU equipment for data acquisition, is used for data compression and hair PDC equipment or NIC (Network Interface Controller, the communication adapter) equipment sent;Then PMU will be acquired Data be sent to PDC perhaps NIC PDC or NIC, by PMU acquire data compressed after be sent to power distribution network WAMS system WAMS main website in system.Under normal conditions, the communication protocol that power distribution network WAMS is used are as follows: GBT 26865.2-2011 electric system Real-time dynamic monitoring system part 2: Data Transport Protocol.The communication system of power distribution network WAMS has the following characteristics that communication network Structure is complicated for network, and communication end node is large number of;Communication distance is shorter;Amount of communication data is big.In order to meet power distribution network WAMS Construction in requirement to communication system, a variety of communication of power system modes need to be used cooperatively.
But since PDC or NIC are to be connect by optical fiber with PMU, communication frequency can achieve 100 frame per second, but It is that the transmission rate for the Radio Network System that PDC or NIC send data to WAMS main website is lower than 100 frame per second, therefore, meeting Cause PDC or the NIC information content included in the data of the unit capacity of transmission very few, and then leads to information transfer efficiency It is lower.
Summary of the invention
Technical problem to be solved by the present invention lies in provide a kind of communication data compression, decompressing method, device and be System, to improve information transfer efficiency.
The present invention is to solve above-mentioned technical problem by the following technical programs:
In a first aspect, being applied to power distribution network WAMS system the embodiment of the invention provides a kind of communication data compression method The middle data transmitting equipment that data are sent to main website, which comprises
A: the configuration frame that the WAMS main website in WAMS system is sent is received, the data frame that each PMU unit is sent is received;It will The data frame is divided at least two data frame set;
B: it is directed to each data frame set, using first data frame in the data frame set as current data Frame, judge current data frame whether be this wheel compression the first frame data;
C: if so, the numerical value of the SYNC field of the current data frame is changed to preset field, and compressometer is digital The value of Count_byte is set as 0;The current data frame is stored into the DATA_Frame1 section to caching array TEMP head end, Judge whether the compression time-consuming of this wheel compression is greater than or equal to default time limit T;If the compression time-consuming of this wheel compression is greater than or equal to Default time limit T, executes step F, if the compression time-consuming of this wheel compression is less than default time limit T, by the next of the current data frame Frame returns as current data frame and executes the step B;
D: if it is not, by the sum of the current value of compressometer number Count_byte and preset step-length as the compressometer number Current value;According to the difference of the phasor of current data frame phasor corresponding with the last data frame of the current data frame, Variable compression is carried out to the current data frame and obtains variable section Δ DATA_Frame;
E: judge whether the data frame that this wheel compression is compressed reaches compression according to the compressometer number Count_byte The upper limit;If the data frame that this wheel compression is compressed reaches the compression upper limit, step F is executed;If the data frame that this wheel compression is compressed The upper limit is not up to compressed, judges whether the compression time-consuming of this wheel compression is greater than or equal to default time limit T;If the compression of this wheel compression Time-consuming executes step F more than or equal to default time limit T, if the compression time-consuming of this wheel compression is less than default time limit T, works as by described in The next frame of preceding data frame returns as current data frame and executes the step B;
F: in the first frame that the current data frame is this wheel compression, and the compression time-consuming of this wheel compression is greater than or equal in advance If when time limit T, the combination of the DATA_Frame1, the compressometer number Count_byte are sent out as compressed data The main website of data transmitted by sending device for receiving data is sent into WAMS system;It is being epicycle except the current data frame The first frame of compression, and when the compression time-consuming of this wheel compression is greater than or equal to default time limit T other than in the case where, will be described The combination of DATA_Frame1, the compressometer number Count_byte and the variable section Δ DATA_Frame are as compression Data afterwards are sent in WAMS system the main website of data transmitted by sending device for receiving data.
Optionally, the data transmitting equipment includes at least: one of PDC unit and NIC unit.
Optionally, the step A, comprising:
Receive what each PMU unit was sent, the data frame for the track data itself acquired being generated according to configuration frame.
Optionally, the phasor according to current data frame phase corresponding with the last data frame of the current data frame The difference of amount carries out variable compression to the current data frame and obtains variable section Δ DATA_Frame, comprising:
D1: by the phasor number n for including in current data frame divided by j, b phasor of a group phasor and remainder is obtained, and b is small In j;
D2: since first group of phasor in a group phasor, using first group of vector as current group vector, for working as Each of preceding group of phasor phasor, by the corresponding phasor of the amplitude of the phasor and the last data frame of the current data frame Amplitude be compared, obtain first amplitude variable quantity;The angle of each phasor of the current data frame is worked as with described The angle that each of the last data frame of preceding data frame corresponds to phasor is compared, and first angle variable quantity is obtained, according to institute It states first amplitude variable quantity and the first angle variable quantity generates the first marking variable;By the first amplitude variable quantity and institute It states first angle variable quantity and synthesizes the first variable;
D3: by the corresponding first marking variable storage of the current group of phasor into mark array flag;By described first Variable storage is into variable array data;Then it using next group of phasor of current group phasor as current group phasor, and returns and holds The row D2 step, until a group phasor is all processed;
D4: for each of b phasor phasor, by the previous number of the amplitude of the phasor and the current data frame It is compared according to the amplitude of the correspondence phasor of frame, obtains the second amplitude variable quantity;By the angle of the phasor and the current number It is compared according to the angle of the correspondence phasor of the last data frame of frame, obtains second angle variable quantity;According to second amplitude Variable quantity and the second angle variable quantity generate the second marking variable, by second marking variable storage to mark array In flag;The second amplitude variable quantity and the second angle variable quantity are synthesized into the second variable;By second variable It stores in variable array data;
D5 is by the mark array flag and the variable array data composition variable section Δ DATA_Frame.
Optionally, the width of the amplitude by the phasor and the corresponding phasor of the last data frame of the current data frame Value is compared, and obtains first amplitude variable quantity;By the angle of each phasor of the current data frame and the current number It is compared according to each angle for corresponding to phasor of the last data frame of frame, first angle variable quantity is obtained, according to described the One amplitude variable quantity and the first angle variable quantity generate the first marking variable, comprising:
1) k is set, to count, initial value 0 judges whether k is less than j:
2), if so, by the last data frame of the amplitude r1 of each phasor of current data frame and the current data frame Each correspond to phasor amplitude p1 difference H1 as first amplitude variable quantity;By each phasor of current data frame Angle r2 is with the difference H2 of the angle p2 of each corresponding phasor of the last data frame of the current data frame as first jiao Spend variable quantity;And judge whether the absolute value of H1 and H2 is respectively less than 8;
If 3), the absolute value of H1 and H2 is respectively less than 8, the memory space of 0.5 byte is respectively distributed for H1 and H2, updates first Marking variable sign [k] is 0x00;Judge whether the value of H1 is negative, if the value of H1 is negative, by the value of H1 be updated to H1 and 8 it With, and judge whether the value of H2 is negative;If the value of H1 is positive, judge whether the value of H2 is negative, if the value of H2 is negative, by the value of H2 It is updated to the sum of H2 and 8;By H1 and H2 storage into caching array one;
If 4), the absolute value of H1 and H2 is not respectively less than 8, judge whether the absolute value of H1 and H2 is respectively less than 128;
If 5), the absolute value of H1 and H2 is respectively less than 128, the memory space of 1 byte is respectively distributed for H1 and H2, updates first Marking variable sign [k] is 0x01;Judge whether the value of H1 is negative, if the value of H1 is negative, by the value of H1 be updated to H1 and 128 it With, and judge whether the value of H2 is negative;If the value of H1 is positive, the step of whether value for judging H2 is negative is executed, if H2 Value is negative, and the value of H2 is updated to the sum of H2 and 128;By H1 and H2 storage into caching array two;
If 6), the absolute value of H1 and H2 is not respectively less than 128, judge whether the absolute value of H1 and H2 is respectively less than 2048;
If 7), the absolute value of H1 and H2 is respectively less than 2048, the memory space of 1.5 bytes is respectively distributed for H1 and H2, is updated First marking variable sign [k] is 0x02;Judge whether the value of H1 is negative, if the value of H1 is negative, by the value of H1 be updated to H1 with The sum of 2048, and judge whether the value of H2 is negative;If the value of H1 is positive, the step of whether value for judging H2 is negative executed; If the value of H2 is negative, the value of H2 is updated to the sum of H2 and 2048;By H1 and H2 storage into caching array three;
If 8), the absolute value of H1 and H2 is not respectively less than 2048, updating the first marking variable sign [k] is=0x03, so Afterwards by r1, r2 storage is into caching array four;
9) value of k, is updated to k+1, and returns and executes the step 1);Until each of described current group of vector Vector is all processed;
10), when the value of k is greater than or equal to j, the D3 step is executed.
Optionally, described to store corresponding first marking variable of the current group of phasor into mark array flag, packet It includes:
The corresponding first marking variable storage of each of phasor phasor will currently be organized into temporary identifier array sign, Then by the set storage of corresponding first marking variable of each phasor currently organized into mark array flag.
Optionally, the preset step-length is 1.
Optionally, the preset field are as follows: 0xAA63.
The embodiment of the invention also provides a kind of communication data decompressing method, it is applied to receive data transmission in WAMS system The main website of data transmitted by equipment, which comprises
G: the compressed data frame corresponding with the data frame set that the data transmitting equipment is sent is received;
H: whether the SYNC field for judging the data frame is preset field, executes the G step if it is not, returning;If so, Execute I step;
I: by the data of L byte after compressometer number Count_byte, sequence putting identification array flag, by L Data after a byte are put into variable array data;
J: sequentially taking out j mark from the mark array flag and be put into array sign, then according to sign content, Sequence reads the data that length is corresponded in the variable array data, and according to data frame corresponding with the variable array data Last data frame phasor, restore with according to sign content read data corresponding to original phasor, will be described original Phasor sequence is stored into array Full_data;
K: sequentially taking out b mark from the mark array flag and be put into array sign, then according to sign content, Sequence reads the data that length is corresponded in the variable array data, and according to data frame corresponding with the variable array data Last data frame phasor, restore with according to sign content read data corresponding to original phasor, will be described original Phasor sequence is stored into array Full_data;
L: other fields in addition to phasor are generated according to configuration frame and first frame data frame, by other fields generated With the data combination producing complete data frame in array Full_data.
Optionally, the method also includes:
Whether the data frame after judging obtained decompression is wrong or leakage is sent out, if so, to the data transmitting equipment Order is reissued in transmission, so that the data transmitting equipment transfers corresponding mistake or leakage hair data frame.
The embodiment of the invention also provides a kind of communication data compression set, it is applied in power distribution network WAMS system to main website The data transmitting equipment of data is sent, described device includes:
First receiving module receives each PMU unit for receiving the configuration frame of the transmission of the WAMS main website in WAMS system The data frame of transmission;The data frame is divided at least two data frame set, wherein include data a in the configuration frame And b;
First judgment module, for being directed to each data frame set, by first data in the data frame set Frame as current data frame, judge current data frame whether be this wheel compression the first frame data;
First setup module, for the judging result of the first judgment module be in the case where, will it is described currently The numerical value of the SYNC field of data frame is changed to preset field, and sets 0 for the value of compressometer number Count_byte;It will be described Current data frame storage judges whether the compression time-consuming of this wheel compression is big to the DATA_Frame1 section of caching array TEMP head end In or equal to default time limit T;If the compression time-consuming of this wheel compression is greater than or equal to default time limit T, the second setup module is triggered, if The compression time-consuming of this wheel compression is less than default time limit T, using the next frame of the current data frame as current data frame, and triggers First judgment module;
Compression module, for the judging result of the first judgment module be it is no in the case where, by compressometer number The current value of the sum of current value and preset step-length of Count_byte as the compressometer number;According to the current data frame Phasor phasor corresponding with the last data frame of the current data frame difference, to the current data frame carry out variable compression Obtain variable section Δ DATA_Frame;
Second judgment module, for judging data that this wheel compression is compressed according to the compressometer number Count_byte Whether frame reaches the compression upper limit;If the data frame that this wheel compression is compressed reaches the compression upper limit, step F is executed;If this wheel compression The data frame compressed not up to compresses the upper limit, judges whether the compression time-consuming of this wheel compression is greater than or equal to default time limit T;If The compression time-consuming of this wheel compression is greater than or equal to default time limit T, the second setup module is triggered, if the compression time-consuming of this wheel compression is small The first judgment module is triggered using the next frame of the current data frame as current data frame in default time limit T;
Second setup module, in the first frame that the current data frame is this wheel compression, and the compression of this wheel compression When time-consuming is greater than or equal to default time limit T, by the DATA_Frame1, the group cooperation of the compressometer number Count_byte The main website of data transmitted by sending device for receiving data is sent in WAMS system for compressed data;Except described Other than current data frame is the first frame of this wheel compression, and the compression time-consuming of this wheel compression is greater than or equal to when presetting time limit T In the case of, by the DATA_Frame1, the compressometer number Count_byte and the variable section Δ DATA_Frame Combine the main website that data transmitted by sending device for receiving data are sent in WAMS system as compressed data.
Optionally, the data transmitting equipment includes at least: one of PDC unit and NIC unit.
Optionally, first receiving module, is also used to:
Receive what each PMU unit was sent, the data frame for the track data itself acquired being generated according to configuration frame.
Optionally, the compression module, is also used to:
D1: by the phasor number n for including in current data frame divided by j, b phasor of a group phasor and remainder is obtained, and b is small In j;
D2: since first group of phasor in a group phasor, using first group of vector as current group vector, for working as Each of preceding group of phasor phasor, by the corresponding phasor of the amplitude of the phasor and the last data frame of the current data frame Amplitude be compared, obtain first amplitude variable quantity;The angle of each phasor of the current data frame is worked as with described The angle that each of the last data frame of preceding data frame corresponds to phasor is compared, and first angle variable quantity is obtained, according to institute It states first amplitude variable quantity and the first angle variable quantity generates the first marking variable;By the first amplitude variable quantity and institute It states first angle variable quantity and synthesizes the first variable;
D3: by the corresponding first marking variable storage of the current group of phasor into mark array flag;By described first Variable storage is into variable array data;Then it using next group of phasor of current group phasor as current group phasor, and returns and holds The row D2 step, until a group phasor is all processed;
D4: for each of b phasor phasor, by the previous number of the amplitude of the phasor and the current data frame It is compared according to the amplitude of the correspondence phasor of frame, obtains the second amplitude variable quantity;By the angle of the phasor and the current number It is compared according to the angle of the correspondence phasor of the last data frame of frame, obtains second angle variable quantity;According to second amplitude Variable quantity and the second angle variable quantity generate the second marking variable, by second marking variable storage to mark array In flag;The second amplitude variable quantity and the second angle variable quantity are synthesized into the second variable;By second variable It stores in variable array data;
D5: by the mark array flag and the variable array data composition variable section Δ DATA_Frame.
Optionally, compression module is also used to:
1) k is set, to count, initial value 0 judges whether k is less than j:
2), if so, by the last data frame of the amplitude r1 of each phasor of current data frame and the current data frame Each correspond to phasor amplitude p1 difference H1 as first amplitude variable quantity;By each phasor of current data frame Angle r2 is with the difference H2 of the angle p2 of each corresponding phasor of the last data frame of the current data frame as first jiao Spend variable quantity;And judge whether the absolute value of H1 and H2 is respectively less than 8;
If 3), the absolute value of H1 and H2 is respectively less than 8, the memory space of 0.5 byte is respectively distributed for H1 and H2, updates first Marking variable sign [k] is 0x00;Judge whether the value of H1 is negative, if the value of H1 is negative, by the value of H1 be updated to H1 and 8 it With, and judge whether the value of H2 is negative;If the value of H1 is positive, judge whether the value of H2 is negative, if the value of H2 is negative, by the value of H2 It is updated to the sum of H2 and 8;By H1 and H2 storage into caching array one;
If 4), the absolute value of H1 and H2 is not respectively less than 8, judge whether the absolute value of H1 and H2 is respectively less than 128;
If 5), the absolute value of H1 and H2 is respectively less than 128, the memory space of 1 byte is respectively distributed for H1 and H2, updates first Marking variable sign [k] is 0x01;Judge whether the value of H1 is negative, if the value of H1 is negative, by the value of H1 be updated to H1 and 128 it With, and judge whether the value of H2 is negative;If the value of H1 is positive, the step of whether value for judging H2 is negative is executed, if H2 Value is negative, and the value of H2 is updated to the sum of H2 and 128;By H1 and H2 storage into caching array two;
If 6), the absolute value of H1 and H2 is not respectively less than 128, judge whether the absolute value of H1 and H2 is respectively less than 2048;
If 7), the absolute value of H1 and H2 is respectively less than 2048, the memory space of 1.5 bytes is respectively distributed for H1 and H2, is updated First marking variable sign [k] is 0x02;Judge whether the value of H1 is negative, if the value of H1 is negative, by the value of H1 be updated to H1 with The sum of 2048, and judge whether the value of H2 is negative;If the value of H1 is positive, the step of whether value for judging H2 is negative executed; If the value of H2 is negative, the value of H2 is updated to the sum of H2 and 2048;By H1 and H2 storage into caching array three;
If 8), the absolute value of H1 and H2 is not respectively less than 2048, updating the first marking variable sign [k] is=0x03, so Afterwards by r1, r2 storage is into caching array four;
9) value of k, is updated to k+1, and returns and executes the step 1);Until each of described current group of vector Vector is all processed;
10), when the value of k is greater than or equal to j, the D3 step is executed.
Optionally, compression module is also used to:
The corresponding first marking variable storage of each of phasor phasor will currently be organized into temporary identifier array sign, Then by the set storage of corresponding first marking variable of each phasor currently organized into mark array flag.
Optionally, the preset step-length is 1.
Optionally, the preset field are as follows: 0xAA63.
The embodiment of the invention also provides a kind of communication data decompression device, it is applied to receive data transmission in WAMS system The main website of data transmitted by equipment, described device include:
Second receiving module, the compression corresponding with the data frame set sent for receiving the data transmitting equipment Data frame afterwards;
Third judgment module, for judging whether the SYNC field of the data frame is preset field, if it is not, described in triggering Second receiving module;If so, triggering memory module;
Memory module, for by the data of L byte after compressometer number Count_byte, sequence putting identification number Data after L byte are put into variable array data by group flag;
J mark is sequentially taken out from the mark array flag to be put into array sign, it is suitable then according to sign content Sequence reads the data that length is corresponded in the variable array data, and according to data frame corresponding with the variable array data The phasor of last data frame, restore with according to sign content read data corresponding to original phasor, by the original phase Amount sequence is stored into array Full_data;
Decompression module is put into array sign for sequentially taking out b mark from the mark array flag, then according to According to sign content, sequentially read the data that length is corresponded in the variable array data, and according to the variable array data The phasor of the last data frame of corresponding data frame restores and original phase corresponding to the data that read according to sign content Amount stores the original phasor sequence into array Full_data;
Composite module will give birth to for generating other fields in addition to phasor according to configuration frame and first frame data frame At other fields and array Full_data in data combination producing complete data frame.
Optionally, described device further include: the 4th judgment module is used for:
Whether the data frame after judging obtained decompression is wrong or leakage is sent out, if so, to the data transmitting equipment Order is reissued in transmission, so that the data transmitting equipment transfers corresponding mistake or leakage hair data frame.
The embodiment of the invention also provides a kind of communication data compression and decompression system, the system comprises:
Based on communication data compression set described in any of the above embodiments, and it is based on communication data solution described in any of the above embodiments Pressure device.
The present invention has the advantage that compared with prior art
Using the embodiment of the present invention, according to the last data frame of the phasor of the current data frame and the current data frame The difference of corresponding phasor carries out variable compression to the current data frame, only retains the first frame data frame in each wheel compression, Then according to the difference of the phasor in the data frame after first frame data frame, data compression, the difference institute between phasor are carried out The memory space of occupancy is less than the occupied memory space of phasor, therefore can reduce the corresponding data volume of data frame, improves The information content contained in the data of unit capacity improves information transmitting efficiency.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of communication data compression method provided in an embodiment of the present invention;
Fig. 2 is a kind of structural schematic diagram of power distribution network WAMS system provided in an embodiment of the present invention;
Fig. 3 is a kind of data exchange schematic diagram of power distribution network WAMS system provided in an embodiment of the present invention;
Fig. 4 is a kind of schematic illustration of communication data compression method provided in an embodiment of the present invention;
Fig. 5 is the generating principle signal of marking variable in a kind of communication data compression method provided in an embodiment of the present invention Figure;
Fig. 6 is a kind of structural representation of the compressed data of communication data compression method provided in an embodiment of the present invention Figure;
Fig. 7 is a kind of flow diagram of communication data decompressing method provided in an embodiment of the present invention;
Fig. 8 is a kind of schematic illustration of communication data decompressing method provided in an embodiment of the present invention;
Fig. 9 is a kind of structural schematic diagram of communication data compression set provided in an embodiment of the present invention;
Figure 10 is a kind of structural schematic diagram of communication data decompression device provided in an embodiment of the present invention;
Figure 11 is the structural schematic diagram of a kind of communication data compression provided in an embodiment of the present invention and decompression system.
Specific embodiment
It elaborates below to the embodiment of the present invention, the present embodiment carries out under the premise of the technical scheme of the present invention Implement, the detailed implementation method and specific operation process are given, but protection scope of the present invention is not limited to following implementation Example.
For solve prior art problem, the embodiment of the invention provides a kind of communication data compression, decompressing method, device and System.
In a first aspect, just a kind of communication data compression method provided in an embodiment of the present invention is introduced first below.
Illustrate first, a kind of communication data compression method provided in an embodiment of the present invention is preferably applied to be applied to Send the data transmitting equipment of data in power distribution network WAMS system to main website, and the data transmitting equipment includes at least: PDC is mono- One of member and NIC unit.
Fig. 1 is a kind of flow diagram of communication data compression method provided in an embodiment of the present invention, as shown in Figure 1, institute The method of stating includes:
S101: the configuration frame that the WAMS main website in WAMS system is sent is received, the data that each PMU unit is sent are received Frame;The data frame is divided at least two data frame set, wherein include data a and b in the configuration frame.
Specifically, can receive what each PMU unit was sent, the track data itself acquired is generated according to configuration frame Data frame.
Illustratively, Fig. 2 is a kind of structural schematic diagram of power distribution network WAMS system provided in an embodiment of the present invention;Fig. 3 is A kind of data exchange schematic diagram of power distribution network WAMS system provided in an embodiment of the present invention;As Figure 2-3, PDC equipment passes through Ethernet obtains data frame from PMU equipment, after then compressing data frame, will be compressed by the dedicated VPN in wireless network Data frame afterwards is sent to WAMS system main website.In another application scenarios, NIC device obtains data from PMU equipment Compressed data frame after then compressing data frame, is sent to WAMS system master by the dedicated VPN in wireless network by frame It stands.The specific transmitting step of data frame is as shown in figure 3, PMU equipment sends a number to PDC equipment or NIC device every Jms According to frame DATA, PDC equipment or NIC are sent to WAMS system after N*Jms is by N number of data frame compression received in N*Jms Main website, it is generally the case that the process that N number of data frame received in N*Jms compresses can be known as by PDC equipment or NIC device One wheel compression.
Illustratively, the configuration frame pre-set can be sent to each data and sent by the WAMS main website in WAMS system Equipment, wherein including the quantity a and the number of the phasor for including in configuration frame in the phasor grouping of each of each data frame According to the quantity b for the phasor not being grouped in frame.For example, containing 18 phasors in a data frame, the value of a is 4, i.e., by every four A phasor is divided into one group, then obtains four groups of phasors.It there remains two phasors, the b phase that the two phasors are not grouped as Amount.
If this step has obtained 3 data frame set, the data frame for including in data frame set -1 is frame -1-1, frame - 1-2, frame -1-3, frame -1-4, frame -1-5, frame -1-6;The data frame for including in data frame set -2 is frame -2-1, frame -2-2, frame - 2-3, frame -2-4, frame -2-5, frame -2-6;The data frame for including in data frame set -3 is frame -3-1, frame -3-2, frame -3-3, frame - 3-4, frame -3-5, frame -3-6.
S102: it is directed to each data frame set, using first data frame in the data frame set as current number According to frame, judge current data frame whether be this wheel compression the first frame data;If so, executing S103 step;If it is not, executing S104 Step;
By S101 step it is found that PDC equipment or NIC are after N*Jms is by N number of data frame compression received in N*Jms It is sent to WAMS system main website, therefore, it is necessary to judge the received present frame of PDC equipment or NIC device institute, frame -1-1, if Start this wheel compression if it is the first frame data for first frame data of this wheel compression, executes S103 step;If not this First frame data of wheel compression execute S104 step.
S103: the numerical value of the SYNC field of the current data frame is changed to preset field, and compressometer is digital The value of Count_byte is set as 0;The current data frame is stored into the DATA_Frame1 section to caching array TEMP head end, Judge whether the compression time-consuming of this wheel compression is greater than or equal to default time limit T;If the compression time-consuming of this wheel compression is greater than or equal to Default time limit T, executes step S106, will be under the current data frame if the compression time-consuming of this wheel compression is less than default time limit T One frame returns as current data frame and executes the S102 step.
Specifically, the preset field can be with are as follows: 0xAA63.
Illustratively, using the compression for data frame set -1 as the first wheel compression.In existing WAMS system, number Field values according to frame are executed according to the regulation of GBT 26865.2-2011, and the SYNC field numerical value of data frame is 0xAA03, The SYNC for the first frame data frame that every wheel compression communicates 0xAA63 is changed in embodiments of the present invention to be distinguish;Meanwhile it will The value of the compressometer number Count_byte of this wheel compression is set as 0, then present frame is obtained content, frame -1-1, and storage is arrived slow It deposits in the DATA_Frame1 section of array TEMP head end.Then, by data compression unit price from start receive data frame set -1 when The compression time-consuming started to the duration between current time as this wheel compression is carved, then judges that the compression time-consuming of this wheel compression is It is no to be greater than or equal to default time limit T;If the compression time-consuming of this wheel compression is greater than or equal to default time limit T, step S106 is executed, if The compression time-consuming of this wheel compression is less than default time limit T, by the next frame of 0 current data frame, frame -1-2, as current number According to frame, and returns and execute the S102 step.
It should be noted that SYNC field can also be referred to as synchronization field.
S104: by the sum of the current value of compressometer number Count_byte and preset step-length as the compressometer number Current value;It is right according to the difference of the phasor of current data frame phasor corresponding with the last data frame of the current data frame The current data frame carries out variable compression and obtains variable section Δ DATA_Frame;
Specifically, according to the phasor of current data frame phasor corresponding with the last data frame of the current data frame Difference carries out variable compression to obtain variable section Δ DATA_Frame may include: D1: by current data to the current data frame The phasor number n for including in frame obtains b phasor of a group phasor and remainder divided by j, and b is less than j;D2: from a group phasor First group of phasor starts, for each of current group phasor phasor, by the amplitude of the phasor and the current data frame The amplitude of correspondence phasor of last data frame be compared, obtain first amplitude variable quantity;By the every of the current data frame The angle of one phasor is compared with the angle of each corresponding phasor of the last data frame of the current data frame, is obtained First angle variable quantity;D3: by the corresponding first marking variable storage of the current group of phasor into mark array flag;By institute The first variable storage is stated into variable array data;Then using next group of phasor of current group phasor as current group phasor, and It returns and executes the D2 step, until a group phasor is all processed;D4: for each of b phasor phasor, by the phase The amplitude of amount is compared with the amplitude of the corresponding phasor of the last data frame of the current data frame, obtains the variation of the second amplitude Amount;The angle of the phasor is compared with the angle of the corresponding phasor of the last data frame of the current data frame, is obtained Second angle variable quantity;The second marking variable is generated according to the second amplitude variable quantity and the second angle variable quantity, it will The second marking variable storage is into mark array flag;By the second amplitude variable quantity and the second angle variable quantity Synthesize the second variable;By second variable storage into variable array data;D5 is by the mark array flag and described Variable array data composition variable section Δ DATA_Frame.
Specifically, the width of the amplitude by the phasor and the corresponding phasor of the last data frame of the current data frame Value is compared, and obtains first amplitude variable quantity;By the angle of each phasor of the current data frame and the current number It is compared according to each angle for corresponding to phasor of the last data frame of frame, first angle variable quantity is obtained, according to described the One amplitude variable quantity and the first angle variable quantity generate the first marking variable, may include: 1), set k to count, initial value is 0, judge whether k is less than j:2), if so, by before the amplitude r1 of each phasor of current data frame and the current data frame Each of one data frame corresponds to the difference H1 of the amplitude p1 of phasor as first amplitude variable quantity;By each of current data frame The difference H2 of the angle p2 of each corresponding phasor of the last data frame of the angle r2 and current data frame of a phasor makees For first angle variable quantity;And judge whether the absolute value of H1 and H2 is respectively less than 8;If 3), the absolute value of H1 and H2 is respectively less than 8, The memory space of 0.5 byte is respectively distributed for H1 and H2, the first marking variable sign [k] of update is 0x00;Judging the value of H1 is It is no to be negative, if the value of H1 is negative, the value of H1 is updated to the sum of H1 and 8, and judge whether the value of H2 is negative;If the value of H1 is Just, judge whether the value of H2 is negative, if the value of H2 is negative, the value of H2 is updated to the sum of H2 and 8;By H1 and H2 storage to caching In array one;If 4), the absolute value of H1 and H2 is not respectively less than 8, judge whether the absolute value of H1 and H2 is respectively less than 128;5), If the absolute value of H1 and H2 is respectively less than 128, the memory space of 1 byte is respectively distributed for H1 and H2, updates the first marking variable Sign [k] is 0x01;Judge whether the value of H1 is negative, if the value of H1 is negative, the value of H1 is updated to the sum of H1 and 128, and sentence Whether the value of disconnected H2 is negative;If the value of H1 is positive, the step of whether value for judging H2 is negative is executed, if the value of H2 is negative, The value of H2 is updated to the sum of H2 and 128;By H1 and H2 storage into caching array two;6), if the absolute value of H1 and H2 is not Respectively less than 128, judge whether the absolute value of H1 and H2 is respectively less than 2048;It is H1 if 7), the absolute value of H1 and H2 is respectively less than 2048 The memory space of 1.5 bytes is respectively distributed with H2, the first marking variable sign [k] of update is 0x02;Judge H1 value whether be It is negative, if the value of H1 is negative, the value of H1 is updated to the sum of H1 and 2048, and judge whether the value of H2 is negative;If the value of H1 is positive, The step of whether value for judging H2 is negative executed;If the value of H2 is negative, the value of H2 is updated to the sum of H2 and 2048;By H1 With H2 storage into caching array three;If 8), the absolute value of H1 and H2 is not respectively less than 2048, the first marking variable is updated Sign [k] is=0x03, and then by r1, r2 storage is into caching array four;9) value of k, is updated to k+1, and returns and holds The row step 1);Until each of described current group of vector vector is all processed;10), when the value of k is greater than or equal to j When, execute the D3 step.
Specifically, can be described by the corresponding first marking variable storage of the current group of phasor to mark array flag In, it may include: by the corresponding first marking variable storage of each of current group phasor phasor to temporary identifier array In sign, then by the set storage of corresponding first marking variable of each phasor currently organized into mark array flag.
Fig. 4 is a kind of schematic illustration of communication data compression method provided in an embodiment of the present invention, as shown in figure 4, such as The quantity for the phasor for including in fruit current data frame is 18, and a is 4, b 2, then by include in current data frame 18 phasors It is divided into 4 groups in sequence.If i is count number, the phasor for having been processed by how many group is represented, such as when i=0, start to first Four phasors in group phasor carry out variable compression, and then when carrying out the compression of each group of phasor, if j is count number, j is represented How many phasors in processed current group of phasor.
The number of each phasor in first group is phasor -1-1, phasor -1-2, phasor -1-3, phasor -1-4;Similar, The number of each phasor in second group is phasor -2-1, phasor -2-2, phasor -2-3, phasor -2-4;It is each in third group The number of phasor is phasor -3-1, phasor -3-2, phasor -3-3, phasor -3-4;The number of each phasor in 4th group is phase Amount -4-1, phasor -4-2, phasor -4-3, phasor -4-4;Remaining two phasors can be phasor-b-1, phasor-b-2.
Variable compression first is carried out to first phasor in first group of phasor, by the amplitude of phasor -1-1 and -1-1 pairs of frame It answers the amplitude of position to be compared, such as can obtain the phasor -1-1 in first group of phasor of frame -1-2 in the hope of difference, with frame -1-1 First group of phasor in phasor -1-1 between amplitude difference, using the difference as first amplitude variable quantity;Then, by phasor- The angle of 1-1 with, the angle of frame -1-1 corresponding position is compared, for example, can in the hope of difference obtain in first group of phasor of frame -1-2 Phasor -1-1, the difference of the angle between the phasor -1-1 in first group of phasor of frame -1-1, using the difference as first angle Variable quantity.
Then vector-the 1-1 in first group of vector of data frame -1-2 is regard as current phasor, according to the of current phasor One angle variable quantity and first amplitude variable quantity generate the first marking variable.
Fig. 5 is the generating principle signal of marking variable in a kind of communication data compression method provided in an embodiment of the present invention Figure, as shown in figure 5, process can be with are as follows: set k as count number, the value of k is less than j, i.e., less than 4.First determine whether k whether less than 4, if Not less than 4, illustrates that the generating process for carrying out the first marking variable in each vector to first group is over, need first First marking variable of each phasor in group combines, and then is stored.When the value of k is greater than or equal to j, according to the One amplitude variable quantity and the first angle variable quantity generate the first marking variable, by the first marking variable storage to mark array In flag;First amplitude variable quantity and the first angle variable quantity are synthesized into the first variable;By the first variable storage to change It measures in array data;The array flag and variable array data composition variable section Δ DATA_Frame will be identified.
When k is less than 4, illustrate to need to generate the first marking variable of the phasor in first group.For example, by data frame -1-2 Phasor -1-1 amplitude r1 and the corresponding phasor of the data frame -1-1 of the data frame -1-2, the difference of the amplitude p1 of phasor -1-1 Value H1 is as amplitude variable quantity;By the data frame -1-1 of the angle r2 of the phasor -1-1 of data frame -1-2 and the data frame -1-2 Correspondence phasor, the difference H2 of the angle p2 of phasor -1-1 is as angle variable quantity;And judge whether the absolute value of H1 and H2 is equal Less than 8.
If the absolute value of H1 and H2 is respectively less than 8, the memory space of 0.5 byte is respectively distributed for H1 and H2, is updated first and is become Amount mark sign [k] is 0x00;Judge whether the value of H1 is negative, if the value of H1 is negative, the value of H1 be updated to the sum of H1 and 8, And judge whether the value of H2 is negative;If the value of H1 is positive, judge whether the value of H2 is negative, if the value of H2 is negative, more by the value of H2 It is newly the sum of H2 and 8;By H1 and H2 storage into caching array one.
If the absolute value of H1 and H2 is not respectively less than 8, judge whether the absolute value of H1 and H2 is respectively less than 128;If H1 and H2 Absolute value be respectively less than 128, respectively distribute the memory space of 1 byte for H1 and H2, updating the first marking variable sign [k] is 0x01;Judge whether the value of H1 is negative, if the value of H1 is negative, the value of H1 is updated to the sum of H1 and 128, and judges that the value of H2 is It is no to be negative;If the value of H1 is positive, the step of whether value for judging H2 is negative is executed, if the value of H2 is negative, more by the value of H2 It is newly the sum of H2 and 128;By H1 and H2 storage into caching array two.
If the absolute value of H1 and H2 is not respectively less than 128, judge whether the absolute value of H1 and H2 is respectively less than 2048;If H1 and The absolute value of H2 is respectively less than 2048, and the memory space of 1.5 bytes is respectively distributed for H1 and H2, updates the first marking variable sign [k] is 0x02;Judge whether the value of H1 is negative, if the value of H1 is negative, the value of H1 is updated to the sum of H1 and 2048, and judge H2 Value whether be negative;If the value of H1 is positive, the step of whether value for judging H2 is negative executed;If the value of H2 is negative, by H2 Value be updated to the sum of H2 and 2048;By H1 and H2 storage into caching array three.
If the absolute value of H1 and H2 is not respectively less than 2048, updating the first marking variable sign [k] is=0x03, then will R1, r2 storage are into caching array four;The value of k is updated to k+1, and the vector-in first group of vector of data frame -1-2 1-2 generates the corresponding first identifier of current phasor as current phasor.Meanwhile by the caching array one of vector -1-1, Or the data sequential storage in caching array two or caching array three is into variable array data;Sign [k] is deposited It stores up in mark array flag.For current data frame, each of first group of vector in data frame -1-2 vector is carried out Above-mentioned processing, so it is right, and each group of vector in data frame -1-2 carries out above-mentioned processing, and then has handled a group phasor.Finally To mark array flag in sequential storage, the first marking variable of four vectors in first group of phasor of data frame -1-2, First marking variable of four vectors in second group of phasor, the first marking variable of four vectors in third group phasor, First marking variable of four vectors in four groups of phasors.The storage order and mark array of variable in variable data data The storage order of the first marking variable in flag is identical, and which is not described herein again.
It after having handled a group vector, needs to handle remaining 2 vectors, generates second during processing and become Amount mark is identical as the process of the first marking variable generated in a group vector;Bivariate process is generated during processing Identical as the process of the first variable generated in a group vector, which is not described herein again.
Then the corresponding variable array data of data frame -1-2, and mark array flag are combined into the change of data frame -1-2 Measure section Δ DATA_Frame2.
It should be noted that when carrying out the storage of the first marking variable, for caching array one, in actual storage In the process, there is no the contents of nybble, in order to save space, need to cache the data and other data of array one It is stitched together and fills up a byte, therefore, need 0.5 of a byte cache array one in embodiments of the present invention The data of byte, similar, 1.5 bytes of three bytes for memory buffers array are assigned in caching array three Data, corresponding memory space are three [0], three [1], three [2].
S105: judge whether the data frame that this wheel compression is compressed reaches pressure according to the compressometer number Count_byte The contracting upper limit;If the data frame that this wheel compression is compressed reaches the compression upper limit, step S106 is executed;If the number that this wheel compression is compressed The upper limit is not up to compressed according to frame, judges whether the compression time-consuming of this wheel compression is greater than or equal to default time limit T;If this wheel compression Compression is time-consuming to be greater than or equal to default time limit T, executes step S106, will if the compression time-consuming of this wheel compression is less than default time limit T The next frame of the current data frame returns as current data frame and executes the step S102.
Illustratively, after carrying out variable compression to data frame -1-2, judge in the compression process to data frame set -1 Whether the quantity of middle compressed data frame reaches, and the upper limit of the quantity for the data frame that can be compressed is stopped if reaching the upper limit Then only compression procedure executes S106 step.
If the not up to upper limit, judgement carries out compressing corresponding compression time-consuming for data frame set -1, if has reached pre- If time limit T, if having reached default time limit T, S106 step is executed;If not up to default time limit T, by data in data frame set -1 Next data frame of frame -1-2, data frame -1-30 are used as present frame, then return and execute S102 step, until all numbers It is all compressed according to the data frame in frame set.
S106: in the first frame that the current data frame is this wheel compression, and the compression time-consuming of this wheel compression is greater than or waits When default time limit T, by the DATA_Frame1, the combination of the compressometer number Count_byte is as compressed number According to the main website for being sent in WAMS system data transmitted by sending device for receiving data;It is being except the current data frame The first frame of this wheel compression, and when the compression time-consuming of this wheel compression is greater than or equal to default time limit T other than in the case where, will be described The combination of DATA_Frame1, the compressometer number Count_byte and the variable section Δ DATA_Frame are as compression Data afterwards are sent in WAMS system the main website of data transmitted by sending device for receiving data.
Fig. 6 is a kind of structural representation of the compressed data of communication data compression method provided in an embodiment of the present invention Figure;As shown in fig. 6, DATA_Frame1 is used to store first frame data of this wheel compression, i.e. data for this wheel compression Frame -1-1;
Compressometer number Count_byte, for storing the quantity for the data frame for including in each wheel compression;ΔDATA_ Frame2, for store the data frame -1-2 in epicycle compression process by compressed data, i.e., corresponding first variable with And first marking variable;And so on.
It, can be in the variable section combination for carrying out data frame -1-2 it should be noted that by taking Δ DATA_Frame2 as an example The first marking variable array flag of data frame -1-2 is stored in the first half of Δ DATA_Frame2, is then successively stored First variable of each phasor: PHASORS1, PHASORS2, PHASORS3, and so on.
Using embodiment illustrated in fig. 1 of the present invention, before the phasor of the current data frame and the current data frame One data frame corresponds to the difference of phasor, carries out variable compression to the current data frame, only retains first in each wheel compression Frame data frame carries out data compression then according to the difference of the phasor in the data frame after first frame data frame, between phasor The occupied memory space of difference be less than the occupied memory space of phasor, improve the letter contained in the data of unit capacity Breath amount improves information transmitting efficiency
In addition, applying embodiment illustrated in fig. 1 of the present invention, data can also timely be sent, avoid the product of data Pressure.
Second aspect, corresponding with embodiment illustrated in fig. 1 of the present invention, the embodiment of the invention also provides a kind of communication datas Decompressing method.
It should be noted that a kind of communication data decompressing method provided in an embodiment of the present invention, is preferably applied to be applied to The main website of data transmitted by data transmitting equipment is received in WAMS system.
Fig. 7 is a kind of flow diagram of communication data decompressing method provided in an embodiment of the present invention, and Fig. 8 is that the present invention is real A kind of schematic illustration of communication data decompressing method of example offer is provided;As shown in Figure 7 and Figure 8, which comprises
S701: the compressed data frame corresponding with the data frame set that the data transmitting equipment is sent is received.
Illustratively, received compressed data are as shown in Figure 6.
S702: whether the SYNC field for judging the data frame is preset field, executes the S701 step if it is not, returning Suddenly;If so, executing S703 step.
Whether the SYNC field for judging received data is 0xAA63, if so, illustrating that received data are according to the present invention Embodiment the method carries out compressed data, executes S703 step;If it is not, illustrating received data not in accordance with the present invention Embodiment the method carries out compressed data, jumps out circulation, carries out the reception of next round data.
S703: by the data of L byte after compressometer number Count_byte, sequence putting identification array flag, Data after L byte are put into variable array data;
Illustratively, the data of L byte after the Count_byte of received data frame are deposited as marking variable It stores up in mark array flag.The subsequent data of the data frame are stored as variable data into variable array data.
It is understood that the size of L is that system is preset, value can be a+1.
S704: j mark is sequentially taken out from the mark array flag and is put into array sign, then according in sign Hold, sequentially reads the data for corresponding to length in the variable array data, and according to number corresponding with the variable array data According to the phasor of the last data frame of frame, restore with original phasor corresponding to the data that are read according to sign content, will be described Original phasor sequence is stored into array Full_data.
Illustratively, it sequentially takes out 4 marks from mark array flag to be put into array sign, then sequence, which is read, becomes The data of length are corresponded in amount array data.
According to the phasor of the last data frame of data frame corresponding with the variable array data, restore and according to sign Original phasor corresponding to the data that content is read stores the original phasor sequence into array Full_data.It is understood that , the variable compression process for restoring S104 step in the process and the embodiment of the present invention of original phasor is dual process, this hair Bright embodiment no longer repeats it.
S705: b mark is sequentially taken out from the mark array flag and is put into array sign, then according in sign Hold, sequentially reads the data for corresponding to length in the variable array data, and according to number corresponding with the variable array data According to the phasor of the last data frame of frame, restore with original phasor corresponding to the data that are read according to sign content, will be described Original phasor sequence is stored into array Full_data.
Illustratively, 2 marks are sequentially taken out from the mark array flag to be put into array sign, then according to Sign content, sequentially reads the data that length is corresponded in the variable array data, and according to described data pairs of variable array The phasor of the last data frame for the data frame answered, restore with according to sign content read data corresponding to original phasor, The original phasor sequence is stored and is stored in into array Full_data behind the original phasor that S704 step restores. Further it will be understood that the size of a, b are that main website in WAMS system is wrapped into the configuration frame that data transmitting equipment is sent The data contained.
S706: generating other fields in addition to phasor according to configuration frame and first frame data frame, by it is generated other Data combination producing complete data frame in field and array Full_data.
It is emphasized that the corresponding process of this step is the prior art, the embodiment of the present invention is not repeated to it.
Using embodiment illustrated in fig. 7 of the present invention, compressed data can be decompressed.
In a kind of specific embodiment of the embodiment of the present invention, the method also includes:
S707 (not shown): whether the data frame after the decompression judged is wrong or leakage is sent out, if so, to Order is reissued in the data transmitting equipment transmission, so that the data transmitting equipment transfers corresponding mistake or leakage hair data frame.
Illustratively, whether the data frame after WAMS main station judging decompression is wrong, such as, it can be determined that data frame is corresponding Value whether obviously exceed reasonable range, perhaps obviously occur between the data items not detected or data items Data have occurred reverse etc.;Or the identification information according to preset data frame, judge received data frame data whether with Preset identification information matches, if so, illustrating that leakage discovery has occurred as then, sending to data transmitting equipment in data frame Order is reissued, for example, can will reissue instruction according to the identification information that mistake or leakage hair data frame occurs and be sent to pair The data transmitting equipment answered.
Using the above embodiment of the present invention, data error reporting caused by being sent out to avoid error in data or leakage.
The third aspect, corresponding with first aspect of the embodiment of the present invention, the embodiment of the invention also provides a kind of communication numbers According to compression set, applied to the data transmitting equipment for sending data in power distribution network WAMS system to main website.
Fig. 9 is a kind of structural schematic diagram of communication data compression set provided in an embodiment of the present invention, as shown in figure 9, institute Stating device includes:
First receiving module 901 receives each PMU for receiving the configuration frame of the transmission of the WAMS main website in WAMS system The data frame that unit is sent;The data frame is divided at least two data frame set;
First judgment module 902, for being directed to each data frame set, by first number in the data frame set According to frame as current data frame, judge current data frame whether be this wheel compression the first frame data;
First setup module 903, for the judging result of the first judgment module 902 be in the case where, by institute The numerical value for stating the SYNC field of current data frame is changed to preset field, and sets 0 for the value of compressometer number Count_byte; By the DATA_Frame1 section of current data frame storage to caching array TEMP head end, judge that the compression of this wheel compression is time-consuming Whether default time limit T is greater than or equal to;If the compression time-consuming of this wheel compression is greater than or equal to default time limit T, the second setting of triggering Module 905, if the compression time-consuming of this wheel compression is less than default time limit T, using the next frame of the current data frame as current number According to frame, and trigger first judgment module 902;
Compression module 904, for the judging result of the first judgment module 902 be it is no in the case where, by compressometer The current value of the sum of current value and preset step-length of digital Count_byte as the compressometer number;According to the current number According to the difference of the phasor of frame and the corresponding phasor of the last data frame of the current data frame, variable is carried out to the current data frame Compression obtains variable section Δ DATA_Frame;
Second judgment module 905, for judging what this wheel compression was compressed according to the compressometer number Count_byte Whether data frame reaches the compression upper limit;If the data frame that this wheel compression is compressed reaches the compression upper limit, step F is executed;If epicycle It compresses compressed data frame and not up to compresses the upper limit, judge whether the compression time-consuming of this wheel compression is greater than or equal to the default time limit T;If the compression time-consuming of this wheel compression is greater than or equal to default time limit T, the second setup module is triggered, if the compression of this wheel compression consumes When be less than default time limit T and trigger the first judgment module using the next frame of the current data frame as current data frame 902;
Second setup module 906, in the first frame that the current data frame is this wheel compression, and the pressure of this wheel compression When contracting time-consuming is greater than or equal to default time limit T, by the DATA_Frame1, the combination of the compressometer number Count_byte The main website of data transmitted by sending device for receiving data is sent in WAMS system as compressed data;Except institute State the first frame that current data frame is this wheel compression, and when the compression time-consuming of this wheel compression is greater than or equal to default time limit T other than In the case where, by the DATA_Frame1, the compressometer number Count_byte and the variable section Δ DATA_Frame Combination the main websites of data transmitted by sending device for receiving data is sent in WAMS system as compressed data.
Using embodiment illustrated in fig. 9 of the present invention, before the phasor of the current data frame and the current data frame One data frame corresponds to the difference of phasor, carries out variable compression to the current data frame, only retains first in each wheel compression Frame data frame carries out data compression then according to the difference of the phasor in the data frame after first frame data frame, between phasor The occupied memory space of difference be less than the occupied memory space of phasor, improve the letter contained in the data of unit capacity Breath amount improves information transmitting efficiency.
In a kind of specific embodiment of the embodiment of the present invention, the data transmitting equipment is included at least: PDC unit and One of NIC unit.
In a kind of specific embodiment of the embodiment of the present invention, first receiving module 901 is also used to:
Receive what each PMU unit was sent, the data frame for the track data itself acquired being generated according to configuration frame.
In a kind of specific embodiment of the embodiment of the present invention, the compression module 904 is also used to:
D1: by the phasor number n for including in current data frame divided by j, b phasor of a group phasor and remainder is obtained, and b is small In j;
D2: since first group of phasor in a group phasor, using first group of vector as current group vector, for working as Each of preceding group of phasor phasor, by the corresponding phasor of the amplitude of the phasor and the last data frame of the current data frame Amplitude be compared, obtain first amplitude variable quantity;The angle of each phasor of the current data frame is worked as with described The angle that each of the last data frame of preceding data frame corresponds to phasor is compared, and obtains first angle variable quantity;
D3: by the corresponding first marking variable storage of the current group of phasor into mark array flag;By described first Variable storage is into variable array data;Then it using next group of phasor of current group phasor as current group phasor, and returns and holds The row D2 step, until a group phasor is all processed;
D4: for each of b phasor phasor, by the previous number of the amplitude of the phasor and the current data frame It is compared according to the amplitude of the correspondence phasor of frame, obtains the second amplitude variable quantity;By the angle of the phasor and the current number It is compared according to the angle of the correspondence phasor of the last data frame of frame, obtains second angle variable quantity;According to second amplitude Variable quantity and the second angle variable quantity generate the second marking variable, by second marking variable storage to mark array In flag;The second amplitude variable quantity and the second angle variable quantity are synthesized into the second variable;By second variable It stores in variable array data;
D5 is by the mark array flag and the variable array data composition variable section Δ DATA_Frame.
In a kind of specific embodiment of the embodiment of the present invention, compression module 904 is also used to:
1) k is set, to count, initial value 0 judges whether k is less than j:
2), if so, by the last data frame of the amplitude r1 of each phasor of current data frame and the current data frame Each correspond to phasor amplitude p1 difference H1 as first amplitude variable quantity;By each phasor of current data frame Angle r2 is with the difference H2 of the angle p2 of each corresponding phasor of the last data frame of the current data frame as first jiao Spend variable quantity;And judge whether the absolute value of H1 and H2 is respectively less than 8;
If 3), the absolute value of H1 and H2 is respectively less than 8, the memory space of 0.5 byte is respectively distributed for H1 and H2, updates first Marking variable sign [k] is 0x00;Judge whether the value of H1 is negative, if the value of H1 is negative, by the value of H1 be updated to H1 and 8 it With, and judge whether the value of H2 is negative;If the value of H1 is positive, judge whether the value of H2 is negative, if the value of H2 is negative, by the value of H2 It is updated to the sum of H2 and 8;By H1 and H2 storage into caching array one;
If 4), the absolute value of H1 and H2 is not respectively less than 8, judge whether the absolute value of H1 and H2 is respectively less than 128;
If 5), the absolute value of H1 and H2 is respectively less than 128, the memory space of 1 byte is respectively distributed for H1 and H2, updates first Marking variable sign [k] is 0x01;Judge whether the value of H1 is negative, if the value of H1 is negative, by the value of H1 be updated to H1 and 128 it With, and judge whether the value of H2 is negative;If the value of H1 is positive, the step of whether value for judging H2 is negative is executed, if H2 Value is negative, and the value of H2 is updated to the sum of H2 and 128;By H1 and H2 storage into caching array two;
If 6), the absolute value of H1 and H2 is not respectively less than 128, judge whether the absolute value of H1 and H2 is respectively less than 2048;
If 7), the absolute value of H1 and H2 is respectively less than 2048, the memory space of 1.5 bytes is respectively distributed for H1 and H2, is updated First marking variable sign [k] is 0x02;Judge whether the value of H1 is negative, if the value of H1 is negative, by the value of H1 be updated to H1 with The sum of 2048, and judge whether the value of H2 is negative;If the value of H1 is positive, the step of whether value for judging H2 is negative executed; If the value of H2 is negative, the value of H2 is updated to the sum of H2 and 2048;By H1 and H2 storage into caching array three;
If 8), the absolute value of H1 and H2 is not respectively less than 2048, updating the first marking variable sign [k] is=0x03, so Afterwards by r1, r2 storage is into caching array four;
9) value of k, is updated to k+1, and returns and executes the step 1);Until each of described current group of vector Vector is all processed;
10), when the value of k is greater than or equal to j, the D3 step is executed.
In a kind of specific embodiment of the embodiment of the present invention, compression module 904 is also used to:
The corresponding first marking variable storage of each of phasor phasor will currently be organized into temporary identifier array sign, Then by the set storage of corresponding first marking variable of each phasor currently organized into mark array flag.
In a kind of specific embodiment of the embodiment of the present invention, the preset step-length is 1.
In a kind of specific embodiment of the embodiment of the present invention, the preset field are as follows: 0xAA63.
Fourth aspect, corresponding with second aspect of the embodiment of the present invention, the embodiment of the invention also provides a kind of communication numbers According to decompression device.
It should be noted that a kind of communication data decompression device provided in an embodiment of the present invention, is preferably applied to WAMS system The main website of data transmitted by data transmitting equipment is received in system.
Figure 10 is a kind of structural schematic diagram of communication data decompression device provided in an embodiment of the present invention, as shown in Figure 10, Described device includes:
Second receiving module 1001, for receiving the corresponding with the data frame set of the data transmitting equipment transmission Compressed data frame;
Third judgment module 1002, for judging whether the SYNC field of the data frame is preset field, if it is not, triggering Second receiving module 1001;If so, triggering memory module 1003;
Memory module 1003, for being sequentially put into mark for the data of L byte after compressometer number Count_byte Know array flag, the data after L byte are put into variable array data;
J mark is sequentially taken out from the mark array flag to be put into array sign, it is suitable then according to sign content Sequence reads the data that length is corresponded in the variable array data, and according to data frame corresponding with the variable array data The phasor of last data frame, restore with according to sign content read data corresponding to original phasor, by the original phase Amount sequence is stored into array Full_data;
Decompression module 1004 is put into array sign, so for sequentially taking out b mark from the mark array flag Afterwards according to sign content, sequentially read the data that length is corresponded in the variable array data, and according to the variable array The phasor of the last data frame of the corresponding data frame of data, restore with it is original corresponding to the data that are read according to sign content Phasor stores the original phasor sequence into array Full_data;
Composite module 1005 will for generating other fields in addition to phasor according to configuration frame and first frame data frame Data combination producing complete data frame in other fields generated and array Full_data.
Using embodiment illustrated in fig. 10 of the present invention, compressed data can be decompressed.
In a kind of specific embodiment of the embodiment of the present invention, on the basis of embodiment illustrated in fig. 10 of the present invention, this Inventive embodiments also add: 1006 (not shown) of the 4th judgment module is used for:
Whether the data frame after judging obtained decompression is wrong or leakage is sent out, if so, to the data transmitting equipment Order is reissued in transmission, so that the data transmitting equipment transfers corresponding mistake or leakage hair data frame.
In a kind of specific embodiment of the embodiment of the present invention, the system comprises:
What the communication data compression set and fourth aspect present invention provided based on the third aspect of the embodiment of the present invention was provided Communication data decompression device.
Using the above embodiment of the present invention, data error reporting caused by being sent out to avoid error in data or leakage.
5th aspect, to solve prior art problem, the embodiment of the invention also provides a kind of compression of communication data and solutions Pressure system.
Figure 11 is the structural schematic diagram of a kind of communication data compression provided in an embodiment of the present invention and decompression system., such as scheme Shown in 11, the system comprises:
Based on communication data compression set 1101 described in the third aspect of the embodiment of the present invention, and it is based on the embodiment of the present invention Communication data decompression device 1102 described in fourth aspect.
Using embodiment illustrated in fig. 11 of the present invention, communication data can be compressed and be decompressed.
6th aspect, a kind of communication data to solve prior art problem, with the 5th aspect offer of the embodiment of the present invention Compression and decompression system are corresponding, and the embodiment of the invention also provides a kind of communication means, are applied to WAMS system, method packet It includes:
Data compression is carried out using data compression method described in first aspect of the embodiment of the present invention and by compressed number According to sending;Compressed data are received, and data decompression method described in application second aspect of the embodiment of the present invention carries out The decompression of data.
Using the above embodiment of the present invention, compression and the decompression of data may be implemented.
It is understood that compression and decompression collectively form entire communication process.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.

Claims (21)

1. a kind of communication data compression method, which is characterized in that send data to main website applied in power distribution network WAMS system Data transmitting equipment, which comprises
A: the configuration frame that the WAMS main website in WAMS system is sent is received, the data frame that each PMU unit is sent is received;It will be described Data frame is divided at least two data frame set;
B: sentence for each data frame set using first data frame in the data frame set as current data frame Disconnected current data frame whether be this wheel compression the first frame data;
C: if so, the numerical value of the SYNC field of the current data frame is changed to preset field, and by compressometer number Count_ The value of byte is set as 0;By the DATA_Frame1 section of current data frame storage to caching array TEMP head end, this is judged Whether the compression time-consuming of wheel compression is greater than or equal to default time limit T;If the compression time-consuming of this wheel compression is greater than or equal to default Limit T, execute step F, if the compression time-consuming of this wheel compression is less than default time limit T, using the next frame of the current data frame as Current data frame, and return and execute the step B;
D: if it is not, the working as the compressometer number by the sum of the current value of compressometer number Count_byte and preset step-length Preceding value;According to the difference of the phasor of current data frame phasor corresponding with the last data frame of the current data frame, to institute It states current data frame progress variable compression and obtains variable section Δ DATA_Frame;
E: judge whether the data frame that this wheel compression is compressed reaches the compression upper limit according to the compressometer number Count_byte; If the data frame that this wheel compression is compressed reaches the compression upper limit, step F is executed;If the data frame that this wheel compression is compressed is not up to The upper limit is compressed, judges whether the compression time-consuming of this wheel compression is greater than or equal to default time limit T;If the compression of this wheel compression is time-consuming big In or equal to default time limit T, step F is executed, if the compression time-consuming of this wheel compression is less than default time limit T, by the current data The next frame of frame returns as current data frame and executes the step B;
F: in the first frame that the current data frame is this wheel compression, and when the compression time-consuming of this wheel compression is greater than or equal to default When limiting T, the combination of the DATA_Frame1, the compressometer number Count_byte are sent to as compressed data The main website of data transmitted by sending device for receiving data in WAMS system;It is being this wheel compression except the current data frame First frame, and when the compression time-consuming of this wheel compression is greater than or equal to default time limit T other than in the case where, by the DATA_ The combination of Frame1, the compressometer number Count_byte and the variable section Δ DATA_Frame are as compressed number According to the main website for being sent in WAMS system data transmitted by sending device for receiving data.
2. a kind of communication data compression method according to claim 1, which is characterized in that the data transmitting equipment is at least It include: one of PDC unit and NIC unit.
3. a kind of communication data compression method according to claim 1, which is characterized in that the step
A, comprising:
Receive what each PMU unit was sent, the data frame for the track data itself acquired being generated according to configuration frame.
4. a kind of communication data compression method according to claim 1, which is characterized in that described according to the current data The difference of the phasor of frame phasor corresponding with the last data frame of the current data frame carries out variable pressure to the current data frame Contracting obtains variable section Δ DATA_Frame, comprising:
D1: by the phasor number n for including in current data frame divided by j, b phasor of a group phasor and remainder is obtained, and b is less than j;
D2: since first group of phasor in a group phasor, using first group of vector as current group vector, for current group Each of phasor phasor, by the width of the amplitude of the phasor and the corresponding phasor of the last data frame of the current data frame Value is compared, and obtains first amplitude variable quantity;By the angle of each phasor of the current data frame and the current number It is compared according to each angle for corresponding to phasor of the last data frame of frame, first angle variable quantity is obtained, according to described the One amplitude variable quantity and the first angle variable quantity generate the first marking variable;By the first amplitude variable quantity and described One angle variable quantity synthesizes the first variable;
D3: by the corresponding first marking variable storage of the current group of phasor into mark array flag;By first variable It stores in variable array data;Then it using next group of phasor of current group phasor as current group phasor, and returns and executes institute D2 step is stated, until a group phasor is all processed;
D4: for each of b phasor phasor, by the last data frame of the amplitude of the phasor and the current data frame The amplitude of correspondence phasor be compared, obtain the second amplitude variable quantity;By the angle of the phasor and the current data frame The angle of correspondence phasor of last data frame be compared, obtain second angle variable quantity;Changed according to second amplitude Amount and the second angle variable quantity generate the second marking variable, by second marking variable storage to mark array flag In;The second amplitude variable quantity and the second angle variable quantity are synthesized into the second variable;By second variable storage Into variable array data;
D5: by the mark array flag and the variable array data composition variable section Δ DATA_Frame.
5. a kind of communication data compression method according to claim 4, which is characterized in that the amplitude by the phasor It is compared with the amplitude of the corresponding phasor of the last data frame of the current data frame, obtains first amplitude variable quantity;By institute State each corresponding phasor of the angle of each phasor of current data frame and the last data frame of the current data frame Angle is compared, and obtains first angle variable quantity, raw according to the first amplitude variable quantity and the first angle variable quantity At the first marking variable, comprising:
1) k is set, to count, initial value 0 judges whether k is less than j:
2), if so, by the every of the amplitude r1 of each phasor of current data frame and the last data frame of the current data frame The difference H1 of the amplitude p1 of one corresponding phasor is as first amplitude variable quantity;By the angle of each phasor of current data frame R2 becomes with the difference H2 of the angle p2 of each corresponding phasor of the last data frame of the current data frame as first angle Change amount;And judge whether the absolute value of H1 and H2 is respectively less than 8;
If 3), the absolute value of H1 and H2 is respectively less than 8, the memory space of 0.5 byte is respectively distributed for H1 and H2, updates the first variable Identifying sign [k] is 0x00;Judge whether the value of H1 is negative, if the value of H1 is negative, the value of H1 is updated to the sum of H1 and 8, and Judge whether the value of H2 is negative;If the value of H1 is positive, judge whether the value of H2 is negative, if the value of H2 is negative, the value of H2 is updated For the sum of H2 and 8;By H1 and H2 storage into caching array one;
If 4), the absolute value of H1 and H2 is not respectively less than 8, judge whether the absolute value of H1 and H2 is respectively less than 128;
If 5), the absolute value of H1 and H2 is respectively less than 128, the memory space of 1 byte is respectively distributed for H1 and H2, updates the first variable Identifying sign [k] is 0x01;Judge whether the value of H1 is negative, if the value of H1 is negative, the value of H1 be updated to the sum of H1 and 128, And judge whether the value of H2 is negative;If the value of H1 is positive, the step of whether value for judging H2 is negative is executed, if the value of H2 is It is negative, the value of H2 is updated to the sum of H2 and 128;By H1 and H2 storage into caching array two;
If 6), the absolute value of H1 and H2 is not respectively less than 128, judge whether the absolute value of H1 and H2 is respectively less than 2048;
If 7), the absolute value of H1 and H2 is respectively less than 2048, the memory space of 1.5 bytes is respectively distributed for H1 and H2, updates first Marking variable sign [k] is 0x02;Judge whether the value of H1 is negative, if the value of H1 is negative, the value of H1 is updated to H1 and 2048 The sum of, and judge whether the value of H2 is negative;If the value of H1 is positive, the step of whether value for judging H2 is negative executed;If H2 Value be negative, the value of H2 is updated to the sum of H2 and 2048;By H1 and H2 storage into caching array three;
If 8), the absolute value of H1 and H2 is not respectively less than 2048, updating the first marking variable sign [k] is=0x03, then will R1, r2 storage are into caching array four;
9) value of k, is updated to k+1, and returns and executes the step 1);Until each of described current group of vector vector It is all processed;
10), when the value of k is greater than or equal to j, the D3 step is executed.
6. a kind of communication data compression method according to claim 4, which is characterized in that described by the current group of phasor Corresponding first marking variable storage is into mark array flag, comprising:
The corresponding first marking variable storage of each of phasor phasor will currently be organized into temporary identifier array sign, then By the set storage of corresponding first marking variable of each phasor currently organized into mark array flag.
7. a kind of communication data compression method according to claim 1, which is characterized in that the preset step-length is 1.
8. a kind of communication data compression method according to claim 1, which is characterized in that the preset field are as follows: 0xAA63。
9. a kind of communication data decompressing method, which is characterized in that be applied to receive transmitted by data transmitting equipment in WAMS system The main website of data, which comprises
G: the compressed data frame corresponding with the data frame set that the data transmitting equipment is sent is received;
H: whether the SYNC field for judging the data frame is preset field, executes the G step if it is not, returning;If so, executing I step;
I: by the data of L byte after compressometer number Count_byte, sequence putting identification array flag, by L word Data after section are put into variable array data;
J: sequentially taking out j mark from the mark array flag and be put into array sign, then according to sign content, sequence Read the data that length is corresponded in the variable array data, and according to data frame corresponding with the variable array data before The phasor of one data frame, restore with according to sign content read data corresponding to original phasor, by the original phasor Sequence is stored into array Full_data;
K: sequentially taking out b mark from the mark array flag and be put into array sign, then according to sign content, sequence Read the data that length is corresponded in the variable array data, and according to data frame corresponding with the variable array data before The phasor of one data frame, restore with according to sign content read data corresponding to original phasor, by the original phasor Sequence is stored into array Full_data;
L: other fields in addition to phasor are generated according to configuration frame and first frame data frame, by other fields generated and number Data combination producing complete data frame in group Full_data.
10. a kind of communication data decompressing method according to claim 9, which is characterized in that the method also includes:
Whether the data frame after judging obtained decompression is wrong or leakage is sent out, if so, sending to the data transmitting equipment Order is reissued, so that the data transmitting equipment transfers corresponding mistake or leakage hair data frame.
11. a kind of communication data compression set, which is characterized in that send data to main website applied in power distribution network WAMS system Data transmitting equipment, described device include:
First receiving module receives each PMU unit and sends for receiving the configuration frame of the transmission of the WAMS main website in WAMS system Data frame;The data frame is divided at least two data frame set;
First judgment module makees first data frame in the data frame set for being directed to each data frame set For current data frame, judge current data frame whether be this wheel compression the first frame data;
First setup module, for the judging result of the first judgment module be in the case where, by the current data The numerical value of the SYNC field of frame is changed to preset field, and sets 0 for the value of compressometer number Count_byte;It will be described current Data frame storage to caching array TEMP head end DATA_Frame1 section, judge the compression time-consuming of this wheel compression whether be greater than or Equal to default time limit T;If the compression time-consuming of this wheel compression is greater than or equal to default time limit T, the second setup module is triggered, if epicycle The compression time-consuming of compression is less than default time limit T, using the next frame of the current data frame as current data frame, and triggers first Judgment module;
Compression module, for the judging result of the first judgment module be it is no in the case where, by compressometer number Count_ The current value of the sum of current value and preset step-length of byte as the compressometer number;According to the phasor of the current data frame The difference of phasor corresponding with the last data frame of the current data frame carries out variable compression to the current data frame and is become Measure section Δ DATA_Frame;
Second judgment module, the data frame for judging that this wheel compression is compressed according to the compressometer number Count_byte are It is no to reach the compression upper limit;If the data frame that this wheel compression is compressed reaches the compression upper limit, step F is executed;If this wheel compression is pressed The data frame of contracting not up to compresses the upper limit, judges whether the compression time-consuming of this wheel compression is greater than or equal to default time limit T;If epicycle The compression time-consuming of compression is greater than or equal to default time limit T, triggers the second setup module, if the compression time-consuming of this wheel compression is less than in advance If time limit T, using the next frame of the current data frame as current data frame, the first judgment module is triggered;
Second setup module, for the first frame in the current data frame for this wheel compression, and the compression of this wheel compression is time-consuming When more than or equal to default time limit T, by the DATA_Frame1, the combination of the compressometer number Count_byte is as pressure Data after contracting are sent in WAMS system the main website of data transmitted by sending device for receiving data;Except described current Data frame is the first frame of this wheel compression, and when the compression time-consuming of this wheel compression is greater than or equal to default time limit T other than the case where Under, by the DATA_Frame1, the combination of the compressometer number Count_byte and the variable section Δ DATA_Frame The main website of data transmitted by sending device for receiving data is sent in WAMS system as compressed data.
12. a kind of communication data compression set according to claim 11, which is characterized in that the data transmitting equipment is extremely It less include: one of PDC unit and NIC unit.
13. a kind of communication data compression set according to claim 11, which is characterized in that first receiving module, It is also used to:
Receive what each PMU unit was sent, the data frame for the track data itself acquired being generated according to configuration frame.
14. a kind of communication data compression set according to claim 11, which is characterized in that the compression module is also used In:
D1: by the phasor number n for including in current data frame divided by j, b phasor of a group phasor and remainder is obtained, and b is less than j;
D2: since first group of phasor in a group phasor, using first group of vector as current group vector, for current group Each of phasor phasor, by the width of the amplitude of the phasor and the corresponding phasor of the last data frame of the current data frame Value is compared, and obtains first amplitude variable quantity;By the angle of each phasor of the current data frame and the current number It is compared according to each angle for corresponding to phasor of the last data frame of frame, first angle variable quantity is obtained, according to described the One amplitude variable quantity and the first angle variable quantity generate the first marking variable;By the first amplitude variable quantity and described One angle variable quantity synthesizes the first variable;
D3: by the corresponding first marking variable storage of the current group of phasor into mark array flag;By first variable It stores in variable array data;Then it using next group of phasor of current group phasor as current group phasor, and returns and executes institute D2 step is stated, until a group phasor is all processed;
D4: for each of b phasor phasor, by the last data frame of the amplitude of the phasor and the current data frame The amplitude of correspondence phasor be compared, obtain the second amplitude variable quantity;By the angle of the phasor and the current data frame The angle of correspondence phasor of last data frame be compared, obtain second angle variable quantity;Changed according to second amplitude Amount and the second angle variable quantity generate the second marking variable, by second marking variable storage to mark array flag In;The second amplitude variable quantity and the second angle variable quantity are synthesized into the second variable;By second variable storage Into variable array data;
D5: by the mark array flag and the variable array data composition variable section Δ DATA_Frame.
15. a kind of communication data compression set according to claim 14, which is characterized in that compression module is also used to:
1) k is set, to count, initial value 0 judges whether k is less than j:
2), if so, by the every of the amplitude r1 of each phasor of current data frame and the last data frame of the current data frame The difference H1 of the amplitude p1 of one corresponding phasor is as first amplitude variable quantity;By the angle of each phasor of current data frame R2 becomes with the difference H2 of the angle p2 of each corresponding phasor of the last data frame of the current data frame as first angle Change amount;And judge whether the absolute value of H1 and H2 is respectively less than 8;
If 3), the absolute value of H1 and H2 is respectively less than 8, the memory space of 0.5 byte is respectively distributed for H1 and H2, updates the first variable Identifying sign [k] is 0x00;Judge whether the value of H1 is negative, if the value of H1 is negative, the value of H1 is updated to the sum of H1 and 8, and Judge whether the value of H2 is negative;If the value of H1 is positive, judge whether the value of H2 is negative, if the value of H2 is negative, the value of H2 is updated For the sum of H2 and 8;By H1 and H2 storage into caching array one;
If 4), the absolute value of H1 and H2 is not respectively less than 8, judge whether the absolute value of H1 and H2 is respectively less than 128;
If 5), the absolute value of H1 and H2 is respectively less than 128, the memory space of 1 byte is respectively distributed for H1 and H2, updates the first variable Identifying sign [k] is 0x01;Judge whether the value of H1 is negative, if the value of H1 is negative, the value of H1 be updated to the sum of H1 and 128, And judge whether the value of H2 is negative;If the value of H1 is positive, the step of whether value for judging H2 is negative is executed, if the value of H2 is It is negative, the value of H2 is updated to the sum of H2 and 128;By H1 and H2 storage into caching array two;
If 6), the absolute value of H1 and H2 is not respectively less than 128, judge whether the absolute value of H1 and H2 is respectively less than 2048;
If 7), the absolute value of H1 and H2 is respectively less than 2048, the memory space of 1.5 bytes is respectively distributed for H1 and H2, updates first Marking variable sign [k] is 0x02;Judge whether the value of H1 is negative, if the value of H1 is negative, the value of H1 is updated to H1 and 2048 The sum of, and judge whether the value of H2 is negative;If the value of H1 is positive, the step of whether value for judging H2 is negative executed;If H2 Value be negative, the value of H2 is updated to the sum of H2 and 2048;By H1 and H2 storage into caching array three;
If 8), the absolute value of H1 and H2 is not respectively less than 2048, updating the first marking variable sign [k] is=0x03, then will R1, r2 storage are into caching array four;
9) value of k, is updated to k+1, and returns and executes the step 1);Until each of described current group of vector vector It is all processed;
10), when the value of k is greater than or equal to j, the D3 step is executed.
16. a kind of communication data compression set according to claim 14, which is characterized in that compression module is also used to:
The corresponding first marking variable storage of each of phasor phasor will currently be organized into temporary identifier array sign, then By the set storage of corresponding first marking variable of each phasor currently organized into mark array flag.
17. a kind of communication data compression set according to claim 11, which is characterized in that the preset step-length is 1.
18. a kind of communication data compression set according to claim 11, which is characterized in that the preset field are as follows: 0xAA63。
19. a kind of communication data decompression device, which is characterized in that be applied to receive transmitted by data transmitting equipment in WAMS system The main website of data, described device include:
Second receiving module, for receiving the corresponding compressed with the data frame set of the data transmitting equipment transmission Data frame;
Third judgment module, for judging whether the SYNC field of the data frame is preset field, if it is not, triggering described second Receiving module;If so, triggering memory module;
Memory module, for by the data of L byte after compressometer number Count_byte, sequence putting identification array Data after L byte are put into variable array data by flag;
It sequentially takes out j mark from the mark array flag to be put into array sign, then according to sign content, sequence is read The data that length is corresponded in the variable array data are taken, and according to the previous of data frame corresponding with the variable array data The phasor of data frame, restore with according to sign content read data corresponding to original phasor, the original phasor is suitable Sequence is stored into array Full_data;
Decompression module is put into array sign for sequentially taking out b mark from the mark array flag, then according to Sign content, sequentially reads the data that length is corresponded in the variable array data, and according to described data pairs of variable array The phasor of the last data frame for the data frame answered, restore with according to sign content read data corresponding to original phasor, The original phasor sequence is stored into array Full_data;
Composite module will be generated for generating other fields in addition to phasor according to configuration frame and first frame data frame Data combination producing complete data frame in other fields and array Full_data.
20. a kind of communication data decompression device according to claim 19, which is characterized in that described device further include: the Four judgment modules, are used for:
Whether the data frame after judging obtained decompression is wrong or leakage is sent out, if so, sending to the data transmitting equipment Order is reissued, so that the data transmitting equipment transfers corresponding mistake or leakage hair data frame.
21. a kind of communication data compression and decompression system, which is characterized in that the system comprises:
Based on the described in any item communication data compression sets of claim 11-18, and based on the communication described in claim 19 Data decompressor.
CN201811057233.XA 2018-09-11 2018-09-11 Communication data compression and decompression method, device and system Active CN109067775B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811057233.XA CN109067775B (en) 2018-09-11 2018-09-11 Communication data compression and decompression method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811057233.XA CN109067775B (en) 2018-09-11 2018-09-11 Communication data compression and decompression method, device and system

Publications (2)

Publication Number Publication Date
CN109067775A true CN109067775A (en) 2018-12-21
CN109067775B CN109067775B (en) 2020-12-08

Family

ID=64760111

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811057233.XA Active CN109067775B (en) 2018-09-11 2018-09-11 Communication data compression and decompression method, device and system

Country Status (1)

Country Link
CN (1) CN109067775B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109936373A (en) * 2019-02-28 2019-06-25 北京交通大学 A kind of real-time data compression method for synchronized phasor DATA REASONING

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101178424A (en) * 2007-12-12 2008-05-14 北京四方继保自动化股份有限公司 Dynamic data compression storage method in electric network wide-area measuring systems (WAMS)
CN102811062A (en) * 2010-01-19 2012-12-05 北京四方继保自动化股份有限公司 Curve sparse processing method for high-density time sequence data in power system wide-area measurement system (WAMS)
CN102970340A (en) * 2012-10-30 2013-03-13 清华大学 Real-time data compression communication method applicable to wide area measurement system
WO2017070087A1 (en) * 2015-10-21 2017-04-27 GE Lighting Solutions, LLC System and method for data compression over a communication network
CN108233344A (en) * 2018-01-29 2018-06-29 合肥工业大学 Power distribution network WAMS communications protections and feeder automation method based on multicast

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101178424A (en) * 2007-12-12 2008-05-14 北京四方继保自动化股份有限公司 Dynamic data compression storage method in electric network wide-area measuring systems (WAMS)
CN102811062A (en) * 2010-01-19 2012-12-05 北京四方继保自动化股份有限公司 Curve sparse processing method for high-density time sequence data in power system wide-area measurement system (WAMS)
CN102970340A (en) * 2012-10-30 2013-03-13 清华大学 Real-time data compression communication method applicable to wide area measurement system
WO2017070087A1 (en) * 2015-10-21 2017-04-27 GE Lighting Solutions, LLC System and method for data compression over a communication network
CN108141244A (en) * 2015-10-21 2018-06-08 通用电气照明解决方案有限责任公司 For passing through the system and method for the data compression of communication network
CN108233344A (en) * 2018-01-29 2018-06-29 合肥工业大学 Power distribution network WAMS communications protections and feeder automation method based on multicast

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
FANG ZHANG等: "Application of a Real-Time Data Compression and Adapted Protocol Technique for WAMS", 《IEEE TRANSACTIONS ON POWER SYSTEMS》 *
齐文斌: "广域测量系统数据在线无损压缩算法", 《电网技术》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109936373A (en) * 2019-02-28 2019-06-25 北京交通大学 A kind of real-time data compression method for synchronized phasor DATA REASONING
CN109936373B (en) * 2019-02-28 2023-05-02 北京交通大学 Real-time data compression method for synchronous phasor data measurement

Also Published As

Publication number Publication date
CN109067775B (en) 2020-12-08

Similar Documents

Publication Publication Date Title
CN108833058A (en) A kind of method that Wide Area Measurement System communication process dynamic data is compressed, decompressed
CN103795596A (en) Programmable control SDN measuring system and method
CN111697997B (en) HPLC module rapid detection device and method based on copy controller
CN101227265B (en) Method for data synchronization among client ends in equipment monitoring system
CN109067775A (en) A kind of communication data compression, decompressing method, apparatus and system
CN107528667A (en) The method and apparatus that frame data transmission is carried out between proximal device and remote equipment
CN101834772B (en) Ethernet ring network-based media access control address sorting method and device
CN203894392U (en) Monitoring system of formation quality of batch storage batteries
CN103969594A (en) Batch storage battery formation quality monitoring system and monitoring method
CN208718639U (en) Oil/gas well data acquisition device and oil/gas well monitor system
CN111447229B (en) Large-scale data acquisition method and device based on compressed sensing theory
CN103731324A (en) Multichannel real-time concurrent charging data simulation generation method and device
CN107911436A (en) Multi-state data integration transmission realizing method between a kind of electric system boss station
CN207906699U (en) Detecting robot of pipe
CN106849349A (en) A kind of sun square formation simulator developing Of Remote Control Power frame system
CN208003405U (en) A kind of motion monitoring system based on wearable device
CN102882926B (en) Remote data transmission system and method for gas turbine sensor
CN106506118B (en) The method and system that USXGMII multichannel IPG is accurately compensated
CN104266772A (en) Data collection method of multi-point temperature monitoring system of switch cabinet
CN204442009U (en) A kind of portable intelligent switch cubicle data collection station
CN206906814U (en) Network intelligence measure and control instrument
CN110920469A (en) Protection architecture and process for earth rail potential
CN104333473B (en) It is managed collectively the system and method for route exchange device information interface
CN116186613B (en) Intelligent acquisition processing method and system for industrial Internet data
CN110753057B (en) Communication method, device and equipment of fault indicator

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant