CN105447393A - File transfer method and file transfer device for electric power system - Google Patents

File transfer method and file transfer device for electric power system Download PDF

Info

Publication number
CN105447393A
CN105447393A CN201510800335.6A CN201510800335A CN105447393A CN 105447393 A CN105447393 A CN 105447393A CN 201510800335 A CN201510800335 A CN 201510800335A CN 105447393 A CN105447393 A CN 105447393A
Authority
CN
China
Prior art keywords
file
compressed encoding
unit
string
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
CN201510800335.6A
Other languages
Chinese (zh)
Other versions
CN105447393B (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 file transfer method and a file transfer device for an electric power system. The method comprises the following steps of: acquiring a first hash value of a first file, wherein the first file is the one needed to be transferred, and the first file comprises a plurality of unit character strings; judging whether a preset database contains a second hash value of which the value is identical to the first hash value; if the preset database contains the second hash value of which the value is identical to the first hash value, transferring a third file comprising the first hash value to a target terminal; if the preset database does not contain the second hash value of which the value is identical to the first hash value, respectively reading compressed codes corresponding to each unit character string in the first file from a compressed code table; and transferring the third file comprising the compressed codes corresponding to each unit character string to the target terminal. With the method and the device provided by the invention, the technical problem of relatively high cost and relatively low safety of data transfer through a mobile terminal in the electric power system is solved.

Description

For file transmitting method and the 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 the security that guarantee information transmits, the information security solution that national grid has oneself proprietary, namely production control great Qu and management information great Qu uses respective LAN (Local Area Network) respectively, to make production control great Qu and management information great Qu isolated with extraneous internet, and realize production control great Qu by distinctive safety insulating device (as fire wall) and secure accessing platform, information between management information great Qu and internet isolates.
Along with the appearance of professional mobile terminal, specialty mobile terminal and based on the mobile office of professional mobile terminal be applied in power industry obtain universal, but existing most of mobile terminal is all connected to internet, if directly by internet transmission audio-video document and picture file, be faced with certain safety issue, and more flow can be expended, in electric system, the expansion of work in every causes extra financial burden.
Transmit the higher and technical matters that security is lower of the cost of data in electric system by mobile terminal, not yet propose effective solution at present.
Summary of the invention
Embodiments provide a kind of file transmitting method for electric system and device, transmit the higher and technical matters that security is lower of the cost of data at least to solve in electric system by mobile terminal.
According to an aspect of the embodiment of the present invention, provide a kind of file transmitting method for electric system, the method comprises: the first Hash Value obtaining the first file, and wherein, the first file is the file needing to transmit, and the first file comprises multiple unit string; Judge the second Hash Value that in presetting database, whether existence value is identical with the first Hash Value, wherein, presetting database is for preserving the second file sent and the second Hash Value corresponding to the second file; If the second Hash Value that in presetting database, existence value is identical with the first Hash Value, then transmission comprises the 3rd file of the first Hash Value to target terminal; If there is not the second Hash Value that value is identical with the first Hash Value in presetting database, from compressed encoding table, then read the compressed encoding corresponding to each unit string in the first file respectively, wherein, compressed encoding table is used for store compressed element and compresses compressed encoding corresponding to element; Transmission comprises the 3rd file of compressed encoding corresponding to each unit string to target terminal.
Further, compressed encoding table comprises Huffman code tables, and before read the compressed encoding corresponding to each unit string in the first file respectively from compressed encoding table, the method also comprises: create the string assemble being used for store compressed element; Read each unit string in the first file successively; Judge the compression element that in string assemble, whether existence value is identical with the unit string of reading; When there is not value with the identical compression element of unit string read in string assemble, using the unit string that reads as a compression element stored in string assemble; Generate Huffman code tables based on string assemble, wherein, Huffman code tables is used for store compressed element and unique compressed encoding corresponding to compression element.
Further, compressed encoding table comprises the Huffman code tables based on the second file generated, before read the compressed encoding corresponding to each unit string in the first file respectively from compressed encoding table, the method also comprises: read each unit string in the first file successively; Judge the compression element that in Huffman code tables, whether existence value is identical with the unit string of reading; When there is not value with the identical compression element of unit string read in Huffman code tables, by the unit string read and the compressed encoding that generates based on the unit string read stored in Huffman code tables.
Further, from compressed encoding table, read the compressed encoding corresponding to each unit string in the first file respectively to comprise: the positional information obtaining the Huffman code tables intermediate value compression element identical with unit string; According to the compressed encoding corresponding to the compression element that positional information read value is identical with unit string.
Further, before transmission comprises the 3rd file to target terminal of compressed encoding corresponding to each unit string, the method also comprises: judge in the 3rd file, whether existence is worth identical compressed encoding; In the 3rd file, existence is worth identical compressed encoding, substituted with a feature string by multiple compressed encodings with identical value, wherein, the length of feature string is less than compressed encoding.
According to another aspect of the embodiment of the present invention, provide a kind of document conveying apparatus for electric system, this device comprises: acquiring unit, for obtaining the first Hash Value of the first file, wherein, the first file is the file needing to transmit, and the first file comprises multiple unit string; First judging unit, for the second Hash Value judging that in presetting database, whether existence value is identical with the first Hash Value, wherein, presetting database is for preserving the second file sent and the second Hash Value corresponding to the second file; First delivery unit, if for second Hash Value identical with the first Hash Value of existence value in presetting database, then transmit comprise the first Hash Value the 3rd file to target terminal; First reading unit, if for there is not value second Hash Value identical with the first Hash Value in presetting database, from compressed encoding table, then read the compressed encoding corresponding to each unit string in the first file respectively, wherein, compressed encoding table is used for store compressed element and compresses compressed encoding corresponding to element; Second delivery unit, for transmit comprise compressed encoding corresponding to each unit string the 3rd file to target terminal.
Further, compressed encoding table comprises Huffman code tables, this device also comprises: creating unit, for before read the compressed encoding corresponding to each unit string in the first file respectively from compressed encoding table, creates the string assemble being used for store compressed element; Second reading unit, for reading each unit string in the first file successively; Second judging unit, for the compression element judging that in string assemble, whether existence value is identical with the unit string of reading; First storage unit, for there is not value with the identical compression element of unit string read in string assemble, using the unit string that reads as a compression element stored in string assemble; Generation unit, for generating Huffman code tables based on string assemble, wherein, Huffman code tables is used for store compressed element and unique compressed encoding corresponding to compression element.
Further, compressed encoding table comprises the Huffman code tables based on the second file generated, this device also comprises: third reading gets unit, for before read the compressed encoding corresponding to each unit string in the first file respectively from compressed encoding table, read each unit string in the first file successively; 3rd judging unit, for the compression element judging that in Huffman code tables, whether existence value is identical with the unit string of reading; Second storage unit, for there is not value with the identical compression element of unit string read in Huffman code tables, by the unit string read and the compressed encoding that generates based on the unit string read stored in Huffman code tables.
Further, the first reading unit is also for obtaining the positional information of the Huffman code tables intermediate value compression element identical with unit string; According to the compressed encoding corresponding to the compression element that positional information read value is identical with unit string.
Further, the second delivery unit also for transmission comprise the 3rd file to target terminal of compressed encoding corresponding to each unit string before, judge in the 3rd file, whether existence is worth identical compressed encoding; In the 3rd file, existence is worth identical compressed encoding, substituted with a feature string by multiple compressed encodings with identical value, 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 the file needing to transmit, and the first file comprises multiple unit string; Judge the second Hash Value that in presetting database, whether existence value is identical with the first Hash Value, wherein, presetting database is for preserving the second file sent and the second Hash Value corresponding to the second file; If the second Hash Value that in presetting database, existence value is identical with the first Hash Value, then transmission comprises the 3rd file of the first Hash Value to target terminal; If there is not the second Hash Value that value is identical with the first Hash Value in presetting database, from compressed encoding table, then read the compressed encoding corresponding to each unit string in the first file respectively, wherein, compressed encoding table is used for store compressed element and compresses compressed encoding corresponding to element; Transmission comprises the 3rd file of compressed encoding corresponding to each unit string to target terminal.Thus solve in electric system and transmit the higher and technical matters that security is lower of the cost of data by mobile terminal.By compressing source document, reducing the size of file and improve the security of file.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, and form a application's part, schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the process flow diagram of the file transmitting method for electric system according to the embodiment of the present invention; And
Fig. 2 is the schematic diagram of the document conveying apparatus for electric system according to the embodiment of the present invention.
Embodiment
The present invention program is understood better in order to make those skilled in the art person, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the embodiment of a part of the present invention, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, should belong to the scope of protection of the invention.
It should be noted that, term " first ", " second " etc. in instructions of the present invention and claims and above-mentioned accompanying drawing are for distinguishing similar object, and need not be used for describing specific order or precedence.Should be appreciated that the data used like this can be exchanged in the appropriate case, so as embodiments of the invention described herein can with except here diagram or describe those except order implement.In addition, term " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, such as, contain those steps or unit that the process of series of steps or unit, method, system, product or equipment is not necessarily limited to clearly list, but can comprise clearly do not list or for intrinsic other step of these processes, method, product or equipment or unit.
First, the part noun occurred in the process be described the embodiment of the present invention or term are applicable to description below:
Hash Value: be through the result that hash function process obtains, hash function input data variation long is arbitrarily become the output data of regular length (i.e. above-mentioned process obtain result).
Huffman encoding: be a kind of coded system, the method constructs the shortest code word of the average length of different prefix according to character probability of occurrence.
According to the embodiment of the present invention, provide a kind of embodiment of the method for the file transmitting method for electric system, it should be noted that, can perform in the computer system of such as one group of computer executable instructions in the step shown in the process flow diagram of accompanying drawing, and, although show logical order in flow charts, in some cases, can be different from the step shown or described by order execution herein.
Fig. 1 is the process flow diagram of the file transmitting method for electric system according to the embodiment of the present invention, and as shown in Figure 1, the method comprises:
Step S101, obtains the first Hash Value of the first file, and wherein, the first file is the file needing to transmit, and the first file comprises multiple unit string.
Step S102, judges the second Hash Value that in presetting database, whether existence value is identical with the first Hash Value, and wherein, presetting database is for preserving the second file sent and the second Hash Value corresponding to the second file.
Step S103, if the second Hash Value that in presetting database, existence value is identical with the first Hash Value, then transmission comprises the 3rd file of the first Hash Value to target terminal.
The video being exclusively used in storage and having sent is had in the LAN (Local Area Network) of electrical network, the server (server is provided with presetting database) of the files such as audio frequency (i.e. the second file), when mobile terminal sends target video file (i.e. the first file), can first be processed target video file by fixing hash algorithm (also namely for the treatment of the hash algorithm of the second file), and each second Hash Value on the first Hash Value obtained and server is contrasted, if identical, just illustrate that target video file is the file sent, at this moment, only need that the first Hash Value is encapsulated as a file (i.e. the 3rd file) according to a set form and transfer to target terminal, target terminal downloads the video corresponding to the first Hash Value from server.
Step S104, if there is not the second Hash Value that value is identical with the first Hash Value in presetting database, from compressed encoding table, then read the compressed encoding corresponding to each unit string in the first file respectively, wherein, compressed encoding table is used for store compressed element and compresses compressed encoding corresponding to element.
Step S105, transmission comprises the 3rd file of compressed encoding corresponding to each unit string to target terminal.
After arranging according to character string the putting in order in the first file of correspondence by each compressed encoding, the 3rd file obtained is sent to target terminal.
By above-described embodiment, by obtaining the first Hash Value of the first file, wherein, the first file is the file needing to transmit, and the first file comprises multiple unit string; Judge the second Hash Value that in presetting database, whether existence value is identical with the first Hash Value, wherein, presetting database is for preserving the second file sent and the second Hash Value corresponding to the second file; If the second Hash Value that in presetting database, existence value is identical with the first Hash Value, then transmission comprises the 3rd file of the first Hash Value to target terminal; If there is not the second Hash Value that value is identical with the first Hash Value in presetting database, from compressed encoding table, then read the compressed encoding corresponding to each unit string in the first file respectively, wherein, compressed encoding table is used for store compressed element and compresses compressed encoding corresponding to element; Transmission comprises the 3rd file of compressed encoding corresponding to each unit string to target terminal.Thus solve in electric system and transmit the higher and technical matters that security is lower of the cost of data by mobile terminal, by compressing source document, reducing the size of file and improve the security of file.
In an optional scheme, above-mentioned compressed encoding table comprises Huffman code tables, in order to improve the compression ratio to the first file, before read the compressed encoding corresponding to each unit string in the first file respectively from compressed encoding table, the string assemble for store compressed element can be created; Read each unit string in the first file successively; Judge the compression element that in string assemble, whether existence value is identical with the unit string of reading; When there is not value with the identical compression element of unit string read in string assemble, using the unit string that reads as a compression element stored in string assemble; Generate Huffman code tables based on string assemble, wherein, Huffman code tables is used for store compressed element and unique compressed encoding corresponding to compression element.It should be noted that, the number of times also needing recording compressed element to occur while compression element is write string assemble, then be each compression element assignment compressed encoding, for the compressed encoding of the maximum compression Match of elemental composition shortest character of occurrence number, and ensure that the length of the compressed encoding that compression element that occurrence number is many is corresponding is no longer than the few compression element of occurrence number, thus the highest compression ratio can be ensured.
In another optional scheme, compressed encoding table comprises the Huffman code tables based on the second file generated, all files (comprising the first file and the second file) can be covered by same Huffman code tables, before read the compressed encoding corresponding to each unit string in the first file respectively from compressed encoding table, each unit string in the first file can be read successively; Judge the compression element that in Huffman code tables, whether existence value is identical with the unit string of reading; When there is not value with the identical compression element of unit string read in Huffman code tables, by the unit string read and the compressed encoding that generates based on the unit string read stored in Huffman code tables.Utilize the program, can be that each unit string generates corresponding compressed encoding, at the already present unit string of compressed encoding table, the compressed encoding before can continuing to use, for non-existent unit string, need according to regular length separately for it generates a compressed encoding.In the environment that requirement of real-time is higher, can the program be adopted, thus the speed of compression process can be improved.
It should be noted that, utilize the program carry out compression process after, based on the character string in the first file and the second file sent, above-mentioned Huffman code tables can be upgraded, namely the physical length of each unit string in the first file and each second file of having sent is added up, and regenerate corresponding compressed encoding according to its length, thus obtain the Huffman code tables of renewal.
Reading respectively from compressed encoding table in the embodiment of the present invention can comprise corresponding to the compressed encoding of each unit string in the first file: the positional information obtaining the Huffman code tables intermediate value compression element identical with unit string; According to the compressed encoding corresponding to the compression element that positional information read value is identical with unit string.Compression element and compressed encoding are sequential storage, and the length compressing element is fixed value, after the positional information (namely compressing the initial character address of element) of the compression element known, can add that on the basis of this address above-mentioned fixed value can obtain the address of the initial character of compressed encoding.
In order to compress file further, before transmission comprises the 3rd file to target terminal of compressed encoding corresponding to each unit string, can also judge in the 3rd file, whether existence is worth identical compressed encoding; In the 3rd file, existence is worth identical compressed encoding, substituted with a feature string by multiple compressed encodings with identical value, wherein, the length of feature string is less than compressed encoding.Namely the compressed encoding repeated in above-mentioned file is compressed further, thus the size of file can be reduced further.
It should be noted that, for aforesaid each embodiment of the method, in order to simple description, therefore it is all expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not by the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in instructions all belongs to preferred embodiment, and involved action and module might not be that the present invention is necessary.
The embodiment of the present invention additionally provides a kind of document conveying apparatus for electric system.It should be noted that, the document conveying apparatus for electric system of the embodiment of the present invention may be used for performing the file transmitting method for electric system that the embodiment of the present invention provides.
Fig. 2 is the schematic diagram of the document conveying apparatus for electric system according to the embodiment of the present invention.As shown in Figure 2, this device can comprise: acquiring unit 10, first judging unit 20, first delivery unit 30, first reading unit 40 and the second delivery unit 50.
Acquiring unit 10 is for obtaining the first Hash Value of the first file, and wherein, the first file is the file needing to transmit, and the first file comprises multiple unit string.
Second Hash Value of the first judging unit 20 for judging that in presetting database, whether existence value is identical with the first Hash Value, wherein, presetting database is for preserving the second file sent and the second Hash Value corresponding to the second file.
If the first delivery unit 30 is for second Hash Value identical with the first Hash Value of existence value in presetting database, then transmit comprise the first Hash Value the 3rd file to target terminal.
If for there is not value second Hash Value identical with the first Hash Value in presetting database in the first reading unit 40, from compressed encoding table, then read the compressed encoding corresponding to each unit string in the first file respectively, wherein, compressed encoding table is used for store compressed element and compresses compressed encoding corresponding to element.
Second delivery unit 50 for transmit comprise compressed encoding corresponding to each unit string the 3rd file to target terminal.
By above-described embodiment, obtained the first Hash Value of the first file by acquiring unit, wherein, the first file is the file needing to transmit, and the first file comprises multiple unit string; First judging unit judges the second Hash Value that in presetting database, whether existence value is identical with the first Hash Value, and wherein, presetting database is for preserving the second file sent and the second Hash Value corresponding to the second file; If the second Hash Value that in presetting database, existence value is identical with the first Hash Value, the first delivery unit then transmit comprise the first Hash Value the 3rd file to target terminal; If there is not the second Hash Value that value is identical with the first Hash Value in presetting database, first reading unit then reads the compressed encoding corresponding to each unit string in the first file respectively from compressed encoding table, wherein, compressed encoding table is used for store compressed element and compresses compressed encoding corresponding to element; Second delivery unit transmission comprises the 3rd file of compressed encoding corresponding to each unit string to target terminal.Thus solve in electric system and transmit the higher and technical matters that security is lower of the cost of data by mobile terminal, by compressing source document, reducing the size of file and improve the security of file.
In an optional scheme, above-mentioned compressed encoding table comprises Huffman code tables, in order to improve the compression ratio to the first file, said apparatus can also comprise: creating unit, for before read the compressed encoding corresponding to each unit string in the first file respectively from compressed encoding table, create the string assemble being used for store compressed element; Second reading unit, for reading each unit string in the first file successively; Second judging unit, for the compression element judging that in string assemble, whether existence value is identical with the unit string of reading; First storage unit, for there is not value with the identical compression element of unit string read in string assemble, using the unit string that reads as a compression element stored in string assemble; Generation unit, for generating Huffman code tables based on string assemble, wherein, Huffman code tables is used for store compressed element and unique compressed encoding corresponding to compression element.It should be noted that, the number of times also needing recording compressed element to occur while compression element is write string assemble, then be each compression element assignment compressed encoding, for the compressed encoding of the maximum compression Match of elemental composition shortest character of occurrence number, and ensure that the length of the compressed encoding that compression element that occurrence number is many is corresponding is no longer than the few compression element of occurrence number, thus the highest compression ratio can be ensured.
In another optional scheme, compressed encoding table comprises the Huffman code tables based on the second file generated, all files (comprising the first file and the second file) can be covered by same Huffman code tables, above-mentioned device can also comprise: third reading gets unit, for before read the compressed encoding corresponding to each unit string in the first file respectively from compressed encoding table, read each unit string in the first file successively; 3rd judging unit, for the compression element judging that in Huffman code tables, whether existence value is identical with the unit string of reading; Second storage unit, for there is not value with the identical compression element of unit string read in Huffman code tables, by the unit string read and the compressed encoding that generates based on the unit string read stored in Huffman code tables.Utilize the program, can be that each unit string generates corresponding compressed encoding, at the already present unit string of compressed encoding table, the compressed encoding before can continuing to use, for non-existent unit string, need according to regular length separately for it generates a compressed encoding.In the environment that requirement of real-time is higher, can the program be adopted, thus the speed of compression process can be improved.
It should be noted that, utilize the program carry out compression process after, based on the character string in the first file and the second file sent, above-mentioned Huffman code tables can be upgraded, namely the physical length of each unit string in the first file and the second file of having sent is added up, and regenerate corresponding compressed encoding according to its length, thus obtain the Huffman code tables of renewal.
The first reading unit in above-described embodiment is also for obtaining the positional information of the Huffman code tables intermediate value compression element identical with unit string; According to the compressed encoding corresponding to the compression element that positional information read value is identical with unit string.
In order to compress file further, the second delivery unit also for transmission comprise the 3rd file to target terminal of compressed encoding corresponding to each unit string before, judge in the 3rd file, whether existence is worth identical compressed encoding; In the 3rd file, existence is worth identical compressed encoding, substituted with a feature string by multiple compressed encodings with identical value, wherein, the length of feature string is less than compressed encoding.Namely the compressed encoding repeated in above-mentioned file is compressed further, thus the size of file can be reduced further.
The modules provided in the present embodiment is identical with the using method that the corresponding step of embodiment of the method provides, application scenarios also can be identical.It is noted, of course, that the scheme that above-mentioned module relates to can be not limited to content in above-described embodiment and scene, and above-mentioned module may operate in terminal or mobile terminal, can pass through software or hardware implementing.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
In the above embodiment of the present invention, the description of each embodiment is all emphasized particularly on different fields, in certain embodiment, there is no the part described in detail, can see the associated description of other embodiments.
In several embodiments that the application provides, should be understood that, disclosed technology contents, the mode by other realizes.Wherein, device embodiment described above is only schematic, the such as division of described unit, can be that a kind of logic function divides, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of unit or module or communication connection can be electrical or other form.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form of SFU software functional unit also can be adopted to realize.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (10)

1. for a file transmitting method for electric system, it is characterized in that, comprising:
Obtain the first Hash Value of the first file, wherein, described first file is the file needing to transmit, and described first file comprises multiple unit string;
Judge the second Hash Value that in presetting database, whether existence value is identical with described first Hash Value, wherein, described presetting database is for preserving the second file sent and described second Hash Value corresponding to described second file;
If described second Hash Value that in described presetting database, existence value is identical with described first Hash Value, then transmission comprises the 3rd file of described first Hash Value to target terminal;
If there is not described second Hash Value that value is identical with described first Hash Value in described presetting database, from compressed encoding table, then read the compressed encoding corresponding to unit string described in each in described first file respectively, wherein, described compressed encoding table is used for store compressed element and compressed encoding corresponding to described compression element;
Transmit the 3rd file extremely described target terminal comprising compressed encoding corresponding to unit string described in each.
2. method according to claim 1, it is characterized in that, described compressed encoding table comprises Huffman code tables, and before read the compressed encoding corresponding to unit string described in each in described first file respectively from compressed encoding table, described method also comprises:
Create the string assemble for storing described compression element;
Read each unit string in described first file successively;
Judge the compression element that in described string assemble, whether existence value is identical with the described unit string of reading;
When there is not value with the identical compression element of described unit string read in described string assemble, using the described unit string that reads as a compression element stored in described string assemble;
Generate described Huffman code tables based on described string assemble, wherein, described Huffman code tables is for storing described compression element and unique compressed encoding corresponding to described compression element.
3. method according to claim 1, it is characterized in that, described compressed encoding table comprises the Huffman code tables based on described second file generated, before read the compressed encoding corresponding to unit string described in each in described first file respectively from compressed encoding table, described method also comprises:
Read each unit string in described first file successively;
Judge the compression element that in described Huffman code tables, whether existence value is identical with the described unit string of reading;
When there is not value with the identical compression element of described unit string read in described Huffman code tables, by the described unit string read and the compressed encoding that generates based on the described unit string read stored in described Huffman code tables.
4. according to the method in claim 2 or 3, it is characterized in that, from compressed encoding table, read the compressed encoding corresponding to unit string described in each in described first file respectively comprise:
Obtain the positional information of the described Huffman code tables intermediate value compression element identical with described unit string;
According to the compressed encoding corresponding to the compression element that described positional information read value is identical with described unit string.
5. method as claimed in any of claims 1 to 3, is characterized in that, before transmitting the 3rd file that comprises compressed encoding corresponding to unit string described in each to described target terminal, described method also comprises:
Judge in described 3rd file, whether existence is worth identical compressed encoding;
In described 3rd file, existence is worth identical compressed encoding, substituted by multiple compressed encodings with identical value with a feature string, wherein, the length of described feature string is less than described compressed encoding.
6. for a document conveying apparatus for electric system, it is characterized in that, comprising:
Acquiring unit, for obtaining the first Hash Value of the first file, wherein, described first file is the file needing to transmit, and described first file comprises multiple unit string;
First judging unit, for the second Hash Value judging that in presetting database, whether existence value is identical with described first Hash Value, wherein, described presetting database is for preserving the second file sent and described second Hash Value corresponding to described second file;
First delivery unit, if for described second Hash Value identical with described first Hash Value of existence value in described presetting database, then transmit comprise described first Hash Value the 3rd file to target terminal;
First reading unit, if for there is not value described second Hash Value identical with described first Hash Value in described presetting database, from compressed encoding table, then read the compressed encoding corresponding to unit string described in each in described first file respectively, wherein, described compressed encoding table is used for store compressed element and compressed encoding corresponding to described compression element;
Second delivery unit, for transmitting the 3rd file extremely described target terminal comprising compressed encoding corresponding to unit string described in each.
7. device according to claim 6, is characterized in that, described compressed encoding table comprises Huffman code tables, and described device also comprises:
Creating unit, for before read the compressed encoding corresponding to unit string described in each in described first file respectively from compressed encoding table, creates the string assemble for storing described compression element;
Second reading unit, for reading each unit string in described first file successively;
Second judging unit, for the compression element judging that in described string assemble, whether existence value is identical with the described unit string of reading;
First storage unit, for there is not value with the identical compression element of described unit string read in described string assemble, using the described unit string that reads as a compression element stored in described string assemble;
Generation unit, for generating described Huffman code tables based on described string assemble, wherein, described Huffman code tables is for storing described compression element and unique compressed encoding corresponding to described compression element.
8. device according to claim 6, is characterized in that, described compressed encoding table comprises the Huffman code tables based on described second file generated, and described device also comprises:
Third reading gets unit, for before read the compressed encoding corresponding to unit string described in each in described first file respectively from compressed encoding table, reads each unit string in described first file successively;
3rd judging unit, for the compression element judging that in described Huffman code tables, whether existence value is identical with the described unit string of reading;
Second storage unit, for there is not value with the identical compression element of described unit string read in described Huffman code tables, by the described unit string read and the compressed encoding that generates based on the described unit string read stored in described Huffman code tables.
9. the device according to claim 7 or 8, is characterized in that, described first reading unit is also for obtaining the positional information of the described Huffman code tables intermediate value compression element identical with described unit string; According to the compressed encoding corresponding to the compression element that described positional information read value is identical with described unit string.
10. according to the device in claim 6 to 8 described in any one, it is characterized in that, described second delivery unit also for before transmitting the 3rd file that comprises compressed encoding corresponding to unit string described in each to described target terminal, judges in described 3rd file, whether existence is worth identical compressed encoding; In described 3rd file, existence is worth identical compressed encoding, substituted by multiple compressed encodings with identical value with a feature string, wherein, the length of described feature string is less than described 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 true CN105447393A (en) 2016-03-30
CN105447393B 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
孙妙平: "电力系统测量数据的压缩、传输及解压研究", 《中国优秀硕士学位论文全文数据库》 *

Also Published As

Publication number Publication date
CN105447393B (en) 2018-06-01

Similar Documents

Publication Publication Date Title
US20190007165A1 (en) Polar code encoding method and device
CN106815875B (en) Method and device for encoding and decoding information bitmap
CN104199951B (en) Web page processing method and device
CN104412601A (en) System and method for single KVM client accommodating multiple different video compression technologies
CN104917586A (en) Verification method, device and system of transmitted data
CN105052040A (en) System and method for multi-stream compression and decompression
CN102780685A (en) Method and system for compressing and encrypting data
CN105207975A (en) Data transmission method and data transmission system for USB image equipment under VDI architecture
CN104079950A (en) Video output processing method, device and system and video receiving processing method, device and system
CN113625589A (en) Equipment control method and device, electronic equipment and storage medium
CN104468044A (en) Data compression method and device applied to network transmission
CN102938683A (en) Data processing method and device
KR102138892B1 (en) Apparatus for compressing data losslessly and method thereof
CN113691812B (en) Hongmon system-based distributed video processing method, terminal and readable medium
CN104123244A (en) USB redirection system and method
CN113163198B (en) Image compression method, decompression method, device, equipment and storage medium
EP3745375A1 (en) Method for transmitting signal via mesh network and remote control system thereof
CN105119957A (en) Information transmission method and device used for intelligent device
CN114614829A (en) Satellite data frame processing method and device, electronic equipment and readable storage medium
CN105447393A (en) File transfer method and file transfer device for electric power system
CN101309259B (en) Distributed image display method
CN111259013A (en) Method and device for storing data
CN103514407B (en) The virus method and system of the audio-video document of production net are transferred to from Office Network
JP6283728B2 (en) Mass data transfer apparatus and method
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