CN112506868A - File display method and device, electronic equipment and storage medium - Google Patents

File display method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112506868A
CN112506868A CN202011396355.9A CN202011396355A CN112506868A CN 112506868 A CN112506868 A CN 112506868A CN 202011396355 A CN202011396355 A CN 202011396355A CN 112506868 A CN112506868 A CN 112506868A
Authority
CN
China
Prior art keywords
file
display
display mode
module
format
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.)
Pending
Application number
CN202011396355.9A
Other languages
Chinese (zh)
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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202011396355.9A priority Critical patent/CN112506868A/en
Publication of CN112506868A publication Critical patent/CN112506868A/en
Pending legal-status Critical Current

Links

Images

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
    • G06F16/168Details of user interfaces specifically adapted to file systems, e.g. browsing and visualisation, 2d or 3d GUIs

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)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the disclosure relates to a file display method, a file display device, electronic equipment and a storage medium, wherein the method comprises the following steps: the file format of the file is obtained, the display mode corresponding to the file is determined according to the file format of the file, and then the file is displayed according to the display mode of the file. That is to say, in the embodiment of the present disclosure, different display manners are determined for different file formats of a file, and the file is displayed in a centralized manner according to the determined display manners, so that when a user clicks the displayed file, detailed information of the corresponding file can be directly viewed on a current interface, operation steps for viewing the file are saved, and efficiency of viewing the file and satisfaction of the user are improved.

Description

