CN112115109B - File sharing method, equipment and computer readable storage medium - Google Patents

File sharing method, equipment and computer readable storage medium Download PDF

Info

Publication number
CN112115109B
CN112115109B CN202011021604.6A CN202011021604A CN112115109B CN 112115109 B CN112115109 B CN 112115109B CN 202011021604 A CN202011021604 A CN 202011021604A CN 112115109 B CN112115109 B CN 112115109B
Authority
CN
China
Prior art keywords
file
shared
suffix
name
copy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011021604.6A
Other languages
Chinese (zh)
Other versions
CN112115109A (en
Inventor
吴启军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN202011021604.6A priority Critical patent/CN112115109B/en
Publication of CN112115109A publication Critical patent/CN112115109A/en
Application granted granted Critical
Publication of CN112115109B publication Critical patent/CN112115109B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • 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/162Delete operations
    • 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/164File meta data generation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

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

Abstract

The invention discloses a file sharing method, equipment and a computer readable storage medium, wherein the method comprises the following steps: detecting whether a file suffix is carried in the name of a file to be shared; then, if the file suffix is not carried in the name, acquiring the file suffix corresponding to the file to be shared from a database; then, generating a copy piece identical to the file to be shared, and renaming the copy piece according to the name and the file suffix; and finally, sharing the renamed copy, and deleting the copy after sharing. The humanized file sharing scheme is realized, so that file sharing among users is smoother and more convenient, the problem that the files are difficult to identify and open after sharing is avoided, and the file sharing experience among users is improved.

Description

File sharing method, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of mobile communications, and in particular, to a method and apparatus for sharing files, and a computer readable storage medium.
Background
In the prior art, with the rapid development of mobile terminal technology, handheld mobile terminals have gradually replaced traditional music devices such as MP3 and MP4, and become main devices for playing audio and video. The mobile terminals can be wirelessly connected by establishing Bluetooth or WiFi, so that a user can share one file on the mobile terminal to another mobile terminal through WiFi, bluetooth or Internet application.
After the mobile terminal receives the shared files, the file manager can display the files under the catalogues of the corresponding file types in a classified mode according to the file types, and a user can browse and open the files conveniently.
However, during sharing, the files are shared under the catalogues placed by the file manager according to the corresponding file types, so that during sharing, the names of the shared files only contain the file types and do not contain the suffixes of the files, and the shared files are not opened on the shared terminal, so that the user experience is poor. In addition, if the shared file is an audio file with a suffix of 3ga format, since the default player of the system cannot identify the audio file with the 3ga format, if the shared mobile terminal is not provided with playing software supporting the 3ga format, the 3ga format file cannot be identified on the shared terminal, and the shared mobile terminal cannot be opened by using the default music of the system.
Therefore, in summary, the file sharing scheme in the prior art has the problem that the other party cannot identify, so that the file sharing experience between users is affected.
Disclosure of Invention
In order to solve the technical defects in the prior art, the invention provides a file sharing method, which comprises the following steps:
Detecting whether a file suffix is carried in the name of a file to be shared;
if the file suffix is not carried in the name, acquiring the file suffix corresponding to the file to be shared from a database;
generating a copy piece identical to the file to be shared, and renaming the copy piece according to the name and the file suffix;
and sharing the renamed copy, and deleting the copy after sharing is completed.
Optionally, the detecting whether the name of the file to be shared carries a file suffix includes:
acquiring attribute information of the file to be shared;
and determining whether the name carries the file suffix according to the attribute information.
Optionally, if the name does not carry the file suffix, acquiring the file suffix corresponding to the file to be shared from a database, including:
determining a database corresponding to the file to be shared according to the attribute information;
and acquiring a file suffix corresponding to the file to be shared from the database.
Optionally, the generating the copy piece identical to the file to be shared, and renaming the copy piece according to the name and the file suffix includes:
Generating copies identical to the files to be shared in the catalogue of the files to be shared;
and renaming the copy piece according to the name and the file suffix.
Optionally, the sharing the renamed copy and deleting the copy after sharing is completed includes:
in the sharing instruction of the file to be shared, the copying piece replaces the file to be shared;
and deleting the copy in the catalog after the copy transmission is completed.
The invention also provides a file sharing device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the computer program is realized when being executed by the processor:
detecting whether a file suffix is carried in the name of a file to be shared;
if the file suffix is not carried in the name, acquiring the file suffix corresponding to the file to be shared from a database;
generating a copy piece identical to the file to be shared, and renaming the copy piece according to the name and the file suffix;
and sharing the renamed copy, and deleting the copy after sharing is completed.
Optionally, the computer program is implemented when executed by the processor:
acquiring attribute information of the file to be shared;
and determining whether the name carries the file suffix according to the attribute information.
Optionally, the computer program is implemented when executed by the processor:
determining a database corresponding to the file to be shared according to the attribute information;
and acquiring a file suffix corresponding to the file to be shared from the database.
Optionally, the computer program is implemented when executed by the processor:
generating copies identical to the files to be shared in the catalogue of the files to be shared;
renaming the copy piece according to the name and the file suffix;
in the sharing instruction of the file to be shared, the copying piece replaces the file to be shared;
and deleting the copy in the catalog after the copy transmission is completed.
The invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a file sharing program, and the file sharing program realizes the steps of the file sharing method according to any one of the above steps when being executed by a processor.
By means of the file sharing method, the file sharing equipment and the computer readable storage medium, whether the names of the files to be shared carry file suffixes or not is detected; then, if the file suffix is not carried in the name, acquiring the file suffix corresponding to the file to be shared from a database; then, generating a copy piece identical to the file to be shared, and renaming the copy piece according to the name and the file suffix; and finally, sharing the renamed copy, and deleting the copy after sharing. The humanized file sharing scheme is realized, so that file sharing among users is smoother and more convenient, the problem that the files are difficult to identify and open after sharing is avoided, and the file sharing experience among users is improved.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
fig. 1 is a schematic diagram of a hardware structure of a mobile terminal according to the present invention;
fig. 2 is a schematic diagram of a communication network system according to an embodiment of the present invention;
FIG. 3 is a flowchart of a first embodiment of a file sharing method according to the present invention;
FIG. 4 is a flowchart of a second embodiment of a file sharing method according to the present invention;
FIG. 5 is a flowchart of a third embodiment of a file sharing method according to the present invention;
FIG. 6 is a flowchart of a fourth embodiment of a file sharing method according to the present invention;
fig. 7 is a flowchart of a fifth embodiment of a file sharing method according to the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present invention, and have no specific meaning per se. Thus, "module," "component," or "unit" may be used in combination.
The terminal may be implemented in various forms. For example, the terminals described in the present invention may include mobile terminals such as cell phones, tablet computers, notebook computers, palm computers, personal digital assistants (Personal Digital Assistant, PDA), portable media players (Portable Media Player, PMP), navigation devices, wearable devices, smart bracelets, pedometers, and fixed terminals such as digital TVs, desktop computers, and the like.
The following description will be given taking a mobile terminal as an example, and those skilled in the art will understand that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for a moving purpose.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention, the mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an a/V (audio/video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. Those skilled in the art will appreciate that the mobile terminal structure shown in fig. 1 is not limiting of the mobile terminal and that the mobile terminal may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The following describes the components of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be used for receiving and transmitting signals during the information receiving or communication process, specifically, after receiving downlink information of the base station, processing the downlink information by the processor 110; and, the uplink data is transmitted to the base station. Typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication, global System for Mobile communications), GPRS (General Packet Radio Service ), CDMA2000 (Code Division Multiple Access, CDMA 2000), WCDMA (Wideband Code Division Multiple Access ), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, time Division synchronous code Division multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, frequency Division Duplex Long term evolution), and TDD-LTE (Time Division Duplexing-Long Term Evolution, time Division Duplex Long term evolution), etc.
WiFi belongs to a short-distance wireless transmission technology, and a mobile terminal can help a user to send and receive e-mails, browse web pages, access streaming media and the like through the WiFi module 102, so that wireless broadband Internet access is provided for the user. Although fig. 1 shows a WiFi module 102, it is understood that it does not belong to the necessary constitution of a mobile terminal, and can be omitted entirely as required within a range that does not change the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the mobile terminal 100. The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive an audio or video signal. The a/V input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, the graphics processor 1041 processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphics processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, and the like, and can process such sound into audio data. The processed audio (voice) data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting the audio signal.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 1061 and/or the backlight when the mobile terminal 100 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; as for other sensors such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured in the mobile phone, the detailed description thereof will be omitted.
The display unit 106 is used to display information input by a user or information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the mobile terminal. In particular, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 1071 or thereabout by using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 110, and can receive and execute commands sent from the processor 110. Further, the touch panel 1071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 107 may include other input devices 1072 in addition to the touch panel 1071. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc., as specifically not limited herein.
Further, the touch panel 1071 may overlay the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or thereabout, the touch panel 1071 is transferred to the processor 110 to determine the type of touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of touch event. Although in fig. 1, the touch panel 1071 and the display panel 1061 are two independent components for implementing the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 may be integrated with the display panel 1061 to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 108 serves as an interface through which at least one external device can be connected with the mobile terminal 100. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and an external device.
Memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power source 111 (e.g., a battery) for supplying power to the respective components, and preferably, the power source 111 may be logically connected to the processor 110 through a power management system, so as to perform functions of managing charging, discharging, and power consumption management through the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based will be described below.
Referring to fig. 2, fig. 2 is a schematic diagram of a communication network system according to an embodiment of the present invention, where the communication network system is an LTE system of a general mobile communication technology, and the LTE system includes a UE (User Equipment) 201, an e-UTRAN (Evolved UMTS Terrestrial Radio Access Network ) 202, an epc (Evolved Packet Core, evolved packet core) 203, and an IP service 204 of an operator that are sequentially connected in communication.
Specifically, the UE201 may be the terminal 100 described above, and will not be described herein.
The E-UTRAN202 includes eNodeB2021 and other eNodeB2022, etc. The eNodeB2021 may be connected with other eNodeB2022 by a backhaul (e.g., an X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide access from the UE201 to the EPC 203.
EPC203 may include MME (Mobility Management Entity ) 2031, hss (Home Subscriber Server, home subscriber server) 2032, other MMEs 2033, SGW (Serving Gate Way) 2034, pgw (PDN Gate Way) 2035 and PCRF (Policy and Charging Rules Function, policy and tariff function entity) 2036, and so on. The MME2031 is a control node that handles signaling between the UE201 and EPC203, providing bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location registers (not shown) and to hold user specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034 and PGW2035 may provide IP address allocation and other functions for UE201, PCRF2036 is a policy and charging control policy decision point for traffic data flows and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem ), or other IP services, etc.
Although the LTE system is described above as an example, it should be understood by those skilled in the art that the present invention is not limited to LTE systems, but may be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above mobile terminal hardware structure and the communication network system, various embodiments of the method of the present invention are provided.
Example 1
FIG. 3 is a flowchart of a file sharing method according to a first embodiment of the present invention. A method of file sharing, the method comprising:
s1, detecting whether a file suffix is carried in the name of a file to be shared;
s2, if the name does not carry the file suffix, acquiring the file suffix corresponding to the file to be shared from a database;
s3, generating a copy piece identical to the file to be shared, and renaming the copy piece according to the name and the file suffix;
s4, sharing the renamed copy, and deleting the copy after sharing is completed.
In this embodiment, first, it is detected whether a file suffix is carried in a name of a file to be shared; then, if the file suffix is not carried in the name, acquiring the file suffix corresponding to the file to be shared from a database; then, generating a copy piece identical to the file to be shared, and renaming the copy piece according to the name and the file suffix; and finally, sharing the renamed copy, and deleting the copy after sharing.
Specifically, in this embodiment, considering that the existing file sharing technology does not have a file suffix in the file sharing process, the shared file cannot be opened on the shared mobile terminal, for example, because the 3ga format is not recognized by the system default music player, and thus cannot be opened on the shared mobile terminal, the embodiment provides a specific embodiment for solving the problem that the file sharing cannot be opened.
In this embodiment, first, when the system detects that a file sharing event occurs, the attribute of the shared file is first determined, and whether the shared file includes a file suffix is determined. Specifically, whether the attribute of the file contains a title (Name header) or a Name (Name) of the file is judged, if the attribute is a title, the file does not contain a file suffix, and only the Name containing the file contains the file suffix. Then, if it is determined that the file currently being shared is not suffixed, the multimedia database is queried for the name of the file (the name is suffixed), then a copy of the file is copied, and then the copy file is renamed to the file name found from the multimedia database. And finally, file sharing is carried out by using the renamed copy files, and after receiving a sharing completion instruction, local file copies are deleted. It can be understood that, according to the file name modification scheme of the present embodiment, on the shared mobile terminal, the suffix of the received file is determined, and if the docurmentid (file number) of the received file is ending with.3ga and the minisype (suffix) is of the application/OCtet-stream type, the minisype of the file is changed to audio/3ga and then stored in the database. Therefore, when the receiving end is in the file preview interface, if the file is opened, the multimedia database is queried for minisize, and the file type of the preview interface is updated according to the new minisize (audio/3 ga). It can be seen that, in this embodiment, when the user clicks to open the file with the suffix of 3ga format, according to the type of the file specified by the new minisype (audio/3 ga), all application programs capable of identifying to open the file are searched in the system, and displayed in a list for the user to select to open.
The method has the beneficial effects that whether the names of the files to be shared carry file suffixes or not is detected; then, if the file suffix is not carried in the name, acquiring the file suffix corresponding to the file to be shared from a database; then, generating a copy piece identical to the file to be shared, and renaming the copy piece according to the name and the file suffix; and finally, sharing the renamed copy, and deleting the copy after sharing. The humanized file sharing scheme is realized, so that file sharing among users is smoother and more convenient, the problem that the files are difficult to identify and open after sharing is avoided, and the file sharing experience among users is improved.
Example two
Fig. 4 is a flowchart of a second embodiment of a file sharing method according to the present invention, based on the above embodiment, the detecting whether a file suffix is carried in a name of a file to be shared includes:
s11, acquiring attribute information of the file to be shared;
s12, determining whether the name carries the file suffix according to the attribute information.
In this embodiment, first, attribute information of the file to be shared is obtained; and then, determining whether the name carries the file suffix according to the attribute information.
Optionally, in this embodiment, attribute information of a file to be shared is determined, where the attribute information includes a type of the file and specific information under the type, for example, the type to which the file belongs includes a music type, a document type, and the like, the specific information of the music includes format information, encoding information, and the like of the music, and the specific information of the document includes format information, version information, and the like of the document;
optionally, in this embodiment, a file suffix of the music file is determined according to the format information and/or the encoding information of the music;
alternatively, in the present embodiment, the file suffix of the file is determined according to the format information and version information of the above-described document.
The method has the beneficial effects that the attribute information of the file to be shared is obtained; and then, determining whether the name carries the file suffix according to the attribute information. The file suffix modification foundation is provided for the subsequent realization of a humanized file sharing scheme, so that file sharing among users is smoother and more convenient, the problem that the file is difficult to identify and open after sharing is avoided, and the file sharing experience among users is improved.
Example III
Fig. 5 is a flowchart of a third embodiment of a file sharing method according to the present invention, based on the above embodiment, the obtaining, in a database, a file suffix corresponding to the file to be shared if the name does not carry the file suffix includes:
s21, determining a database corresponding to the file to be shared according to the attribute information;
s22, acquiring a file suffix corresponding to the file to be shared from the database.
In this embodiment, first, a database corresponding to the file to be shared is determined according to the attribute information; and then, acquiring a file suffix corresponding to the file to be shared from the database.
Optionally, in this embodiment, the database corresponding to the file to be shared is determined according to the attribute information, where the database may be a plurality of types of databases, for example, a media database, a file management database, and the like, and meanwhile, the database may also be a network server database other than local data, so that a success rate of matching a subsequent file suffix is higher, a matched file suffix is more comprehensive, and options for users are richer;
optionally, in this embodiment, a file suffix corresponding to the file to be shared is obtained in the database, where one or more file suffixes of the music file corresponding to the format information and/or the encoding information of the music are selected;
Alternatively, in the present embodiment, one or more file suffixes of the file corresponding to the format information and version information of the above-described document are selected.
The method has the beneficial effects that the database corresponding to the file to be shared is determined through the attribute information; and then, acquiring a file suffix corresponding to the file to be shared from the database. The file suffix source foundation is provided for realizing a humanized file sharing scheme subsequently, so that file sharing among users is smoother and more convenient, the problem that the file is difficult to identify and open after sharing is avoided, and the file sharing experience among users is improved.
Example IV
Fig. 6 is a flowchart of a fourth embodiment of a file sharing method according to the present invention, based on the above embodiment, the generating a copy piece identical to the file to be shared, and renaming the copy piece according to the name and the file suffix includes:
s31, generating a copy piece identical to the file to be shared in the directory of the file to be shared;
s32, renaming the copy piece according to the name and the file suffix.
In this embodiment, first, a copy piece identical to the file to be shared is generated in a directory of the file to be shared; and renaming the copy piece according to the name and the file suffix.
Optionally, in this embodiment, a copy piece identical to the file to be shared is generated in a directory of the file to be shared, where the copy piece identical to the file to be shared is generated in a file directory of the file to be shared;
alternatively, in this embodiment, unlike the above-described scheme, in a directory of an application program where a sharing operation corresponding to a file to be shared is located, a copy piece identical to the file to be shared is generated;
alternatively, in this embodiment, unlike the above-described scheme, in a system public sharing directory of a file to be shared, a copy identical to the file to be shared is generated;
optionally, in this embodiment, when there is only one file suffix, renaming the one copy according to the name and the file suffix;
optionally, in this embodiment, when there are multiple file suffixes, renaming is performed on the multiple copies according to the name and the file suffix, respectively.
The method has the advantages that the copy pieces identical to the files to be shared are generated in the catalogue of the files to be shared; and renaming the copy piece according to the name and the file suffix. A file name modification way is provided for realizing a humanized file sharing scheme subsequently, so that file sharing among users is smoother and more convenient, the problem that the file is difficult to identify and open after sharing is avoided, and the file sharing experience among users is improved.
Example five
FIG. 7 is a flowchart of a fifth embodiment of a file sharing method according to the present invention, based on the above embodiment, the steps of sharing renamed copies, and deleting the copies after sharing are completed include:
s41, in the sharing instruction of the file to be shared, replacing the file to be shared by the copy piece;
s42, deleting the copy in the catalog after the copy is transmitted.
In this embodiment, first, in the sharing instruction of the file to be shared, the file to be shared is replaced by the copy piece; then, when the transfer of the copy is completed, the copy in the directory is deleted.
Optionally, in this embodiment, the sharing instruction is modified, that is, in the sharing instruction of the file to be shared, the copy is replaced by one or more files to be shared;
optionally, in this embodiment, when generating copies with different names of the files to be shared, the multiple copies are sequentially transmitted, and when the previous copy cannot be identified, sharing transmission of the next copy is performed;
optionally, in this embodiment, when generating copies of different names of a plurality of files to be shared, the copies are batched and transmitted, so as to improve the sharing transmission efficiency.
The file sharing method has the beneficial effects that the copying piece replaces the file to be shared in the file sharing instruction; then, when the transfer of the copy is completed, the copy in the directory is deleted. The humanized file sharing scheme is realized, so that file sharing among users is smoother and more convenient, the problem that the files are difficult to identify and open after sharing is avoided, and the file sharing experience among users is improved.
Example six
Based on the above embodiment, the present invention further provides a file sharing device, where the device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the computer program is implemented when executed by the processor:
detecting whether a file suffix is carried in the name of a file to be shared;
if the file suffix is not carried in the name, acquiring the file suffix corresponding to the file to be shared from a database;
generating a copy piece identical to the file to be shared, and renaming the copy piece according to the name and the file suffix;
and sharing the renamed copy, and deleting the copy after sharing is completed.
In this embodiment, first, it is detected whether a file suffix is carried in a name of a file to be shared; then, if the file suffix is not carried in the name, acquiring the file suffix corresponding to the file to be shared from a database; then, generating a copy piece identical to the file to be shared, and renaming the copy piece according to the name and the file suffix; and finally, sharing the renamed copy, and deleting the copy after sharing.
Specifically, in this embodiment, considering that the existing file sharing technology does not have a file suffix in the file sharing process, the shared file cannot be opened on the shared mobile terminal, for example, because the 3ga format is not recognized by the system default music player, and thus cannot be opened on the shared mobile terminal, the embodiment provides a specific embodiment for solving the problem that the file sharing cannot be opened.
In this embodiment, first, when the system detects that a file sharing event occurs, the attribute of the shared file is first determined, and whether the shared file includes a file suffix is determined. Specifically, whether the attribute of the file contains a title (Name header) or a Name (Name) of the file is judged, if the attribute is a title, the file does not contain a file suffix, and only the Name containing the file contains the file suffix. Then, if it is determined that the file currently being shared is not suffixed, the multimedia database is queried for the name of the file (the name is suffixed), then a copy of the file is copied, and then the copy file is renamed to the file name found from the multimedia database. And finally, file sharing is carried out by using the renamed copy files, and after receiving a sharing completion instruction, local file copies are deleted. It can be understood that, according to the file name modification scheme of the present embodiment, on the shared mobile terminal, the suffix of the received file is determined, and if the docurmentid (file number) of the received file is ending with.3ga and the minisype (suffix) is of the application/OCtet-stream type, the minisype of the file is changed to audio/3ga and then stored in the database. Therefore, when the receiving end is in the file preview interface, if the file is opened, the multimedia database is queried for minisize, and the file type of the preview interface is updated according to the new minisize (audio/3 ga). It can be seen that, in this embodiment, when the user clicks to open the file with the suffix of 3ga format, according to the type of the file specified by the new minisype (audio/3 ga), all application programs capable of identifying to open the file are searched in the system, and displayed in a list for the user to select to open.
The method has the beneficial effects that whether the names of the files to be shared carry file suffixes or not is detected; then, if the file suffix is not carried in the name, acquiring the file suffix corresponding to the file to be shared from a database; then, generating a copy piece identical to the file to be shared, and renaming the copy piece according to the name and the file suffix; and finally, sharing the renamed copy, and deleting the copy after sharing. The humanized file sharing scheme is realized, so that file sharing among users is smoother and more convenient, the problem that the files are difficult to identify and open after sharing is avoided, and the file sharing experience among users is improved.
Example seven
Based on the above embodiments, the computer program when executed by the processor implements:
acquiring attribute information of the file to be shared;
and determining whether the name carries the file suffix according to the attribute information.
In this embodiment, first, attribute information of the file to be shared is obtained; and then, determining whether the name carries the file suffix according to the attribute information.
Optionally, in this embodiment, attribute information of a file to be shared is determined, where the attribute information includes a type of the file and specific information under the type, for example, the type to which the file belongs includes a music type, a document type, and the like, the specific information of the music includes format information, encoding information, and the like of the music, and the specific information of the document includes format information, version information, and the like of the document;
optionally, in this embodiment, a file suffix of the music file is determined according to the format information and/or the encoding information of the music;
alternatively, in the present embodiment, the file suffix of the file is determined according to the format information and version information of the above-described document.
The method has the beneficial effects that the attribute information of the file to be shared is obtained; and then, determining whether the name carries the file suffix according to the attribute information. The file suffix modification foundation is provided for the subsequent realization of a humanized file sharing scheme, so that file sharing among users is smoother and more convenient, the problem that the file is difficult to identify and open after sharing is avoided, and the file sharing experience among users is improved.
Example eight
Based on the above embodiments, the computer program when executed by the processor implements:
determining a database corresponding to the file to be shared according to the attribute information;
and acquiring a file suffix corresponding to the file to be shared from the database.
In this embodiment, first, a database corresponding to the file to be shared is determined according to the attribute information; and then, acquiring a file suffix corresponding to the file to be shared from the database.
Optionally, in this embodiment, the database corresponding to the file to be shared is determined according to the attribute information, where the database may be a plurality of types of databases, for example, a media database, a file management database, and the like, and meanwhile, the database may also be a network server database other than local data, so that a success rate of matching a subsequent file suffix is higher, a matched file suffix is more comprehensive, and options for users are richer;
optionally, in this embodiment, a file suffix corresponding to the file to be shared is obtained in the database, where one or more file suffixes of the music file corresponding to the format information and/or the encoding information of the music are selected;
Alternatively, in the present embodiment, one or more file suffixes of the file corresponding to the format information and version information of the above-described document are selected.
The method has the beneficial effects that the database corresponding to the file to be shared is determined through the attribute information; and then, acquiring a file suffix corresponding to the file to be shared from the database. The file suffix source foundation is provided for realizing a humanized file sharing scheme subsequently, so that file sharing among users is smoother and more convenient, the problem that the file is difficult to identify and open after sharing is avoided, and the file sharing experience among users is improved.
Example nine
Based on the above embodiments, the computer program when executed by the processor implements:
generating copies identical to the files to be shared in the catalogue of the files to be shared;
renaming the copy piece according to the name and the file suffix;
in the sharing instruction of the file to be shared, the copying piece replaces the file to be shared;
and deleting the copy in the catalog after the copy transmission is completed.
In this embodiment, first, a copy piece identical to the file to be shared is generated in a directory of the file to be shared; and renaming the copy piece according to the name and the file suffix.
Optionally, in this embodiment, a copy piece identical to the file to be shared is generated in a directory of the file to be shared, where the copy piece identical to the file to be shared is generated in a file directory of the file to be shared;
alternatively, in this embodiment, unlike the above-described scheme, in a directory of an application program where a sharing operation corresponding to a file to be shared is located, a copy piece identical to the file to be shared is generated;
alternatively, in this embodiment, unlike the above-described scheme, in a system public sharing directory of a file to be shared, a copy identical to the file to be shared is generated;
optionally, in this embodiment, when there is only one file suffix, renaming the one copy according to the name and the file suffix;
optionally, in this embodiment, when there are multiple file suffixes, renaming is performed on the multiple copies according to the name and the file suffix, respectively.
In another embodiment, first, in the sharing instruction of the file to be shared, the file to be shared is replaced by the copy piece; then, when the transfer of the copy is completed, the copy in the directory is deleted.
Optionally, in this embodiment, the sharing instruction is modified, that is, in the sharing instruction of the file to be shared, the copy is replaced by one or more files to be shared;
optionally, in this embodiment, when generating copies with different names of the files to be shared, the multiple copies are sequentially transmitted, and when the previous copy cannot be identified, sharing transmission of the next copy is performed;
optionally, in this embodiment, when generating copies of different names of a plurality of files to be shared, the copies are batched and transmitted, so as to improve the sharing transmission efficiency.
The file sharing method has the beneficial effects that the copying piece replaces the file to be shared in the file sharing instruction; then, when the transfer of the copy is completed, the copy in the directory is deleted. The humanized file sharing scheme is realized, so that file sharing among users is smoother and more convenient, the problem that the files are difficult to identify and open after sharing is avoided, and the file sharing experience among users is improved.
Examples ten
Based on the above embodiment, the present invention further provides a computer readable storage medium, where a file sharing program is stored, where the file sharing program, when executed by a processor, implements the steps of the file sharing method according to any one of the above embodiments.
By means of the file sharing method, the file sharing equipment and the computer readable storage medium, whether the names of the files to be shared carry file suffixes or not is detected; then, if the file suffix is not carried in the name, acquiring the file suffix corresponding to the file to be shared from a database; then, generating a copy piece identical to the file to be shared, and renaming the copy piece according to the name and the file suffix; and finally, sharing the renamed copy, and deleting the copy after sharing. The humanized file sharing scheme is realized, so that file sharing among users is smoother and more convenient, the problem that the files are difficult to identify and open after sharing is avoided, and the file sharing experience among users is improved.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.

