CN105447393B - For the file transmitting method and device of electric system - Google Patents

For the file transmitting method and device of electric system Download PDF

Info

Publication number
CN105447393B
CN105447393B CN201510800335.6A CN201510800335A CN105447393B CN 105447393 B CN105447393 B CN 105447393B CN 201510800335 A CN201510800335 A CN 201510800335A CN 105447393 B CN105447393 B CN 105447393B
Authority
CN
China
Prior art keywords
file
unit
string
compressed encoding
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.)
Active
Application number
CN201510800335.6A
Other languages
Chinese (zh)
Other versions
CN105447393A (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.)
Melt Logical Science And Technology Of Intelligence (beijing) Inc Co
State Grid Corp of China SGCC
State Grid Beijing Electric Power Co Ltd
Original Assignee
Melt Logical Science And Technology Of Intelligence (beijing) Inc Co
State Grid Corp of China SGCC
State Grid Beijing 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 Melt Logical Science And Technology Of Intelligence (beijing) Inc Co, State Grid Corp of China SGCC, State Grid Beijing Electric Power Co Ltd filed Critical Melt Logical Science And Technology Of Intelligence (beijing) Inc Co
Priority to CN201510800335.6A priority Critical patent/CN105447393B/en
Publication of CN105447393A publication Critical patent/CN105447393A/en
Application granted granted Critical
Publication of CN105447393B publication Critical patent/CN105447393B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/606Protecting data by securing the transmission between two devices or processes
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/40Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code
    • H03M7/42Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code using table look-up for the coding or decoding process, e.g. using read-only memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention discloses a kind of file transmitting methods and device for electric system.Wherein, this method includes:The first Hash Value of the first file is obtained, wherein, for the first file to need the file transmitted, the first file includes multiple unit strings;Judge in presetting database with the presence or absence of the second Hash Value that value is identical with the first Hash Value;If existence value second Hash Value identical with the first Hash Value in presetting database, transmission includes the 3rd file of the first Hash Value to target terminal;If the compressed encoding for corresponding to each unit string in the first file is read respectively from compressed encoding table there is no second Hash Value identical with the first Hash Value is worth in presetting database;Transmission includes the 3rd file of the corresponding compressed encoding of each unit string to target terminal.The present invention solve transmitted in electric system by mobile terminal data cost it is higher and the technical issues of security is relatively low.

Description