File display method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of network technologies, and in particular, to a file display method and apparatus, an electronic device, and a storage medium.
Background
When a user uploads some files to a computer terminal or a mobile terminal, the files are usually displayed in a terminal interface (such as a web page side, and possibly a mobile terminal) in a thumbnail mode. When a user wants to view the content of a file, the user needs to click the thumbnail of the file in the interface and transfer to the detail page of the file to view the corresponding file details.
In the related art, as for a file showing a picture or a video, the file is also shown in a terminal interface in the form of a thumbnail image, as in the above-mentioned file. When the number of the files of the pictures or the videos is large, a user needs to click each thumbnail and transfer to the file detail pages of the pictures or the videos respectively to know the file details of all the pictures or the videos, so that the complexity of searching operation is increased, and the user experience is reduced.
Disclosure of Invention
The embodiment of the disclosure provides a file display method and device, an electronic device and a storage medium, so as to at least solve the technical problems that file viewing operation steps are complex and searching efficiency and user experience are reduced due to the fact that files cannot be displayed according to file formats of the files in the related art. The technical scheme of the embodiment of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a file display method, including:
acquiring a file format of a file;
determining a display mode corresponding to the file according to the file format of the file;
and displaying the file according to the display mode of the file.
Optionally, the file format of the acquired file includes:
acquiring attribute information of a file or a suffix name of the file;
and identifying the attribute information or the suffix name to obtain the file format of the file.
Optionally, the method further includes:
if the file format of the file is the picture type, determining that the file is a picture file;
and if the file format of the file is the video type, determining that the file is a video file.
Optionally, if the file is a video file, the method further includes:
acquiring any frame image in the video file;
and taking the any frame of image as a cover picture for displaying the file.
Optionally, if the file format is a picture type or a video type, determining a presentation manner of the file according to the file format of the file includes:
identifying an aspect ratio of the file;
if the file is determined to be a common file according to the aspect ratio of the file, determining a display mode of the corresponding file according to the aspect ratio of the common file;
and if the file is determined to be a long-image file according to the aspect ratio of the file, determining the display mode of the corresponding file according to the aspect ratio of the long-image file.
Optionally, the determining the display mode of the corresponding file according to the aspect ratio of the common file includes:
if the aspect ratio of the common file is smaller than a first preset ratio, determining that the display mode of the common file is horizontal display;
if the aspect ratio of the common file is larger than or equal to a first preset ratio, determining that the display mode of the common file is vertical display;
the determining the display mode of the corresponding file according to the aspect ratio of the long map file comprises the following steps:
if the width-height ratio of the long image file is smaller than a second preset ratio, determining that the display mode of the long image file is horizontal display;
and if the aspect ratio of the long image file is greater than or equal to a second preset ratio, determining that the display mode of the long image file is vertical display.
Optionally, the displaying the file according to the display mode of the file includes:
if the display mode of the file is horizontal display, displaying the file in a horizontal mode;
and if the display mode of the file is vertical display, displaying the file in a vertical mode.
Optionally, before displaying the file, the method further includes:
acquiring the receiving time of the file;
according to the time for receiving the files, sequentially arranging or reversely arranging the displayed files;
and displaying the arranged files according to the display mode of the files.
Optionally, after presenting the file, the method further includes:
detecting a first operation instruction of clicking the file;
and displaying a detail page of the file or playing the file according to the first operation instruction.
Optionally, after presenting the file, the method further includes:
detecting a second operation instruction for showing that the file is pressed for a long time;
and displaying a prompt box including downloading the file or deleting the file according to the second operation instruction.
According to a second aspect of the embodiments of the present disclosure, there is provided a file display method, including:
acquiring a file format of a file sent by a terminal;
determining a display mode corresponding to the file according to the file format of the file;
and sending the file display method to the terminal so that the terminal can display the file according to the file display mode.
Optionally, if the file format is a picture type or a video type, determining a presentation manner of the file according to the file format of the file includes:
identifying an aspect ratio of the file;
if the file is determined to be a common file according to the aspect ratio of the file, determining a display mode of the corresponding file according to the aspect ratio of the common file;
and if the file is determined to be a long-image file according to the aspect ratio of the file, determining the display mode of the corresponding file according to the aspect ratio of the long-image file.
Optionally, the determining the display mode of the corresponding file according to the aspect ratio of the common file includes:
if the aspect ratio of the common file is smaller than a first preset ratio, determining that the display mode of the common file is horizontal display;
if the aspect ratio of the common file is larger than or equal to a first preset ratio, determining that the display mode of the common file is vertical display;
the determining the display mode of the corresponding file according to the aspect ratio of the long map file comprises the following steps:
if the width-height ratio of the long image file is smaller than a second preset ratio, determining that the display mode of the long image file is horizontal display;
and if the aspect ratio of the long image file is greater than or equal to a second preset ratio, determining that the display mode of the long image file is vertical display.
According to a third aspect of the embodiments of the present disclosure, there is provided a file display method, including:
acquiring a file format of a file;
sending the file format of the file to a server so that the server can determine a display mode corresponding to the file according to the file format of the file;
receiving a display mode of the file sent by the server;
and displaying the file according to the display mode of the file.
Optionally, the file format of the acquired file includes:
acquiring attribute information of a file or a suffix name of the file;
and identifying the attribute information or the suffix name to obtain the file format of the file.
Optionally, the displaying the file according to the display mode of the file includes:
if the display mode of the file is horizontal display, displaying the file in a horizontal mode;
and if the display mode of the file is vertical display, displaying the file in a vertical mode.
Optionally, after presenting the file, the method further includes:
detecting a first operation instruction of clicking the file;
and displaying a detail page of the file or playing the file according to the first operation instruction.
Optionally, after presenting the file, the method further includes:
detecting a second operation instruction that the file is pressed for a long time;
and displaying a prompt box including downloading the file or deleting the file according to the second operation instruction.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a file display method, including:
acquiring a file sent by a terminal;
determining a file format of the file;
determining a display mode corresponding to the file according to the file format of the file;
and sending the display mode of the file to the terminal so that the terminal can display the file according to the display mode of the file.
Optionally, the obtaining the file sent by the terminal includes:
and receiving the file, the attribute information of the file or the suffix name.
Optionally, if the file format is a picture type or a video type, determining a presentation manner of the file according to the file format of the file includes:
identifying an aspect ratio of the file;
if the file is determined to be a common file according to the aspect ratio of the file, determining a display mode of the corresponding file according to the aspect ratio of the common file;
and if the file is determined to be a long-image file according to the aspect ratio of the file, determining the display mode of the corresponding file according to the aspect ratio of the long-image file.
Optionally, the determining the display mode of the corresponding file according to the aspect ratio of the common file includes:
if the aspect ratio of the common file is smaller than a first preset ratio, determining that the display mode of the common file is horizontal display;
if the aspect ratio of the common file is larger than or equal to a first preset ratio, determining that the display mode of the common file is vertical display;
the determining the display mode of the corresponding file according to the aspect ratio of the long map file comprises the following steps:
if the width-height ratio of the long image file is smaller than a second preset ratio, determining that the display mode of the long image file is horizontal display;
and if the aspect ratio of the long image file is greater than or equal to a second preset ratio, determining that the display mode of the long image file is vertical display.
According to a fifth aspect of the embodiments of the present disclosure, there is provided a file display method, including:
acquiring a file;
sending the acquired file to a server so that the server can determine a display mode corresponding to the file conveniently;
receiving a display mode of the file sent by the server;
and displaying the file according to the display mode of the file.
Optionally, the sending the acquired file to a server includes:
and sending the file, the attribute information of the file or the suffix name of the file.
Optionally, the displaying the file according to the display mode of the file includes:
if the display mode of the file is horizontal display, displaying the file in a horizontal mode;
and if the display mode of the file is vertical display, displaying the file in a vertical mode.
Optionally, after presenting the file, the method further includes:
detecting a first operation instruction of clicking the file;
and displaying a detail page of the file or playing the file according to the first operation instruction.
Optionally, after presenting the file, the method further includes:
detecting a second operation instruction that the file is pressed for a long time;
and displaying a prompt box including downloading the file or deleting the file according to the second operation instruction.
According to a sixth aspect of the embodiments of the present disclosure, there is provided a file display apparatus including:
a first obtaining module configured to perform obtaining a file format of a file;
the first determining module is configured to determine a display mode corresponding to the file according to the file format of the file;
the first display module is configured to display the file according to the display mode of the file.
Optionally, the first obtaining module includes:
a second acquisition module configured to perform acquisition of attribute information of a file or a suffix name of the file;
and the first identification module is configured to identify the attribute information or the suffix name to obtain the file format of the file.
Optionally, the apparatus further comprises:
the first file determining module is configured to determine that the file is a picture file when the file format of the file acquired by the first acquiring module is a picture type; and/or
And the second file determining module is configured to determine that the file is a video file when the file format of the file acquired by the first acquiring module is a video type.
Optionally, the apparatus further comprises:
the third acquisition module is configured to acquire any frame image in the video file when the second file determination module determines that the file is the video file;
a cover determining module configured to execute the image of any frame acquired by the third acquiring module as a cover picture showing the document.
Optionally, the first determining module includes:
a second identification module configured to identify an aspect ratio of the file when the file format is a picture type or a video type;
a file determination module configured to determine whether the file is a normal file or a long-figure file according to an aspect ratio of the file;
the display determining module is configured to execute a display mode configured to determine a corresponding file according to the aspect ratio of the common file when the file determining module determines that the file is the common file; or when the file is determined to be a long-figure file according to the aspect ratio of the file, determining the display mode of the corresponding file according to the aspect ratio of the long-figure file.
Optionally, the display determining module includes: the display device comprises a first judgment module, a first display determination module and a second display determination module; and/or a second judgment module, a third display determination module and a fourth display determination module; wherein the content of the first and second substances,
the first judging module is configured to execute the judgment of whether the aspect ratio of the common file is smaller than a first preset ratio;
the first display determining module is configured to determine that the display mode of the common file is horizontal display when the first judging module judges that the aspect ratio of the common file is smaller than a first preset ratio;
the second display determining module is configured to determine that the display mode of the common file is vertical display when the first judging module judges that the aspect ratio of the common file is greater than or equal to a first preset ratio;
the second judging module is configured to execute the judgment of whether the aspect ratio of the long map file is smaller than a second preset ratio;
the third display determining module is configured to determine that the display mode of the long-image file is horizontal display when the second judging module judges that the aspect ratio of the long-image file is smaller than a second preset ratio;
the fourth display determining module is configured to determine that the display mode of the long-image file is vertical display when the second determining module determines that the aspect ratio of the long-image file is greater than or equal to a second preset ratio.
Optionally, the first display module includes:
the first file display module is configured to display the file in a horizontal version mode when the display mode determined by the first display determination module is horizontal version display;
and the second file display module is configured to display the file in a vertical mode if the display mode determined by the second display determination module is vertical display.
Optionally, the first display module includes:
a fourth obtaining module configured to obtain the receiving time of the file before the first showing module shows the file;
the sorting module is configured to determine the display sequence of the files according to the receiving time of the files;
and the second display module is configured to display the files according to the display sequence of the files and the display mode of the files.
Optionally, the apparatus further comprises:
the first detection module is configured to detect a first operation instruction of clicking the file after the file is displayed by the first display module;
and the third display module is configured to execute the first operation instruction detected by the first detection module, display the detail page of the file or directly play the file.
Optionally, the apparatus further comprises:
the second detection module is configured to execute a second operation instruction of detecting that the file is pressed for a long time after the file is displayed by the first display module;
and the prompting module is configured to execute a prompting frame which comprises the steps of downloading the file or deleting the file according to the second operation instruction detected by the second detection module.
According to a seventh aspect of the embodiments of the present disclosure, there is provided a file displaying apparatus, including:
the acquisition module is configured to acquire the file format of the file sent by the terminal;
the determining module is configured to determine a display mode corresponding to the file according to the file format of the file;
and the sending module is configured to execute the file displaying method and send the file displaying method to the terminal so that the terminal can display the file according to the file displaying mode.
Optionally, the determining module includes:
the identification module is configured to identify the aspect ratio of the file when the file format is a picture type or a video type;
a file determination module configured to determine whether the file is a normal file or a long-figure file according to an aspect ratio of the file;
the display determining module is configured to determine a display mode of a corresponding file according to the aspect ratio of the common file when the file determining module determines that the file is the common file; or when the file is determined to be a long-figure file according to the aspect ratio of the file, determining the display mode of the corresponding file according to the aspect ratio of the long-figure file.
Optionally, the display determining module includes: the display device comprises a first judgment module, a first display determination module and a second display determination module; and/or a second judgment module, a third display determination module and a fourth display determination module; wherein
The first judging module is configured to execute the judgment of whether the aspect ratio of the common file is smaller than a first preset ratio;
the first display determining module is configured to determine that the display mode of the common file is horizontal display when the first judging module judges that the aspect ratio of the common file is smaller than a first preset ratio;
the second display determining module is configured to determine that the display mode of the common file is vertical display when the first judging module judges that the aspect ratio of the common file is greater than or equal to a first preset ratio;
the second judging module is configured to execute the judgment of whether the aspect ratio of the long map file is smaller than a second preset ratio;
the third display determining module is configured to determine that the display mode of the long-image file is horizontal display when the second judging module judges that the aspect ratio of the long-image file is smaller than a second preset ratio;
the fourth display determining module is configured to determine that the display mode of the long-image file is vertical display when the second determining module determines that the aspect ratio of the long-image file is greater than or equal to a second preset ratio.
According to an eighth aspect of the embodiments of the present disclosure, there is provided a file display apparatus including:
an acquisition module configured to execute acquiring a file format of a file;
the sending module is configured to execute sending of the file format of the file to a server, so that the server determines a display mode corresponding to the file according to the file format of the file;
the receiving module is configured to execute a display mode of receiving the file sent by the server;
and the display module is configured to display the file according to the display mode of the file.
Optionally, the obtaining module includes:
a first acquisition module configured to perform acquisition of attribute information of a file or a suffix name of the file;
and the identification module is configured to identify the attribute information or the suffix name to obtain the file format of the file.
Optionally, the display module includes:
the first file display module is configured to display the file in a horizontal version mode when the display mode of the file is the horizontal version display;
the first file display module is configured to display the file in a vertical mode when the display mode of the file is vertical display.
Optionally, the apparatus further comprises:
the first detection module is configured to detect a first operation instruction of clicking the file after the file is displayed by the display module;
and the content display module is configured to display the detail page of the file or play the file according to the first operation instruction.
Optionally, the apparatus further comprises:
the second detection module is configured to execute a second operation instruction of detecting that the file is pressed for a long time after the file is displayed by the display module;
and the prompting module is configured to execute a prompting frame which comprises the steps of downloading the file or deleting the file according to the second operation instruction.
According to a ninth aspect of the embodiments of the present disclosure, there is provided a document presentation apparatus including:
the acquisition module is configured to execute acquisition of a file sent by a terminal;
a first determination module configured to perform determining a file format of the file;
the second determining module is configured to determine a display mode corresponding to the file according to the file format of the file;
and the sending module is configured to send the display mode of the file to the terminal so that the terminal can display the file according to the display mode of the file.
According to a tenth aspect of the embodiments of the present disclosure, there is provided a file display apparatus including:
an acquisition module configured to perform acquiring a file;
the sending module is configured to send the acquired file to a server so that the server can determine a display mode corresponding to the file;
the receiving module is configured to execute a display mode of receiving the file sent by the server;
and the display module is configured to display the file according to the display mode of the file.
According to an eleventh aspect of embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the file presentation method as described above.
According to a twelfth aspect of the embodiments of the present disclosure, there is provided a storage medium, wherein when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the file presentation method as described above.
According to a thirteenth aspect of embodiments of the present disclosure, there is provided a computer program product, wherein instructions of the computer program product, when executed by a processor of an electronic device, cause the electronic device to execute any one of the above-mentioned file presentation methods.
The technical scheme provided by the embodiment of the disclosure at least has the following beneficial effects:
in the embodiment of the disclosure, the file format of a file is obtained first, the display mode corresponding to the file is determined according to the file format of the file, and then the file is displayed according to the display mode of the file. That is to say, in the embodiment of the present disclosure, different display manners are determined for different file formats of a file, and the file is displayed in a centralized manner according to the determined display manners, so that when a user clicks the displayed file, the corresponding detailed information can be directly viewed, the viewing steps are saved, and the file viewing efficiency and the user satisfaction are improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of embodiments of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as unduly limiting the embodiments of the disclosure.
FIG. 1 is a flow diagram illustrating a file presentation method in accordance with an exemplary embodiment.
Fig. 2A is a schematic diagram illustrating a landscape picture presentation according to an exemplary embodiment.
Fig. 2B is a schematic diagram illustrating a portrait picture presentation according to an exemplary embodiment.
Fig. 3A is a diagram illustrating a landscape video presentation, according to an example embodiment.
Fig. 3B is a diagram illustrating a portrait video presentation, according to an example embodiment.
FIG. 4 is a diagram illustrating one manner of presenting icons in accordance with an illustrative embodiment.
FIG. 5 is a diagram illustrating a centralized presentation file, according to an example embodiment.
FIG. 6 is a flowchart illustrating an application example of a file presentation method according to an example embodiment.
FIG. 7 is another flow diagram illustrating a file presentation method in accordance with an exemplary embodiment.
FIG. 8 is another flow diagram illustrating a file presentation method in accordance with an exemplary embodiment.
FIG. 9 is another flow diagram illustrating a file presentation method in accordance with an exemplary embodiment.
FIG. 10 is another flow diagram illustrating a file presentation method in accordance with an exemplary embodiment.
FIG. 11 is a block diagram illustrating a file presentation apparatus according to an example embodiment.
FIG. 12 is a block diagram illustrating a first presentation module according to an exemplary embodiment.
FIG. 13 is another block diagram illustrating a file presentation apparatus according to an example embodiment.
FIG. 14 is another block diagram of a file presentation apparatus, according to an example embodiment.
FIG. 15 is another block diagram illustrating a file presentation apparatus according to an example embodiment.
Fig. 16 is a block diagram illustrating a structure of an electronic device according to an example embodiment.
FIG. 17 is a block diagram illustrating an apparatus with file presentation in accordance with an exemplary embodiment. Figure (a).
Detailed Description
In order to make the technical solutions of the embodiments of the present disclosure better understood by those of ordinary skill in the art, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the embodiments of the present disclosure and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with embodiments of the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the disclosed embodiments, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a file presentation method according to an exemplary embodiment, where the file presentation method is used in a terminal, as shown in fig. 1, and includes the following steps:
in step 101, a file format of a file is acquired;
in step 102, determining a display mode corresponding to the file according to the file format of the file;
in step 103, the file is displayed according to the display mode of the file.
The file display method according to the embodiment of the present disclosure may be applied to a terminal and the like, and is not limited herein, and the terminal implementation device may be an electronic device such as a smart phone, a notebook computer, a tablet computer, and the like.
The following describes in detail specific implementation steps of a file display method provided in an embodiment of the present disclosure with reference to fig. 1.
In step 101, the file format of the file is obtained.
In this step, the file may be an uploaded file (for example, a file transmitted by another device, or a picture, a video, an edited document, etc. shot by a mobile phone), or may be a local file, which is not limited in this embodiment.
In one embodiment, a user may select a file on or in a device connected to the terminal and utilize the terminal to perform local presentations. In one example, the terminal receives a file transmitted in a connected device, and displays three states of "transmission in progress", "transmission success", "transmission failure", and the like according to a transmission process of the file. If the file transmission is successful, acquiring a file format of the file, which specifically comprises: acquiring attribute information or a suffix name of the file, and identifying the attribute information or the suffix name to obtain a file format of the file, wherein the file format can be a picture type, a video type, or other types such as a word type, a page type, a pdf type, and the like. In another example, the terminal detects the selected file, and obtains the file format of the selected file: acquiring attribute information or a suffix name of the file, and identifying the attribute information or the suffix name to obtain a file format of the file, wherein the file format can be a picture type, a video type, or other types such as a word type, a page type, a pdf type, and the like.
In step 102, a display mode corresponding to the file is determined according to the file format of the file.
In some embodiments, the terminal stores in advance a correspondence between file formats and sizes (i.e. aspect ratios) of different files and presentation manners, which may also be referred to as a preconfigured presentation policy, that is, different attachment styles may be customized and presented according to the file formats (or file types) and sizes of the files.
In one embodiment, the terminal may obtain the file format of the file by identifying the attribute information or the suffix name of the file.
And if the file format is the picture type, the terminal determines that the file is the picture file, identifies the aspect ratio of the picture file, and determines the display mode of the corresponding file according to the aspect ratio of the file.
If the file format is a video type, the terminal determines that the file is a video type file, identifies the aspect ratio of the video file, and determines the display mode of the corresponding file according to the aspect ratio of the file. In one embodiment, if the file is a video file, any frame image in the video file is also acquired; and taking the any frame of image as a cover picture for displaying the file. Specifically, any one frame image may be the first frame image of the video file, but is not limited thereto.
In some embodiments, determining that the display mode of the file is horizontal display according to whether the aspect ratio of the file is smaller than a corresponding preset ratio; and if the aspect ratio of the file is greater than or equal to the corresponding preset ratio, determining that the display mode of the file is vertical display. In one example, the preset range of preset ratios is typically: [0.6,1.2].
In an embodiment, if the file is determined to be a normal file (for example, a file that can be completely displayed through a display screen) according to the aspect ratio of the file, determining the display mode of the corresponding file according to the aspect ratio of the normal file specifically includes:
if the aspect ratio of the common file is smaller than a first preset ratio, determining that the display mode of the common file is horizontal display; and if the aspect ratio of the common file is greater than or equal to a first preset ratio, determining that the display mode of the common file is vertical display. It should be noted that, the preset range of the first preset ratio is usually: [0.6,1.2], of course, the adaptive modification may be performed according to actual needs, and the embodiment is not limited.
In one example, a file is considered to be a normal file if the aspect ratio of the file is [0.8,1.1], or the file is considered to be a normal file if the width of the file is not greater than the width of the terminal display and the height of the file is not greater than the height of the terminal display. It should be understood that the aspect ratio of the general document may be specifically set according to the situation, and the present embodiment is not particularly limited.
That is, the terminal may determine different presentation manners according to the file format (or the suffix name of the file) and the aspect ratio of the file. The content of the picture or the video can be checked on the current interface, and the content of the file can be checked after the content of the file can be transferred to a detail page of the file by clicking the file in the related technology, so that the file checking efficiency is improved, and the user satisfaction is improved.
Similarly, in another embodiment, if the file is determined to be a long-length file (for example, a file that cannot be completely displayed once through a display screen) according to the aspect ratio of the file, determining the display mode of the corresponding file according to the aspect ratio of the long-length file specifically includes:
if the width-height ratio of the long image file is smaller than a second preset ratio, determining that the display mode of the long image file is horizontal display; and if the aspect ratio of the long image file is greater than or equal to a second preset ratio, determining that the display mode of the long image file is vertical display. It should be noted that, the preset range of the second preset ratio is usually: [1.2,1.6], of course, the adaptive modification may be performed according to actual needs, and the embodiment is not limited.
In one example, if the aspect ratio of a file is [0.1,0.5] or [1.3,1.5], the file is considered to be a long-length map file, or the width of the file is greater than the width of the terminal display screen, or the height of the file is not greater than the height of the terminal display screen, the file is considered to be a long-length map file. It should be understood that the aspect ratio of the long-figure file may be specifically set according to the situation, and the embodiment is not particularly limited.
The following specifically describes the general documents as examples.
If the file attribute information or suffix name of the file is: determining that the file is a picture file if the file format of the file is identified as a picture type. For a file of that picture type (i.e., a picture file), the system will automatically identify its aspect ratio. It should be noted that in this embodiment, the file format can be identified by the file attribute information or the suffix name, but the information included in the file attribute information and the suffix name is not completely the same, for example, the file attribute information may include conventional information: the file type, the opening mode, the occupied space, the size, the creating time, the modifying time, the access time and other information, and safety information, detailed information and the like can also be included; and suffix names, typically refer to the type, size, modification date, etc. of the file.
If the ratio of the height of the picture file to the width of the picture file is smaller than a first preset ratio (e.g., 1.2), the picture file is considered to be a landscape picture, and the display mode is landscape display, as shown in fig. 2A, fig. 2A is a schematic diagram of a landscape picture display mode according to an exemplary embodiment, which is taken as an example of a landscape picture display mode on a mobile terminal. If the ratio of the height of the picture file to the width of the picture file is greater than or equal to the first preset ratio, the picture file is considered as a portrait screen picture, and the display mode is a portrait display, as shown in fig. 2B, fig. 2B is a schematic diagram of a portrait picture display mode according to an exemplary embodiment, which is taken as an example of the portrait picture display mode on the mobile terminal. It should be noted that the range of the preset ratio (i.e. the first preset ratio) of the common picture file may be between 0.6 and 1.2; the range of the preset ratio (i.e., the second preset ratio) of the long-figure file may be 1.2 to 1.6, and the like, and certainly, in practical application, the range of the corresponding preset ratio may also need to be adaptively adjusted, which is not limited in this embodiment.
If the attribute information or suffix name according to the file is: and 5, mp4.rmvb. avi. wma. flv. mov, identifying that the file format of the file is a video type, and determining that the file is a video file. For a video type file (i.e., a video file), the terminal will automatically recognize its aspect ratio. If the height and width of the video file are smaller than a first predetermined ratio (e.g., 1.2), etc., the video file is identified as a landscape video, and the presentation manner is a landscape presentation, as shown in fig. 3A, where fig. 3A is a schematic diagram of a landscape video presentation manner according to an exemplary embodiment. If the height-to-width ratio of the video file is greater than or equal to a first predetermined ratio (e.g., 1.2, etc.), the system identifies the video file as a portrait video, which is presented in a portrait manner, as shown in fig. 3B, where fig. 3B is a schematic diagram of a portrait video presentation manner according to an exemplary embodiment. If the video file is identified to be a horizontal screen video or a vertical screen video, the terminal captures any frame image in the horizontal screen video or the vertical screen video as a cover picture for displaying the corresponding horizontal screen video or vertical screen video file, so that a user can conveniently view the file, and the efficiency of viewing the file is provided. It should be noted that the preset ratio (i.e. the first preset ratio) of some common video files may range from 0.6 to 1.2; certainly, the range of the preset ratio (i.e., the second preset ratio) of some wide-screen video files may be 1.2 to 1.6, but in practical applications, the range of the corresponding preset ratio may also be adaptively adjusted as needed, and this embodiment is not limited.
In this embodiment, if the file format or the suffix name of the file is another type, the file is identified as another type of file, it should be noted that the another type is a type other than the picture type and the video type, and the corresponding another file is a file other than the picture file and the video file.
That is, for other types of files for processing picture types and video types, the terminal determines the file format of the file according to the attribute information or the suffix name of the file, and displays an icon corresponding to the file format or the suffix name. Specifically, as shown in fig. 4, fig. 4 is a schematic diagram illustrating an icon presentation manner according to an exemplary embodiment. The file formats and corresponding display modes of other files at least comprise one of the following modes:
if the file format of the file is page, displaying a page icon in a display mode;
if the file format of the file is key, displaying the key icon in a display mode;
if the file format of the file is number, the display mode is to display the number icons;
if the file format of the file is. doc,. docx; wps, the display mode is to display word icons;
if the file format of the file is ppt and pptx, displaying the ppt icon in a display mode;
if the file format of the file is txt, the display mode is txt icon display;
if the file format of the file is pdf, displaying a pdf icon;
if the file format of the file is csv, displaying the csv icon in a display mode;
if the file format of the file is xls and xlsx, the excel icon is displayed.
If the file format of the file is zip,. zipx,. zix,. rar,. 7z, the display mode is to display the compressed file icon;
if the file format of the file is wav,. flac,. ape,. mp3,. aac, the audio file icon is presented.
In step 103, the file is displayed according to the display mode of the file.
In the step, if the display mode of the file is horizontal display, the file is displayed in a horizontal mode; if the display mode of the file is vertical display, displaying the file in a vertical mode; if the display mode of the file is a display mode corresponding to a file in another format, displaying an icon corresponding to the file, which can be referred to the foregoing specifically, and is not described herein again.
In the embodiment of the present disclosure, a display mode corresponding to the file is determined according to the file format of the file, and then the file is displayed according to the display mode of the file. That is to say, in the embodiment of the present disclosure, different display manners are determined for different file formats of a file, and the file is displayed in a centralized manner according to the determined display manners, so that when a user clicks the displayed file, detailed information of the corresponding file can be viewed on a current interface, viewing steps are saved, and file viewing efficiency and user satisfaction are improved.
Further, in the embodiment of the present disclosure, for a picture file or a video file, it may be determined, according to the size of the picture file or the video file itself, whether the display mode of the picture file or the video file is horizontal display or vertical display, and then the picture file is displayed in a horizontal mode or a vertical mode according to the determined display mode, or the video is displayed in a horizontal mode or a vertical mode. The embodiment of the disclosure is convenient for users to check the detailed information of the picture or the video on the current interface when the users click the displayed picture or video file, thereby saving the steps of checking the file and improving the efficiency of checking the file and the satisfaction degree of the users.
Optionally, in another embodiment, on the basis of the above embodiment, the method may further include:
acquiring the receiving time of the file;
determining the display sequence of the files according to the receiving time of the files;
and displaying the sorted files according to the display order of the files and the display mode of the files.
That is to say, in the embodiment of the present disclosure, for a received file, a display mode of the file is determined first, and then the file is collectively placed in one display area for centralized display in the determined display mode. In addition to presenting "landscape/portrait pictures" and "landscape/portrait video" files, the presentation icons of other types of files are of consistent size. Further, all the files may be arranged in the order of the receiving time of the files, sequentially ordered from left to right and from top to bottom, and then all the ordered files are displayed. As shown in particular in fig. 5. Fig. 5 is a schematic diagram illustrating a centralized presentation of files according to an exemplary embodiment, a team task list is created, and the files presented in the list are exemplified by "a word file purchased in autumn project," a landscape screen picture file, a portrait screen picture file, a file upload failure, and a file upload in the middle ", where the reception time of the" word file purchased in autumn project "is earliest, the reception time of the" file upload in the middle "is latest, and the" word file purchased in autumn project, "the landscape screen picture file, the portrait screen picture file, the file upload failure, and the file upload in the middle" are ordered from left to right, from top to bottom, in the order of the reception time. However, in practical applications, the method is not limited thereto. Of course, in this embodiment, all the files may be arranged in sequence from left to right, from top to bottom, and the like according to the reverse order of the time of the file, and this embodiment is not limited.
In the embodiment of the disclosure, the files are displayed in sequence or reverse sequence according to the receiving time of the files, so that a user can conveniently check the files according to the time, and the file checking efficiency and the user satisfaction degree are improved.
Optionally, in another embodiment, on the basis of the foregoing embodiment, when the terminal detects that the user clicks a first operation instruction of any displayed file, that is, the terminal detects that the displayed file is clicked by the user, the detail page of the file is opened for the user according to the first operation instruction (for example, if the opened file is a video-class file, the video may be played, for example, the opened file is a picture-class file, the content of the picture may be directly displayed, and for example, the opened file is a word-class file, and the content of the word may be displayed).
In the embodiment of the disclosure, the detail page of the picture file can be opened according to the detected operation instruction, or the video file or the file with other format can be played, so that the viewing operation steps of the user are saved, and the viewing efficiency is improved.
Optionally, in another embodiment, on the basis of the foregoing embodiment, if the terminal detects that the user presses any displayed file for a long time, that is, the terminal detects that the displayed file is pressed for a long time, a prompt box including downloading the file or deleting the file is displayed according to the second operation instruction, so that the file is downloaded or deleted when detecting that the user selects an instruction of the instruction box.
In the embodiment of the disclosure, the displayed file can be downloaded or deleted according to the detected operation instruction, so that the efficiency of downloading or deleting the file is improved.
Referring to fig. 6, a flowchart of an application example diagram of a file presentation method according to an exemplary embodiment is shown, where a file in this implementation is an ordinary file (i.e., a non-long-image file), and the method includes:
step 601: acquiring attribute information of a file or a suffix name of the file;
step 602: identifying the attribute information or the suffix name to obtain the file format of the file;
step 603: if the file format is a picture type or a video type, identifying the aspect ratio of a file corresponding to the picture type or the video type;
step 604: judging whether the aspect ratio of the file is smaller than a first preset ratio or not; if yes, go to step 605; otherwise, go to step 606;
step 605: if the aspect ratio of the file is smaller than a first preset ratio, determining that the display mode of the file is horizontal display;
step 606: if the aspect ratio of the file is larger than or equal to a first preset ratio, determining that the display mode of the file is vertical display;
step 607: if the display mode of the file is horizontal display, displaying the file in a horizontal mode; if the display mode of the file is vertical display, displaying the file in a vertical mode;
if the file is a video file, any frame image in the video file can be acquired; and taking the any frame of image as a cover picture for displaying the file.
Step 608: acquiring the receiving time of the file;
step 609: determining the display sequence of the files according to the receiving time of the files;
step 610: and displaying the files according to the display sequence of the files and the display mode of the files.
Further, after presenting the file, the method may further include:
detecting a first operation instruction of clicking the file; displaying a detail page of the file or playing the file according to the first operation instruction; or
Detecting a second operation instruction for showing that the file is pressed for a long time; and displaying a prompt box including downloading the file or deleting the file according to the second operation instruction.
In the embodiment of the disclosure, the file format of the file is obtained by identifying the acquired attribute information and the suffix name of the file, if the file format is a picture type or a video type, the aspect ratio of the file corresponding to the picture type or the video type is identified, if the aspect ratio of the file is greater than or equal to a preset ratio, the display mode of the file is determined to be vertical display, and if the display mode of the file is horizontal display, the file is displayed in horizontal display; and if the display mode of the file is vertical display, displaying the file in a vertical mode. That is to say, in the embodiment of the present disclosure, for different file formats of a file, a horizontal screen display mode or a vertical screen display mode of the file is determined, and the file is displayed in a centralized manner according to the horizontal screen display mode or the vertical screen display mode, so that when a user clicks the displayed file, detailed information of the corresponding file can be directly viewed on a current interface, viewing steps are saved, and file viewing efficiency and user satisfaction are improved.
Furthermore, in the embodiment of the disclosure, displayed files can be sorted according to the receiving time of the files, so that a user can check the files conveniently according to the time, and the file checking efficiency and the user satisfaction degree are improved.
Further, in the embodiment of the present disclosure, the displayed file can be directly downloaded or deleted according to the detected operation instruction, so that the efficiency of downloading or deleting the file is improved.
Referring to fig. 7, an exemplary diagram of a file presentation method according to an exemplary embodiment is shown, where the present solution uses a server as an execution subject, and the method includes steps 701 and 703.
Step 701: and receiving the file format of the file sent by the terminal.
The server receives the file format of the file sent by the terminal.
Step 702: and determining a display mode corresponding to the file according to the file format of the file.
And if the server determines that the file format is the picture type or the video type, determining the display mode of the file according to the file format of the file.
In one embodiment, the server identifies an aspect ratio of the file; if the file is determined to be a common file according to the aspect ratio of the file, determining a display mode of the corresponding file according to the aspect ratio of the common file; and if the file is determined to be a long-image file according to the aspect ratio of the file, determining the display mode of the corresponding file according to the aspect ratio of the long-image file. The determining the display mode of the corresponding file according to the aspect ratio of the common file comprises: if the aspect ratio of the common file is smaller than a first preset ratio, determining that the display mode of the common file is horizontal display; if the aspect ratio of the common file is larger than or equal to a first preset ratio, determining that the display mode of the common file is vertical display; the determining the display mode of the corresponding file according to the aspect ratio of the long map file comprises the following steps: if the width-height ratio of the long image file is smaller than a second preset ratio, determining that the display mode of the long image file is horizontal display; and if the aspect ratio of the long image file is greater than or equal to a second preset ratio, determining that the display mode of the long image file is vertical display. The specific implementation process is detailed in the corresponding process in the above embodiments, and is not described herein again.
Step 703: and sending the display mode of the file to the terminal so that the terminal can display the file according to the display mode of the file.
In this embodiment, the server sends the file display mode to the terminal, so that the terminal can display the file according to the file display mode. The specific implementation process of the terminal display file is detailed in the corresponding process in the above embodiment, and is not described herein again.
In the embodiment of the disclosure, the server determines different display modes according to different file formats of the file sent by the terminal, and sends the display modes of the file to the terminal, so that the terminal can display the file in a centralized manner according to the determined display modes, and a user can directly view corresponding detailed information when clicking the displayed file, thereby saving the viewing steps, and improving the efficiency of viewing the file and the satisfaction degree of the user.
Referring also to fig. 8, an exemplary diagram of a file presentation method according to an exemplary embodiment is shown, in which an execution subject of the method is a terminal, and the execution subject interacts with the execution subject shown in fig. 7. The method comprises 801 and 803.
Step 801: and acquiring the file format of the file.
In the step, the terminal firstly acquires the attribute information of the file or the suffix name of the file; and then, identifying the attribute information or the suffix name to obtain the file format of the file.
Step 802: and sending the file format of the file to a server so that the server can determine a display mode corresponding to the file according to the file format of the file.
In this step, the terminal sends the file format of the file obtained by identification to the server, and after receiving the file format of the file, the server determines the display mode corresponding to the file according to the file format of the file, where the server determines the process of the corresponding display mode of the file according to the file format of the received file, which is specifically detailed in the implementation process corresponding to the above embodiment and is not described herein again.
Step 803: and receiving the display mode of the file sent by the server.
The terminal receives the display mode of the file sent by the server, and the display mode may include a horizontal display mode, a vertical display mode, and the like, and of course, other display modes may also be used, and this embodiment is not limited.
Step 804: and displaying the file according to the display mode of the file.
In the step, if the display mode of the file is horizontal display, the file is displayed in a horizontal mode; and if the display mode of the file is vertical display, displaying the file in a vertical mode. If the display mode of the file is a display mode corresponding to a file in another format, displaying an icon corresponding to the file, which can be referred to the foregoing specifically, and is not described herein again.
In the embodiment of the disclosure, the terminal acquires different file formats of the file, then sends the file formats to the server, the server determines different display modes of the file according to the file formats, and sends the display modes of the file to the terminal, and the terminal displays the file in a centralized manner according to the received display modes, so that a user can directly view corresponding detailed information when clicking the displayed file, viewing steps are saved, file viewing efficiency is improved, and the satisfaction degree of the user is improved.
Optionally, in another embodiment, on the basis of the above embodiment of this embodiment, after displaying the file, the method may further include: detecting a first operation instruction of clicking the file; and displaying a detail page of the file or playing the file according to the first operation instruction. The specific details of this embodiment are given in the implementation process corresponding to the above embodiment, and are not described herein again.
Optionally, in another embodiment, on the basis of the above embodiment of the embodiment, after displaying the file, the method further includes: detecting a second operation instruction that the file is pressed for a long time; and displaying a prompt box including downloading the file or deleting the file according to the second operation instruction. The specific details of this embodiment are given in the implementation process corresponding to the above embodiment, and are not described herein again.
Referring to fig. 9, an exemplary diagram of a file presentation method according to an exemplary embodiment is shown, where an executing subject is a server, and the method includes steps 901 and 904.
Step 901: and acquiring the file sent by the terminal.
Step 902: determining a file format of the file.
In one embodiment, when the terminal sends the file, the terminal also sends the attribute information or the suffix name of the file to the server, and the server acquires the attribute information and the suffix name information and determines the file format of the file according to the attribute information or the suffix name. The specific scheme for determining the file format is described in the foregoing embodiment, and is not described herein again.
Step 903: and determining a display mode corresponding to the file according to the file format of the file.
In one embodiment, the server identifies an aspect ratio of the file; if the file is determined to be a common file according to the aspect ratio of the file, determining a display mode of the corresponding file according to the aspect ratio of the common file; and if the file is determined to be a long-image file according to the aspect ratio of the file, determining the display mode of the corresponding file according to the aspect ratio of the long-image file. That is, determining that the display mode of the file is horizontal display according to whether the aspect ratio of the file is smaller than a corresponding preset ratio; and if the aspect ratio of the file is greater than or equal to the corresponding preset ratio, determining that the display mode of the file is vertical display. The specific implementation process is detailed in the corresponding process in the above embodiments, and is not described herein again.
Step 904: and sending the display mode of the file to the terminal so that the terminal can display the file according to the display mode of the file.
In this embodiment, the server sends the file display mode to the terminal, so that the terminal can display the file according to the file display mode. The specific details of this embodiment are given in the implementation process corresponding to the above embodiment, and are not described herein again.
In the embodiment of the disclosure, when receiving a file sent by a terminal, a server determines the file format of the file, determines different display modes according to the file format, and sends the display modes of the file to the terminal, so that the terminal can display the file in a centralized manner according to the determined display modes, and a user can directly view corresponding detailed information when clicking the displayed file, thereby saving the viewing steps, improving the efficiency of viewing the file, and improving the satisfaction degree of the user.
Referring also to fig. 10, which is an exemplary diagram illustrating a file presentation method according to an exemplary embodiment, an execution subject is a terminal, which interacts with the execution subject of the flow illustrated in fig. 9, and the method includes: step 1001 and 1004.
Step 1001: and acquiring the file.
In one embodiment, the terminal may also obtain attribute information or a suffix name of the file.
Step 1002: and sending the acquired file to a server so that the server can determine a display mode corresponding to the file conveniently.
In one embodiment, the terminal sends the attribute information or the suffix name of the file to the server when sending the file, and the server determines the file format of the file according to the attribute information or the suffix name. The specific scheme for determining the file format is described in the foregoing embodiment, and is not described herein again.
Step 1003: and receiving the display mode of the file sent by the server.
The terminal receives the display mode of the file sent by the server, and the display mode may include a horizontal display mode, a vertical display mode, and the like, and of course, other display modes may also be used, and this embodiment is not limited.
Step 1004: and displaying the file according to the display mode of the file.
In the step, if the display mode of the file is horizontal display, the file is displayed in a horizontal mode; and if the display mode of the file is vertical display, displaying the file in a vertical mode. And if the display mode of the file is the display mode corresponding to the file with other format, displaying the icon corresponding to the file. The specific details of this embodiment are given in the implementation process corresponding to the above embodiment, and are not described herein again.
In the embodiment of the disclosure, the terminal sends the acquired file to the server, the server determines different file formats of the file, then determines different display modes of the file according to the file formats, and sends the display modes of the file to the terminal, and the terminal displays the file in a centralized manner according to the received display modes, so that a user can directly view corresponding detailed information when clicking the displayed file, viewing steps are saved, file viewing efficiency is improved, and the satisfaction degree of the user is improved.
It is noted that, for simplicity of explanation, the method embodiments are described as a series of acts or combinations, but those skilled in the art will appreciate that the present disclosure is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the disclosure. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required of the disclosed embodiments.
FIG. 11 is a block diagram illustrating a file presentation apparatus according to an example embodiment. Referring to fig. 11, the apparatus includes a first obtaining module 1101, a first determining module 1102 and a first presenting module 1103, wherein,
the first obtaining module 1101 configured to perform obtaining a file format of a file;
the first determining module 1102 is configured to determine a display mode corresponding to the file according to the file format of the file;
the first displaying module 1103 is configured to display the file according to the displaying manner of the file.
Optionally, in another embodiment, on the basis of the above embodiment, the first obtaining module includes: a second obtaining module and a first identifying module, wherein,
a second acquisition module configured to perform acquisition of attribute information of a file or a suffix name of the file;
and the first identification module is configured to identify the attribute information or the suffix name to obtain the file format of the file.
Optionally, in another embodiment, on the basis of the above embodiment, the apparatus further includes: a first file determination module and/or a second file determination module, wherein,
the first file determining module is configured to determine that the file is a picture file when the file format of the file acquired by the first acquiring module is a picture type or the file format of the file is identified as a picture type by the first identifying module;
the second file determining module is configured to determine that the file is a video file when the file format of the file acquired by the first acquiring module is a picture type or the file format of the file identified by the first identifying module is a video type.
Optionally, in another embodiment, on the basis of the above embodiment, the apparatus further includes: a third file determination module, wherein,
the third file determining module is configured to determine that the file is another file when the file format of the file acquired by the first acquiring module is another type or the file format of the file is recognized by the first recognizing module as another type, where the another type is a type other than the picture type and the video type, and the corresponding another file is a file other than the picture file and the video file.
Optionally, in another embodiment, on the basis of the above embodiment, the apparatus further includes: a third acquisition module and a cover determination module, wherein,
the third obtaining module is configured to obtain a frame of image in the video file when the second file determining module determines that the file is a video file;
the cover determining module is configured to execute the one frame of image acquired by the third acquiring module as a cover picture showing the document.
Optionally, in another embodiment, on the basis of the foregoing embodiment, the first determining module includes: a second identification module, a file determination module, and a presentation determination module, wherein,
the second identification module is configured to identify the aspect ratio of the file when the file format is a picture type or a video type;
a file determination module configured to determine whether the file is a normal file or a long-figure file according to an aspect ratio of the file;
the display determining module is configured to determine a display mode of a corresponding file according to the aspect ratio of the common file when the file determining module determines that the file is the common file; or when the file is determined to be a long-figure file according to the aspect ratio of the file, determining the display mode of the corresponding file according to the aspect ratio of the long-figure file.
Optionally, in another embodiment, on the basis of the above embodiment, the display determination module includes: the display device comprises a first judgment module, a first display determination module and a second display determination module; and/or a second judgment module, a third display determination module and a fourth display determination module; wherein the content of the first and second substances,
the first judging module is configured to execute the judgment of whether the aspect ratio of the common file is smaller than a first preset ratio;
the first display determining module is configured to determine that the display mode of the common file is horizontal display when the first judging module judges that the aspect ratio of the common file is smaller than a first preset ratio;
the second display determining module is configured to determine that the display mode of the common file is vertical display when the first judging module judges that the aspect ratio of the common file is greater than or equal to a first preset ratio;
the second judging module is configured to execute the judgment of whether the aspect ratio of the long map file is smaller than a second preset ratio;
the third display determining module is configured to determine that the display mode of the long-image file is horizontal display when the second judging module judges that the width-to-height ratio of the long-image file is smaller than a second preset ratio;
the fourth display determining module is configured to determine that the display mode of the long-image file is vertical display when the second determining module determines that the aspect ratio of the long-image file is greater than or equal to a second preset ratio.
Optionally, in another embodiment, on the basis of the above embodiment, the first display module includes: a first document presentation module and a second document presentation module, wherein,
the first file display module is configured to display the file in a horizontal version mode when the display mode determined by the first display determination module is horizontal version display;
the second file display module is configured to perform the display mode determined by the second display determination module as the vertical display mode, and then display the file in the vertical display mode.
Optionally, in another embodiment, on the basis of the above embodiment, the first display module 1103 may further include: a fourth obtaining module 1201, a sorting module 1202 and a second displaying module 1203, whose schematic structural diagrams are shown in fig. 12, wherein,
the fourth obtaining module 1201, configured to obtain the receiving time of the file before the first presenting module 703 presents the file;
the sorting module 1202 is configured to determine the presentation order of the files according to the time of the files;
the second displaying module 1203 is configured to display the files according to the displaying order of the files and the displaying manner of the files.
Optionally, in another embodiment, on the basis of the above embodiment, the apparatus may further include: a first detection module and a third display module, wherein,
the first detection module is configured to detect a first operation instruction that the file is clicked after the file is displayed by the first display module;
the third display module is configured to execute the first operation instruction detected by the first detection module, display the detail page of the file or directly play the file.
Optionally, in another embodiment, on the basis of the above embodiment, the apparatus may further include: a second detection module and a prompt module, wherein,
the second detection module is configured to execute a second operation instruction which detects that the file is pressed for a long time after the file is displayed by the first display module;
the prompt module is configured to execute a prompt box configured to execute the second operation instruction detected by the second detection module and display the prompt box including downloading the file or deleting the file.
Referring also to FIG. 13, another block diagram of a document presentation apparatus is shown in accordance with an exemplary embodiment. The device comprises: a receiving module 1301, a determining module 1302 and a sending module 1303, wherein,
a receiving module 1301 configured to execute a file format of a file transmitted by a receiving terminal;
a determining module 1302, configured to determine, according to a file format of the file, a display manner corresponding to the file;
the sending module 1303 is configured to execute sending the file displaying method to the terminal, so that the terminal can display the file according to the file displaying manner.
Optionally, in another embodiment, on the basis of the foregoing embodiment, the determining module includes: an identification module and a presentation determination module, wherein,
the identification module is configured to identify the aspect ratio of the file when the file format is a picture type or a video type;
a file determination module configured to determine whether the file is a normal file or a long-figure file according to an aspect ratio of the file;
the display determining module is configured to determine a display mode of a corresponding file according to the aspect ratio of the common file when the file determining module determines that the file is the common file; or when the file is determined to be a long-figure file according to the aspect ratio of the file, determining the display mode of the corresponding file according to the aspect ratio of the long-figure file.
Optionally, in another embodiment, on the basis of the above embodiment, the display determination module includes: the display device comprises a first judgment module, a first display determination module and a second display determination module; and/or a second judgment module, a third display determination module and a fourth display determination module; wherein
The first judging module is configured to execute the judgment of whether the aspect ratio of the common file is smaller than a first preset ratio;
the first display determining module is configured to determine that the display mode of the common file is horizontal display when the first judging module judges that the aspect ratio of the common file is smaller than a first preset ratio;
the second display determining module is configured to determine that the display mode of the common file is vertical display when the first judging module judges that the aspect ratio of the common file is greater than or equal to a first preset ratio;
the second judging module is configured to execute the judgment of whether the aspect ratio of the long map file is smaller than a second preset ratio;
the third display determining module is configured to determine that the display mode of the long-image file is horizontal display when the second judging module judges that the aspect ratio of the long-image file is smaller than a second preset ratio;
the fourth display determining module is configured to determine that the display mode of the long-image file is vertical display when the second determining module determines that the aspect ratio of the long-image file is greater than or equal to a second preset ratio.
Referring also to FIG. 14, another block diagram of a document presentation device is shown in accordance with an exemplary embodiment. The device comprises: an obtaining module 1401, a sending module 1402, a receiving module 1403 and a presentation module 1404, wherein,
an acquisition module 1401 configured to execute acquiring a file format of a file;
a sending module 1402, configured to execute sending the file format of the file to a server, so that the server determines a display manner corresponding to the file according to the file format of the file;
a receiving module 1403 configured to execute receiving a display mode of the file sent by the server;
a presentation module 1404 configured to perform presentation of the file according to the presentation manner of the file.
Optionally, in another embodiment, on the basis of the above embodiment, the obtaining module includes: a first obtaining module and an identifying module, wherein,
a first acquisition module configured to perform acquisition of attribute information of a file or a suffix name of the file;
and the identification module is configured to identify the attribute information or the suffix name to obtain the file format of the file.
Optionally, in another embodiment, on the basis of the above embodiment, the display module includes: a first document presentation module and a second document presentation module, wherein,
the first file display module is configured to display the file in a horizontal version mode when the display mode of the file is the horizontal version display;
the first file display module is configured to display the file in a vertical mode when the display mode of the file is vertical display.
Optionally, in another embodiment, on the basis of the above embodiment, the apparatus further includes: a first detection module and a content presentation module, wherein,
the first detection module is configured to detect a first operation instruction of clicking the file after the file is displayed by the display module;
and the content display module is configured to display the detail page of the file or play the file according to the first operation instruction.
Optionally, in another embodiment, on the basis of the above embodiment, the apparatus further includes: a second detection module and a prompt module, wherein,
the second detection module is configured to execute a second operation instruction of detecting that the file is pressed for a long time after the file is displayed by the display module;
and the prompting module is configured to execute a prompting frame which comprises the steps of downloading the file or deleting the file according to the second operation instruction.
Referring also to FIG. 15, another block diagram of a document presentation apparatus is shown in accordance with an exemplary embodiment. The device comprises: an acquisition module 1501, a first determination module 1502, a second determination module 1503, and a transmission module 1504, wherein,
an acquisition module 1501 configured to perform acquiring a file transmitted by a terminal;
a first determining module 1502 configured to perform determining a file format of the file;
a second determining module 1503, configured to determine, according to the file format of the file, a display manner corresponding to the file;
a sending module 1504 configured to execute sending the file display mode to the terminal, so that the terminal displays the file according to the file display mode.
Optionally, an embodiment of the present disclosure further provides a file display apparatus, where the apparatus includes: an acquisition module, a sending module, a receiving module and a display module, wherein,
an acquisition module configured to perform acquiring a file;
the sending module is configured to send the acquired file to a server so that the server can determine a display mode corresponding to the file;
the receiving module is configured to execute a display mode of receiving the file sent by the server;
and the display module is configured to display the file according to the display mode of the file.
With regard to the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment related to the method, and reference may be made to part of the description of the embodiment of the method for the relevant points, and the detailed description will not be made here.
In an exemplary embodiment, an embodiment of the present disclosure further provides an electronic device, including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the file presentation method as described above.
In an exemplary embodiment, the present disclosure also provides a storage medium, which is characterized in that when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the file presentation method as described above.
In an exemplary embodiment, the disclosed embodiments also provide a storage medium comprising instructions, such as a memory comprising instructions, executable by a processor of an apparatus to perform the above-described method. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Fig. 16 is a block diagram illustrating an electronic device 1600 in accordance with an example embodiment. For example, the electronic device 800 may be a mobile terminal or a server, and in the embodiment of the present disclosure, the electronic device is taken as a mobile terminal as an example for description. For example, the electronic device 1600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a gaming console, a tablet device, a medical device, an exercise device, a personal digital assistant, and so forth.
Referring to fig. 16, electronic device 1600 may include one or more of the following components: processing component 1602, memory 1604, power component 1606, multimedia component 1608, audio component 1610, input/output (I/O) interface 1612, sensor component 1614, and communications component 1616.
The processing component 1602 generally controls overall operation of the electronic device 1600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 1602 may include one or more processors 1620 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 1602 can include one or more modules that facilitate interaction between the processing component 1602 and other components. For example, the processing component 1602 can include a multimedia module to facilitate interaction between the multimedia component 1608 and the processing component 1602.
The memory 1604 is configured to store various types of data to support operation at the device 1600. Examples of such data include instructions for any application or method operating on the electronic device 1600, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 1604 may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 1606 provides power to the various components of the electronic device 1600. The power components 1606 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 1600.
The multimedia component 1608 comprises a screen that provides an output interface between the electronic device 1600 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1608 comprises a front-facing camera and/or a rear-facing camera. The front-facing camera and/or the back-facing camera may receive external multimedia data when device 1600 is in an operational mode, such as a capture mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 1610 is configured to output and/or input an audio signal. For example, the audio component 1610 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 1600 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 1604 or transmitted via the communications component 1616. In some embodiments, audio component 1610 further includes a speaker for outputting audio signals.
The I/O interface 1612 provides an interface between the processing component 1602 and peripheral interface modules, such as keyboards, click wheels, buttons, and the like. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
Sensor assembly 1614 includes one or more sensors for providing various aspects of status assessment for electronic device 1600. For example, sensor assembly 1614 may detect an open/closed state of device 1600, the relative positioning of components, such as a display and keypad of device 1600, a change in position of device 1600 or a component of device 1600, the presence or absence of user contact with device 1600, orientation or acceleration/deceleration of device 1600, and a change in temperature of device 1600. The sensor assembly 1614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communications component 1616 is configured to facilitate communications between the electronic device 1600 and other devices in a wired or wireless manner. The electronic device 1600 may access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 1616 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 1616 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 1600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the file presentation methods shown above.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 1604 comprising instructions, executable by the processor 1620 of the electronic device 1600 to perform the file presentation method illustrated above is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product is also provided, in which instructions, when executed by the processor 1620 of the electronic device 1600, cause the electronic device 1600 to perform the file presentation method illustrated above.
FIG. 17 is a block diagram illustrating an apparatus 1700 for file exposure in accordance with an exemplary embodiment. For example, the apparatus 1700 may be provided as a server. Referring to fig. 17, the apparatus 1700 includes a processing component 1722 that further includes one or more processors and memory resources, represented by memory 1732, for storing instructions, such as applications, that are executable by the processing component 1722. The application programs stored in memory 1732 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1722 is configured to execute instructions to perform the method file presentation method described above.
The apparatus 1700 may also include a power component 1726 configured to perform power management of the apparatus 1700, a wired or wireless network interface 1750 configured to connect the apparatus 1700 to a network, and an input output (I/O) interface 1758. The apparatus 1700 may operate based on an operating system, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like, stored in the memory 1732.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosed embodiments pertain. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (10)