Claims (3)

1. A method for sharing files, the method comprising:
detecting whether a file suffix is carried in the name of a file to be shared;
if the file suffix is not carried in the name, acquiring the file suffix corresponding to the file to be shared from a database;
generating a copy piece identical to the file to be shared, and renaming the copy piece according to the name and the file suffix;
sharing the renamed copy, and deleting the copy after sharing is completed;
the detecting whether the name of the file to be shared carries the file suffix includes:
acquiring attribute information of the file to be shared;
determining whether the name carries the file suffix according to the attribute information;
if the name does not carry the file suffix, acquiring the file suffix corresponding to the file to be shared from a database, including:
determining a database corresponding to the file to be shared according to the attribute information;
acquiring a file suffix corresponding to the file to be shared from the database;
the generating the copy piece identical to the file to be shared, and renaming the copy piece according to the name and the file suffix includes:
Generating copies identical to the files to be shared in the catalogue of the files to be shared;
renaming the copy piece according to the name and the file suffix;
the sharing of the renamed copy and the deletion of the copy after the sharing is completed comprises the following steps:
in the sharing instruction of the file to be shared, the copying piece replaces the file to be shared;
deleting the copy in the catalog after the copy is transmitted;
wherein,
judging whether the attribute of the file to be shared contains a title Name header of the file or a Name of the file, if the attribute of the file to be shared contains the title Name header, determining that the Name of the file to be shared does not contain the file suffix, and if the attribute of the file to be shared contains the Name of the file, determining that the Name of the file to be shared contains the file suffix;
judging the suffix of a received file on the shared mobile terminal, if the document ID file number of the received file is ending with 3ga and the minisize suffix is of the application/octet-stream type, changing the minisize suffix of the file into audio/3ga, and then storing the modified file in a database;
When the shared mobile terminal is positioned on a file preview interface and a modified file is opened, inquiring a minisize suffix in a multimedia database, and updating the file type of the file preview interface according to a new minisize suffix audio/3 ga;
when a user clicks to open a file with the minisize suffix in the audio/3ga format, the type of the file is specified according to the new minisize suffix audio/3ga, and all application programs capable of identifying and opening the file are searched in the system and displayed in a list for the user to select and open.
2. A file sharing device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program implementing when executed by the processor:
detecting whether a file suffix is carried in the name of a file to be shared;
if the file suffix is not carried in the name, acquiring the file suffix corresponding to the file to be shared from a database;
generating a copy piece identical to the file to be shared, and renaming the copy piece according to the name and the file suffix;
sharing the renamed copy, and deleting the copy after sharing is completed;
The detecting whether the name of the file to be shared carries the file suffix includes:
acquiring attribute information of the file to be shared;
determining whether the name carries the file suffix according to the attribute information;
if the name does not carry the file suffix, acquiring the file suffix corresponding to the file to be shared from a database, including:
determining a database corresponding to the file to be shared according to the attribute information;
acquiring a file suffix corresponding to the file to be shared from the database;
the generating the copy piece identical to the file to be shared, and renaming the copy piece according to the name and the file suffix includes:
generating copies identical to the files to be shared in the catalogue of the files to be shared;
renaming the copy piece according to the name and the file suffix;
the sharing of the renamed copy and the deletion of the copy after the sharing is completed comprises the following steps:
in the sharing instruction of the file to be shared, the copying piece replaces the file to be shared;
deleting the copy in the catalog after the copy is transmitted;
Wherein,
judging whether the attribute of the file to be shared contains a title Name header of the file or a Name of the file, if the attribute of the file to be shared contains the title Name header, determining that the Name of the file to be shared does not contain the file suffix, and if the attribute of the file to be shared contains the Name of the file, determining that the Name of the file to be shared contains the file suffix;
judging the suffix of a received file on the shared mobile terminal, if the document ID file number of the received file is ending with 3ga and the minisize suffix is of the application/octet-stream type, changing the minisize suffix of the file into audio/3ga, and then storing the modified file in a database;
when the shared mobile terminal is positioned on a file preview interface and a modified file is opened, inquiring a minisize suffix in a multimedia database, and updating the file type of the file preview interface according to a new minisize suffix audio/3 ga;
when a user clicks to open a file with the minisize suffix in the audio/3ga format, the type of the file is specified according to the new minisize suffix audio/3ga, and all application programs capable of identifying and opening the file are searched in the system and displayed in a list for the user to select and open.
3. A computer-readable storage medium, wherein a file sharing program is stored on the computer-readable storage medium, and the file sharing program when executed by a processor implements the steps of the file sharing method of claim 1.
CN202011021604.6A 2020-09-25 2020-09-25 File sharing method, equipment and computer readable storage medium Active CN112115109B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011021604.6A CN112115109B (en) 2020-09-25 2020-09-25 File sharing method, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011021604.6A CN112115109B (en) 2020-09-25 2020-09-25 File sharing method, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112115109A CN112115109A (en) 2020-12-22
CN112115109B true CN112115109B (en) 2024-03-22

