CN109933569A - The deployment method and relevant device of a kind of merging method of file, file - Google Patents

The deployment method and relevant device of a kind of merging method of file, file Download PDF

Info

Publication number
CN109933569A
CN109933569A CN201910082138.3A CN201910082138A CN109933569A CN 109933569 A CN109933569 A CN 109933569A CN 201910082138 A CN201910082138 A CN 201910082138A CN 109933569 A CN109933569 A CN 109933569A
Authority
CN
China
Prior art keywords
file
format
merging
storage
byte
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
CN201910082138.3A
Other languages
Chinese (zh)
Other versions
CN109933569B (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910082138.3A priority Critical patent/CN109933569B/en
Publication of CN109933569A publication Critical patent/CN109933569A/en
Priority to PCT/CN2019/118801 priority patent/WO2020155780A1/en
Application granted granted Critical
Publication of CN109933569B publication Critical patent/CN109933569B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Deployment method, computer equipment and the storage medium of the merging method of file proposed by the present invention based on data processing, file, wherein method includes: to obtain the cat order of user's input, obtains the first file of multiple different-formats to be combined from designated position according to cat order;Multiple first files are spliced in the way of the byte end position that the byte initial position of the first file of the latter is spliced to previous first file, until the splicing of all first files is completed to obtain merging file;File will be merged to store using any format in the different-format of multiple first files as storage format to designated position, it is not interfere with each other between each file in the merging file obtained by above-mentioned merging method, when promoting to client, only one transmission channel can complete the transmission of multiple files, and corresponding content can be opened by multiple format software and be shown to a file, it is extremely convenient that user opens browsing viewing.

Description

The deployment method and relevant device of a kind of merging method of file, file
Technical field
The present invention relates to the technical field of data processing, the merging method of file a kind of, file are especially related to Deployment method and relevant device.
Background technique
Current file is promoted the mode propagated and is only capable of when such as promoting, being only capable of using video, text using single file propagation Any formatted file of the formats such as shelves, picture is transmitted, and is if desired all promoted to the file of multiple format, needs to transmit Multiple files, on the one hand, at high cost for enterprise's angle, on the other hand very not convenient from the point of view of customer perspective, this is just needed Transmission popularization will be carried out again after various file mergencess.
In the prior art, the file mergences of different-format obtains one generally by multiple compressing files are merged in turn A compressed file is needed in this way by can just see after decompression, and what is obtained after decompressing is still multiple files, is not only accounted for Space, core position, and it is troublesome in poeration.
Additionally there are the technology that picture, document etc. are assembled to same file, but this kind of method is by the two content set It closes in one file, such as picture file is inserted into the merging file of document files formation, user opens this document can be same When both see the content merged, and the content of some two parts of files of situation does not need to merge, such as has first Yi Liangge company, first company are video promotional file, and company B is document promotional file, if passing through the above method first and second The promotional content of company can only gather together, and can not be combined into a file in advance under, user can check respectively again Respective content.
Summary of the invention
The main object of the present invention be the merging method that a kind of file is provided, the deployment method of file, computer equipment and Storage medium, it is intended to content can only be merged when solving to merge different-format file or be caused by compressing to merge using extremely Inconvenient problem.
Based on foregoing invention purpose, the present invention proposes a kind of merging method of file, comprising:
The cat order of user's input is obtained, the cat order is for merging the file of different-format;
The first file of multiple different-formats to be combined is obtained from designated position according to the cat order;Wherein, described First file includes the protocol information of respective file format, and the protocol information includes the association positioned at byte initial position in file Head is discussed, the protocol header includes byte initial position, byte end position and from the byte initial position to the byte The information of byte length between end position;
Multiple first files are spliced according to the byte initial position of the first file described in the latter to previous institute The mode for stating the byte end position of the first file is spliced, until all first file splicings are completed to be merged File;
By the merging file using any format in the different-format of multiple first files as storage format It stores to the designated position.
Further, it is described by the merging file with any format in the different-format of multiple first files The step of storing as storage format to the designated position, comprising:
Obtain the format information for the merging file storage of user's input;
The merging file is stored with the storage format to the designated position according to the format information.
Further, first file includes JPG formatted file and non-JPG formatted file, it is described will be multiple described First file splices according to the byte initial position of the first file described in the latter to the byte knot of previous first file The mode of tail position is spliced, until all first file splicings are completed to obtain the step of merging file, comprising:
By the non-JPG formatted file by carrying out packing compression after the cat Command combination, to obtain non-JPG lattice Formula compressed file;
By the non-JPG format compression file and the JPG formatted file according to the byte start bit of the latter file It sets to splice to the mode of the byte end position of previous file and be spliced to obtain the merging file.
The present invention also provides a kind of deployment methods of merging file obtained such as above-mentioned merging method, comprising:
It obtains user and information is opened to the merging file is opened first by ocr software;
Judge whether the reading format of the ocr software is the storage format according to the first opening information;
If so, the first file of the storage format will be corresponded in the merging file according to the first opening information Content is shown.
Further, the first file of the multiple different-format to be combined include the first format the first file and First file of the second format, the storage format are first format, it is described open information according to described first will be described After the step of content for the first file for corresponding to the storage format in merging file is shown, comprising:
The change information that user changes the storage format is obtained, the change information includes corresponding second format Format suffix name;
According to it is described change information by it is described merge file storage format from first form modifying at described second Format;
It obtains user and is believed second opening for merging File Open by the corresponding ocr software of second format Breath;
The content of the first file of second format will be corresponded in the merging file according to the second opening information It is shown.
Further, described to correspond to the of the storage format in the merging file according to the first opening information The step of content of one file is shown, comprising:
First that file format is the storage format is found in the merging file according to the first opening information First protocol header of file;
Corresponding first byte initial position and the first byte length are obtained, and from first protocol header with described First byte initial position is the file content that starting point extracts corresponding first byte length;
The file content is parsed and shown.
Further, the format information of the storage format includes the suffix name of format, described to open according to described first Information judged after the step of whether the reading format of the ocr software is the storage format, comprising:
If the reading format is not the storage format, judge whether the reading format is a variety of not appositions Except any of the storage format in formula;
If the reading format is in a variety of different-formats except any of the storage format, described in judgement Whether ocr software is the ocr software that can ignore that the format suffix name of file;
If the ocr software is the ocr software that can ignore that the format suffix name of file, pass through the ocr software It is shown by the merging File Open, and by the content of correspondence first file for reading format;Otherwise, stop opening The merging file.
Further, described to judge whether the ocr software is the ocr software that can ignore that the format suffix name of file The step of after, comprising:
If the ocr software is not the ocr software that can ignore that the format suffix name of file, it is soft to obtain the reading The reading format of part;
The format suffix name for merging file is modified to according to the reading format to correspond to the lattice for reading format Formula suffix name, and by the ocr software by the merging File Open, by correspondence first file for reading format Content is shown.
The present invention also provides a kind of computer equipment, including memory and processor, the memory is stored with computer The step of program, the processor realizes the above method when executing the computer program.
The present invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, the computer The step of above method is realized when program is executed by processor.
The invention has the benefit that the file mergences of multiple and different formats is merged at one by above-mentioned merging method It is not interfere with each other between file and each file, in this way when needing to promote to client, it is only necessary to which a transmission channel can be completed more The transmission of a file, and corresponding content can be opened by multiple format software and be shown to a file, user opens browsing Viewing is extremely convenient.
Detailed description of the invention
Fig. 1 is the step schematic diagram of the merging method of file in one embodiment of the invention;
Fig. 2 is the step schematic diagram for merging the deployment method of file in one embodiment of the invention;
Fig. 3 is the structural schematic block diagram of the computer equipment of one embodiment of the invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
Referring to Fig.1, the merging method of the file in the present embodiment, comprising:
Step S1: the cat order of user's input is obtained, the cat order is for merging the file of different-format;
Step S2: the first file of multiple different-formats to be combined is obtained from designated position according to the cat order;Its In, first file includes the protocol information of respective file format, and the protocol information includes being located at byte starting in file The protocol header of position, the protocol header include byte initial position, byte end position and from the byte initial position to The information of byte length between the byte end position;
Step S3: multiple first files are spliced according to the byte initial position of the first file described in the latter to preceding The mode of the byte end position of one first file is spliced, until all first file splicings are completed to obtain To merging file;
Step S4: by the merging file using any format in the different-format of multiple first files as depositing Storage format is stored to the designated position.
As described in above-mentioned steps S1 and S2, different-format file, which is merged, to be realized by cat order, cat (cat is writing a Chinese character in simplified form for concatenate, refers to display or multiple text files are connected) order is a kind of linux system (meter Calculation machine operating system) under by the order of file mergences, specifically, can be directly inputted by user, then system obtains the life It enables.After getting the cat order, the cat order is executed, gets the first file to be combined from designated position first, on Stating the first file to be combined is to preset ready file, is stored in designated position, such as the present count of storage system According in library, obtained directly from presetting database when needing.First file is propagated for merging and then promoting, and can be difference The file of format, such as video format, PDF format, TXT format and word formatted file.It is understood that by different-format File mergences be to merge the byte in more parts of file contents, each file itself carries protocol information, agreement letter Breath includes protocol rule, byte length, Format Type etc..Specifically, can be above-mentioned to describe by character that the format is arranged Protocol information, the combination of such as letter, number or both, the protocol information of above-mentioned file format is the specification information of the format, It is above-mentioned Format Type including attribute informations, the identification label such as Length (length) and Identifier (identification label), These attribute informations can be represented by character that the format is arranged, as FIF format protocol information in Identifier belong to Property, 5 bytes are accounted on this document head, corresponding character is " " JFIF "+" 0 " ", for another example in video format, protocol information packet The attributes such as box size, box type are included, wherein box type attribute indicates type, accounts for 4 bytes, and corresponding character is video Layout character (such as " ftyp ", " moov ").In the present embodiment for ease of description, the word of protocol information will be had before file Section is defined as protocol header, and protocol header includes byte initial position, byte end position and from byte initial position to byte The information of byte length between end position.
As described in above-mentioned steps S3 and S4, according to cat order by the file of multiple and different formats by byte head and the tail splicing Mode merges, i.e., splices according to the byte initial position of the first file of the latter to the byte ending of previous first file The mode of position is spliced, until the splicing of all first files is completed, obtains above-mentioned merging file, each in merging file in this way Content between kind format is not interfere with each other.It is formed the merging file after merging file in above-mentioned first file different-format Any format store as storage format to above-mentioned designated position.
Citing ground, file 1 and file 2 are merged, and will first need combined file 1, file 2 to store to designated position, so After will be using cat order, such as user's input is cat+ file 1 (file name)+file 2 (file name) → merging file (title), this results in cat orders, are searched according to the title of file 1 and file 2 in designated position according to the cat order, File 1 and file 2 are obtained after finding, is then merged, and 2 byte initial position of file is spliced to file 1 when merging Byte end position, merge after storage arrive designated position, the title of the merging file be aforesaid operations input " merge File (title) ".When being read using ocr software, ocr software finds the protocol header of corresponding first file, and then parses The content of this section of byte length, is shown, above-mentioned ocr software can be the various softwares for being used to watch file content, such as PDF reader, video player, word reader etc..
In one embodiment, above-mentioned steps S4, comprising:
Step S41: the format information for the merging file storage of user's input is obtained;
Step S42: the merging file is stored with the storage format to the specific bit according to the format information It sets.
It, can be using any format in the first file different-format as storage lattice due to merging file in the present embodiment Formula, so before storing, one of which can be selected to store again as storage format by user, above-mentioned format information packet The format suffix name for merging file is included, when the format suffix name for getting user's input, then can will merge file in that format The format of suffix name is stored, it should be noted that in the entitled above-mentioned first file different-format of format suffix of user's input Any suffix name, the format that such user can according to actual needs after consolidation directly be wanted merging file with user It stores to designated position, avoids the trouble for needing changing format when subsequent use, such as one by video format file and PDF Formatted file merges file made of merging by above-mentioned merging method, which is frequently used and first Video format file is used, PDF format file only uses once in a while, then directly according to user when storing after consolidation Needs stored file is merged with video format, make user more convenient to use.In another example, it will be regarded if user wants The promotional file of frequency format and PDF format merge after merging file promote to client, and in practice for client for What is received at the beginning is that video council is more attractive, then at this moment user can input regards when storage according to actual needs The format information of frequency so that the storage format for merging file is video format, then is promoted to client.
In one embodiment, above-mentioned first file includes JPG formatted file and non-JPG formatted file, then above-mentioned step Suddenly S3 includes:
Step S31: by the non-JPG formatted file by carrying out packing compression after the cat Command combination, to obtain Non- JPG format compression file;
Step S32: by the non-JPG format compression file and the JPG formatted file according to the word of the latter file Section initial position, which is spliced to the mode of the byte end position of previous file, is spliced to obtain the merging file.
It can also include JPG formatted file and non-JPG format text in the present embodiment, in the file of above-mentioned different-format Non- JPG formatted file (such as mp4 format, PDF format, TXT format and word format file) is then first passed through above-mentioned conjunction by part And method is merged and is recompressed later, i.e., according to packing compression is being carried out after above-mentioned cat Command combination, to obtain one Non- JPG format compression file, then the non-JPG format compression file is merged with above-mentioned JPG formatted file, when user wants merging When checking the content of JPG formatted file in file, it is opened using image reading device, if also want to watch other one Combined file is played, then compressed file is decompressed using decompression tool, is at this moment removed after above-mentioned compressed file decompression But then the secondary merging file of JPG formatted file carries out checking the secondary merging file using the ocr software of corresponding format ?.
In conclusion by above-mentioned merging method, by the file mergences of multiple and different formats at a merging file, in this way When needing to promote to client, it is only necessary to which a transmission channel can disposably complete the transmission of multiple files, and due to the merging The file of different-format in file is not interfere with each other, and be may recognize that in merging file by ocr software and is corresponded to ocr software format Content, and can extract this partial content when opening and shown, i.e., a file can pass through the soft of a variety of different-formats Corresponding content is opened and shown to part, and it is extremely convenient that user opens browsing viewing.
Referring to Fig. 2, the present invention also provides a kind of method for opening above-mentioned merging file, which includes:
Step S5: obtaining user by ocr software and open information to the merging file is opened first,
Step S6: judge whether the reading format of the ocr software is the storage lattice according to the first opening information Formula;
Step S7: if so, according to the first opening information the of the storage format will be corresponded in the merging file The content of one file is shown.
In the present embodiment, after synthesizing above-mentioned merging file, which can be extended to user client, Above-mentioned merging file can be broadcasting media promotional file, above-mentioned first file can be various different-formats file, as video, The file of the formats such as PDF, TXT and word.As described in above-mentioned steps S5, after client receives above-mentioned merging file, use Family can carry out opening viewing to the merging file, when user opens merging file by ocr software, client It gets first opened to merging file and opens information.
As described in above-mentioned steps S6 and step S7, it is to be understood that generalling use which type of ocr software can only The corresponding file for reading format is opened, such as PDF reader opening is pdf document, video player can only open video File, word reader can only open word document file etc., if not the corresponding file for reading format, it is understood that there may be nothing Method opens file, can not show the case where respective file content.And since the ocr software that user uses is unknown, so showing Before content, the reading format of ocr software can be obtained by the first opening information, then judges the reading lattice of ocr software Whether formula is the corresponding storage format for merging file, such as is merged when merging file by MP4 file and pdf document, that Storage format can for both MP4 and PDF any one of, if storage format be MP4, then judgement read format be also When MP4, that is, show that user opens the merging file using MP4 player, at this moment can open information according to first will merge The content of MP4 file in file is shown.
In one embodiment, it is soft to adapt it to corresponding reading for the storage format that file can also be merged by modification The reading format of part.First file of above-mentioned multiple different-formats to be combined includes the first file and second of the first format First file of format, wherein above-mentioned storage format is the first format, then after above-mentioned steps S7, comprising:
Step S71: obtaining user and change the change information of the storage format, and the change information includes correspondence described the The format suffix name of two formats;
Step S72: according to it is described change information by it is described merge file storage format from first form modifying at Second format;
Step S73: user is obtained by the corresponding ocr software of second format and merges the of File Open for described Two open information;
Step S74: the first text of second format will be corresponded in the merging file according to the second opening information The content of part is shown.
In the present embodiment, above-mentioned first format and the second format all can be above-mentioned video, PDF, TXT and word etc. Any one of format, and the first format and the second format be not identical, according to user's needs, can modify to merging file lattice Formula (format that the format of the modification must include for merging file).Specifically, after can be by modifying the format for merging file Sew the first form modifying into the second format, the change information of above-mentioned user's input is that modification merges file format suffix name Information needs the first format being changed to the second format in the present embodiment including the format suffix name after change, then this is more The format suffix name that breath includes corresponding second format is converted to, such as certain banking company, by loan briefing material word document and popularization Small video is merged into a merging file, and be sent to client, in the client with the storage of MP4 format, then composite document Video file can be played out directly by MP4 player, when its suffix name is changed to word document suffix name (such as When .doc), then merging the word document in file can be opened by word reader.
Citing ground, by the promotional videos (MP4 formatted file) of company A and the detailed character introduction (PDF format) of product It is merged into a merging file, which is generalized to the client of user with MP4 format, at this moment user can be using view Then frequency player direct viewing promotional videos are led to if interested can also directly modify the format suffix name for merging file Cross the product introduction that PDF reader further checks PDF format, such user do not need with the secondary interaction of company A, facilitate province Thing.
In one embodiment, above-mentioned steps S7, comprising:
Step S701: it is the storage lattice that file format is found in the merging file according to the first opening information The protocol header of first file of formula;
Step S702: corresponding first byte initial position and the first byte long are obtained from first protocol header Degree, and the file content for corresponding to first byte length is extracted as starting point using first byte initial position;
Step S703: the file content is parsed and is shown.
In the present embodiment, the first file for merging every kind of format in file is not interfere with each other, and accounts for the portion merged in file Divide memory, and the first file of every kind of format has corresponding protocol header in merging file, so that ocr software carries out it Identification.When opening using ocr software to merging file, it is literary in merging that information is opened according to first obtained when opening The first protocol header that the first file of corresponding storage format is searched in part, obtains the first byte start bit from first protocol header It sets and the first byte length, then using the first byte initial position as starting point, end position is terminal, extracts the first byte long File content in degree, these file contents are the file content of corresponding above-mentioned storage format, as correspond to storage format Then the content of first file again shows this document content.
In another embodiment, user can edit the format of the merging file, be used for obtaining merging file The storage format of storage.Such as user clicks directly on and merges file to show multiple selective formats, with then to these Format is selected, and as included tri- kinds of mp4, PDF, TXT in these formats, user can click one of format of selection at this time, Client can get the format information of user's input, and the format selected above-mentioned user according to the format information is as merging Then the storage format of file is stored to client designated position.It certainly, can also be with if user wants to change another format into Another format is substituted for by selecting.The step of user modifies format can be saved in this way, by selecting format directly may be used It is more convenient to open the file of corresponding format.
In one embodiment, the format information of above-mentioned storage format includes the suffix name of format, after above-mentioned steps S6, also Include:
Step S61: if the reading format is not the storage format, judge whether the reading format is described more Except any of the storage format in kind different-format;
Step S62: if the reading format is in a variety of different-formats except any of the storage format, Judge whether the ocr software is the ocr software that can ignore that the format suffix name of file;
Step S63: if the ocr software is the ocr software that can ignore that the format suffix name of file, by described Ocr software is shown by the merging File Open, and by the content of correspondence first file for reading format;Otherwise, Stop opening the merging file.
In the present embodiment, when judging above-mentioned reading format is not storage format, that is, showing cannot be straight using ocr software Above-mentioned merging file is taken out, but above-mentioned reading format may be except a variety of of the first file except above-mentioned storage format Any one of format, due to having various different ocr softwares in identical reading format, and different ocr softwares is corresponding real The code of its existing function will not be identical, and the format suffix name that file can be ignored in some of them ocr software code will directly have The File Open of the reading format, and some are then not all right, such as the first and second two kinds of video players, first video player can only be to suffix The file of entitled WMV is opened, and second video player can then ignore the suffix name of file, as long as in file including view Frequency file can be opened, and merge file if at this moment opening, and the content of displaying is corresponding the first file content for reading format, and It is not the first file content of storage format.So this step needs, which continue judgement, reads whether format is a variety of different-formats In except any of the storage format, if it is not, the reading format of i.e. ocr software is not a variety of lattice in the first file Formula it is any, matched first file can not be found, so stop opening above-mentioned merging file.If but above-mentioned reading format is Except any of storage format in a variety of different-formats, then judging ocr software not is the format suffix name that can ignore that file Ocr software, due to can ignore that the ocr software of format suffix name can go out corresponding protocol header with Direct Recognition, so work as Ocr software identifies protocol header i.e. and can determine whether that it is that can ignore that the ocr software of the format suffix name of file, while will correspond to It reads the first File Open of format and shows.
Citing ground, above-mentioned merging file is by the of the first file of MP4 format, the first file of PDF format and TXT format One file mergences forms, and storage format is MP4 format, first when user opens merging file using ocr software The reading format for first judging ocr software is MP4 format, if it is, by ocr software open be video file, First file of i.e. above-mentioned MP4 format;If it is not, whether judging to read format again except other two except MP4 format Kind, i.e., it is PDF format or TXT format that format is read in judgement, if reading format is not PDF format or TXT format, that Above-mentioned merging file can not be opened at this time, that is, stops opening.If reading format is PDF format, judge to ocr software Whether it is the software that can ignore that format suffix name, if what is then opened is the first file of PDF format, is if reading format TXT format then judges whether to ocr software be the software that can ignore that format suffix name, if what is then opened is TXT format The first file can not equally be opened at this time above-mentioned if ocr software is not the software that can ignore that format suffix name Merge file.
In one embodiment, after above-mentioned steps S62, comprising:
Step S64: if the ocr software is not the ocr software that can ignore that the format suffix name of file, institute is obtained State the reading format of ocr software;
Step S65: it is modified to the format suffix name for merging file to correspond to the reading according to the reading format The format suffix name of format, and by the ocr software by the merging File Open reads the of format for correspondence is described The content of one file is shown.
It is the ocr software that can ignore that format suffix name when judging ocr software not, i.e., this is read at this time in the present embodiment Above-mentioned merging file cannot be opened by reading software, at this moment can obtain the reading format of ocr software, and identify that the reading format is Which kind of format, is then modified to the corresponding format suffix name for reading format for the format suffix name for merging file, which can lead to It crosses the code write to realize, when the suffix name that the format suffix name for merging file is modified to reading format, then openable conjunction And file, and display is the content of corresponding the first file for reading format.
The merging device of file provided by the invention, comprising:
Order unit is obtained, for obtaining the cat order of user's input, the cat order is for merging different-format File;
File unit is obtained, for obtaining multiple different-formats to be combined from designated position according to the cat order First file;Wherein, first file includes the protocol information of respective file format, and the protocol information includes being located at file The protocol header of middle byte initial position, the protocol header include byte initial position, byte end position and from the byte Information of the initial position to byte length between the byte end position;
Splice file unit, for the byte start bit by multiple first files according to the first file described in the latter It sets to splice to the mode of the byte end position of previous first file and be spliced, until all first files are spelled Completion is connect to obtain merging file;
Storage file unit, for by the merging file with any one of the different-format of multiple first files Format is stored as storage format to the designated position.
Such as described in above-mentioned acquisition order unit and acquisition file unit, different-format file, which is merged, can pass through cat To realize, cat (cat is writing a Chinese character in simplified form for concatenate, refers to display or multiple text files are connected) order is for order By the order of file mergences under linux system (a kind of computer operating system), specifically, can be directly inputted by user, Then system gets the order.After obtaining the cat order, the cat order is executed, is got first from designated position wait close And the first file, above-mentioned first file to be combined be preset ready file, be stored in designated position, such as deposit In the presetting database of storage system, obtained directly from presetting database when needing.These first files are for being merged into And promote and propagate, it can be the file of different-format, such as video format, PDF format, TXT format and word formatted file.It can be with Understand, is to merge the byte in more parts of file contents by the file mergences of different-format, each file itself carries There is protocol information, which includes protocol rule, byte length, Format Type etc.,.Specifically, the format can be passed through The character of agreement describes above-mentioned protocol information, the combination of such as letter, number or both, and the protocol information of above-mentioned file format is For the specification information of the format, including the attribute informations such as Length (length) and Identifier (identification label), the identification mark Note is above-mentioned Format Type, can represent these attribute informations by character that the format is arranged, as the agreement of FIF format is believed Identifier attribute in breath accounts for 5 bytes on this document head, and corresponding character is " " JFIF "+" 0 " " for another example in video In format, protocol information includes the attributes such as box size, box type, and wherein box type attribute indicates type, accounts for 4 words Section, corresponding character are the layout character of video (such as " ftyp ", " moov ").In the present embodiment for ease of description, by file Preceding several bytes with protocol information are defined as protocol header, protocol header include byte initial position, byte end position with And from byte initial position to the information of byte length byte end position.
As described in above-mentioned splicing file unit and storage file unit, according to cat order by the file of multiple and different formats It merges, i.e., splices according to the byte initial position of the first file of the latter to previous the in such a way that byte head and the tail splice The mode of the byte end position of one file is spliced, until the splicing of all first files is completed, obtains above-mentioned merging file, Merge the content in file between various formats in this way not interfereing with each other.It is formed the merging file after merging file with above-mentioned the Any format in one file different-format is stored as storage format to above-mentioned designated position.
Citing ground, file 1 and file 2 are merged, and will first need combined file 1, file 2 to store to designated position, so After will be using cat order, such as user's input is cat+ file 1 (file name)+file 2 (file name) → merging file (title), this results in cat orders, are searched according to the title of file 1 and file 2 in designated position according to the cat order, File 1 and file 2 are obtained after finding, is then merged, and 2 byte initial position of file is spliced to file 1 when merging Byte end position, merge after storage arrive designated position, the title of the merging file be aforesaid operations input " merge File (title) ".When being read using ocr software, ocr software can arrive the protocol header of corresponding first file, and then parsing should The content of section byte length, is shown, above-mentioned ocr software can be to be various for watching the software of file content, such as PDF Reader, video player, word reader etc..
In one embodiment, above-mentioned storage file unit, comprising:
Information sub-elements are obtained, for obtaining the format information for the merging file storage of user's input;
Storage file subelement, for according to the format information by the merging file with the storage format store to The designated position.
It, can be using any format in the first file different-format as storage lattice due to merging file in the present embodiment Formula, so before storing, one of which can be selected to store again as storage format by user, above-mentioned format information packet The format suffix name for merging file is included, when the format suffix name for getting user's input, then can will merge file in that format The format of suffix name is stored, it should be noted that in the entitled above-mentioned first file different-format of format suffix of user's input Any suffix name, the format that such user can according to actual needs after consolidation directly be wanted merging file with user It stores to designated position, avoids the trouble for needing changing format when subsequent use, such as one by video format file and PDF Formatted file merges file made of merging by above-mentioned merging method, which is frequently used and first Video format file is used, PDF format file only uses once in a while, then directly according to user when storing after consolidation Needs stored file is merged with video format, make user more convenient to use.In another example, it will be regarded if user wants The promotional file of frequency format and PDF format merge after merging file promote to client, and in practice for client for What is received at the beginning is that video council is more attractive, then at this moment user can input regards when storage according to actual needs The format information of frequency so that the storage format for merging file is video format, then is promoted to client.
In one embodiment, above-mentioned first file includes JPG formatted file and non-JPG formatted file, then above-mentioned spelling Connecing file unit includes:
Compressed file subelement, for the non-JPG formatted file to be packaged later by the cat Command combination Compression, to obtain non-JPG format compression file;
Splice file subelement, is used for the non-JPG format compression file and the JPG formatted file according to latter Splice to the mode of the byte end position of previous file and spliced to obtain the conjunction in the byte initial position of a file And file.
It can also include JPG formatted file and non-JPG format text in the present embodiment, in the file of above-mentioned different-format Non- JPG formatted file (such as mp4 format, PDF format, TXT format and word format file) is then first passed through above-mentioned conjunction by part And method is merged and is recompressed later, i.e., according to packing compression is being carried out after above-mentioned cat Command combination, to obtain one Non- JPG format compression file, then the non-JPG format compression file is merged with above-mentioned JPG formatted file, when user wants merging When checking the content of JPG formatted file in file, it is opened using image reading device, if also want to watch other one Combined file is played, then compressed file is decompressed using decompression tool, is at this moment removed after above-mentioned compressed file decompression But then the secondary merging file of JPG formatted file carries out checking the secondary merging file using the ocr software of corresponding format ?.
In conclusion by above-mentioned merging device, by the file mergences of multiple and different formats at a merging file and each It is not interfere with each other between a file, in this way when needing to promote to client, it is only necessary to which a transmission channel can disposably be completed multiple The transmission of file, and since the file of the different-format in the merging file is not interfere with each other, conjunction may recognize that by ocr software And the content of ocr software format is corresponded in file, and this partial content can be extracted when opening and shown, i.e. a file Corresponding content can be opened and shown by the software of multiple format, and it is extremely convenient that user opens browsing viewing.
In one embodiment, the present invention also provides a kind of device for opening above-mentioned merging file, the device for opening packets It includes:
Opening unit is obtained, is opened by ocr software to the merging file is opened first for obtaining user Information,
Judge storage unit, for according to it is described first opening information judge the ocr software reading format whether be The storage format;
Content element is shown, when the reading format for the ocr software is the storage format, according to described first Information is opened to show the content for the first file for corresponding to the storage format in the merging file.
In the present embodiment, after synthesizing above-mentioned merging file, which can be extended to user client, Above-mentioned merging file can be broadcasting media promotional file, above-mentioned first file can be various different-formats file, as video, The file of the formats such as PDF, TXT and word.As described in above-mentioned acquisition opening unit, client receives the above-mentioned conjunction of broadcasting system And after file, user can carry out opening viewing to the merging file, when user is carried out by ocr software to file is merged When opening, client gets first opened to merging file and opens information.
As described in above-mentioned judgement storage unit and display content element, it is to be understood which type of is generallyd use Ocr software can only open the corresponding file for reading format, such as PDF reader opening is pdf document, video player Video file can only be opened, word reader can only open word document file etc., if not the corresponding text for reading format Part, it is understood that there may be file can not be opened, can not show the case where respective file content.And not due to the ocr software of user's use Know, so the reading format of ocr software can be obtained by the first opening information, then judgement is read before showing content Whether the reading format of software is the corresponding storage format for merging file, such as when merging file is by MP4 file and pdf document Merge, then storage format can for both MP4 and PDF any one of, if storage format be MP4, then judging When reading format is also MP4, that is, show that user opens the merging file using MP4 player, it at this moment can be according to first dozen Information is opened to show the content of the MP4 file merged in file.
In one embodiment, it is soft to adapt it to corresponding reading for the storage format that file can also be merged by modification The reading format of part.First file of above-mentioned multiple different-formats to be combined includes the first file and second of the first format First file of format, wherein above-mentioned storage format is the first format, the then device for opening of above-mentioned merging file, further includes:
Changing unit is obtained, the change information of the storage format is changed for obtaining user, the change information includes The format suffix name of corresponding second format;
Modify format unit, for according to the change information by the storage format for merging file from first lattice Formula is modified as second format;
Second opening unit, for obtaining user by the corresponding ocr software of second format for the merging file Second opened opens information;
Second display unit, for according to the second opening information second format will to be corresponded in the merging file The content of the first file shown.
In the present embodiment, above-mentioned first format and the second format all can be above-mentioned video, PDF, TXT and word etc. Any one of format, and the first format and the second format be not identical, according to user's needs, can modify to merging file lattice Formula (format that the format of the modification must include for merging file).Specifically, after can be by modifying the format for merging file Sew the first form modifying into the second format, the change information of above-mentioned user's input is that modification merges file format suffix name Information needs the first format being changed to the second format in the present embodiment including the format suffix name after change, then this is more The format suffix name that breath includes corresponding second format is converted to, such as certain banking company, by loan briefing material word document and popularization Small video is merged into a merging file, and be sent to client, in the client with the storage of MP4 format, then composite document Video file can be played out directly by MP4 player, when its suffix name is changed to word document suffix name (such as When .doc), then merging the word document in file can be opened by word reader.
Citing ground, by the promotional videos (MP4 formatted file) of company A and the detailed character introduction (PDF format) of product It is merged into a merging file, which is generalized to the client of user with MP4 format, at this moment user can be using view Then frequency player direct viewing promotional videos are led to if interested can also directly modify the format suffix name for merging file Cross the product introduction that PDF reader further checks PDF format, such user do not need with the secondary interaction of company A, facilitate province Thing.
In one embodiment, above-mentioned display content element, comprising:
Agreement subelement is searched, is for finding file format in the merging file according to the first opening information The protocol header of first file of the storage format;
Content subelement is extracted, for obtaining corresponding first byte initial position and the from first protocol header One byte length, and the file content for corresponding to first byte length is extracted as starting point using first byte initial position;
Parsing display subelement, for being parsed and being shown the file content.
In the present embodiment, the first file for merging every kind of format in file is not interfere with each other, and accounts for the portion merged in file Divide memory, and the first file of every kind of format has corresponding protocol header in merging file, so that ocr software carries out it Identification.When opening using ocr software to merging file, it is literary in merging that information is opened according to first obtained when opening The first protocol header that the first file of corresponding storage format is searched in part, obtains the first byte start bit from first protocol header It sets and the first byte length, then using the first byte initial position as starting point, end position is terminal, extracts the first byte long File content in degree, these file contents are the file content of corresponding above-mentioned storage format, as correspond to storage format Then the content of first file again shows this document content.
In another embodiment, user can edit the format of the merging file, be used for obtaining merging file The storage format of storage.Such as user clicks directly on and merges file to show multiple selective formats, with then to these Format is selected, and as included tri- kinds of mp4, PDF, TXT in these formats, user can click one of format of selection at this time, Client can get the format information of user's input, and the format selected above-mentioned user according to the format information is as merging Then the storage format of file is stored to client designated position.It certainly, can also be with if user wants to change another format into Another format is substituted for by selecting.The step of user modifies format can be saved in this way, by selecting format directly may be used It is more convenient to open the file of corresponding format.
In one embodiment, the format information of above-mentioned storage format includes the suffix name of format, and above-mentioned merging file is beaten Opening apparatus, further includes:
Judge more lattice units, if not being the storage format for the reading format, judges that the reading format is No is in a variety of different-formats except any of the storage format;
Unit is ignored in judgement, if being in a variety of different-formats except the storage format for the reading format It is any, then judge whether the ocr software is the ocr software that can ignore that the format suffix name of file;
Stop opening unit, when for the ocr software being the ocr software of format suffix name that can ignore that file, Then by the ocr software by the merging File Open, and the content of correspondence first file for reading format is carried out Display;Otherwise, stop opening the merging file.
In the present embodiment, when judging above-mentioned reading format is not storage format, that is, showing cannot be straight using ocr software Above-mentioned merging file is taken out, but above-mentioned reading format may be except a variety of of the first file except above-mentioned storage format Any one of format, due to having various different ocr softwares in identical reading format, and different ocr softwares is corresponding real The code of its existing function will not be identical, and the format suffix name that file can be ignored in some of them ocr software code will directly have The File Open of the reading format, and some are then not all right, such as the first and second two kinds of video players, first video player can only be to suffix The file of entitled WMV is opened, and second video player can then ignore the suffix name of file, as long as in file including view Frequency file can be opened, and merge file if at this moment opening, and the content of displaying is corresponding the first file content for reading format, and It is not the first file content of storage format.So needs continue judgement read format whether be in a variety of different-formats except The storage format it is any, if it is not, the reading format of i.e. ocr software be not in the first file multiple format appoint One kind can not find matched first file, so stop opening above-mentioned merging file.If but above-mentioned reading format be it is a variety of not It is the reading that can ignore that the format suffix name of file with except any of storage format, then ocr software is judged not in format Software, due to can ignore that the ocr software of format suffix name can go out corresponding protocol header with Direct Recognition, so it is soft when reading Part identifies protocol header i.e. and can determine whether that it is that can ignore that the ocr software of the format suffix name of file, while reading lattice for corresponding First File Open of formula is simultaneously shown.
Citing ground, above-mentioned merging file is by the of the first file of MP4 format, the first file of PDF format and TXT format One file mergences forms, and storage format is MP4 format, first when user opens merging file using ocr software The reading format for first judging ocr software is MP4 format, if it is, by ocr software open be video file, First file of i.e. above-mentioned MP4 format;If it is not, whether judging to read format again except other two except MP4 format Kind, i.e., it is PDF format or TXT format that format is read in judgement, if reading format is not PDF format or TXT format, that Above-mentioned merging file can not be opened at this time, that is, stops opening.If reading format is PDF format, judge to ocr software Whether it is the software that can ignore that format suffix name, if what is then opened is the first file of PDF format, is if reading format TXT format then judges whether to ocr software be the software that can ignore that format suffix name, if what is then opened is TXT format The first file can not equally be opened at this time above-mentioned if ocr software is not the software that can ignore that format suffix name Merge file.
In one embodiment, the device for opening of above-mentioned merging file, comprising:
Obtain read unit, if for the ocr software be not the format suffix name that can ignore that file reading it is soft Part then obtains the reading format of the ocr software;
A unit is sewed in change, for being modified to correspond to by the format suffix name for merging file according to the reading format The format suffix name for reading format, and by the ocr software by the merging File Open, by the correspondence reading The content of first file of format is shown.
It is the ocr software that can ignore that format suffix name when judging ocr software not, i.e., this is read at this time in the present embodiment Above-mentioned merging file cannot be opened by reading software, at this moment can obtain the reading format of ocr software, and identify that the reading format is Which kind of format, is then modified to the corresponding format suffix name for reading format for the format suffix name for merging file, which can lead to It crosses the code write to realize, when the suffix name that the format suffix name for merging file is modified to reading format, then openable conjunction And file, and display is the content of corresponding the first file for reading format.
Referring to Fig. 3, a kind of computer equipment is also provided in the embodiment of the present invention, which can be server, Its internal structure can be as shown in Figure 3.The computer equipment includes processor, the memory, network connected by system bus Interface and database.Wherein, the processor of the Computer Design is for providing calculating and control ability.The computer equipment is deposited Reservoir includes non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program And database.The internal memory provides environment for the operation of operating system and computer program in non-volatile memory medium.It should The database of computer equipment is for all data needed for storing merging multiple format file and opening merging file.The meter The network interface for calculating machine equipment is used to communicate with external terminal by network connection.When the computer program is executed by processor To realize a kind of merging method of file and the deployment method of the merging file merged by the merging method.
Above-mentioned processor executes the step of merging method of above-mentioned file: obtaining the cat order of user's input, the cat Order the file for merging different-format;Multiple different-formats to be combined are obtained from designated position according to the cat order The first file;Wherein, first file includes the protocol information of respective file format, and the protocol information includes being located at text The protocol header of byte initial position in part, the protocol header include byte initial position, byte end position and from the word Information of the section initial position to byte length between the byte end position;By multiple first files according to the latter institute The byte initial position for stating the first file, which is spliced to the mode of the byte end position of previous first file, is spliced, Until all first file splicings are completed to obtain merging file;By the merging file with multiple first files Any format in different-format is stored as storage format to the designated position.
In above-mentioned computer equipment, it is above-mentioned by it is described merging file in the different-format of multiple first files appoint The step of a kind of format is stored as storage format to the designated position, comprising: obtain user's input is used for the merging The format information of file storage;The merging file is stored with the storage format to described specified according to the format information Position.
In one embodiment, above-mentioned first file includes JPG formatted file and non-JPG formatted file, it is described will be more A first file splices according to the byte initial position of the first file described in the latter to previous first file The mode of byte end position is spliced, until all first file splicings are completed to obtain the step of merging file, It include: by the non-JPG formatted file by carrying out packing compression after the cat Command combination, to obtain non-JPG format pressure Contracting file;By the non-JPG format compression file and the JPG formatted file according to the byte initial position of the latter file Splice to the mode of the byte end position of previous file and is spliced to obtain the merging file.
Above-mentioned processor executes the step of deployment method for the merging file that above-mentioned merging method obtains: obtaining user and passes through Ocr software opens information to the merging file is opened first;The reading is judged according to the first opening information Whether the reading format of software is the storage format;It will be right in the merging file if so, opening information according to described first The content of the first file of the storage format is answered to be shown.
In above-mentioned computer equipment, the first file of above-mentioned multiple different-formats to be combined includes the first of the first format File and second the first file of format, the storage format is first format, described to open information according to described first After the step of content for the first file for corresponding to the storage format in the merging file is shown, comprising: obtain User changes the change information of the storage format, and the change information includes the format suffix name of corresponding second format; According to it is described change information by it is described merge file storage format from first form modifying at second format;It obtains User opens information for the second of the merging File Open by the corresponding ocr software of second format;According to described Two opening information show the content for the first file for corresponding to second format in the merging file.
In one embodiment, above-mentioned to correspond to the storage lattice in the merging file according to the first opening information The step of content of first file of formula is shown, comprising: looked in the merging file according to the first opening information To the first protocol header of the first file that file format is the storage format;Corresponding is obtained from first protocol header One byte initial position and the first byte length, and corresponding described first is extracted by starting point of first byte initial position The file content of byte length;The file content is parsed and shown.
In one embodiment, the format information of above-mentioned storage format includes the suffix name of format, described according to described One opening information judges after the step of whether the reading format of the ocr software is the storage format, comprising: if described Reading format is not the storage format, then judges whether the reading format is to deposit in a variety of different-formats except described Store up any of format;If the reading format is in a variety of different-formats except any of the storage format, Judge whether the ocr software is the ocr software that can ignore that the format suffix name of file;It can if the ocr software is Ignore the ocr software of the format suffix name of file, then by the ocr software by the merging File Open, and will correspond to The content of first file for reading format is shown;Otherwise, stop opening the merging file.
In one embodiment, above-mentioned to judge whether the ocr software is that can ignore that the format suffix name of file is read After the step of reading software, comprising: if the ocr software is not the ocr software that can ignore that the format suffix name of file, Obtain the reading format of the ocr software;The format suffix name for merging file is modified to pair according to the reading format The format suffix name for reading format is answered, and will be read the merging File Open described in correspondence by the ocr software The content for reading the first file of format is shown.
It will be understood by those skilled in the art that structure shown in Fig. 3, only part relevant to application scheme is tied The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme.
One embodiment of the invention also provides a kind of computer readable storage medium, is stored thereon with computer program, calculates Machine program realizes a kind of merging method of file when being executed by processor, specifically: the cat order of user's input is obtained, it is described Cat order is for merging the file of different-format;Multiple not appositions to be combined are obtained from designated position according to the cat order First file of formula;Wherein, first file includes the protocol information of respective file format, and the protocol information includes being located at The protocol header of byte initial position in file, the protocol header include byte initial position, byte end position and from described Information of the byte initial position to byte length between the byte end position;By multiple first files according to the latter The byte initial position of first file, which is spliced to the mode of the byte end position of previous first file, is spelled It connects, until all first file splicings are completed to obtain merging file;By the merging file with multiple first texts Any format in the different-format of part is stored as storage format to the designated position.
Above-mentioned computer readable storage medium, it is above-mentioned by the merging file with the different-format of multiple first files In any format the step of storing as storage format to the designated position, comprising: obtain user's input is used for institute State the format information for merging file storage;The merging file is stored with the storage format to institute according to the format information State designated position.
In one embodiment, above-mentioned first file includes JPG formatted file and non-JPG formatted file, it is described will be more A first file splices according to the byte initial position of the first file described in the latter to previous first file The mode of byte end position is spliced, until all first file splicings are completed to obtain the step of merging file, It include: by the non-JPG formatted file by carrying out packing compression after the cat Command combination, to obtain non-JPG format pressure Contracting file;By the non-JPG format compression file and the JPG formatted file according to the byte initial position of the latter file Splice to the mode of the byte end position of previous file and is spliced to obtain the merging file.
Above-mentioned computer program realizes a kind of deployment method for the merging file that merging method obtains when being executed by processor, Specifically: user, which is obtained, by ocr software opens information to the merging file is opened first;According to described first Open information judges whether the reading format of the ocr software is the storage format;If so, opening letter according to described first Breath shows the content for the first file for corresponding to the storage format in the merging file.
Above-mentioned computer readable storage medium, the first file of above-mentioned multiple different-formats to be combined include the first format The first file and the second format the first file, the storage format be first format, it is described according to described first After opening the step of information is shown the content for the first file for corresponding to the storage format in the merging file, packet It includes: obtaining the change information that user changes the storage format, the change information includes the format of corresponding second format Suffix name;According to it is described change information by it is described merge file storage format from first form modifying at second lattice Formula;It obtains user and information is opened for the second of the merging File Open by the corresponding ocr software of second format;According to The content for the first file for corresponding to second format in the merging file is shown according to the second opening information.
In one embodiment, above-mentioned to correspond to the storage lattice in the merging file according to the first opening information The step of content of first file of formula is shown, comprising: looked in the merging file according to the first opening information To the first protocol header of the first file that file format is the storage format;Corresponding is obtained from first protocol header One byte initial position and the first byte length, and corresponding described first is extracted by starting point of first byte initial position The file content of byte length;The file content is parsed and shown.
In one embodiment, the format information of above-mentioned storage format includes the suffix name of format, described according to described One opening information judges after the step of whether the reading format of the ocr software is the storage format, comprising: if described Reading format is not the storage format, then judges whether the reading format is to deposit in a variety of different-formats except described Store up any of format;If the reading format is in a variety of different-formats except any of the storage format, Judge whether the ocr software is the ocr software that can ignore that the format suffix name of file;It can if the ocr software is Ignore the ocr software of the format suffix name of file, then by the ocr software by the merging File Open, and will correspond to The content of first file for reading format is shown;Otherwise, stop opening the merging file.
In one embodiment, above-mentioned to judge whether the ocr software is that can ignore that the format suffix name of file is read After the step of reading software, comprising: if the ocr software is not the ocr software that can ignore that the format suffix name of file, Obtain the reading format of the ocr software;The format suffix name for merging file is modified to pair according to the reading format The format suffix name for reading format is answered, and will be read the merging File Open described in correspondence by the ocr software The content for reading the first file of format is shown.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can store and a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, Any reference used in provided herein and embodiment to memory, storage, database or other media, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, mono- diversified forms of RAM can obtain, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double speed are according to rate SDRAM (SSRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, device, article or the method that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, device, article or method institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, device of element, article or method.
The above description is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all utilizations Equivalent structure or equivalent flow shift made by description of the invention and accompanying drawing content is applied directly or indirectly in other correlations Technical field, be included within the scope of the present invention.

Claims (10)

1. a kind of merging method of file characterized by comprising
The cat order of user's input is obtained, the cat order is for merging the file of different-format;
The first file of multiple different-formats to be combined is obtained from designated position according to the cat order;Wherein, described first File includes the protocol information of respective file format, and the protocol information includes the agreement positioned at byte initial position in file Head, the protocol header include byte initial position, byte end position and from the byte initial position to the byte knot The information of byte length between tail position;
Multiple first files are spliced according to the byte initial position of the first file described in the latter to previous described The mode of the byte end position of one file is spliced, until all first file splicings are completed to obtain merging text Part;
The merging file is stored using any format in the different-format of multiple first files as storage format To the designated position.
2. the merging method of file according to claim 1, which is characterized in that it is described by the merging file with multiple institutes State the step of any format in the different-format of the first file is stored as storage format to the designated position, comprising:
Obtain the format information for the merging file storage of user's input;
The merging file is stored with the storage format to the designated position according to the format information.
3. the merging method of file according to claim 1, which is characterized in that first file includes JPG format text Part and non-JPG formatted file, it is described by multiple first files according to the byte start bit of the first file described in the latter It sets to splice to the mode of the byte end position of previous first file and be spliced, until all first files are spelled Completion is connect to obtain the step of merging file, comprising:
By the non-JPG formatted file by carrying out packing compression after the cat Command combination, to obtain non-JPG format pressure Contracting file;
The non-JPG format compression file and the JPG formatted file are spelled according to the byte initial position of the latter file The mode for being connected to the byte end position of previous file is spliced to obtain the merging file.
4. a kind of deployment method for the merging file that merging method as described in claim 1 obtains, which is characterized in that including
It obtains user and information is opened to the merging file is opened first by ocr software;
Judge whether the reading format of the ocr software is the storage format according to the first opening information;
If so, the content of the first file of the storage format will be corresponded in the merging file according to the first opening information It is shown.
5. the deployment method for the merging file that merging method according to claim 4 obtains, which is characterized in that the multiple First file of different-format to be combined includes the first file of the first format and the first file of the second format, described to deposit Storage format is first format, described to correspond to the storage format in the merging file according to the first opening information The content of the first file the step of being shown after, comprising:
The change information that user changes the storage format is obtained, the change information includes the format of corresponding second format Suffix name;
According to it is described change information by it is described merge file storage format from first form modifying at second format;
It obtains user and information is opened for the second of the merging File Open by the corresponding ocr software of second format;
The content for the first file for corresponding to second format in the merging file is carried out according to the second opening information Display.
6. the deployment method for the merging file that merging method according to claim 4 obtains, which is characterized in that the foundation The step that the first opening information shows the content for the first file for corresponding to the storage format in the merging file Suddenly, comprising:
The first file that file format is the storage format is found in the merging file according to the first opening information The first protocol header;
Corresponding first byte initial position and the first byte length are obtained, and from first protocol header with described first Byte initial position is the file content that starting point extracts corresponding first byte length;
The file content is parsed and shown.
7. the deployment method for the merging file that merging method according to claim 4 obtains, which is characterized in that the storage The format information of format includes format suffix name, the reading lattice that the ocr software is judged according to the first opening information After the step of whether formula is the storage format, comprising:
If the reading format is not the storage format, judge whether the reading format is in a variety of different-formats Except any of the storage format;
If the reading format is to judge the reading except any of the storage format in a variety of different-formats Whether software is the ocr software that can ignore that the format suffix name of file;
If the ocr software is the ocr software that can ignore that the format suffix name of file, pass through the ocr software for institute Merging File Open is stated, and the content of correspondence first file for reading format is shown;Otherwise, stop described in opening Merge file.
8. the deployment method for the merging file that merging method according to claim 7 obtains, which is characterized in that the judgement The ocr software whether be the step of can ignore that the ocr software of the format suffix name of file after, comprising:
If the ocr software is not the ocr software that can ignore that the format suffix name of file, the ocr software is obtained Read format;
The format suffix name for merging file is modified to after corresponding to the format for reading format according to the reading format Sew name, and by the ocr software by the merging File Open, by the content of correspondence first file for reading format It is shown.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists In, the step of processor realizes any one of claims 1 to 3 the method when executing the computer program, and/or The processor realizes the step of any one of claim 4 to 8 the method when executing the computer program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of the method described in any one of claims 1 to 3 is realized when being executed by processor and/or the processor execute institute The step of any one of claim 4 to 8 the method is realized when stating computer program.
CN201910082138.3A 2019-01-28 2019-01-28 File merging method, file opening method and related equipment Active CN109933569B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910082138.3A CN109933569B (en) 2019-01-28 2019-01-28 File merging method, file opening method and related equipment
PCT/CN2019/118801 WO2020155780A1 (en) 2019-01-28 2019-11-15 File merging method, file opening method, and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910082138.3A CN109933569B (en) 2019-01-28 2019-01-28 File merging method, file opening method and related equipment

Publications (2)

Publication Number Publication Date
CN109933569A true CN109933569A (en) 2019-06-25
CN109933569B CN109933569B (en) 2024-03-19

Family

ID=66985256

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910082138.3A Active CN109933569B (en) 2019-01-28 2019-01-28 File merging method, file opening method and related equipment

Country Status (2)

Country Link
CN (1) CN109933569B (en)
WO (1) WO2020155780A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020155780A1 (en) * 2019-01-28 2020-08-06 平安科技(深圳)有限公司 File merging method, file opening method, and related device
CN111597151A (en) * 2020-05-20 2020-08-28 广州平云小匠科技有限公司 File generation method and device, computer equipment and storage medium
CN116755593A (en) * 2023-08-11 2023-09-15 江苏中威科技软件系统有限公司 Method for combining or combining information with file aggregation whiteboard for reading and operating
CN116992057A (en) * 2023-06-30 2023-11-03 北京百度网讯科技有限公司 Method, device and equipment for processing multimedia files in storage equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120185516A1 (en) * 2011-01-17 2012-07-19 International Business Machines Corporation Computer data file merging based on file metadata
WO2017090054A1 (en) * 2015-11-26 2017-06-01 Satyam Sandepogu Editfile
CN107194001A (en) * 2017-06-14 2017-09-22 网宿科技股份有限公司 A kind of column storage format file rapid-combination method and its system
CN108632541A (en) * 2017-03-20 2018-10-09 杭州海康威视数字技术股份有限公司 A kind of more video clip merging methods and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8291315B2 (en) * 2006-02-28 2012-10-16 Ricoh Co., Ltd. Standardized network access to partial document imagery
CN103390005B (en) * 2012-05-11 2016-05-04 北大方正集团有限公司 A kind of method and system of merge document
CN106101264B (en) * 2016-07-20 2019-05-24 腾讯科技(深圳)有限公司 Content distributing network log method for pushing, device and system
CN109147831A (en) * 2018-09-26 2019-01-04 深圳壹账通智能科技有限公司 A kind of voice connection playback method, terminal device and computer readable storage medium
CN109933569B (en) * 2019-01-28 2024-03-19 平安科技(深圳)有限公司 File merging method, file opening method and related equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120185516A1 (en) * 2011-01-17 2012-07-19 International Business Machines Corporation Computer data file merging based on file metadata
WO2017090054A1 (en) * 2015-11-26 2017-06-01 Satyam Sandepogu Editfile
CN108632541A (en) * 2017-03-20 2018-10-09 杭州海康威视数字技术股份有限公司 A kind of more video clip merging methods and device
CN107194001A (en) * 2017-06-14 2017-09-22 网宿科技股份有限公司 A kind of column storage format file rapid-combination method and its system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020155780A1 (en) * 2019-01-28 2020-08-06 平安科技(深圳)有限公司 File merging method, file opening method, and related device
CN111597151A (en) * 2020-05-20 2020-08-28 广州平云小匠科技有限公司 File generation method and device, computer equipment and storage medium
CN116992057A (en) * 2023-06-30 2023-11-03 北京百度网讯科技有限公司 Method, device and equipment for processing multimedia files in storage equipment
CN116755593A (en) * 2023-08-11 2023-09-15 江苏中威科技软件系统有限公司 Method for combining or combining information with file aggregation whiteboard for reading and operating
CN116755593B (en) * 2023-08-11 2023-10-24 江苏中威科技软件系统有限公司 Method for combining or combining information with file aggregation whiteboard for reading and operating

Also Published As

Publication number Publication date
WO2020155780A1 (en) 2020-08-06
CN109933569B (en) 2024-03-19

Similar Documents

Publication Publication Date Title
CN109933569A (en) The deployment method and relevant device of a kind of merging method of file, file
US6839059B1 (en) System and method for manipulation and interaction of time-based mixed media formats
US6834371B1 (en) System and method for controlling synchronization of a time-based presentation and its associated assets
US6922702B1 (en) System and method for assembling discrete data files into an executable file and for processing the executable file
US20050038826A1 (en) Method of managing multimedia content written in SMIL and file system thereof
CN1755667B (en) Method and system for creating, inserting, and reusing document parts in an electronic document
US7979801B2 (en) Media presentation driven by meta-data events
US20020026521A1 (en) System and method for managing and distributing associated assets in various formats
US7772998B2 (en) Method and apparatus for encoding/decoding metadata
US20040199876A1 (en) Reversible document format
KR100478934B1 (en) Apparatus and method of object-based MPEG-4 content editing and authoring and retrieval
US20080163317A1 (en) Generation of video streams from content items
JP5676167B2 (en) System and method for generating search results
US8244692B1 (en) Interleaving compressed archives within a page description language file
US20120304046A1 (en) Integrated media browse and insertion
US20060116863A1 (en) User interface design apparatus and method
US8001454B2 (en) Differential dynamic content delivery with presentation control instructions
CN100418088C (en) Search processing system, search server, client, search processing method, program, and recording medium
US11030163B2 (en) System for tracking and displaying changes in a set of related electronic documents
CN110046263A (en) Multimedia recommendation method, device, server and storage medium
US7848598B2 (en) Image retrieval processing to obtain static image data from video data
KR20210101280A (en) Apparatus and method for signaling information in container file format
EP3621021A1 (en) Data search method and data search system thereof
CN108614714A (en) Dynamic library updating method and device and storage medium
US12096068B2 (en) Spatio-temporal navigation of content of different types with synchronous displacement of playback position indicators

Legal Events

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