1. A file display method is characterized by comprising the following steps:
acquiring a file format of a file;
determining a display mode corresponding to the file according to the file format of the file;
and displaying the file according to the display mode of the file.
2. A file display method is characterized by comprising the following steps:
receiving a file format of a file sent by a terminal;
determining a display mode corresponding to the file according to the file format of the file;
and sending the display mode of the file to the terminal so that the terminal can display the file according to the display mode of the file.
3. A file display method is characterized by comprising the following steps:
acquiring a file format of a file;
sending the file format of the file to a server so that the server can determine a display mode corresponding to the file according to the file format of the file;
receiving a display mode of the file sent by the server;
and displaying the file according to the display mode of the file.
4. A file display method is characterized by comprising the following steps:
acquiring a file sent by a terminal;
determining a file format of the file;
determining a display mode corresponding to the file according to the file format of the file;
and sending the display mode of the file to the terminal so that the terminal can display the file according to the display mode of the file.
5. A file display method is characterized by comprising the following steps:
acquiring a file;
sending the acquired file to a server so that the server can determine a display mode corresponding to the file conveniently;
receiving a display mode of the file sent by the server;
and displaying the file according to the display mode of the file.
6. A document presentation device, comprising:
a first obtaining module configured to perform obtaining a file format of a file;
the first determining module is configured to determine a display mode corresponding to the file according to the file format of the file;
the first display module is configured to display the file according to the display mode of the file.
7. A document presentation device, comprising:
a receiving module configured to execute a file format of a file transmitted by a receiving terminal;
the determining module is configured to determine a display mode corresponding to the file according to the file format of the file;
and the sending module is configured to execute the file displaying method and send the file displaying method to the terminal so that the terminal can display the file according to the file displaying mode.
8. A document presentation device, comprising:
an acquisition module configured to execute acquiring a file format of a file;
the sending module is configured to execute sending of the file format of the file to a server, so that the server determines a display mode corresponding to the file according to the file format of the file;
the receiving module is configured to execute a display mode of receiving the file sent by the server;
and the display module is configured to display the file according to the display mode of the file.
9. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the file presentation method of any one of claims 1 to 5.
10. A storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the file presentation method of any one of claims 1 to 5.
CN202011396355.9A 2020-12-03 2020-12-03 File display method and device, electronic equipment and storage medium Pending CN112506868A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011396355.9A CN112506868A (en) 2020-12-03 2020-12-03 File display method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011396355.9A CN112506868A (en) 2020-12-03 2020-12-03 File display method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112506868A true CN112506868A (en) 2021-03-16