Family

ID=73796779

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011021604.6A Active CN112115109B (en) 2020-09-25 2020-09-25 File sharing method, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112115109B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1145174A (en) * 1996-09-05 1999-02-16 N T T Data:Kk File exchanging system
CN103886028A (en) * 2014-02-27 2014-06-25 广州视睿电子科技有限公司 Method and device for copying files from storage equipment to advertisement players
CN105701195A (en) * 2016-01-12 2016-06-22 深圳市创维电器科技有限公司 Method and system for implementing automatic sorted storing according to file types
WO2017000820A1 (en) * 2015-07-01 2017-01-05 北京奇虎科技有限公司 File sharing method, apparatus, and system based on cloud storage
CN111143301A (en) * 2019-12-27 2020-05-12 深圳市环球数码影视文化有限公司 File uploading method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1145174A (en) * 1996-09-05 1999-02-16 N T T Data:Kk File exchanging system
CN103886028A (en) * 2014-02-27 2014-06-25 广州视睿电子科技有限公司 Method and device for copying files from storage equipment to advertisement players
WO2017000820A1 (en) * 2015-07-01 2017-01-05 北京奇虎科技有限公司 File sharing method, apparatus, and system based on cloud storage
CN105701195A (en) * 2016-01-12 2016-06-22 深圳市创维电器科技有限公司 Method and system for implementing automatic sorted storing according to file types
CN111143301A (en) * 2019-12-27 2020-05-12 深圳市环球数码影视文化有限公司 File uploading method and system