For the file transmitting method and device of electric system
Technical field
The present invention relates to field of power, in particular to a kind of file transmitting method for electric system and Device.
Background technology
In order to ensure the security of information transmission, the information security solution that national grid has oneself proprietary produces Great Qu and management information great Qu is controlled respectively using respective LAN so that production control great Qu and management information great Qu with it is outer The internet on boundary is isolated, and passes through distinctive safety insulating device (such as fire wall) and the realization production control of secure accessing platform Information isolation between great Qu, management information great Qu and internet.
With the appearance of professional mobile terminal, professional mobile terminal and the mobile office based on professional mobile terminal are applied It is popularized in power industry, but existing most of mobile terminal is all connected to internet, if directly passed through The Internet transmission audio-video document and picture file are faced with certain safety issue, and can expend more flow, for electricity The expansion of work in every causes additional financial burden in Force system.
Higher and the technical issues of security is relatively low, the mesh for the cost for transmitting data in electric system by mobile terminal It is preceding not yet to propose effective solution.
The content of the invention
An embodiment of the present invention provides a kind of file transmitting method and device for electric system, at least to solve electric power The cost for transmitting data in system by mobile terminal is higher and the technical issues of security is relatively low.
One side according to embodiments of the present invention provides a kind of file transmitting method for electric system, the party Method includes:The first Hash Value of the first file is obtained, wherein, to need the file transmitted, the first file includes more the first file A unit string;Judge with the presence or absence of the second Hash Value that value is identical with the first Hash Value in presetting database, wherein, it presets Database is used to preserve the second file sent and the second Hash Value corresponding to the second file;If exist in presetting database Value second Hash Value identical with the first Hash Value, then transmitting includes the 3rd file of the first Hash Value to target terminal;It is if pre- If there is no second Hash Value identical with the first Hash Value is worth in database, then read and correspond to respectively from compressed encoding table The compressed encoding of each unit string in first file, wherein, compressed encoding table compresses element and compression element for storing Corresponding compressed encoding;Transmission includes the 3rd file of the corresponding compressed encoding of each unit string to target terminal.
Further, compressed encoding table includes Huffman code tables, corresponds to the being read respectively from compressed encoding table In one file before the compressed encoding of each unit string, this method further includes:It creates to store the character of compression element Set of strings;The each unit string being successively read in the first file;Judge in string assemble with the presence or absence of value and reading The identical compression element of unit string;There is no the compression members that value is identical with the unit string read in string assemble In the case of element, using the unit string of reading as a compression element deposit string assemble;It is given birth to based on string assemble Into Huffman code tables, wherein, Huffman code tables are compiled for storing compression element and being uniquely corresponding to compress the compression of element Code.
Further, compressed encoding table includes the Huffman code tables based on the second file generated, from compressed encoding table Middle read respectively corresponds in the first file before the compressed encoding of each unit string, and this method further includes:It is successively read Each unit string in first file;Judge identical with the unit string read with the presence or absence of value in Huffman code tables Compression element;In the case of the value compression element identical with the unit string of reading is not present in Huffman code tables, The compressed encoding that the unit string of reading and the unit string based on reading generate is stored in Huffman code tables.
Further, the compression volume for corresponding to each unit string in the first file is read respectively from compressed encoding table Code includes:Obtain the location information of the Huffman code tables intermediate value compression element identical with unit string;According to location information Compressed encoding corresponding to the reading value compression element identical with unit string.
Further, transmission include the 3rd file of the corresponding compressed encoding of each unit string to target terminal it Before, this method further includes:Judge in the 3rd file with the presence or absence of the compressed encoding that value is identical;Existence value is identical in the 3rd file Compressed encoding in the case of, one feature string of multiple compressed encodings with identical value is substituted, wherein, tagged word The length of symbol string is less than compressed encoding.
Other side according to embodiments of the present invention provides a kind of document conveying apparatus for electric system, should Device includes:Acquiring unit, for obtaining the first Hash Value of the first file, wherein, the file that the first file transmits for needs, First file includes multiple unit strings;First judging unit, for judging to whether there is value and first in presetting database The second identical Hash Value of Hash Value, wherein, presetting database is for preserving the second file for having sent and corresponding to the second text Second Hash Value of part;First transmission unit, if for second miscellaneous identical with the first Hash Value of existence value in presetting database Gather value, then transmission includes the 3rd file of the first Hash Value to target terminal;First reading unit, if in presetting database There is no second Hash Value identical with the first Hash Value is worth, then reads and correspond in the first file respectively from compressed encoding table The compressed encoding of each unit string, wherein, compressed encoding table compresses element compression corresponding with compression element for storing Coding;Second transmission unit, it is whole to target for transmitting the 3rd file for including the corresponding compressed encoding of each unit string End.
Further, compressed encoding table includes Huffman code tables, which further includes:Creating unit, for from pressure It reduces the staff to read respectively in code table and correspond in the first file before the compressed encoding of each unit string, create to store pressure The string assemble of contracting element;Second reading unit, for being successively read each unit string in the first file;Second sentences Disconnected unit, for judging in string assemble with the presence or absence of the compression element that value is identical with the unit string read;First protects Memory cell, will in the case of the value compression element identical with the unit string of reading is not present in string assemble The unit string of reading is as a compression element deposit string assemble;Generation unit, for being based on string assemble life Into Huffman code tables, wherein, Huffman code tables are compiled for storing compression element and being uniquely corresponding to compress the compression of element Code.
Further, compressed encoding table includes the Huffman code tables based on the second file generated, which further includes:The Three reading units, for reading the compression volume for corresponding to each unit string in the first file respectively from compressed encoding table Before code, each unit string for being successively read in the first file;3rd judging unit, for judging in Huffman code tables With the presence or absence of the value compression element identical with the unit string read;Second storage unit, in Huffman code tables In the case of there is no the value compression element identical with the unit string read, by the unit string of reading and based on reading Unit string generation compressed encoding deposit Huffman code tables.
Further, the first reading unit is additionally operable to obtain the compression identical with unit string of Huffman code tables intermediate value The location information of element;According to the compressed encoding corresponding to the location information reading value compression element identical with unit string.
Further, the second transmission unit is additionally operable to include the of the corresponding compressed encoding of each unit string in transmission Before three files to target terminal, judge in the 3rd file with the presence or absence of the compressed encoding that value is identical;Exist in the 3rd file In the case of being worth identical compressed encoding, one feature string of multiple compressed encodings with identical value is substituted, wherein, The length of feature string is less than compressed encoding.
In embodiments of the present invention, by obtaining the first Hash Value of the first file, wherein, the first file is to need to transmit File, the first file include multiple unit strings;Judge identical with the first Hash Value with the presence or absence of value in presetting database The second Hash Value, wherein, presetting database is for preserving the second file for having sent and corresponding to the second miscellaneous of the second file Gather value;If existence value second Hash Value identical with the first Hash Value in presetting database, transmission includes the first Hash Value 3rd file is to target terminal;If there is no second Hash Value identical with the first Hash Value is worth in presetting database, from pressure The compressed encoding for being read respectively in code table and corresponding to each unit string in the first file is reduced the staff, wherein, compressed encoding table is used In storage compression element compressed encoding corresponding with compression element;Transmission includes the corresponding compressed encoding of each unit string 3rd file is to target terminal.So as to solve in electric system by mobile terminal transmit data cost is higher and security The technical issues of relatively low.By being compressed to original document, reducing the size of file and improving the security of file.
Description of the drawings
Attached drawing described herein is used for providing a further understanding of the present invention, forms the part of the application, this hair Bright schematic description and description does not constitute improper limitations of the present invention for explaining the present invention.In the accompanying drawings:
Fig. 1 is the flow chart of the file transmitting method for electric system according to embodiments of the present invention;And
Fig. 2 is the schematic diagram of the document conveying apparatus for electric system according to embodiments of the present invention.
Specific embodiment
In order to which those skilled in the art is made to more fully understand the present invention program, below in conjunction in the embodiment of the present invention The technical solution in the embodiment of the present invention is clearly and completely described in attached drawing, it is clear that described embodiment is only The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people Member's all other embodiments obtained without making creative work should all belong to the model that the present invention protects It encloses.
It should be noted that term " first " in description and claims of this specification and above-mentioned attached drawing, " Two " etc. be the object for distinguishing similar, without being used to describe specific order or precedence.It should be appreciated that it so uses Data can exchange in the appropriate case, so as to the embodiment of the present invention described herein can with except illustrating herein or Order beyond those of description is implemented.In addition, term " comprising " and " having " and their any deformation, it is intended that cover Cover it is non-exclusive include, be not necessarily limited to for example, containing the process of series of steps or unit, method, system, product or equipment Those steps or unit clearly listed, but may include not list clearly or for these processes, method, product Or the intrinsic other steps of equipment or unit.
First, the part noun or term occurred during the embodiment of the present invention is described is suitable for following solution It releases:
Hash Value:Be by hash function handle as a result, hash function is to change arbitrarily long input data Into the output data (result that i.e. above-mentioned processing obtains) of regular length.
Huffman encoding:It is a kind of coding mode, this method constructs the average length of different prefix according to character probability of occurrence Spend shortest code word.
According to embodiments of the present invention, a kind of embodiment of the method for the file transmitting method for electric system is provided, is needed It is noted that step shown in the flowchart of the accompanying drawings can be in the computer system of such as a group of computer-executable instructions Middle execution, although also, show logical order in flow charts, it in some cases, can be to be different from herein Order performs shown or described step.
Fig. 1 is the flow chart of the file transmitting method for electric system according to embodiments of the present invention, as shown in Figure 1, This method includes:
Step S101 obtains the first Hash Value of the first file, wherein, the file that the first file transmits for needs, first File includes multiple unit strings.
Step S102 judged with the presence or absence of value second Hash Value identical with the first Hash Value in presetting database, wherein, Presetting database is used to preserve the second file sent and the second Hash Value corresponding to the second file.
Step S103, if existence value second Hash Value identical with the first Hash Value in presetting database, transmission includes 3rd file of the first Hash Value is to target terminal.
There is the service for being exclusively used in the files (i.e. the second file) such as video, audio that storage has been sent in the LAN of power grid Device (is provided with presetting database) on server, when mobile terminal sends target video file (i.e. the first file), Ke Yixian Target video file is handled by fixed hash algorithm (namely hash algorithm for handling the second file), and will The first obtained Hash Value is compared with each second Hash Value on server, if identical, just illustrates target video file For the file being transmitted across, at this moment, it is only necessary to which the first Hash Value is encapsulated as a file (i.e. according to a fixed form Three files) target terminal is transmitted to, target terminal downloads the video corresponding to the first Hash Value from server.
Step S104, if there is no second Hash Value identical with the first Hash Value is worth in presetting database, from compression The compressed encoding for corresponding to each unit string in the first file is read in coding schedule respectively, wherein, compressed encoding table is used for Storage compression element compressed encoding corresponding with compression element.
Step S105, transmission include the 3rd file of the corresponding compressed encoding of each unit string to target terminal.
I.e. by each compressed encoding after according to corresponding character string, putting in order in the first file is arranged, will To the 3rd file be sent to target terminal.
By above-described embodiment, by obtaining the first Hash Value of the first file, wherein, the first file needs to transmit File, the first file include multiple unit strings;Judge identical with the first Hash Value with the presence or absence of value in presetting database Second Hash Value, wherein, presetting database is used to preserve the second file sent and the second hash corresponding to the second file Value;If existence value second Hash Value identical with the first Hash Value in presetting database, transmission includes the of the first Hash Value Three files are to target terminal;If there is no second Hash Value identical with the first Hash Value is worth in presetting database, from compression The compressed encoding for corresponding to each unit string in the first file is read in coding schedule respectively, wherein, compressed encoding table is used for Storage compression element compressed encoding corresponding with compression element;Transmission includes the of the corresponding compressed encoding of each unit string Three files are to target terminal.So as to solve in electric system by mobile terminal transmit data cost is higher and security compared with The technical issues of low, by being compressed to original document, reducing the size of file and improving the security of file.
In an optional scheme, above-mentioned compressed encoding table includes Huffman code tables, in order to improve to the first text The compression ratio of part is reading the compressed encoding corresponding to each unit string in the first file respectively from compressed encoding table Before, can create to store the string assemble of compression element;The each unit string being successively read in the first file; Judge in string assemble with the presence or absence of the compression element that value is identical with the unit string read;It is not deposited in string assemble In the case of the identical compression element of the unit string for being worth with reading, using the unit string of reading as a compression member Element deposit string assemble;Huffman code tables are generated based on string assemble, wherein, Huffman code tables are compressed for storing Element and the compressed encoding for being uniquely corresponding to compression element.It should be noted that element write-in string assemble will compressed The number of recording compressed element appearance is also needed to simultaneously, is then each compression one compressed encoding of element assignment, to occur The compressed encoding of the most compression Match of elemental composition shortest character of number, and ensure the corresponding compression of compression element more than occurrence number The length of coding is no longer than the few compression element of occurrence number, thereby may be ensured that highest compression ratio.
In another optional scheme, compressed encoding table includes the Huffman code tables based on the second file generated, can To be covered to the same Huffman code tables of all files (including the first file and the second file), from compressed encoding table Before the middle compressed encoding read respectively corresponding to each unit string in the first file, it can be successively read in the first file Each unit string;Judge in Huffman code tables with the presence or absence of the compression member that value is identical with the unit string read Element;In the case of the value compression element identical with the unit string of reading is not present in Huffman code tables, by reading Unit string and based on reading unit string generation compressed encoding deposit Huffman code tables.It, can using the program Corresponding compressed encoding is generated to be not necessarily each unit string, in the already present unit character of compressed encoding table String, the compressed encoding before can continuing to use, for the unit string that is not present, it is necessary to be individually for its generation according to regular length One compressed encoding.In the higher environment of requirement of real-time, the program may be employed, so as to improve the speed of compression processing Degree.
It should be noted that after processing is compressed using the program, based on the first file and can send Character string in second file is updated above-mentioned Huffman code tables, that is, each second for counting the first file and having sent The physical length of each unit string in file, and corresponding compressed encoding is regenerated according to its length, so as to obtain more New Huffman code tables.
It is read respectively in slave compressed encoding table in the embodiment of the present invention and corresponds to each unit string in the first file Compressed encoding can include:Obtain the location information of the Huffman code tables intermediate value compression element identical with unit string; According to the compressed encoding corresponding to the location information reading value compression element identical with unit string.It compresses element and compression is compiled Code is sequential storage, and compresses the length of element for fixed value, (compresses element in the location information for the compression element known Initial character address) after, can plus above-mentioned fixed value be that can obtain the initial character of compressed encoding on the basis of the address Address.
In order to be further compressed to file, include the 3rd of the corresponding compressed encoding of each unit string in transmission Before file to target terminal, it can also judge in the 3rd file with the presence or absence of the compressed encoding that value is identical;In the 3rd file In the case of the identical compressed encoding of existence value, one feature string of multiple compressed encodings with identical value is substituted, Wherein, the length of feature string is less than compressed encoding.The compressed encoding repeated in above-mentioned file is carried out further Compression, so as to further reduce the size of file.
It should be noted that for foregoing each method embodiment, in order to be briefly described, therefore it is all expressed as a series of Combination of actions, but those skilled in the art should know, the present invention and from the limitation of described sequence of movement because According to the present invention, some steps may be employed other orders or be carried out at the same time.Secondly, those skilled in the art should also know It knows, embodiment described in this description belongs to preferred embodiment, and involved action and module are not necessarily of the invention It is necessary.
The embodiment of the present invention additionally provides a kind of document conveying apparatus for electric system.It should be noted that this hair The document conveying apparatus for electric system of bright embodiment can be used for performing that the embodiment of the present invention provided for electric power The file transmitting method of system.
Fig. 2 is the schematic diagram of the document conveying apparatus for electric system according to embodiments of the present invention.As shown in Fig. 2, The device can include:Acquiring unit 10, the first judging unit 20, the first transmission unit 30, the first reading unit 40 and Two transmission units 50.
Acquiring unit 10 is used to obtain the first Hash Value of the first file, wherein, the file that the first file transmits for needs, First file includes multiple unit strings.
First judging unit 20 is used to judge in presetting database with the presence or absence of second miscellaneous identical with the first Hash Value of value Gather value, wherein, presetting database is for preserving the second file sent and the second Hash Value corresponding to the second file.
If the first transmission unit 30 is used for the second Hash Value that existence value is identical with the first Hash Value in presetting database, Transmission includes the 3rd file of the first Hash Value to target terminal.
If the first reading unit 40 is used in presetting database there is no the second Hash Value that value is identical with the first Hash Value, Then read the compressed encoding for corresponding to each unit string in the first file respectively from compressed encoding table, wherein, compression is compiled Code table compresses element compressed encoding corresponding with compression element for storing.
Second transmission unit 50 is used to transmit the 3rd file for including the corresponding compressed encoding of each unit string to mesh Mark terminal.
By above-described embodiment, the first Hash Value of the first file is obtained by acquiring unit, wherein, the first file is needs The file to be transmitted, the first file include multiple unit strings;First judging unit judges to whether there is in presetting database Value second Hash Value identical with the first Hash Value, wherein, presetting database is used to preserve the second file sent and correspondence In the second Hash Value of the second file;If existence value second Hash Value identical with the first Hash Value in presetting database, first Transmission unit then transmits the 3rd file including the first Hash Value to target terminal;If there is no values and first in presetting database The second identical Hash Value of Hash Value, the first reading unit is then read respectively from compressed encoding table to be corresponded in the first file respectively The compressed encoding of a unit string, wherein, compressed encoding table is compiled for storing the compression corresponding with compression element of compression element Code;The transmission of second transmission unit includes the 3rd file of the corresponding compressed encoding of each unit string to target terminal.So as to Solve transmitted in electric system by mobile terminal data cost it is higher and the technical issues of security is relatively low, by original Beginning file is compressed, and is reduced the size of file and is improved the security of file.
In an optional scheme, above-mentioned compressed encoding table includes Huffman code tables, in order to improve to the first text The compression ratio of part, above device can also include:Creating unit, for corresponding to the being read respectively from compressed encoding table In one file before the compressed encoding of each unit string, create to store the string assemble of compression element;Second reads Unit is taken, for being successively read each unit string in the first file;Second judgment unit, for judging string assemble In with the presence or absence of value and the identical compression element of unit string of reading;First storage unit, in string assemble In the case of there is no the value compression element identical with the unit string read, using the unit string of reading as a pressure Contracting element is stored in string assemble;Generation unit, for being based on string assemble generation Huffman code tables, wherein, Huffman Coding schedule is for storage compression element and the compressed encoding for being uniquely corresponding to compress element.It should be noted that member will compressed The number of recording compressed element appearance is also needed to while element write-in string assemble, is then each compression element assignment one A compressed encoding, is the compressed encoding of the most compression Match of elemental composition shortest character of occurrence number, and ensures more than occurrence number The length for compressing the corresponding compressed encoding of element is no longer than the few compression element of occurrence number, thereby may be ensured that highest compression Ratio.
In another optional scheme, compressed encoding table includes the Huffman code tables based on the second file generated, can To be covered to the same Huffman code tables of all files (including the first file and the second file), above-mentioned device may be used also To include:3rd reading unit, for being read respectively corresponding to each unit character in the first file from compressed encoding table Before the compressed encoding of string, each unit string for being successively read in the first file;3rd judging unit, for judging Hough With the presence or absence of the compression element that value is identical with the unit string read in graceful coding schedule;Second storage unit, in Hough In the case of the value compression element identical with the unit string of reading is not present in graceful coding schedule, by the unit string of reading Huffman code tables are stored in the compressed encoding of the unit string generation based on reading.Utilize the program, it may not be necessary to be every One unit string generates corresponding compressed encoding, for that in the already present unit string of compressed encoding table, can continue to use Compressed encoding before is compiled for the unit string being not present, it is necessary to be individually for one compression of its generation according to regular length Code.In the higher environment of requirement of real-time, the program may be employed, so as to improve the speed of compression processing.
It should be noted that after processing is compressed using the program, based on the first file and can send Character string in second file is updated above-mentioned Huffman code tables, that is, the second file for counting the first file and having sent In each unit string physical length, and corresponding compressed encoding is regenerated according to its length, it is newer so as to obtain Huffman code tables.
It is identical with unit string that the first reading unit in above-described embodiment is additionally operable to acquisition Huffman code tables intermediate value Compression element location information;According to the compression corresponding to the location information reading value compression element identical with unit string Coding.
In order to be further compressed to file, the second transmission unit is additionally operable to include each unit string pair in transmission Before 3rd file to target terminal of the compressed encoding answered, judge in the 3rd file with the presence or absence of the compressed encoding that value is identical; In the 3rd file in the case of the identical compressed encoding of existence value, by multiple compressed encodings with identical value with a feature Character string substitutes, wherein, the length of feature string is less than compressed encoding.Compressed encoding i.e. to repeating in above-mentioned file It is further compressed, so as to further reduce the size of file.
Modules provided in the present embodiment are identical with the application method that the corresponding step of embodiment of the method is provided, should It can also be identical with scene.It is noted, of course, that the scheme that above-mentioned module is related to can be not limited in above-described embodiment Content and scene, and above-mentioned module may operate in terminal or mobile terminal, can pass through software or hardware realization.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
In the above embodiment of the present invention, all emphasize particularly on different fields to the description of each embodiment, do not have in some embodiment The part of detailed description may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed technology contents can pass through others Mode is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, Ke Yiwei A kind of division of logic function, can there is an other dividing mode in actual implementation, for example, multiple units or component can combine or Person is desirably integrated into another system or some features can be ignored or does not perform.Another, shown or discussed is mutual Between coupling, direct-coupling or communication connection can be INDIRECT COUPLING or communication link by some interfaces, unit or module It connects, can be electrical or other forms.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also That unit is individually physically present, can also two or more units integrate in a unit.Above-mentioned integrated list The form that hardware had both may be employed in member is realized, can also be realized in the form of SFU software functional unit.
The above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications also should It is considered as protection scope of the present invention.

