WO2020155780A1 - 一种文件的合并方法、文件的打开方法及相关设备 - Google Patents
一种文件的合并方法、文件的打开方法及相关设备 Download PDFInfo
- Publication number
- WO2020155780A1 WO2020155780A1 PCT/CN2019/118801 CN2019118801W WO2020155780A1 WO 2020155780 A1 WO2020155780 A1 WO 2020155780A1 CN 2019118801 W CN2019118801 W CN 2019118801W WO 2020155780 A1 WO2020155780 A1 WO 2020155780A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- file
- format
- merged
- byte
- information
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 76
- 241000282326 Felis catus Species 0.000 claims abstract description 46
- 230000004048 modification Effects 0.000 claims description 18
- 238000012986 modification Methods 0.000 claims description 18
- 230000008859 change Effects 0.000 claims description 14
- 238000000605 extraction Methods 0.000 claims description 2
- 230000005540 biological transmission Effects 0.000 abstract description 9
- 230000001737 promoting effect Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000006837 decompression Effects 0.000 description 3
- 230000002452 interceptive effect Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 230000000644 propagated effect Effects 0.000 description 1
- 230000007480 spreading Effects 0.000 description 1
- 230000002194 synthesizing effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
Definitions
- This application relates to the technical field of data processing, and particularly relates to a method for merging files, a method for opening files, and related equipment.
- the method of file promotion and dissemination can only use a single file. For example, when promoting, only any format file of video, document, picture and other formats can be used for transmission. If you need to promote multiple formats of files, you need to transmit multiple files. On the one hand, the cost is high from the perspective of the enterprise, and on the other hand, it is very inconvenient from the perspective of the customer. This requires the combination of various files before transmission and promotion.
- files of different formats are generally combined by compressing and merging multiple files to obtain a compressed file, which can only be seen after decompression, and the obtained files are still multiple files after decompression, which not only takes up space, but also Memory location and troublesome operation.
- the main purpose of this application is to provide a file merging method, file opening method, computer equipment and storage medium, aiming to solve the problem that when merging files of different formats can only merge the content or compress and merge which causes extremely inconvenient use.
- this application proposes a file merging method, including:
- the cat command is used to merge files of different formats
- the first file includes protocol information corresponding to the file format, and the protocol information includes the start position of the byte in the file A protocol header, the protocol header including byte start position, byte end position, and byte length information from the byte start position to the byte end position;
- the multiple first files are spliced in a manner of splicing the byte start position of the following first file to the byte end position of the previous first file, until all the first files are spliced To get the combined file;
- the combined file is stored in the designated location in any one of the multiple different formats of the first file as a storage format.
- This application also provides a method for opening a merged file obtained by the above merge method, including:
- the present application also provides a computer device including a memory and a processor, the memory stores computer readable instructions, and the processor implements the steps of the above method when the computer readable instructions are executed.
- the present application also provides a computer-readable storage medium on which computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, the steps of the foregoing method are implemented.
- Figure 1 is a schematic diagram of the steps of a file merging method in an embodiment of this application.
- FIG. 2 is a schematic diagram of steps of a method for opening a merged file in an embodiment of this application;
- FIG. 3 is a schematic block diagram of the structure of a computer device according to an embodiment of the application.
- the file merging method in this embodiment includes:
- Step S1 Obtain the cat command input by the user, the cat command is used to merge files of different formats;
- Step S2 Acquire multiple first files of different formats to be merged from a specified location according to the cat command; wherein, the first file includes protocol information corresponding to the file format, and the protocol information includes bytes in the file starting from A protocol header at a starting position, where the protocol header includes a byte starting position, a byte ending position, and the length of information from the byte starting position to the byte ending position;
- Step S3 The multiple first files are spliced in a manner of splicing the byte start position of the following first file to the byte end position of the previous first file until all the first files are spliced. File stitching is completed to obtain a merged file
- Step S4 The combined file is stored in the designated location in any one of the different formats of the multiple first files as a storage format.
- the merging of files in different formats can be achieved by the cat command.
- the cat (cat is short for concatenate and refers to displaying or connecting multiple text files) is a Linux system (a computer operation)
- the command to merge files under the system) can be directly input by the user, and then the system obtains the command.
- execute the cat command and first obtain the first file to be merged from the specified location.
- the first file to be merged is a pre-set and prepared file and is stored in the specified location, such as the storage system
- the preset database can be directly obtained from the preset database when needed.
- the first file is used for merging and spreading.
- each file itself carries protocol information, which includes protocol rules, byte length, format type, and so on.
- protocol information can be described by the characters agreed in the format, such as letters, numbers, or a combination of the two.
- the protocol information in the above file format is the specification information of the format, including Length and Identifier. Tag) and other attribute information, the identification tag is the format type mentioned above, and the attribute information can be represented by the characters agreed in the format, such as the Identifier attribute in the protocol information of the FIF format, which occupies 5 bytes in the file header.
- the protocol information includes box size, box Type and other attributes, where the box type attribute represents the type and occupies 4 bytes, and the corresponding characters are the format characters of the video (such as "ftyp", "moov”).
- the byte with protocol information in front of the file is defined as the protocol header.
- the protocol header includes the byte start position, the byte end position, and the byte start position to the byte end position. Byte length information between.
- multiple files of different formats are merged by byte end-to-end splicing, that is, according to the byte start position of the next first file to be spliced to the previous first file
- the end position of the byte is spliced until all the first files are spliced, and the merged file is obtained, so that the contents of various formats in the merged file do not interfere with each other.
- the combined file is stored in the specified location in any one of the different formats of the first file as the storage format.
- the user input is cat + file 1 (file name) + file 2 (file name) ) ⁇ Merge files (name), so you get the cat command.
- search in the specified location according to the names of file 1 and file 2, and then get file 1 and file 2, and then merge, and merge file 2
- the start position of the section is spliced to the end position of the byte of file 1, and the merged file is stored in the specified position after the merge.
- the name of the merged file is the "merged file (name)" input in the above operation.
- the reading software finds the corresponding protocol header of the first file, and then parses the byte-length content of the segment and displays it.
- the above-mentioned reading software can be various software for viewing the content of the file, for example PDF reader, video player, word reader, etc.
- step S4 includes:
- Step S41 Obtain the format information input by the user for storing the combined file
- Step S42 Store the combined file in the storage format in the designated location according to the format information.
- the user can select one of them as the storage format before storage.
- the above format information includes the combined file.
- the format suffix name entered by the user is obtained, the combined file can be stored in the format suffix name format.
- the format suffix entered by the user is any of the different formats of the first file.
- a kind of suffix so that users can directly store the merged file in the format that the user wants to the specified location after merging according to actual needs, avoiding the trouble of changing the format during subsequent use, such as a video format file and a PDF format file
- the user frequently uses the merged file and first uses the video format file.
- the PDF format file is only used occasionally. Then, after the merge, the merged file is directly converted to video according to the user’s needs. Format storage makes it more convenient for users to use. In another example, if the user wants to promote the merged file after the video format and the PDF format of the promotional file are merged to the customer, but in fact, it is more attractive for the customer to receive the video at the beginning, then this Time users can input the format information of the video during storage according to actual needs, so that the storage format of the combined file is a video format, and then promote it to customers.
- the above-mentioned first file includes a JPG format file and a non-JPG format file
- the above step S3 includes:
- Step S31 The non-JPG format files are combined through the cat command and then packaged and compressed to obtain a non-JPG format compressed file;
- Step S32 The non-JPG format compressed file and the JPG format file are spliced in a manner of splicing the byte start position of the following file to the byte end position of the previous file to obtain the combined file.
- the above-mentioned files in different formats may also include JPG format files and non-JPG format files, and the non-JPG format files (such as mp4 format, PDF format, TXT format, and word format files) are first combined through the above-mentioned merging method Compress after merging, that is, package and compress after merging according to the cat command to obtain a non-JPG format compressed file, and then merge the non-JPG format compressed file with the above JPG format file, when the user wants to view in the combined file
- Compress after merging that is, package and compress after merging according to the cat command to obtain a non-JPG format compressed file
- merge the non-JPG format compressed file with the above JPG format file when the user wants to view in the combined file
- the content of the JPG format file is opened, use a picture reader to open it. If you want to view other merged files, use a decompression tool to decompress the compressed file. At this time, the compressed file will be decompressed and the JPG format
- multiple files of different formats are merged into one merged file, so that when it needs to be promoted to customers, only one transmission channel can complete the transmission of multiple files at once.
- the files of different formats in the merged file do not interfere with each other.
- the reading software can identify the content of the corresponding reading software format in the merged file, and this part of the content can be extracted for display when it is opened, that is, a file can pass multiple different formats
- the software opens and displays the corresponding content, which is extremely convenient for users to open, browse and watch.
- the present application also provides a method for opening the above-mentioned merged file, and the opening method includes:
- Step S5 Obtain the first opening information that the user opens the merged file through the reading software
- Step S6 Determine whether the reading format of the reading software is the storage format according to the first opening information
- Step S7 If yes, display the content of the first file corresponding to the storage format in the merged file according to the first opening information.
- the combined file after synthesizing the above-mentioned combined file, the combined file can be propagated to user clients.
- the above-mentioned combined file can be a media propaganda file
- the above-mentioned first file can be files in various formats, such as video, Files in PDF, TXT and word formats.
- the client After the client receives the merged file, the user can open and watch the merged file. When the user opens the merged file through reading software, the client obtains the first file that opens the merged file. Open the message.
- the reading format of the reading software can be obtained through the first opening information, and then it can be judged whether the reading format of the reading software is the storage format of the corresponding merged file, for example, when the merged file is MP4 file and PDF file are merged, then the storage format can be either MP4 or PDF. If the storage format is MP4, then when it is judged that the reading format is also MP4, it means that the user is using an MP4 player When the combined file is opened, the content of the MP4 file in the combined file can be displayed according to the first opening information.
- the storage format of the combined file can also be modified to adapt it to the reading format of the corresponding reading software.
- the multiple first files of different formats to be merged include a first file of a first format and a first file of a second format, wherein the storage format is the first format, and after the step S7, the method includes:
- Step S71 Obtain modification information for the user to modify the storage format, where the modification information includes a format suffix corresponding to the second format;
- Step S72 Modify the storage format of the merged file from the first format to the second format according to the modification information
- Step S73 Obtain second opening information for the user to open the merged file through the reading software corresponding to the second format
- Step S74 Display the content of the first file corresponding to the second format in the merged file according to the second opening information.
- the above-mentioned first format and second format can be any of the above-mentioned video, PDF, TXT, word and other formats, and the first format and the second format are different. According to the needs of users, they can be combined The format of the file to be modified (the modified format must be the format included in the merged file). Specifically, the first format can be modified to the second format by modifying the format suffix of the merged file.
- the above-mentioned modification information input by the user is the information for modifying the format suffix of the merged file, including the modified format suffix.
- the first format needs to be changed to the second format, and the modification information includes the format suffix corresponding to the second format.
- a bank company merges the word document of loan introduction material and the promotion video into one combined file and sends it To the client, store in MP4 format in the client, then the video file of the synthesized file can be played directly through the MP4 player.
- the suffix name is changed to the word document suffix name (such as .doc)
- the files are merged
- the word file in can be opened by word reader.
- MP4 format file A company's promotional video
- PDF format detailed product description
- step S7 includes:
- Step S701 Find the protocol header of the first file whose file format is the storage format in the merged file according to the first opening information
- Step S702 Acquire the corresponding first byte starting position and first byte length from the first protocol header, and extract the corresponding first byte length from the first byte starting position as a starting point The file content;
- Step S703 parse and display the content of the file.
- the first files of each format in the merged file do not interfere with each other and occupy part of the memory in the merged file, and the first file of each format has a corresponding protocol header in the merged file for
- the reading software recognizes it.
- These file contents are the corresponding file contents in the above storage format , Which is the content of the first file corresponding to the storage format, and then display the content of the file.
- step S74 the method further includes:
- a plurality of preset formats are displayed for the user to select, and the preset format is any one of a plurality of different formats of the first file; after receiving the user’s selection of the multiple After the information in one of the preset formats, the format selected by the user is used as the storage format of the merged file.
- the user can edit the format of the merged file to obtain a storage format for storing the merged file.
- the user directly clicks the merged file to display multiple formats for selection, and then selects these formats.
- these formats include mp4, PDF, and TXT.
- the user can click to select one of the formats, and the client is The format information input by the user can be obtained, and the format selected by the user is used as the storage format of the merged file according to the format information, and then stored in the designated location of the client.
- the user wants to change to another format he can also choose to change to another format. This can save the user the steps to modify the format, and directly open the file of the corresponding format by selecting the format, which is more convenient.
- the format information of the storage format includes the suffix name of the format, and after step S6, it further includes:
- Step S61 If the reading format is not the storage format, determine whether the reading format is any one of the multiple different formats except the storage format;
- Step S62 If the reading format is any one of the multiple different formats except the storage format, it is determined whether the reading software is a reading software that can ignore the format suffix of the file;
- Step S63 If the reading software is a reading software that can ignore the format suffix of the file, the combined file is opened by the reading software, and the content of the first file corresponding to the reading format is displayed; otherwise To stop opening the merged file.
- the reading format when it is determined that the reading format is not the storage format, it means that the reading software cannot be used to directly open the merged file, but the reading format may be any of the multiple formats of the first file other than the storage format.
- the reading format may be any of the multiple formats of the first file other than the storage format.
- some of the reading software code can ignore the file format suffix will directly have the reading format The file is opened, but some are not. For example, two video players, A video player can only open files with the suffix WMV, while video player B can ignore the file suffix, as long as the file contains The video file can be opened.
- the displayed content is the first file content in the corresponding reading format, not the first file content in the storage format. Therefore, in this step, you need to continue to determine whether the reading format is any of the multiple different formats except for the storage format described above. If not, the reading format of the reading software is not any of the multiple formats in the first file and cannot be found. The first file that matches, so stop opening the merged file.
- the reading software is not the reading software that can ignore the format suffix of the file, because the reading software that can ignore the format suffix can directly identify the corresponding Protocol header, so when the reading software recognizes the protocol header, it can be judged to be a reading software that can ignore the format suffix of the file, and at the same time the first file corresponding to the reading format is opened and displayed.
- the above-mentioned merged file is formed by merging the first file in MP4 format, the first file in PDF format, and the first file in TXT format, and its storage format is MP4 format.
- the reading format is PDF format
- judge whether the reading software is software that can ignore the format suffix if it is the first file in PDF format
- if the reading format is TXT format
- judge whether the reading software can be ignored For the software with the format suffix, if it is, the first file in TXT format is opened. If the reading software is not software that can ignore the format suffix, then the above merged file cannot be opened at this time.
- the method includes:
- Step S64 If the reading software is not the reading software that can ignore the format suffix of the file, acquire the reading format of the reading software;
- Step S65 According to the reading format, the format suffix of the combined file is changed to the format suffix corresponding to the reading format, and the combined file is opened by the reading software, and the first reading format corresponding to the reading format is opened. The content of a file is displayed.
- the reading format of the reading software can be obtained, and the reading format of the reading format can be identified , And then change the format suffix of the merged file to the format suffix of the corresponding reading format.
- This process can be realized by writing code.
- the format suffix of the merged file is changed to the suffix of the reading format, the merged file can be opened , And displays the content of the first file in the corresponding reading format.
- the file merging device includes:
- the acquiring command unit is used to acquire the cat command input by the user, and the cat command is used to merge files of different formats;
- the file obtaining unit is used to obtain a plurality of first files in different formats to be merged from a specified location according to the cat command; wherein the first file includes protocol information corresponding to the file format, and the protocol information includes the file located in the file A protocol header at a byte starting position, the protocol header including byte starting position, byte ending position, and byte length information from the byte starting position to the byte ending position;
- the file splicing unit is used for splicing a plurality of the first files in a manner of splicing the byte start position of the following first file to the byte end position of the previous first file until all the first files are spliced.
- the splicing of the first file is completed to obtain a merged file;
- the file storage unit is configured to store the merged file in the storage format in any one of the different formats of the multiple first files to the designated location.
- the aforementioned storage file unit includes:
- the obtaining information subunit is configured to obtain format information input by the user for storing the combined file
- the file storage subunit is configured to store the combined file in the storage format to the designated location according to the format information.
- the first file includes a JPG format file and a non-JPG format file
- the splicing file unit includes:
- the compressed file subunit is used to package and compress the non-JPG format files after being combined by the cat command to obtain a non-JPG format compressed file;
- the splicing file subunit is used to splice the non-JPG format compressed file and the JPG format file in a manner of splicing the byte start position of the following file to the byte end position of the previous file to obtain the merge file.
- multiple files of different formats are merged into one merged file without interfering with each other.
- only one transmission channel can complete multiple files at one time.
- the files of different formats in the combined file do not interfere with each other, the content of the corresponding reading software format in the combined file can be identified through the reading software, and this part of the content can be extracted for display when opened, that is, one
- the file can be opened by software of various formats and the corresponding content displayed, which is extremely convenient for users to open, browse and watch.
- the present application also provides a device for opening the above-mentioned merged file, and the opening device includes:
- the obtaining and opening unit is used to obtain the first opening information for the user to open the merged file through reading software
- a judgment storage unit configured to judge whether the reading format of the reading software is the storage format according to the first opening information
- the display content unit is configured to display the content of the first file corresponding to the storage format in the merged file according to the first opening information when the reading format of the reading software is the storage format.
- the storage format of the combined file can also be modified to adapt it to the reading format of the corresponding reading software.
- the multiple first files of different formats to be merged include a first file of a first format and a first file of a second format, wherein the storage format is the first format, and the device for opening the merged file further includes:
- An obtaining modification unit configured to obtain modification information for a user to modify the storage format, where the modification information includes a format suffix corresponding to the second format;
- a format modification unit configured to modify the storage format of the merged file from the first format to the second format according to the modification information
- the second opening unit is configured to obtain second opening information for the user to open the merged file through the reading software corresponding to the second format
- the second display unit is configured to display the content of the first file corresponding to the second format in the merged file according to the second opening information.
- the above display content unit includes:
- a search protocol subunit configured to find, in the merged file, the protocol header of the first file whose file format is the storage format according to the first open information
- the content extraction subunit is used to obtain the corresponding first byte starting position and the first byte length from the first protocol header, and extract the corresponding first byte starting position from the first byte One-byte file content;
- the parsing and displaying subunit is used for parsing and displaying the content of the file.
- the format information of the storage format includes the suffix name of the format
- the device for opening the merged file further includes:
- the judgment ignoring unit is configured to judge whether the reading software is a reading software that can ignore the format suffix of a file if the reading format is any one of the multiple different formats except the storage format;
- the stop opening unit is used for when the reading software is a reading software that can ignore the format suffix of the file, the combined file is opened by the reading software, and the content of the first file corresponding to the reading format is performed Display; otherwise, stop opening the merged file.
- the device for opening the merged file includes:
- An obtaining reading unit configured to obtain the reading format of the reading software if the reading software is not the reading software that can ignore the format suffix of the file;
- the name changing unit is used to change the format suffix of the combined file to the format suffix corresponding to the reading format according to the reading format, and open the combined file through the reading software, and the corresponding Read the content of the first file in the format for display.
- an embodiment of the present application also provides a computer device.
- the computer device may be a server, and its internal structure may be as shown in FIG. 3.
- the computer equipment includes a processor, a memory, a network interface and a database connected by a system bus. Among them, the computer designed processor is used to provide calculation and control capabilities.
- the memory of the computer device includes a non-volatile storage medium and an internal memory.
- the non-volatile storage medium stores an operating system, computer readable instructions, and a database.
- the memory provides an environment for the operation of the operating system and computer readable instructions in the non-volatile storage medium.
- the database of the computer equipment is used to store all the data required for merging files in multiple formats and opening the merged files.
- the network interface of the computer device is used to communicate with an external terminal through a network connection.
- the above-mentioned processor executes the steps of the above-mentioned file merging method: obtaining the cat command input by the user, where the cat command is used to merge files of different formats; according to the cat command, obtaining multiple first files of different formats to be merged from a specified location.
- the first file includes protocol information corresponding to the file format
- the protocol information includes a protocol header located at the beginning of a byte in the file
- the protocol header includes a byte start position, a byte end position, and Information about the length of the byte from the start position of the byte to the end position of the byte
- the end position of the byte of the first file is spliced until the splicing of all the first files is completed to obtain a merged file;
- the merged file is in any one of a plurality of different formats of the first file It is stored in the designated location as a storage format.
- the foregoing step of storing the combined file in the specified location in any one of a plurality of different formats of the first file as a storage format includes: obtaining user input for the Format information stored in the merged file; storing the merged file in the storage format to the designated location according to the format information.
- the above-mentioned first file includes a JPG format file and a non-JPG format file
- the plurality of first files are spliced to the previous one according to the byte starting position of the latter first file.
- the step of splicing the end positions of the bytes of the first file until all the first files are spliced to obtain a merged file includes: after the non-JPG format files are merged through the cat command, they are packed and compressed to Obtain a non-JPG format compressed file; the non-JPG format compressed file and the JPG format file are spliced in such a way that the byte start position of the following file is spliced to the byte end position of the previous file to obtain the merge file.
- the above-mentioned processor executes the steps of the method for opening the merged file obtained by the above-mentioned merging method: acquiring first opening information for the user to open the merged file through reading software; judging the reading format of the reading software according to the first opening information Whether it is the storage format; if so, the content of the first file corresponding to the storage format in the merged file is displayed according to the first opening information.
- the plurality of first files in different formats to be merged include a first file in a first format and a first file in a second format, the storage format is the first format, and the After opening the information and displaying the content of the first file corresponding to the storage format in the merged file, the method includes: obtaining change information for a user to change the storage format, the change information including the change information corresponding to the second format The format suffix of the file; the storage format of the combined file is modified from the first format to the second format according to the modification information; the user obtains that the combined file is opened by the reading software corresponding to the second format The second opening information; according to the second opening information, the content of the first file corresponding to the second format in the merged file is displayed.
- the step of displaying the content of the first file corresponding to the storage format in the merged file according to the first open information includes: displaying the contents of the merged file in the merged file according to the first open information. Find the first protocol header of the first file whose file format is the storage format; obtain the corresponding first byte starting position and the first byte length from the first protocol header, and use the first The byte starting position is the starting point to extract the file content corresponding to the first byte length; the file content is parsed and displayed.
- the format information of the storage format includes the suffix name of the format
- the method includes: If the reading format is not the storage format, it is determined whether the reading format is any of the multiple different formats except the storage format; if the reading format is the multiple different formats except the storage In any of the formats, it is determined whether the reading software is a reading software that can ignore the format suffix of a file; if the reading software is a reading software that can ignore the format suffix of a file, the reading software will The combined file is opened, and the content of the first file corresponding to the reading format is displayed; otherwise, the opening of the combined file is stopped.
- the step of judging whether the reading software is a reading software that can ignore the format suffix of a file includes: if the reading software is not a reading software that can ignore the format suffix of a file, acquiring all The reading format of the reading software; according to the reading format, the format suffix of the combined file is changed to the format suffix corresponding to the reading format, and the combined file is opened by the reading software, and the corresponding Read the content of the first file in the format for display.
- FIG. 3 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
- An embodiment of the present application also provides a computer-readable storage medium.
- the computer-readable storage medium is, for example, a non-volatile computer-readable storage medium or a volatile computer-readable storage medium on which Computer-readable instructions are stored, and when the computer-readable instructions are executed by the processor, a method for merging files is realized, specifically: obtaining a cat command input by a user, the cat command is used to merge files of different formats; according to the cat Command to obtain multiple first files of different formats to be merged from a specified location; wherein, the first file includes protocol information corresponding to the file format, and the protocol information includes the protocol header at the beginning of the byte in the file, so The protocol header includes byte start position, byte end position, and byte length information from the start position of the byte to the end position of the byte; The start position of the bytes of the first file is spliced to the end position of the bytes of the previous first file to be spliced until all the first files are spliced to obtain
- the above-mentioned step of storing the combined file in any one of a plurality of different formats of the first file as a storage format in the designated location includes: obtaining user input for Format information stored in the combined file; and store the combined file in the storage format to the designated location according to the format information.
- the above-mentioned first file includes a JPG format file and a non-JPG format file
- the plurality of first files are spliced to the previous one according to the byte starting position of the latter first file.
- the step of splicing the end positions of the bytes of the first file until all the first files are spliced to obtain a merged file includes: after the non-JPG format files are merged through the cat command, they are packed and compressed to Obtain a non-JPG format compressed file; the non-JPG format compressed file and the JPG format file are spliced in such a way that the byte start position of the following file is spliced to the byte end position of the previous file to obtain the merge file.
- the above-mentioned computer-readable instruction is executed by a processor to implement a method for opening a merged file obtained by a merge method, specifically: acquiring first open information for a user to open the merged file through a reading software; according to the first open The information determines whether the reading format of the reading software is the storage format; if so, the content of the first file corresponding to the storage format in the merged file is displayed according to the first opening information.
- the plurality of first files in different formats to be merged include a first file in a first format and a first file in a second format, the storage format is the first format, and the basis
- the method includes: acquiring change information for a user to change the storage format, the change information including the corresponding The format suffix name of the second format; modify the storage format of the merged file from the first format to the second format according to the modification information; obtain that the user can use the reading software corresponding to the second format to The second opening information of the merged file is opened; and the content of the first file corresponding to the second format in the merged file is displayed according to the second open information.
- the step of displaying the content of the first file corresponding to the storage format in the merged file according to the first open information includes: displaying the contents of the merged file in the merged file according to the first open information. Find the first protocol header of the first file whose file format is the storage format; obtain the corresponding first byte starting position and the first byte length from the first protocol header, and use the first The byte starting position is the starting point to extract the file content corresponding to the first byte length; the file content is parsed and displayed.
- the format information of the storage format includes the suffix name of the format
- the method includes: If the reading format is not the storage format, it is determined whether the reading format is any of the multiple different formats except the storage format; if the reading format is the multiple different formats except the storage In any of the formats, it is determined whether the reading software is a reading software that can ignore the format suffix of a file; if the reading software is a reading software that can ignore the format suffix of a file, the reading software will The combined file is opened, and the content of the first file corresponding to the reading format is displayed; otherwise, the opening of the combined file is stopped.
- the step of judging whether the reading software is a reading software that can ignore the format suffix of a file includes: if the reading software is not a reading software that can ignore the format suffix of a file, acquiring all The reading format of the reading software; according to the reading format, the format suffix of the combined file is changed to the format suffix corresponding to the reading format, and the combined file is opened by the reading software, and the corresponding Read the content of the first file in the format for display.
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
本申请提出的基于数据处理的文件的合并方法、文件的打开方法、计算机设备和存储介质,其中方法包括:获取用户输入的cat命令,依据cat命令从指定位置获取多个待合并的不同格式的第一文件;将多个第一文件按照后一个第一文件的字节起始位置拼接至前一个第一文件的字节结尾位置的方式进行拼接,直至所有第一文件拼接完成以得到合并文件;将合并文件以多个第一文件的不同格式中的任一种格式作为存储格式存储至指定位置,通过上述合并方法得到的合并文件内各个文件之间互不干扰,当推广给客户时,仅一个传输通道就能完成多个文件的传输,且一个文件可以通过多种格式软件打开并显示对应的内容,用户打开浏览观看极其方便。
Description
本申请要求于2019年1月28日提交中国专利局、申请号为201910082138.3,申请名称为“一种文件的合并方法、文件的打开方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及到数据处理的技术领域,特别是涉及到一种文件的合并方法、文件的打开方法及相关设备。
目前文件推广传播的方式仅能采用单一文件传播,如推广时,仅能采用视频、文档、图片等格式的任一种格式文件进行传输,若需要对多种格式的文件都推广则需要传输多个文件,一方面,从企业角度来说成本高,另一方面从客户角度来看非常不便利,这就需要将各种文件合并之后再进行传输推广。
现有技术中,不同格式的文件合并,一般是通过将多个文件压缩合并进而得到一个压缩文件,这样需要通过解压之后才能看到,且解压之后得到的依然为多个文件,不但占空间、内存位置,且操作麻烦。
另外还存在将图片、文档等集合成同一文件的技术,但是该种方法将两者内容集合在一个文件中,例如将图片文件插入到文档文件形成的合并文件,用户打开该文件会同时看到两者合并在一起的内容,而有些情况两份文件的内容不需要合并在一起,例如有甲乙两个公司,甲公司的为视频宣传文件,乙公司的为文档宣传文件,若是通过上述方法甲乙公司的宣传内容只能集合在一起,而无法在合为一个文件的提前下,用户又可以分别查看各自内容。
本申请的主要目的为提供一种文件的合并方法、文件的打开方法、计算机设备和存储介质,旨在解决合并不同格式文件时只能将内容合并或者通过压缩合并导致使用极其不便的问题。
基于上述发明目的,本申请提出一种文件的合并方法,包括:
获取用户输入的cat命令,所述cat命令用于合并不同格式的文件;
依据所述cat命令从指定位置获取多个待合并的不同格式的第一文件;其中,所述第一文件包括对应文件格式的协议信息,所述协议信息包括位于文件中字节起始位置的协议头,所述协议头包括字节起始位置、字节结尾位置以及从所述字节起始位置到所述字节结尾位置之间字节长度的信息;
将多个所述第一文件按照后一个所述第一文件的字节起始位置拼接至前一个所述第一文件的字节结尾位置的方式进行拼接,直至所有所述第一文件拼接完成以得到合并文件;
将所述合并文件以多个所述第一文件的不同格式中的任一种格式作为存储格式存储至所述指定位置。
本申请还提供了一种如上述合并方法得到的合并文件的打开方法,包括:
获取用户通过阅读软件对所述合并文件进行打开的第一打开信息;
依据所述第一打开信息判断所述阅读软件的阅读格式是否为所述存储格式;
若是,依据所述第一打开信息将所述合并文件中对应所述存储格式的第一文件的内容进行显示。
本申请还提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现上述方法的步骤。
本申请还提供了一种计算机可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述方法的步骤。
通过上述合并方法将多个不同格式的文件合并成一个合并文件且各个文件之间互不干扰,这样当需要推广给客户时,仅需一个传输通道就能完成多个文件的传输,且一个文件可以通过多种格式软件打开并显示对应的内容,用户打开浏览观看极其方便。
图1 为本申请一实施例中文件的合并方法的步骤示意图;
图2 为本申请一实施例中合并文件的打开方法的步骤示意图;
图3 为本申请一实施例的计算机设备的结构示意框图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
参照图1,本实施例中的文件的合并方法,包括:
步骤S1:获取用户输入的cat命令,所述cat命令用于合并不同格式的文件;
步骤S2:依据所述cat命令从指定位置获取多个待合并的不同格式的第一文件;其中,所述第一文件包括对应文件格式的协议信息,所述协议信息包括位于文件中字节起始位置的协议头,所述协议头包括字节起始位置、字节结尾位置以及从所述字节起始位置到所述字节结尾位置之间字节长度的信息;
步骤S3:将多个所述第一文件按照后一个所述第一文件的字节起始位置拼接至前一个所述第一文件的字节结尾位置的方式进行拼接,直至所有所述第一文件拼接完成以得到合并文件;
步骤S4:将所述合并文件以多个所述第一文件的不同格式中的任一种格式作为存储格式存储至所述指定位置。
如上述步骤S1及S2所述,将不同格式文件进行合并可通过cat命令来实现,cat(cat是concatenate的简写,指显示或把多个文本文件连接起来)命令为Linux系统(一种计算机操作系统)下将文件合并的命令,具体而言,可通过用户直接输入,然后系统获取该命令。获取到该cat命令之后,执行该cat命令,首先从指定位置获取到待合并的第一文件,上述待合并的第一文件为预先设置准备好的文件,存储于指定位置中,如存储系统的预设数据库中,需要时直接从预设数据库中获取即可。第一文件用于合并进而推广传播,可为不同格式的文件,如视频格式、PDF格式、TXT格式以及word格式文件。可以理解的是,将不同格式的文件合并即是将多份文件内容中的字节合并,每个文件本身携带有协议信息,该协议信息包括协议规则、字节长度、格式类型等。具体而言,可通过该格式约定的字符来描述上述协议信息,如字母、数字或两者的结合,上述文件格式的协议信息即为该格式的规范信息,包括Length(长度)及Identifier(识别标记)等属性信息,该识别标记即为上述格式类型,可通过该格式约定的字符来代表这些属性信息,如FIF格式的协议信息中的Identifier属性,在该文件头部占5个字节,对应的字符为“"JFIF"+"0"”,又如在视频格式中,协议信息包括box size、box
type等属性,其中box type属性表示类型,占4个字节,对应字符为视频的格式字符(如“ftyp”、“moov”)。本实施例中为了便于描述,将文件的前面带有协议信息的字节定义为协议头,协议头包括有字节起始位置、字节结尾位置以及从字节起始位置到字节结尾位置之间字节长度的信息。
如上述步骤S3及S4所述,依据cat命令将多个不同格式的文件按字节首尾拼接的方式进行合并,即按照后一个第一文件的字节起始位置拼接至前一个第一文件的字节结尾位置的方式进行拼接,直至所有第一文件拼接完成,得到上述合并文件,这样合并文件中各种格式之间的内容互不干扰。形成合并文件之后将该合并文件以上述第一文件不同格式中的任一种格式作为存储格式存储至上述指定位置。
举例地,将文件1和文件2合并,先将需要合并的文件1、文件2存储至指定位置,然后将使用cat命令,例如用户输入的为cat+文件1(文件名称)+文件2(文件名称)→合并文件(名称),这样得到了cat命令,依据该cat命令根据文件1以及文件2的名称在指定位置查找,找到之后获取文件1以及文件2,然后进行合并,合并时将文件2字节起始位置拼接到文件1的字节结束位置,合并之后存储到指定位置,该合并文件的名称即为上述操作输入的“合并文件(名称)”。当采用阅读软件读取时,阅读软件找到对应的第一文件的协议头,进而解析该段字节长度的内容,将其显示,上述阅读软件可为各种用于观看文件内容的软件,例如PDF阅读器、视频播放器、word阅读器等。
在一个实施例中,上述步骤S4,包括:
步骤S41:获取用户输入的用于所述合并文件存储的格式信息;
步骤S42:依据所述格式信息将所述合并文件以所述存储格式存储至所述指定位置。
本实施例中,由于合并文件可以以第一文件不同格式中的任一种格式作为存储格式,故而在存储之前,可通过用户选择其中一种作为存储格式再进行存储,上述格式信息包括合并文件的格式后缀名,当获取到用户输入的格式后缀名,则可以将合并文件以该格式后缀名的格式进行存储,需注意的是用户输入的格式后缀名为上述第一文件不同格式中的任一种的后缀名,这样用户可根据实际需要在合并之后直接将合并文件以用户想要的格式存储至指定位置,避免后续使用时需要更改格式的麻烦,例如一个由视频格式文件以及PDF格式文件通过上述合并方法合并而成的合并文件,对于该合并文件用户频繁使用以及首先使用的是视频格式文件,PDF格式文件只是偶尔使用,那么在合并之后存储时直接根据用户的需要将合并文件以视频格式存储,让用户使用更加方便。在另一例子中,若用户想要将视频格式以及PDF格式的宣传文件合并之后的合并文件推广给客户,而实际上对于客户来说一开始接收到的是视频会更具吸引力,那么这时用户可根据实际需要在存储的时候输入视频的格式信息,使得合并文件的存储格式为视频格式,再推广给客户。
在一个实施例中,上述第一文件包括JPG格式文件以及非JPG格式文件,则上述步骤S3包括:
步骤S31:将所述非JPG格式文件通过所述cat命令合并之后进行打包压缩,以得到非JPG格式压缩文件;
步骤S32:将所述非JPG格式压缩文件以及所述JPG格式文件按照后一个文件的字节起始位置拼接至前一个文件的字节结尾位置的方式进行拼接以得到所述合并文件。
本实施例中,上述不同格式的文件中还可以包括JPG格式文件以及非JPG格式文件,则先将非JPG格式文件(如mp4格式、PDF格式、TXT格式以及word格式等文件)通过上述合并方法进行合并之后再压缩,即依据上述cat命令合并之后在进行打包压缩,从而得到一个非JPG格式压缩文件,再将该非JPG格式压缩文件与上述JPG格式文件合并,当用户想在合并文件中查看JPG格式文件的内容时,采用图片阅读器对其进行打开即可,若还想观看其他一起合并的文件,则采用解压工具对压缩文件进行解压,这时上述压缩文件解压之后得到除却JPG格式文件的二次合并文件,然后采用相应格式的阅读软件进行查看该二次合并文件即可。
综上所述,通过上述合并方法,将多个不同格式的文件合并成一个合并文件,这样当需要推广给客户时,仅需一个传输通道一次性就能完成多个文件的传输,且由于该合并文件内的不同格式的文件互不干扰,通过阅读软件可识别出合并文件中对应阅读软件格式的内容,并在打开时可抽取这部分内容进行显示,即一个文件可以通过多种不同格式的软件打开并显示对应的内容,用户打开浏览观看极其方便。
参照图2,本申请还提供了一种打开上述合并文件的方法,该打开方法包括:
步骤S5:获取用户通过阅读软件对所述合并文件进行打开的第一打开信息,
步骤S6:依据所述第一打开信息判断所述阅读软件的阅读格式是否为所述存储格式;
步骤S7:若是,依据所述第一打开信息将所述合并文件中对应所述存储格式的第一文件的内容进行显示。
本实施例中,在合成上述合并文件之后,可将该合并文件传播推广至用户客户端,上述合并文件可以为媒体传播宣传文件,上述第一文件可为各种不同格式的文件,如视频、PDF、TXT以及word等格式的文件。如上述步骤S5所述,客户端接收到上述合并文件之后,用户可以对该合并文件进行打开观看,当用户通过阅读软件对合并文件进行打开时,客户端获取到对合并文件进行打开的第一打开信息。
如上述步骤S6以及步骤S7所述,可以理解的是,通常采用什么样的阅读软件只能打开对应的阅读格式的文件,例如PDF阅读器打开的为PDF文件,视频播放器只能打开视频文件,word阅读器只能打开word文档文件等等,如果不是对应阅读格式的文件,可能存在无法打开文件、无法显示对应文件内容的情况。而由于用户采用的阅读软件未知,故而在显示内容之前,可通过第一打开信息来获取阅读软件的阅读格式,然后判断阅读软件的阅读格式是否为对应合并文件的存储格式,例如当合并文件由MP4文件以及PDF文件合并而成,那么存储格式可为MP4以及PDF两者之中的任一种,若存储格式为MP4,那么判断阅读格式也为MP4时,即表明用户采用的是MP4播放器打开该合并文件,这时可依据第一打开信息将合并文件中的MP4文件的内容进行显示。
在一个实施例中,还可以通过修改合并文件的存储格式,使其适应对应的阅读软件的阅读格式。上述多个待合并的不同格式的第一文件包括第一格式的第一文件以及第二格式的第一文件,其中上述存储格式为第一格式,则上述步骤S7之后,包括:
步骤S71:获取用户更改所述存储格式的更改信息,所述更改信息包括对应所述第二格式的格式后缀名;
步骤S72:依据所述更改信息将所述合并文件的存储格式从所述第一格式修改成所述第二格式;
步骤S73:获取用户通过所述第二格式对应的阅读软件将所述合并文件打开的第二打开信息;
步骤S74:依据所述第二打开信息将所述合并文件中对应所述第二格式的第一文件的内容进行显示。
本实施例中,上述第一格式以及第二格式均可以为上述视频、PDF、TXT以及word等格式中的任一种,且第一格式和第二格式不相同,根据用户需要,可对合并文件进行修改格式(该修改的格式须为合并文件包含的格式)。具体而言,可以通过修改合并文件的格式后缀来将第一格式修改成第二格式,上述用户输入的更改信息为修改合并文件格式后缀名的信息,其中包括更改后的格式后缀名,本实施例中需要将第一格式更改为第二格式,则该更改信息包括对应第二格式的格式后缀名,如某银行公司,将贷款介绍材料word文档和推广小视频合并成一个合并文件,并发送至客户端,在客户端中以MP4格式存储,则合成文件的视频文件可以直接通过MP4播放器进行播放,当将它的后缀名改为word文档后缀名(如.doc)时,则合并文件中的word文件可以被word阅读器打开。
举例地,将A公司的宣传视频(MP4格式文件)以及产品的详细文字介绍(PDF格式)合并成一个合并文件,将该合并文件以MP4格式推广到用户的客户端,这时用户可以采用视频播放器直接观看宣传视频,若是感兴趣还可以直接修改合并文件的格式后缀名,然后通过PDF阅读器进一步查看PDF格式的产品介绍,这样用户不需要与A公司二次交互,方便省事。
在一个实施例中,上述步骤S7,包括:
步骤S701:依据所述第一打开信息在所述合并文件中找到文件格式为所述存储格式的第一文件的协议头;
步骤S702:从所述第一协议头中获取对应的第一字节起始位置以及第一字节长度,并以所述第一字节起始位置为起点抽取对应所述第一字节长度的文件内容;
步骤S703:将所述文件内容进行解析并显示。
本实施例中,合并文件中的每种格式的第一文件互不干扰,均占合并文件中的部分内存,且每种格式的第一文件在合并文件中均有对应的协议头,以供阅读软件对其进行识别。当使用阅读软件对合并文件进行打开时,依据打开时得到的第一打开信息在合并文件中查找对应存储格式的第一文件的第一协议头,从该第一协议头中得到第一字节起始位置以及第一字节长度,然后以第一字节起始位置为起点,结束位置为终点,抽取第一字节长度内的文件内容,这些文件内容为对应的上述存储格式的文件内容,即为对应存储格式的第一文件的内容,然后再将该文件内容进行显示。
在另一个实施例中,上述步骤S74之后,还包括:
依据用户输入的信息显示多个供所述用户选择的预设格式,所述预设格式为所述第一文件多个不同格式中的任一种格式;在接收到所述用户选择所述多个预设格式中的其一个格式的信息后,将所述用户所选择的格式作为所述合并文件的存储格式。
本实施例中,用户可对该合并文件的格式进行编辑,以得到合并文件用于存储的存储格式。例如用户直接点击合并文件以显示出多个供选择的格式,然后对这些格式进行选择,如这些格式中包括mp4、PDF、TXT三种,此时用户可点击选择其中一种格式,客户端即可获取到用户输入的格式信息,依据该格式信息将上述用户选择的格式作为合并文件的存储格式,然后存储至客户端指定位置。当然,若用户想要换成另一个格式,也可以通过选择来替换成另一个格式。这样可以节省用户修改格式的步骤,通过选择格式直接可以打开对应格式的文件,更加利便。
在一实施例中,上述存储格式的格式信息包括格式的后缀名,上述步骤S6之后,还包括:
步骤S61:若所述阅读格式不是所述存储格式,则判断所述阅读格式是否为所述多种不同格式中除却所述存储格式的任一种;
步骤S62:若所述阅读格式为所述多种不同格式中除却所述存储格式的任一种,则判断所述阅读软件是否为能够忽略文件的格式后缀名的阅读软件;
步骤S63:若所述阅读软件为能够忽略文件的格式后缀名的阅读软件,则通过所述阅读软件将所述合并文件打开,并将对应所述阅读格式的第一文件的内容进行显示;否则,停止打开所述合并文件。
本实施例中,当判断上述阅读格式不是存储格式时,即表明不能采用阅读软件直接打开上述合并文件,但是上述阅读格式可能是除却上述存储格式之外的第一文件的多种格式中的任一种,由于相同阅读格式中具有各种不同阅读软件,而不同的阅读软件对应实现其功能的代码也不会相同,其中有些阅读软件代码可忽略文件的格式后缀名直接将具有该阅读格式的文件打开,而有些则不行,如甲乙两种视频播放器,甲视频播放器只能对后缀名为WMV的文件进行打开,而乙视频播放器则可以忽略文件的后缀名,只要文件中包含有视频文件即可以打开,若这时打开合并文件,展示的内容为对应阅读格式的第一文件内容,而不是存储格式的第一文件内容。故而本步骤需要继续判断阅读格式是不是为多种不同格式中除却所述存储格式的任一种,如果不是,即阅读软件的阅读格式不是第一文件中多种格式的任一种,无法找到匹配的第一文件,故而停止打开上述合并文件。但若上述阅读格式为多种不同格式中除却存储格式的任一种,则判断阅读软件不是能够忽略文件的格式后缀名的阅读软件,由于能够忽略格式后缀名的阅读软件可以直接识别出对应的协议头,故而当阅读软件识别出协议头即可判断其为能够忽略文件的格式后缀名的阅读软件,同时将对应阅读格式的第一文件打开并显示。
举例地,上述合并文件由MP4格式第一文件、PDF格式的第一文件以及TXT格式的第一文件合并而成,其存储格式为MP4格式,当用户采用阅读软件对合并文件进行打开时,首先判断阅读软件的阅读格式是不是MP4格式,如果是,则通过阅读软件打开的是视频文件,即上述MP4格式的第一文件;如果不是,再判断阅读格式是不是除却MP4格式之外的另外两种,即判断阅读格式是不是PDF格式或TXT格式,如果阅读格式不是PDF格式或TXT格式,那么此时无法打开上述合并文件,即停止打开。如果阅读格式为PDF格式,则判断给阅读软件是否为能够忽略格式后缀名的软件,若是则打开的是PDF格式的第一文件,如果阅读格式为TXT格式,则判断给阅读软件是否为能够忽略格式后缀名的软件,若是则打开的是TXT格式的第一文件,如果阅读软件不是能够忽略格式后缀名的软件,那么此时同样无法打开上述合并文件。
在一个实施例中,上述步骤S62之后,包括:
步骤S64:若所述阅读软件不是能够忽略文件的格式后缀名的阅读软件,则获取所述阅读软件的阅读格式;
步骤S65:依据所述阅读格式将所述合并文件的格式后缀名更改成对应所述阅读格式的格式后缀名,并通过所述阅读软件将所述合并文件打开,将对应所述阅读格式的第一文件的内容进行显示。
本实施例中,当判断阅读软件不是能够忽略格式后缀名的阅读软件,即此时该阅读软件不能打开上述合并文件,这时可获取阅读软件的阅读格式,并识别出该阅读格式为何种格式,然后将合并文件的格式后缀名更改成对应阅读格式的格式后缀名,该过程可通过编写的代码实现,当将合并文件的格式后缀名更改成阅读格式的后缀名,则可打开该合并文件,且显示的为对应阅读格式的第一文件的内容。
本申请提供的文件的合并装置,包括:
获取命令单元,用于获取用户输入的cat命令,所述cat命令用于合并不同格式的文件;
获取文件单元,用于依据所述cat命令从指定位置获取多个待合并的不同格式的第一文件;其中,所述第一文件包括对应文件格式的协议信息,所述协议信息包括位于文件中字节起始位置的协议头,所述协议头包括字节起始位置、字节结尾位置以及从所述字节起始位置到所述字节结尾位置之间字节长度的信息;
拼接文件单元,用于将多个所述第一文件按照后一个所述第一文件的字节起始位置拼接至前一个所述第一文件的字节结尾位置的方式进行拼接,直至所有所述第一文件拼接完成以得到合并文件;
存储文件单元,用于将所述合并文件以多个所述第一文件的不同格式中的任一种格式作为存储格式存储至所述指定位置。
在一个实施例中,上述存储文件单元,包括:
获取信息子单元,用于获取用户输入的用于所述合并文件存储的格式信息;
存储文件子单元,用于依据所述格式信息将所述合并文件以所述存储格式存储至所述指定位置。
在一个实施例中,上述第一文件包括JPG格式文件以及非JPG格式文件,则上述拼接文件单元包括:
压缩文件子单元,用于将所述非JPG格式文件通过所述cat命令合并之后进行打包压缩,以得到非JPG格式压缩文件;
拼接文件子单元,用于将所述非JPG格式压缩文件以及所述JPG格式文件按照后一个文件的字节起始位置拼接至前一个文件的字节结尾位置的方式进行拼接以得到所述合并文件。
综上所述,通过上述合并装置,将多个不同格式的文件合并成一个合并文件且各个文件之间互不干扰,这样当需要推广给客户时,仅需一个传输通道一次性就能完成多个文件的传输,且由于该合并文件内的不同格式的文件互不干扰,通过阅读软件可识别出合并文件中对应阅读软件格式的内容,并在打开时可抽取这部分内容进行显示,即一个文件可以通过多种格式的软件打开并显示对应的内容,用户打开浏览观看极其方便。
在一个实施例中,本申请还提供了一种打开上述合并文件的装置,该打开装置包括:
获取打开单元,用于获取用户通过阅读软件对所述合并文件进行打开的第一打开信息,
判断存储单元,用于依据所述第一打开信息判断所述阅读软件的阅读格式是否为所述存储格式;
显示内容单元,用于所述阅读软件的阅读格式为所述存储格式时,依据所述第一打开信息将所述合并文件中对应所述存储格式的第一文件的内容进行显示。
在一个实施例中,还可以通过修改合并文件的存储格式,使其适应对应的阅读软件的阅读格式。上述多个待合并的不同格式的第一文件包括第一格式的第一文件以及第二格式的第一文件,其中上述存储格式为第一格式,则上述合并文件的打开装置,还包括:
获取更改单元,用于获取用户更改所述存储格式的更改信息,所述更改信息包括对应所述第二格式的格式后缀名;
修改格式单元,用于依据所述更改信息将所述合并文件的存储格式从所述第一格式修改成所述第二格式;
第二打开单元,用于获取用户通过所述第二格式对应的阅读软件将所述合并文件打开的第二打开信息;
第二显示单元,用于依据所述第二打开信息将所述合并文件中对应所述第二格式的第一文件的内容进行显示。
在一个实施例中,上述显示内容单元,包括:
查找协议子单元,用于依据所述第一打开信息在所述合并文件中找到文件格式为所述存储格式的第一文件的协议头;
抽取内容子单元,用于从所述第一协议头中获取对应的第一字节起始位置以及第一字节长度,并以所述第一字节起始位置为起点抽取对应所述第一字节长度的文件内容;
解析显示子单元,用于将所述文件内容进行解析并显示。
在一实施例中,上述存储格式的格式信息包括格式的后缀名,上述合并文件的打开装置,还包括:
判断多格单元,用于若所述阅读格式不是所述存储格式,则判断所述阅读格式是否为所述多种不同格式中除却所述存储格式的任一种;
判断忽略单元,用于若所述阅读格式为所述多种不同格式中除却所述存储格式的任一种,则判断所述阅读软件是否为能够忽略文件的格式后缀名的阅读软件;
停止打开单元,用于所述阅读软件为能够忽略文件的格式后缀名的阅读软件时,则通过所述阅读软件将所述合并文件打开,并将对应所述阅读格式的第一文件的内容进行显示;否则,停止打开所述合并文件。
在一个实施例中,上述合并文件的打开装置,包括:
获取阅读单元,用于若所述阅读软件不是能够忽略文件的格式后缀名的阅读软件,则获取所述阅读软件的阅读格式;
更改缀名单元,用于依据所述阅读格式将所述合并文件的格式后缀名更改成对应所述阅读格式的格式后缀名,并通过所述阅读软件将所述合并文件打开,将对应所述阅读格式的第一文件的内容进行显示。
参照图3,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图3所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储合并多种格式文件以及打开合并文件所需的所有数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种文件的合并方法以及由该合并方法合并得到的合并文件的打开方法。
上述处理器执行上述文件的合并方法的步骤:获取用户输入的cat命令,所述cat命令用于合并不同格式的文件;依据所述cat命令从指定位置获取多个待合并的不同格式的第一文件;其中,所述第一文件包括对应文件格式的协议信息,所述协议信息包括位于文件中字节起始位置的协议头,所述协议头包括字节起始位置、字节结尾位置以及从所述字节起始位置到所述字节结尾位置之间字节长度的信息;将多个所述第一文件按照后一个所述第一文件的字节起始位置拼接至前一个所述第一文件的字节结尾位置的方式进行拼接,直至所有所述第一文件拼接完成以得到合并文件;将所述合并文件以多个所述第一文件的不同格式中的任一种格式作为存储格式存储至所述指定位置。
上述计算机设备中,上述将所述合并文件以多个所述第一文件的不同格式中的任一种格式作为存储格式存储至所述指定位置的步骤,包括:获取用户输入的用于所述合并文件存储的格式信息;依据所述格式信息将所述合并文件以所述存储格式存储至所述指定位置。
在一个实施例中,上述第一文件包括JPG格式文件以及非JPG格式文件,所述将多个所述第一文件按照后一个所述第一文件的字节起始位置拼接至前一个所述第一文件的字节结尾位置的方式进行拼接,直至所有所述第一文件拼接完成以得到合并文件的步骤,包括:将所述非JPG格式文件通过所述cat命令合并之后进行打包压缩,以得到非JPG格式压缩文件;将所述非JPG格式压缩文件以及所述JPG格式文件按照后一个文件的字节起始位置拼接至前一个文件的字节结尾位置的方式进行拼接以得到所述合并文件。
上述处理器执行上述合并方法得到的合并文件的打开方法的步骤:获取用户通过阅读软件对所述合并文件进行打开的第一打开信息;依据所述第一打开信息判断所述阅读软件的阅读格式是否为所述存储格式;若是,依据所述第一打开信息将所述合并文件中对应所述存储格式的第一文件的内容进行显示。
上述计算机设备中,上述多个待合并的不同格式的第一文件包括第一格式的第一文件以及第二格式第一文件,所述存储格式为所述第一格式,所述依据所述第一打开信息将所述合并文件中对应所述存储格式的第一文件的内容进行显示的步骤之后,包括:获取用户更改所述存储格式的更改信息,所述更改信息包括对应所述第二格式的格式后缀名;依据所述更改信息将所述合并文件的存储格式从所述第一格式修改成所述第二格式;获取用户通过所述第二格式对应的阅读软件将所述合并文件打开的第二打开信息;依据所述第二打开信息将所述合并文件中对应所述第二格式的第一文件的内容进行显示。
在一个实施例中,上述依据所述第一打开信息将所述合并文件中对应所述存储格式的第一文件的内容进行显示的步骤,包括:依据所述第一打开信息在所述合并文件中找到文件格式为所述存储格式的第一文件的第一协议头;从所述第一协议头中获取对应的第一字节起始位置以及第一字节长度,并以所述第一字节起始位置为起点抽取对应所述第一字节长度的文件内容;将所述文件内容进行解析并显示。
在一个实施例中,上述存储格式的格式信息包括格式的后缀名,所述依据所述第一打开信息判断所述阅读软件的阅读格式是否为所述存储格式的步骤之后,包括:若所述阅读格式不是所述存储格式,则判断所述阅读格式是否为所述多种不同格式中除却所述存储格式的任一种;若所述阅读格式为所述多种不同格式中除却所述存储格式的任一种,则判断所述阅读软件是否为能够忽略文件的格式后缀名的阅读软件;若所述阅读软件为能够忽略文件的格式后缀名的阅读软件,则通过所述阅读软件将所述合并文件打开,并将对应所述阅读格式的第一文件的内容进行显示;否则,停止打开所述合并文件。
在一个实施例中,上述判断所述阅读软件是否为能够忽略文件的格式后缀名的阅读软件的步骤之后,包括:若所述阅读软件不是能够忽略文件的格式后缀名的阅读软件,则获取所述阅读软件的阅读格式;依据所述阅读格式将所述合并文件的格式后缀名更改成对应所述阅读格式的格式后缀名,并通过所述阅读软件将所述合并文件打开,将对应所述阅读格式的第一文件的内容进行显示。
本领域技术人员可以理解,图3中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定。
本申请一实施例还提供一种计算机可读存储介质,所述计算机可读存储介质,例如为非易失性的计算机可读存储介质,或者为易失性的计算机可读存储介质,其上存储有计算机可读指令,计算机可读指令被处理器执行时实现一种文件的合并方法,具体为:获取用户输入的cat命令,所述cat命令用于合并不同格式的文件;依据所述cat命令从指定位置获取多个待合并的不同格式的第一文件;其中,所述第一文件包括对应文件格式的协议信息,所述协议信息包括位于文件中字节起始位置的协议头,所述协议头包括字节起始位置、字节结尾位置以及从所述字节起始位置到所述字节结尾位置之间字节长度的信息;将多个所述第一文件按照后一个所述第一文件的字节起始位置拼接至前一个所述第一文件的字节结尾位置的方式进行拼接,直至所有所述第一文件拼接完成以得到合并文件;将所述合并文件以多个所述第一文件的不同格式中的任一种格式作为存储格式存储至所述指定位置。
上述计算机可读存储介质,上述将所述合并文件以多个所述第一文件的不同格式中的任一种格式作为存储格式存储至所述指定位置的步骤,包括:获取用户输入的用于所述合并文件存储的格式信息;依据所述格式信息将所述合并文件以所述存储格式存储至所述指定位置。
在一个实施例中,上述第一文件包括JPG格式文件以及非JPG格式文件,所述将多个所述第一文件按照后一个所述第一文件的字节起始位置拼接至前一个所述第一文件的字节结尾位置的方式进行拼接,直至所有所述第一文件拼接完成以得到合并文件的步骤,包括:将所述非JPG格式文件通过所述cat命令合并之后进行打包压缩,以得到非JPG格式压缩文件;将所述非JPG格式压缩文件以及所述JPG格式文件按照后一个文件的字节起始位置拼接至前一个文件的字节结尾位置的方式进行拼接以得到所述合并文件。
上述计算机可读指令被处理器执行时实现一种合并方法得到的合并文件的打开方法,具体为:获取用户通过阅读软件对所述合并文件进行打开的第一打开信息;依据所述第一打开信息判断所述阅读软件的阅读格式是否为所述存储格式;若是,依据所述第一打开信息将所述合并文件中对应所述存储格式的第一文件的内容进行显示。
上述计算机可读存储介质,上述多个待合并的不同格式的第一文件包括第一格式的第一文件以及第二格式的第一文件,所述存储格式为所述第一格式,所述依据所述第一打开信息将所述合并文件中对应所述存储格式的第一文件的内容进行显示的步骤之后,包括:获取用户更改所述存储格式的更改信息,所述更改信息包括对应所述第二格式的格式后缀名;依据所述更改信息将所述合并文件的存储格式从所述第一格式修改成所述第二格式;获取用户通过所述第二格式对应的阅读软件将所述合并文件打开的第二打开信息;依据所述第二打开信息将所述合并文件中对应所述第二格式的第一文件的内容进行显示。
在一个实施例中,上述依据所述第一打开信息将所述合并文件中对应所述存储格式的第一文件的内容进行显示的步骤,包括:依据所述第一打开信息在所述合并文件中找到文件格式为所述存储格式的第一文件的第一协议头;从所述第一协议头中获取对应的第一字节起始位置以及第一字节长度,并以所述第一字节起始位置为起点抽取对应所述第一字节长度的文件内容;将所述文件内容进行解析并显示。
在一个实施例中,上述存储格式的格式信息包括格式的后缀名,所述依据所述第一打开信息判断所述阅读软件的阅读格式是否为所述存储格式的步骤之后,包括:若所述阅读格式不是所述存储格式,则判断所述阅读格式是否为所述多种不同格式中除却所述存储格式的任一种;若所述阅读格式为所述多种不同格式中除却所述存储格式的任一种,则判断所述阅读软件是否为能够忽略文件的格式后缀名的阅读软件;若所述阅读软件为能够忽略文件的格式后缀名的阅读软件,则通过所述阅读软件将所述合并文件打开,并将对应所述阅读格式的第一文件的内容进行显示;否则,停止打开所述合并文件。
在一个实施例中,上述判断所述阅读软件是否为能够忽略文件的格式后缀名的阅读软件的步骤之后,包括:若所述阅读软件不是能够忽略文件的格式后缀名的阅读软件,则获取所述阅读软件的阅读格式;依据所述阅读格式将所述合并文件的格式后缀名更改成对应所述阅读格式的格式后缀名,并通过所述阅读软件将所述合并文件打开,将对应所述阅读格式的第一文件的内容进行显示。
以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。
Claims (20)
- 一种文件的合并方法,其特征在于,包括:获取用户输入的cat命令,所述cat命令用于合并不同格式的文件;依据所述cat命令从指定位置获取多个待合并的不同格式的第一文件;其中,所述第一文件包括对应文件格式的协议信息,所述协议信息包括位于文件中字节起始位置的协议头,所述协议头包括字节起始位置、字节结尾位置以及从所述字节起始位置到所述字节结尾位置之间字节长度的信息;将多个所述第一文件按照后一个所述第一文件的字节起始位置拼接至前一个所述第一文件的字节结尾位置的方式进行拼接,直至所有所述第一文件拼接完成以得到合并文件;将所述合并文件以多个所述第一文件的不同格式中的任一种格式作为存储格式存储至所述指定位置。
- 根据权利要求1所述的文件的合并方法,其特征在于,所述将所述合并文件以多个所述第一文件的不同格式中的任一种格式作为存储格式存储至所述指定位置的步骤,包括:获取用户输入的用于所述合并文件存储的格式信息;依据所述格式信息将所述合并文件以所述存储格式存储至所述指定位置。
- 根据权利要求1所述的文件的合并方法,其特征在于,所述第一文件包括JPG格式文件以及非JPG格式文件,所述将多个所述第一文件按照后一个所述第一文件的字节起始位置拼接至前一个所述第一文件的字节结尾位置的方式进行拼接,直至所有所述第一文件拼接完成以得到合并文件的步骤,包括:将所述非JPG格式文件通过所述cat命令合并之后进行打包压缩,以得到非JPG格式压缩文件;将所述非JPG格式压缩文件以及所述JPG格式文件按照后一个文件的字节起始位置拼接至前一个文件的字节结尾位置的方式进行拼接以得到所述合并文件。
- 一种如权利要求1所述的合并方法得到的合并文件的打开方法,其特征在于,包括:获取用户通过阅读软件对所述合并文件进行打开的第一打开信息;依据所述第一打开信息判断所述阅读软件的阅读格式是否为所述存储格式;若是,依据所述第一打开信息将所述合并文件中对应所述存储格式的第一文件的内容进行显示。
- 根据权利要求4所述的合并方法得到的合并文件的打开方法,其特征在于,所述多个待合并的不同格式的第一文件包括第一格式的第一文件以及第二格式的第一文件,所述存储格式为所述第一格式,所述依据所述第一打开信息将所述合并文件中对应所述存储格式的第一文件的内容进行显示的步骤之后,包括:获取用户更改所述存储格式的更改信息,所述更改信息包括对应所述第二格式的格式后缀名;依据所述更改信息将所述合并文件的存储格式从所述第一格式修改成所述第二格式;获取用户通过所述第二格式对应的阅读软件将所述合并文件打开的第二打开信息;依据所述第二打开信息将所述合并文件中对应所述第二格式的第一文件的内容进行显示。
- 根据权利要求4所述的合并方法得到的合并文件的打开方法,其特征在于,所述依据所述第一打开信息将所述合并文件中对应所述存储格式的第一文件的内容进行显示的步骤,包括:依据所述第一打开信息在所述合并文件中找到文件格式为所述存储格式的第一文件的第一协议头;从所述第一协议头中获取对应的第一字节起始位置以及第一字节长度,并以所述第一字节起始位置为起点抽取对应所述第一字节长度的文件内容;将所述文件内容进行解析并显示。
- 根据权利要求4所述的合并方法得到的合并文件的打开方法,其特征在于,所述存储格式的格式信息包括格式后缀名,所述依据所述第一打开信息判断所述阅读软件的阅读格式是否为所述存储格式的步骤之后,包括:若所述阅读格式不是所述存储格式,则判断所述阅读格式是否为所述多种不同格式中除却所述存储格式的任一种;若所述阅读格式为所述多种不同格式中除却所述存储格式的任一种,则判断所述阅读软件是否为能够忽略文件的格式后缀名的阅读软件;若所述阅读软件为能够忽略文件的格式后缀名的阅读软件,则通过所述阅读软件将所述合并文件打开,并将对应所述阅读格式的第一文件的内容进行显示;否则,停止打开所述合并文件。
- 根据权利要求7所述的合并方法得到的合并文件的打开方法,其特征在于,所述判断所述阅读软件是否为能够忽略文件的格式后缀名的阅读软件的步骤之后,包括:若所述阅读软件不是能够忽略文件的格式后缀名的阅读软件,则获取所述阅读软件的阅读格式;依据所述阅读格式将所述合并文件的格式后缀名更改成对应所述阅读格式的格式后缀名,并通过所述阅读软件将所述合并文件打开,将对应所述阅读格式的第一文件的内容进行显示。
- 根据权利要求4所述的合并方法得到的合并文件的打开方法,其特征在于,所述依据所述第一打开信息将所述合并文件中对应所述存储格式的第一文件的内容进行显示的步骤之后,包括:依据用户输入的信息显示多个供所述用户选择的预设格式,所述预设格式为所述第一文件多个不同格式中的任一种格式;在接收到所述用户选择所述多个预设格式中的其一个格式的信息后,将所述用户所选择的格式作为所述合并文件的存储格式。
- 一种文件的合并装置,其特征在于,包括:获取命令单元,用于获取用户输入的cat命令,所述cat命令用于合并不同格式的文件;获取文件单元,用于依据所述cat命令从指定位置获取多个待合并的不同格式的第一文件;其中,所述第一文件包括对应文件格式的协议信息,所述协议信息包括位于文件中字节起始位置的协议头,所述协议头包括字节起始位置、字节结尾位置以及从所述字节起始位置到所述字节结尾位置之间字节长度的信息;拼接文件单元,用于将多个所述第一文件按照后一个所述第一文件的字节起始位置拼接至前一个所述第一文件的字节结尾位置的方式进行拼接,直至所有所述第一文件拼接完成以得到合并文件;存储文件单元,用于将所述合并文件以多个所述第一文件的不同格式中的任一种格式作为存储格式存储至所述指定位置。
- 根据权利要求10所述的文件的合并装置,其特征在于,所述存储文件单元,包括:获取信息子单元,用于获取用户输入的用于所述合并文件存储的格式信息;存储文件子单元,用于依据所述格式信息将所述合并文件以所述存储格式存储至所述指定位置。
- 根据权利要求10所述的文件的合并装置,其特征在于,所述第一文件包括JPG格式文件以及非JPG格式文件,所述拼接文件单元包括:压缩文件子单元,用于将所述非JPG格式文件通过所述cat命令合并之后进行打包压缩,以得到非JPG格式压缩文件;拼接文件子单元,用于将所述非JPG格式压缩文件以及所述JPG格式文件按照后一个文件的字节起始位置拼接至前一个文件的字节结尾位置的方式进行拼接以得到所述合并文件。
- 一种合并文件的打开装置,其特征在于,用于打开如权利要求1-8所述的合并文件,所述打开装置包括:获取打开单元,用于获取用户通过阅读软件对所述合并文件进行打开的第一打开信息,判断存储单元,用于依据所述第一打开信息判断所述阅读软件的阅读格式是否为所述存储格式;显示内容单元,用于所述阅读软件的阅读格式为所述存储格式时,依据所述第一打开信息将所述合并文件中对应所述存储格式的第一文件的内容进行显示。
- 根据权利要求13所述的合并文件的打开装置,其特征在于,还包括:获取更改单元,用于获取用户更改所述存储格式的更改信息,所述更改信息包括对应所述第二格式的格式后缀名;修改格式单元,用于依据所述更改信息将所述合并文件的存储格式从所述第一格式修改成所述第二格式;第二打开单元,用于获取用户通过所述第二格式对应的阅读软件将所述合并文件打开的第二打开信息;第二显示单元,用于依据所述第二打开信息将所述合并文件中对应所述第二格式的第一文件的内容进行显示。
- 根据权利要求13所述的合并文件的打开装置,其特征在于,所述显示内容单元,包括:查找协议子单元,用于依据所述第一打开信息在所述合并文件中找到文件格式为所述存储格式的第一文件的协议头;抽取内容子单元,用于从所述第一协议头中获取对应的第一字节起始位置以及第一字节长度,并以所述第一字节起始位置为起点抽取对应所述第一字节长度的文件内容;解析显示子单元,用于将所述文件内容进行解析并显示。
- 根据权利要求13所述的合并文件的打开装置,其特征在于,所述存储格式的格式信息包括格式的后缀名,所述打开装置包括:判断多格单元,用于若所述阅读格式不是所述存储格式,则判断所述阅读格式是否为所述多种不同格式中除却所述存储格式的任一种;判断忽略单元,用于若所述阅读格式为所述多种不同格式中除却所述存储格式的任一种,则判断所述阅读软件是否为能够忽略文件的格式后缀名的阅读软件;停止打开单元,用于所述阅读软件为能够忽略文件的格式后缀名的阅读软件时,则通过所述阅读软件将所述合并文件打开,并将对应所述阅读格式的第一文件的内容进行显示;否则,停止打开所述合并文件。
- 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现一种文件的合并方法,该文件的合并方法包括:获取用户输入的cat命令,所述cat命令用于合并不同格式的文件;依据所述cat命令从指定位置获取多个待合并的不同格式的第一文件;其中,所述第一文件包括对应文件格式的协议信息,所述协议信息包括位于文件中字节起始位置的协议头,所述协议头包括字节起始位置、字节结尾位置以及从所述字节起始位置到所述字节结尾位置之间字节长度的信息;将多个所述第一文件按照后一个所述第一文件的字节起始位置拼接至前一个所述第一文件的字节结尾位置的方式进行拼接,直至所有所述第一文件拼接完成以得到合并文件;将所述合并文件以多个所述第一文件的不同格式中的任一种格式作为存储格式存储至所述指定位置;和/或所述处理器执行所述计算机可读指令时实现一种合并文件的打开方法,该打开方法包括:获取用户通过阅读软件对所述合并文件进行打开的第一打开信息;依据所述第一打开信息判断所述阅读软件的阅读格式是否为所述存储格式;若是,依据所述第一打开信息将所述合并文件中对应所述存储格式的第一文件的内容进行显示。
- 根据权利要求17所述的计算机设备,其特征在于,所述合并文件的打开方法,包括:获取用户通过阅读软件对所述合并文件进行打开的第一打开信息;依据所述第一打开信息判断所述阅读软件的阅读格式是否为所述存储格式;若是,依据所述第一打开信息将所述合并文件中对应所述存储格式的第一文件的内容进行显示。
- 一种计算机可读存储介质,其上存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现一种文件的合并方法,该文件的合并方法包括:获取用户输入的cat命令,所述cat命令用于合并不同格式的文件;依据所述cat命令从指定位置获取多个待合并的不同格式的第一文件;其中,所述第一文件包括对应文件格式的协议信息,所述协议信息包括位于文件中字节起始位置的协议头,所述协议头包括字节起始位置、字节结尾位置以及从所述字节起始位置到所述字节结尾位置之间字节长度的信息;将多个所述第一文件按照后一个所述第一文件的字节起始位置拼接至前一个所述第一文件的字节结尾位置的方式进行拼接,直至所有所述第一文件拼接完成以得到合并文件;将所述合并文件以多个所述第一文件的不同格式中的任一种格式作为存储格式存储至所述指定位置;和/或所述处理器执行所述计算机可读指令时实现一种合并文件的打开方法,该打开方法包括:获取用户通过阅读软件对所述合并文件进行打开的第一打开信息;依据所述第一打开信息判断所述阅读软件的阅读格式是否为所述存储格式;若是,依据所述第一打开信息将所述合并文件中对应所述存储格式的第一文件的内容进行显示。
- 根据权利要求19所述的计算机可读存储介质,其特征在于,所述合并文件的打开方法,包括:获取用户通过阅读软件对所述合并文件进行打开的第一打开信息;依据所述第一打开信息判断所述阅读软件的阅读格式是否为所述存储格式;若是,依据所述第一打开信息将所述合并文件中对应所述存储格式的第一文件的内容进行显示。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910082138.3 | 2019-01-28 | ||
CN201910082138.3A CN109933569B (zh) | 2019-01-28 | 2019-01-28 | 一种文件的合并方法、文件的打开方法及相关设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020155780A1 true WO2020155780A1 (zh) | 2020-08-06 |
Family
ID=66985256
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/118801 WO2020155780A1 (zh) | 2019-01-28 | 2019-11-15 | 一种文件的合并方法、文件的打开方法及相关设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109933569B (zh) |
WO (1) | WO2020155780A1 (zh) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109933569B (zh) * | 2019-01-28 | 2024-03-19 | 平安科技(深圳)有限公司 | 一种文件的合并方法、文件的打开方法及相关设备 |
CN111597151A (zh) * | 2020-05-20 | 2020-08-28 | 广州平云小匠科技有限公司 | 文件生成方法、装置、计算机设备和存储介质 |
CN116992057A (zh) * | 2023-06-30 | 2023-11-03 | 北京百度网讯科技有限公司 | 存储设备中多媒体文件的处理方法、装置和设备 |
CN116755593B (zh) * | 2023-08-11 | 2023-10-24 | 江苏中威科技软件系统有限公司 | 将信息与文件汇聚白板进行组合或合并阅读及操作的方法 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070204210A1 (en) * | 2006-02-28 | 2007-08-30 | Michael Gormish | Standardized network access to partial document imagery |
CN103390005A (zh) * | 2012-05-11 | 2013-11-13 | 北大方正集团有限公司 | 一种合并文档的方法与系统 |
CN106101264A (zh) * | 2016-07-20 | 2016-11-09 | 腾讯科技(深圳)有限公司 | 内容分发网络日志推送方法、装置和系统 |
CN109147831A (zh) * | 2018-09-26 | 2019-01-04 | 深圳壹账通智能科技有限公司 | 一种语音连接播放方法、终端设备及计算机可读存储介质 |
CN109933569A (zh) * | 2019-01-28 | 2019-06-25 | 平安科技(深圳)有限公司 | 一种文件的合并方法、文件的打开方法及相关设备 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8589454B2 (en) * | 2011-01-17 | 2013-11-19 | International Business Machines Corporation | Computer data file merging based on file metadata |
WO2017090054A1 (en) * | 2015-11-26 | 2017-06-01 | Satyam Sandepogu | Editfile |
CN108632541B (zh) * | 2017-03-20 | 2021-07-20 | 杭州海康威视数字技术股份有限公司 | 一种多视频片段合并方法及装置 |
CN107194001B (zh) * | 2017-06-14 | 2019-11-12 | 网宿科技股份有限公司 | 一种列式存储格式文件快速合并方法及其系统 |
-
2019
- 2019-01-28 CN CN201910082138.3A patent/CN109933569B/zh active Active
- 2019-11-15 WO PCT/CN2019/118801 patent/WO2020155780A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070204210A1 (en) * | 2006-02-28 | 2007-08-30 | Michael Gormish | Standardized network access to partial document imagery |
CN103390005A (zh) * | 2012-05-11 | 2013-11-13 | 北大方正集团有限公司 | 一种合并文档的方法与系统 |
CN106101264A (zh) * | 2016-07-20 | 2016-11-09 | 腾讯科技(深圳)有限公司 | 内容分发网络日志推送方法、装置和系统 |
CN109147831A (zh) * | 2018-09-26 | 2019-01-04 | 深圳壹账通智能科技有限公司 | 一种语音连接播放方法、终端设备及计算机可读存储介质 |
CN109933569A (zh) * | 2019-01-28 | 2019-06-25 | 平安科技(深圳)有限公司 | 一种文件的合并方法、文件的打开方法及相关设备 |
Also Published As
Publication number | Publication date |
---|---|
CN109933569A (zh) | 2019-06-25 |
CN109933569B (zh) | 2024-03-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020155780A1 (zh) | 一种文件的合并方法、文件的打开方法及相关设备 | |
JP4159248B2 (ja) | 階層的データ構造管理システム及び階層的データ構造管理方法 | |
US8271544B2 (en) | Data file having more than one mode of operation | |
US6839059B1 (en) | System and method for manipulation and interaction of time-based mixed media formats | |
US7979801B2 (en) | Media presentation driven by meta-data events | |
US20030084405A1 (en) | Contents conversion system, automatic style sheet selection method and program thereof | |
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 | |
US10289747B2 (en) | Dynamic file concatenation | |
US8958483B2 (en) | Audio/video content synchronization and display | |
US20150128015A1 (en) | Browsing system, terminal, image server, program, computer-readable recording medium storing program, and method | |
US7814408B1 (en) | Pre-computing and encoding techniques for an electronic document to improve run-time processing | |
US7272659B2 (en) | Information rewriting method, recording medium storing information rewriting program and information terminal device | |
WO2001073560A1 (fr) | Systeme fournisseur de contenus | |
EP1732328A1 (en) | Method for automatically removing metadata information from audio data files | |
JP4666789B2 (ja) | コンテンツ配信システムおよびコンテンツ配信サーバ | |
CN107066437B (zh) | 数字作品标注的方法及装置 | |
JP2003141413A (ja) | コンテンツ配信サーバと、コンテンツ付加広告仲介サーバと、ユーザ端末と、それらの処理用プログラム及びその処理用プログラムを記録した記録媒体 | |
JPH11353261A (ja) | Webアプリケーション実行方法 | |
KR20010067762A (ko) | 그래픽 파일에 대한 썸네일을 제공하는 썸네일 게시판시스템 및 방법 | |
JPH11249941A (ja) | 整理用ファイル生成方法 | |
CN111130977B (zh) | 数据处理、封装、输出方法和装置,存储介质和电子设备 | |
EP1132833A2 (en) | A method and structure for dynamic conversion of data | |
KR20010064252A (ko) | 엑스엠엘 기반 멀티미디어 데이터 제작 및 검색 시스템과그를 이용한 멀티미디어 데이터 생성 방법 | |
KR20070023188A (ko) | 추가적인 관리정보를 통한 파일 관리방법 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19912738 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19912738 Country of ref document: EP Kind code of ref document: A1 |