Also Published As

Publication number Publication date
CN112115109A (en) 2020-12-22

Similar Documents

Publication Publication Date Title
CN107967322B (en) File classification display method, mobile terminal and computer readable storage medium
CN108572764B (en) Character input control method and device and computer readable storage medium
CN107888768B (en) Unlocking control method, terminal and computer readable storage medium
CN110180181B (en) Method and device for capturing wonderful moment video and computer readable storage medium
CN114371803B (en) Operation method, intelligent terminal and storage medium
CN109840444B (en) Code scanning identification method, equipment and computer readable storage medium
CN108897846B (en) Information searching method, apparatus and computer readable storage medium
CN110020386B (en) Application page sharing method, mobile terminal and computer readable storage medium
CN108055366A (en) Terminal call interface processing method, mobile terminal and computer readable storage medium
CN107480054B (en) Call chain data processing method and device and computer readable storage medium
CN108322611B (en) Screen locking information pushing method and device and computer readable storage medium
CN110069320B (en) Classification correction method, terminal, system and storage medium for application program
CN109684020B (en) Theme switching method, device and computer readable storage medium
CN109388947B (en) Background management method, device and computer readable storage medium
CN108566476B (en) Information processing method, terminal and computer readable storage medium
CN107766544B (en) Information management method, terminal and computer readable storage medium
CN112115109B (en) File sharing method, equipment and computer readable storage medium
CN111476231B (en) Image area identification method, device and computer readable storage medium
CN110287381B (en) Page control node searching method, terminal and computer readable storage medium
CN109710576B (en) File display method, terminal and storage medium
CN109144747B (en) Data processing method, terminal and computer readable storage medium
CN109656658B (en) Editing object processing method and device and computer readable storage medium
CN112312194B (en) Screen recording data processing method, device and computer readable storage medium
CN113852717B (en) Wallpaper module position migration method, equipment and computer readable storage medium
CN111381728B (en) Touch data management and control method, device and computer readable storage medium

Legal Events

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