Claims (10)

1. a kind of file transmitting method for electric system, which is characterized in that including:
The first Hash Value of the first file is obtained, wherein, the file that first file transmits for needs, the first file bag Include multiple unit strings;
Judge with the presence or absence of the second Hash Value that value is identical with first Hash Value in presetting database, wherein, it is described default Database is used to preserve the second file sent and second Hash Value corresponding to second file;
If existence value second Hash Value identical with first Hash Value in the presetting database, transmission includes institute The 3rd file of the first Hash Value is stated to target terminal;
If it is compiled in the presetting database there is no second Hash Value identical with first Hash Value is worth from compression The compressed encoding for corresponding to each unit string in first file is read in code table respectively, wherein, the compression Coding schedule compresses element and the corresponding compressed encoding of the compression element for storing;
Transmission includes the 3rd file of the corresponding compressed encoding of each unit string to the target terminal.
2. according to the method described in claim 1, it is characterized in that, the compressed encoding table include Huffman code tables, from It reads and corresponds in first file before the compressed encoding of each unit string respectively in compressed encoding table, it is described Method further includes:
It creates to store the string assemble for compressing element;
The each unit string being successively read in first file;
Judge in the string assemble with the presence or absence of the compression element that value is identical with the unit string read;
It, will in the case of the value compression element identical with the unit string of reading is not present in the string assemble The unit string read is stored in the string assemble as a compression element;
The Huffman code tables are generated based on the string assemble, wherein, the Huffman code tables are described for storing Compression element and the compressed encoding for being uniquely corresponding to the compression element.
3. according to the method described in claim 1, it is characterized in that, the compressed encoding table includes giving birth to based on second file Into Huffman code tables, from compressed encoding table respectively read correspond to first file in each unit character Before the compressed encoding of string, the method further includes:
The each unit string being successively read in first file;
Judge in the Huffman code tables with the presence or absence of the compression element that value is identical with the unit string read;
In the case of the value compression element identical with the unit string of reading is not present in the Huffman code tables, The compressed encoding that the unit string of reading and the unit string based on reading generate is stored in the Huffman Coding schedule.
4. according to the method in claim 2 or 3, which is characterized in that read respectively from compressed encoding table described in corresponding to The compressed encoding of each unit string includes in first file:
Obtain the location information of the Huffman code tables intermediate value compression element identical with the unit string;
According to the compressed encoding corresponding to the location information reading value compression element identical with the unit string.
5. method as claimed in any of claims 1 to 3, which is characterized in that include each unit in transmission Before the 3rd file to the target terminal of the corresponding compressed encoding of character string, the method further includes:
Judge in the 3rd file with the presence or absence of the compressed encoding that value is identical;
In the 3rd file in the case of the identical compressed encoding of existence value, multiple compressed encodings with identical value are used One feature string substitutes, wherein, the length of the feature string is less than the length of the compressed encoding.
6. a kind of document conveying apparatus for electric system, which is characterized in that including:
Acquiring unit, for obtaining the first Hash Value of the first file, wherein, the file that first file transmits for needs, First file includes multiple unit strings;
First judging unit, for judging in presetting database with the presence or absence of the second hash that value is identical with first Hash Value Value, wherein, the presetting database is used to preserve the second file sent and described second corresponding to second file Hash Value;
First transmission unit, if for described second miscellaneous identical with first Hash Value of existence value in the presetting database Gather value, then transmission includes the 3rd file of first Hash Value to target terminal;
First reading unit, if being worth described second identical with first Hash Value for being not present in the presetting database Hash Value then reads the compression volume for corresponding to each unit string in first file respectively from compressed encoding table Code, wherein, the compressed encoding table compresses element and the corresponding compressed encoding of the compression element for storing;
Second transmission unit includes the 3rd file of the corresponding compressed encoding of each unit string to described for transmitting Target terminal.
7. device according to claim 6, which is characterized in that the compressed encoding table includes Huffman code tables, described Device further includes:
Creating unit, for being read respectively corresponding to each unit character in first file from compressed encoding table Before the compressed encoding of string, create to store the string assemble of the compression element;
Second reading unit, for each unit string being successively read in first file;
Second judgment unit is identical with the unit string read with the presence or absence of value in the string assemble for judging Compression element;
First storage unit, for the value pressure identical with the unit string of reading to be not present in the string assemble In the case of contracting element, the string assemble is stored in using the unit string of reading as a compression element;
Generation unit generates the Huffman code tables for being based on the string assemble, wherein, the Huffman code tables For storing the compression element and being uniquely corresponding to the compressed encoding of the compression element.
8. device according to claim 6, which is characterized in that the compressed encoding table includes giving birth to based on second file Into Huffman code tables, described device further includes:
3rd reading unit, for being read respectively corresponding to each unit in first file from compressed encoding table Before the compressed encoding of character string, each unit string for being successively read in first file;
3rd judging unit, for judging in the Huffman code tables with the presence or absence of value and the unit string phase of reading Same compression element;
Second storage unit is identical with the unit string read for value to be not present in the Huffman code tables In the case of compressing element, the compression that the unit string of reading and the unit string based on reading generate is compiled Code is stored in the Huffman code tables.
9. the device according to claim 7 or 8, which is characterized in that first reading unit is additionally operable to obtain the Kazakhstan The location information of the graceful coding schedule intermediate value of the husband compression element identical with the unit string;According to the location information reading value Compressed encoding corresponding to the compression element identical with the unit string.
10. the device according to any one in claim 6 to 8, which is characterized in that second transmission unit is additionally operable to Before transmission includes the 3rd file to the target terminal of the corresponding compressed encoding of each unit string, institute is judged It states in the 3rd file with the presence or absence of the compressed encoding that value is identical;The feelings of the identical compressed encoding of existence value in the 3rd file Under condition, one feature string of multiple compressed encodings with identical value is substituted, wherein, the length of the feature string Less than the length of the compressed encoding.
CN201510800335.6A 2015-11-18 2015-11-18 For the file transmitting method and device of electric system Active CN105447393B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510800335.6A CN105447393B (en) 2015-11-18 2015-11-18 For the file transmitting method and device of electric system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510800335.6A CN105447393B (en) 2015-11-18 2015-11-18 For the file transmitting method and device of electric system