Family

ID=74969515

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011396355.9A Pending CN112506868A (en) 2020-12-03 2020-12-03 File display method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112506868A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104166671A (en) * 2014-06-17 2014-11-26 京东方科技集团股份有限公司 File management method and file management device
WO2017041587A1 (en) * 2015-09-11 2017-03-16 广州视睿电子科技有限公司 File display method and system
CN110162286A (en) * 2019-05-17 2019-08-23 维沃移动通信有限公司 A kind of image display method and terminal
CN111338537A (en) * 2020-02-11 2020-06-26 北京字节跳动网络技术有限公司 Method, apparatus, electronic device, and medium for displaying video
CN111399956A (en) * 2020-03-12 2020-07-10 北京字节跳动网络技术有限公司 Content display method and device applied to display equipment and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104166671A (en) * 2014-06-17 2014-11-26 京东方科技集团股份有限公司 File management method and file management device
WO2017041587A1 (en) * 2015-09-11 2017-03-16 广州视睿电子科技有限公司 File display method and system
CN110162286A (en) * 2019-05-17 2019-08-23 维沃移动通信有限公司 A kind of image display method and terminal
CN111338537A (en) * 2020-02-11 2020-06-26 北京字节跳动网络技术有限公司 Method, apparatus, electronic device, and medium for displaying video
CN111399956A (en) * 2020-03-12 2020-07-10 北京字节跳动网络技术有限公司 Content display method and device applied to display equipment and electronic equipment