Publications (2)

Publication Number Publication Date
CN105447393A CN105447393A (en) 2016-03-30
CN105447393B true CN105447393B (en) 2018-06-01

Family

ID=55557556

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510800335.6A Active CN105447393B (en) 2015-11-18 2015-11-18 For the file transmitting method and device of electric system

Country Status (1)

Country Link
CN (1) CN105447393B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101783788A (en) * 2009-01-21 2010-07-21 联想(北京)有限公司 File compression method, file compression device, file decompression method, file decompression device, compressed file searching method and compressed file searching device
CN103023511A (en) * 2012-12-05 2013-04-03 云之朗科技有限公司 Applied compressed encoding method and device
CN104618109A (en) * 2014-12-31 2015-05-13 国家电网公司 Method for safely transmitting data of power terminal based on digital signature

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101783788A (en) * 2009-01-21 2010-07-21 联想(北京)有限公司 File compression method, file compression device, file decompression method, file decompression device, compressed file searching method and compressed file searching device
CN103023511A (en) * 2012-12-05 2013-04-03 云之朗科技有限公司 Applied compressed encoding method and device
CN104618109A (en) * 2014-12-31 2015-05-13 国家电网公司 Method for safely transmitting data of power terminal based on digital signature

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
电力系统测量数据的压缩、传输及解压研究;孙妙平;《中国优秀硕士学位论文全文数据库》;20030228;C042-253 *