Similar Documents

Publication Publication Date Title
US20180088764A1 (en) Method, apparatus, and storage medium for sharing content
CN109683761B (en) Content collection method, device and storage medium
CN107025419B (en) Fingerprint template inputting method and device
EP3337146B1 (en) Method and apparatus for displaying notification message
CN105845124B (en) Audio processing method and device
US10216711B2 (en) Information collection method and apparatus
CN107133352B (en) Photo display method and device
CN107193606B (en) Application distribution method and device
CN107423386B (en) Method and device for generating electronic card
EP3147802B1 (en) Method and apparatus for processing information
CN104462296B (en) File management method and device and terminal
CN110968364A (en) Method and device for adding shortcut plug-in and intelligent equipment
CN111510556B (en) Call information processing method and device and computer storage medium
CN108984098B (en) Information display control method and device based on social software
WO2019051836A1 (en) Information reply method and apparatus
CN111612875A (en) Dynamic image generation method and device, electronic equipment and storage medium
CN108491535B (en) Information classified storage method and device
CN105607958B (en) Information input method and device
CN112506868A (en) File display method and device, electronic equipment and storage medium
CN110196747B (en) Information processing method and device
CN107679123B (en) Picture naming method and device
CN112396675A (en) Image processing method, device and storage medium
CN107257384B (en) Service state monitoring method and device
CN110784721A (en) Picture data compression method and device, electronic equipment and storage medium
CN106897876B (en) Terminal payment processing method and device

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