Also Published As

Publication number Publication date
CN105447393A (en) 2016-03-30

Similar Documents

Publication Publication Date Title
CN101009516B (en) A method, system and device for data synchronization
CN103428227B (en) Based on the IP conceal communication method of Huffman coding
CN103379136A (en) Compression method and decompression method of log acquisition data, compression apparatus and decompression apparatus of log acquisition data
US10701188B2 (en) Transfer device, communication system and communication method
US20080129556A1 (en) Two stage loss-less compressor for a clear channel over a packet network
CN105227962B (en) A kind of lossless information concealing method based on data difference
CN103716056B (en) Data compression method, uncompressing data and equipment
CN104917591A (en) Satellite network data package compression method suitable for uni-directional lossy link
CN110380842B (en) CAN bus message signature method, device and system suitable for intelligent network-connected automobile
CN106209945A (en) Based on multi-link data transmission method for uplink and device
CN104468044A (en) Data compression method and device applied to network transmission
CN208940010U (en) A kind of intranet and extranet synchronization system
CN105447393B (en) For the file transmitting method and device of electric system
CN100425022C (en) Method and system for producing same random number between communication equipments
CN106027521B (en) Compression method, decompressing method, compression set and decompression device
CN111225077B (en) Network distribution method, device and system for Internet of things equipment
Sari et al. The implementation of timestamp, bitmap and rake algorithm on data compression and data transmission from iot to cloud
CN112866196A (en) Short wave digital signal interpretation and reduction method
CN105592135A (en) Method and device for determination of data redundancy elimination DRD dictionary
CN104038307A (en) Data stream transmission system and method
CN106788916A (en) For the data transmission method and data transmission device of bus
CN103634843A (en) Data transmission method, wireless network controller, base station and mobile communication system
CN102790766A (en) Object query method, object query system, object query device and object query acquisition device
WO2021036189A1 (en) Rdma data sending and receiving methods, electronic device and readable storage medium
CN112422525B (en) Fault data transmission method, device, equipment and storage medium

Legal Events

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