CN112291341A - File transmission method, device and equipment - Google Patents

File transmission method, device and equipment Download PDF

Info

Publication number
CN112291341A
CN112291341A CN202011174008.1A CN202011174008A CN112291341A CN 112291341 A CN112291341 A CN 112291341A CN 202011174008 A CN202011174008 A CN 202011174008A CN 112291341 A CN112291341 A CN 112291341A
Authority
CN
China
Prior art keywords
file
subfiles
target
target file
subfile
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
CN202011174008.1A
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202011174008.1A priority Critical patent/CN112291341A/en
Publication of CN112291341A publication Critical patent/CN112291341A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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]
    • 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/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • H04L67/108Resource delivery mechanisms characterised by resources being split in blocks or fragments

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a file transmission method, a file transmission device and file transmission equipment, and belongs to the technical field of data transmission. The file transmission method comprises the following steps: acquiring a target file; under the condition that the storage space occupied by the target file is larger than a first preset threshold value, the target file is split to obtain at least two first subfiles; the storage space occupied by the first subfile is not greater than a first preset threshold; extracting content features of at least two first subfiles; determining a target first subfile with content characteristics meeting preset safety conditions from the at least two first subfiles; the target first subfile is transmitted to the recipient. According to the embodiment of the application, the problem that high-efficiency safe transmission of the file cannot be achieved can be solved.

Description

File transmission method, device and equipment
Technical Field
The application belongs to the technical field of data transmission, and particularly relates to a file transmission method, device and equipment.
Background
With the rapid development of the mobile internet and the continuous popularization of electronic devices, users have more demands on the mobile internet, and file transmission is used as a practical function of the electronic devices to well meet the demands of the users, and the file transmission is becoming more and more common.
Nowadays, files of size above 100M and even GB are becoming more and more large, such as design manuscripts, software development kits, video materials, etc., and the need for users to send large files is becoming more and more common due to business needs.
However, in the related art, when a user sends a relatively large file, the file transmission efficiency is relatively low because the file is too large, and the file related to privacy security is easily transmitted to the other party, so that efficient and safe transmission of the file cannot be realized, and the use experience of the user is affected.
Disclosure of Invention
The embodiment of the application aims to provide a file transmission method, a file transmission device and file transmission equipment, and the problem that high-efficiency safe transmission of files cannot be achieved can be solved.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides a file transmission method, where the method includes:
acquiring a target file; under the condition that the storage space occupied by the target file is larger than a first preset threshold value, the target file is split to obtain at least two first subfiles; the storage space occupied by the first subfile is not greater than a first preset threshold; extracting content features of at least two first subfiles; determining a target first subfile with content characteristics meeting preset safety conditions from the at least two first subfiles; the target first subfile is transmitted to the recipient.
In some implementation manners of the first aspect, in a case that a storage space occupied by the target file is greater than a first preset threshold, splitting the target file to obtain at least two first subfiles includes: and splitting the target file according to a first preset threshold value to obtain N first subfiles, wherein N is a numerical value obtained by rounding up the quotient of the storage space occupied by the target file and the first preset threshold value, and N is an integer not less than 2.
In some implementation manners of the first aspect, the splitting the target file to obtain at least two first subfiles when a storage space occupied by the target file is greater than a first preset threshold includes: extracting semantic features corresponding to the file fragments; splitting the target file according to a mode of attributing the file fragments with the same semantic features to one subfile to obtain at least two first subfiles.
In some implementations of the first aspect, the first preset threshold is a maximum storage space occupied by a transmission file allowed by an application program that transmits the target file.
In some implementations of the first aspect, extracting content features of the at least two first subfiles includes: and under the condition that the residual operation memory capacity of the electronic equipment is larger than a second preset threshold value, extracting the content characteristics of at least two first subfiles in parallel.
In some implementations of the first aspect, in the presence of at least two target first subfiles, transmitting the target first subfile comprises: and under the condition that the remaining operation memory capacity of the electronic equipment is larger than a second preset threshold value or the network speed is larger than a preset speed threshold value, transmitting at least two target first subfiles in parallel.
In some implementations of the first aspect, the method further comprises: receiving a plurality of second subfiles, wherein the plurality of second subfiles are obtained from the same file; and combining the plurality of second subfiles to obtain a second file.
In some implementation manners of the first aspect, each second subfile corresponds to identification information, where the identification information is used to identify an appearance order of the second subfile in the second file, and the combining the plurality of second subfiles to obtain the second file includes: and sequentially combining the plurality of second subfiles according to the appearance sequence of each second subfile in the second file.
In a second aspect, an embodiment of the present application provides a file transfer apparatus, including:
the acquisition module is used for acquiring a target file; the splitting module is used for splitting the target file to obtain at least two first subfiles under the condition that the storage space occupied by the target file is larger than a first preset threshold value; the storage space occupied by the first subfile is not greater than a first preset threshold; the extraction module is used for extracting the content characteristics of the at least two first subfiles; the determining module is used for determining a target first subfile with content characteristics meeting preset safety conditions from the at least two first subfiles; and the transmission module is used for transmitting the target first subfile to the receiving party.
In some implementations of the second aspect, the splitting module is specifically configured to: and splitting the target file according to a first preset threshold value to obtain N first subfiles, wherein N is a numerical value obtained by rounding up the quotient of the storage space occupied by the target file and the first preset threshold value, and N is an integer not less than 2.
In some implementations of the second aspect, the target file includes a plurality of file fragments, and the splitting module is specifically configured to: extracting semantic features corresponding to the file fragments; splitting the target file according to a mode of attributing file fragments with the same semantic features to one subfile to obtain at least two first subfiles, wherein each first subfile corresponds to one semantic feature.
In some implementations of the second aspect, the first preset threshold is a maximum storage space occupied by the transmission file allowed by the application program for transmitting the target file.
In some implementations of the second aspect, the extraction module is specifically configured to: and under the condition that the residual operation memory capacity of the electronic equipment is larger than a second preset threshold value, extracting the content characteristics of at least two first subfiles in parallel.
In some implementations of the second aspect, the transmission module is specifically configured to: and under the condition that the remaining operation memory capacity of the electronic equipment is larger than a second preset threshold value or the network speed is larger than a preset speed threshold value, transmitting at least two target first subfiles in parallel.
In some implementations of the second aspect, the apparatus further comprises: the receiving module is used for receiving a plurality of second subfiles, and the second subfiles are obtained from the same file; and the merging module is used for merging the plurality of second subfiles to obtain a second file.
In some implementation manners of the second aspect, each second subfile corresponds to identification information, the identification information is used to identify an appearance order of the second subfile in the second file, and the merging module is specifically configured to: and sequentially combining the plurality of second subfiles according to the appearance sequence of each second subfile in the second file.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, where the program or instructions, when executed by the processor, implement the steps of the file transfer method as in the first aspect or some realizations of the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium on which a program or instructions are stored, which when executed by a processor, implement the steps of the file transfer method as in the first aspect or some realizations of the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the file transfer method according to the first aspect or some implementations of the first aspect.
In the embodiment of the application, when the target file is obtained, the electronic device can automatically split the target file when the storage space occupied by the target file is larger than a preset threshold, that is, the target file is a large file, so that at least two subfiles occupying storage spaces smaller than or equal to the preset threshold are obtained, and thus, the large file can be successfully split into at least two small files. On the basis, the content characteristics of all the subfiles are extracted, the target subfiles with the content characteristics meeting preset safety conditions, namely the subfiles meeting the requirements of user privacy safety, are determined from all the subfiles, and the target subfiles are transmitted to a receiver of the files. Therefore, the user does not need to split manually, and can split and send the large file while meeting the requirement of user privacy safety, so that high-efficiency safe transmission of the file is realized, and the user experience is improved.
Drawings
Fig. 1 is a schematic diagram of a file transmission method in the related art according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a file transmission method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a file transfer interface provided in an embodiment of the present application;
fig. 4 is a schematic diagram of a file splitting method provided in an embodiment of the present application;
FIG. 5 is a schematic diagram of another file transfer interface provided by an embodiment of the present application;
FIG. 6 is a schematic diagram of yet another file transfer interface provided by an embodiment of the present application;
FIG. 7 is a schematic flowchart of another file transfer method according to an embodiment of the present application;
FIG. 8 is a flowchart illustrating a further file transmission method according to an embodiment of the present application;
FIG. 9 is a schematic structural diagram of a document transportation device according to an embodiment of the present disclosure;
fig. 10 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present application;
fig. 11 is a hardware configuration diagram of another electronic device implementing the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
As background art, with the rapid development of mobile internet and the continuous popularization of electronic devices, users have more demands on mobile internet, and file transmission, which is a practical function of electronic devices, well meets the user demands and is becoming more and more popular.
Nowadays, files of size above 100M and even GB are becoming more and more large, such as design manuscripts, software development kits, video materials, etc., and the need for users to send large files is becoming more and more common due to business needs.
At present, when a user sends a relatively large file, the related art mainly includes two schemes:
according to the manual segmentation scheme, when a user sends a large file, the user is generally required to manually segment the large file into a plurality of small files and then send the small files one by one, so that the file transmission efficiency is low, the files related to privacy safety are easily transmitted to the other side, high-efficiency safe transmission of the files cannot be achieved, and the use experience of the user is influenced.
In the relay transmission scheme, when a user sends a relatively large file, the file is usually sent or uploaded to a relay application program directly, and then the relay application program sends the file to a target object. As shown in fig. 1, when the file sender M1 wants to send a file a (250M), a file B (300M), and a file C (250M) to the file receiver M2, it needs to upload three files to the relay application N by "relay sending", and then N is used as a file relay, and the file receiver M2 downloads the file a, the file B, and the file C from the relay application N by "relay downloading", so as to complete the transmission of the three files. However, because the transit application usually has a problem of security risk or usage limitation, it often results in that a large file is difficult to successfully transmit, so that efficient and secure transmission of the file cannot be achieved, and the user experience is affected.
In view of the problems in the related art, an embodiment of the present application provides a file transmission method, where when a target file is obtained, an electronic device can automatically split the target file when a storage space occupied by the target file is greater than a preset threshold, that is, the target file is a large file, so as to obtain at least two subfiles whose occupied storage space is less than or equal to the preset threshold, and thus, the large file can be successfully split into at least two small files. On the basis, the content characteristics of all the subfiles are extracted, the target subfiles with the content characteristics meeting preset safety conditions, namely the subfiles meeting the requirements of user privacy safety, are determined from all the subfiles, and the target subfiles are transmitted to a receiver of the files. Therefore, the user can split and send the large file while meeting the requirement of user privacy safety without manual splitting, so that high-efficiency safe transmission of the file is realized, and the problem that high-efficiency safe transmission of the file cannot be realized in the related technology is solved.
The following describes the file transmission method provided by the embodiment of the present application in detail through specific embodiments and application scenarios thereof with reference to the accompanying drawings.
Fig. 2 is a schematic flowchart of a file transfer method provided in an embodiment of the present application, where an execution main body of the file transfer method may be an electronic device, and as shown in fig. 2, the file transfer method provided in the embodiment of the present application may include:
s201, acquiring a target file.
In one embodiment, the target file may comprise various types of files, such as text, multimedia, and so on.
Such as images, sound, data compression files, software development kits, video material, etc.
In one embodiment, obtaining the target file may include: firstly, receiving file sending input of a user; then, in response to a file transmission input, a target file is acquired.
For example, if the user wants to send file a to the file recipient M2, the user may click "file send" as shown in fig. 3. In this way, the electronic device can receive a file transmission input from the user, and in response to the input, acquire the file a, i.e., the target file.
S202, under the condition that the storage space occupied by the target file is larger than a first preset threshold value, the target file is split, and at least two first subfiles are obtained.
And the storage space occupied by the first subfile is not greater than a first preset threshold value.
In one embodiment, the first preset threshold may be a maximum storage space occupied by a transmission file allowed by an application program transmitting the target file.
For example, when a file sender wants to transmit a target file through an APP1 on an electronic device, and the maximum storage space occupied by the transmission file allowed by the APP1 is 100M, 100M may be used as a first preset threshold.
Specifically, the electronic device determines whether the storage space occupied by the target file is greater than a first preset threshold, and splits the target file to obtain at least two first subfiles when the storage space occupied by the target file is greater than the first preset threshold, that is, the size of the target file exceeds the maximum value of the storage space occupied by the transmission file allowed by the application program for transmitting the target file.
It should be noted that the first preset threshold may also be set according to specific requirements, and the first preset threshold may be the same as or smaller than a maximum value of a storage space occupied by a transmission file allowed by an application program that transmits a target file.
In an embodiment, splitting the target file to obtain at least two first subfiles when the storage space occupied by the target file is greater than a first preset threshold may include: and splitting the target file according to a first preset threshold value to obtain N first subfiles, wherein N is a numerical value obtained by rounding up the quotient of the storage space occupied by the target file and the first preset threshold value, and N is an integer not less than 2.
For example, the first preset threshold is 100M, the file a is a target file, and the storage space occupied by the file a is 250M. After the electronic device acquires the file a, it is first determined that the storage space occupied by the file a is greater than 100M, then the file a is split according to 100M, and the file a is split into N sub-files, where N is a numerical value obtained by rounding up a quotient of the storage space 250M occupied by the file a and a first preset threshold 100M, that is, 3. As shown in fig. 4, the electronic device splits a file a occupying a storage space of 250M into three subfiles a1, a2 and A3, the three subfiles occupying storage spaces of 100M, 100M and 50M, respectively.
In an embodiment, the splitting the target file to obtain at least two first subfiles may include: extracting semantic features corresponding to the file fragments; splitting the target file according to a mode of attributing file fragments with the same semantic features to one subfile to obtain at least two first subfiles, wherein each first subfile corresponds to one semantic feature.
For example, the first preset threshold is 100M, the file a is a target file, the file a includes four file fragments P1, P2, P3 and P4, and the storage space occupied by the file a is 250M. After the electronic device acquires the file A, firstly determining that the occupied storage space of the file A is larger than 100M, then extracting the semantic features of each file segment to obtain semantic features Y1 and Y2 corresponding to P1, Y3 corresponding to P3 and Y1 corresponding to P4, wherein the semantic features Y1 and P2 correspond to the semantic features. Finally, the file A is divided into three subfiles A1, A2 and A3 according to the mode of attributing the file segments with the same semantic features to one subfile, wherein A1 comprises file segments P1 and P4, A2 comprises file segment P2, and A3 comprises file segment P3.
Therefore, the electronic equipment can split the target file into the plurality of small files under the condition that the storage space occupied by the target file is determined to be large, namely the target file is the large file, so that the electronic equipment can send the small files successfully subsequently, the user does not need to split the small files manually, the operation steps of the user when sending the files are reduced, the automatic splitting of the large files is realized, and the use experience of the user is improved.
S203, extracting the content characteristics of at least two first subfiles.
Specifically, after the splitting of the target file is completed, the electronic device extracts content features of each first subfile, wherein each first subfile corresponds to at least one content feature.
In an embodiment, the content feature may be information obtained by summarizing the file content of the first subfile, may also be a keyword corresponding to the file content of the first subfile, and may also be a category to which the file content of the first subfile belongs.
In one embodiment, when the electronic device extracts the content features of the first subfile, the parallel extraction mode may be selected according to a current memory operation condition of the electronic device.
In one embodiment, extracting the content features of the at least two first subfiles may include: and under the condition that the residual operation memory capacity of the electronic equipment is larger than a second preset threshold value, extracting the content characteristics of at least two first subfiles in parallel.
For example, the second preset threshold is 3M, the electronic device splits the file a occupying the storage space of 250M into three subfiles a1, a2 and A3, where the three subfiles occupy storage spaces of 100M, 100M and 50M, respectively. If the remaining operating memory capacity of the electronic device is 4M, the content features of the three subfiles a1, a2 and A3 can be extracted in parallel.
Therefore, the electronic equipment can improve the extraction efficiency of the content features, and the transmission efficiency of the target file is improved.
S204, determining a target first subfile with content characteristics meeting preset safety conditions from the at least two first subfiles.
Specifically, each first subfile corresponds to at least one content characteristic, and the electronic device determines whether each subfile meets the privacy security requirement by checking whether the content characteristic corresponding to each subfile meets a preset security condition.
It should be noted that the preset security condition is related to privacy security, and may be set according to specific requirements.
For example, if the preset security condition is that the client list of the enterprise is not included, the electronic device may check whether the content characteristics corresponding to each subfile are related to the client name of the enterprise, and filter out a first subfile whose content characteristics are related to the client name of the enterprise, to obtain a first subfile that satisfies the preset condition, i.e., a target subfile.
In an embodiment, when the electronic device checks whether the content feature corresponding to each first subfile meets a preset security condition, the electronic device may determine the number of parallel checking tasks that may be currently allowed according to a current memory operation condition of the electronic device.
For example, the electronic device splits a file a occupying a storage space of 250M in three subfiles a1, a2 and A3, the three subfiles occupying storage spaces of 100M, 100M and 50M, respectively. If the remaining operating memory capacity of the electronic device is 3M at this time, and the number of parallel check tasks that can be currently allowed is 2, the electronic device may check whether the content features of a1 and a2 meet the preset safety conditions in parallel, and then check A3; if the remaining operating memory capacity of the electronic device is 1M at this time, and the number of parallel checking tasks that can be currently allowed is 1, the electronic device serially checks whether the content features of a1, a2, and A3 satisfy the preset safety condition in sequence.
In one embodiment, after determining a target first subfile with content characteristics satisfying a preset security condition from among the at least two first subfiles, the method may further include: a target interface is displayed that includes a target first subfile.
For example, after determining that the first subfiles a1, a2 and A3 all satisfy the preset security condition, the electronic device determines that a1, a2 and A3 all are target first subfiles, and displays a target interface including "privacy compliance" of the files a1, a2 and A3 as shown in fig. 5.
For another example, after determining that the first subfiles a1 and a2 satisfy the preset security condition and that A3 does not satisfy the preset security condition, the electronic device determines that a1 and a2 are the target first subfile, and displays a target interface including files a1 and a2 of "privacy compliance" and files A3 of "privacy non-compliance" as shown in fig. 6.
Therefore, the electronic equipment can determine the number of parallel checking tasks which can be allowed currently according to the current memory running condition of the electronic equipment, and whether the content features corresponding to the subfiles meet the preset safety conditions or not is checked in parallel under the condition that the remaining running memory capacity of the electronic equipment is sufficient, so that the checking efficiency of the content features is improved, and the transmission efficiency of the target file is improved.
S205, transmitting the target first subfile to the receiving party.
In one embodiment, in the presence of at least two target first subfiles, the electronic device transmits the target first subfiles in sequence.
For example, the target first subfile is a1, a2, A3, and the electronic device sequentially transmits a1, a2, A3.
In one embodiment, when the electronic device transmits the target first subfile, the parallel transmission mode may be selected according to a current memory operation condition or a network rate of the electronic device.
In one embodiment, in the case where there are at least two target first subfiles, transmitting the target first subfile may include: and under the condition that the remaining operation memory capacity of the electronic equipment is larger than a second preset threshold value or the network speed is larger than a preset speed threshold value, transmitting at least two target first subfiles in parallel.
For example, the preset rate threshold is 3Mbps, and the target first subfiles are a1, a2, A3. If the network rate of the electronic device is 4Mbps, the three subfiles a1, a2 and A3 may be transmitted in parallel.
In another embodiment, when the electronic device transmits the target first subfile, the electronic device may determine the number of parallel transmission tasks that may be currently allowed according to the current memory operation condition or the network rate of the electronic device.
For example, the number of parallel transmission tasks corresponding to the network rate in the interval of 3Mbps-6Mbps is 2, and the target first subfiles are A1, A2 and A3. If the network rate of the electronic device is 4Mbps, a1 and a2 may be transmitted in parallel, and A3 may be transmitted finally.
According to the file transmission method provided by the embodiment of the application, when the target file is obtained, the electronic device can automatically split the target file under the condition that the storage space occupied by the target file is larger than the preset threshold value, namely the target file is a large file, so that at least two sub-files occupying the storage space smaller than or equal to the preset threshold value are obtained, and thus the large file can be successfully split into at least two small files. On the basis, the content characteristics of all the subfiles are extracted, the target subfiles with the content characteristics meeting preset safety conditions, namely the subfiles meeting the requirements of user privacy safety, are determined from all the subfiles, and the target subfiles are transmitted to a receiver of the files. Therefore, the user can split and send the large file while meeting the requirement of user privacy safety without manual splitting, so that high-efficiency safe transmission of the file is realized, and the problem that high-efficiency safe transmission of the file cannot be realized in the related technology is solved.
As a specific embodiment, fig. 7 is a schematic flowchart of another file transmission method provided in the embodiment of the present application, where an execution main body of the file transmission method may be an electronic device, as shown in fig. 7, the file transmission method provided in the embodiment of the present application may include:
s701, acquiring a target file.
S702, determining whether the storage space occupied by the target file is larger than the maximum value of the storage space occupied by the transmission file allowed by the application program for transmitting the target file, and if not, executing S703-S706; if so, S707-S710 are executed.
S703, extracting the content characteristics of the target file.
S704, determining whether the content characteristics of the target file meet preset safety conditions, if so, executing S705, and if not, executing S706.
S705, transmitting the target file to the receiving party.
S706, canceling the transmission.
S707, splitting the target file to obtain a plurality of subfiles.
S708, extracting the content characteristics of the plurality of subfiles in parallel.
S709, determine a target subfile whose content characteristics satisfy a preset security condition from the plurality of subfiles.
And S710, transmitting the target subfiles to the receiver in parallel.
Therefore, the electronic equipment can select a corresponding file processing mode according to the size of the storage space occupied by the target file, and automatically split the target file to obtain a plurality of smaller subfiles under the condition that the storage space occupied by the target file is larger than the maximum value of the storage space occupied by the transmission file allowed by the application program for transmitting the target file, so that the smooth transmission of the target file is ensured.
In some embodiments of the present application, in order to obtain a large file according to a plurality of small files sent by an electronic device, fig. 8 is a flowchart illustrating another file transmission method provided in an embodiment of the present application, where an execution subject of the file transmission method may be the electronic device, as shown in fig. 8, the file transmission method provided in an embodiment of the present application may include:
s801, receiving a plurality of second subfiles.
Wherein the plurality of second subfiles are derived from the same file.
S802, combining the plurality of second subfiles to obtain a second file.
In an embodiment, each second subfile corresponds to identification information, where the identification information is used to identify an appearance order of the second subfile in the second file, and combining the plurality of second subfiles to obtain the second file may include: and sequentially combining the plurality of second subfiles according to the appearance sequence of each second subfile in the second file.
For example, the files B1, B2, B3 and B4 are four second subfiles received by the electronic device, the corresponding identification information is n1, n3, n2 and n4 respectively, and the appearance sequence of B1, B2, B3 and B4 in the second file is first, third, second and fourth respectively. Therefore, the electronic device merges the files B1, B3, B2, and B4 in order of appearance of the four second subfiles, and finally obtains the second file B.
In one embodiment, when the electronic device merges the plurality of second subfiles, a parallel merging mode may be selected according to a current memory operating condition or a network rate of the electronic device.
In one embodiment, merging the plurality of second subfiles to obtain the second file may include: and under the condition that the residual operation memory capacity of the electronic equipment is larger than a second preset threshold value or the network speed is larger than a preset speed threshold value, combining the plurality of first subfiles in parallel.
For example, the files B1, B2, B3 and B4 are four second subfiles received by the electronic device, the appearance sequence of the four second subfiles in the second file is respectively the first, second, third and fourth, and the second preset threshold is 4M. If the remaining operating memory capacity of the electronic device is 5M, the electronic device may merge the files B3 and B4 while merging the files B1 and B2 to obtain two merged files, and finally merge the two merged files to obtain the second file B.
Therefore, after the electronic equipment receives the plurality of small files, the small files can be combined in sequence according to the appearance sequence of each small file in the large file, and the large file can be acquired smoothly on the premise that the file content of the large file is not damaged.
In the related technology, when a user posts comments through some websites, application programs and other channels, the number of words of the comments is usually limited, so that the user can only post the comments for multiple times or reduce the number of words of the comments manually, and thus, the use experience of the user is poor.
In some embodiments of the present application, in order to improve the experience of a user, an embodiment of the present application further provides a comment sending method, where an execution subject of the comment sending method may be an electronic device, and the method may include: firstly, obtaining a target comment; then, under the condition that the number of words of the target comment is larger than a second preset threshold value, splitting the target comment to obtain at least two sub comments, wherein the number of words of each sub comment is not larger than the second preset threshold value; and finally, sequentially sending at least two sub-comments.
It should be noted that the second preset threshold may be a maximum number of comment words allowed by a website or an application that sends a comment, or may be set according to a specific requirement.
In one embodiment, the target comment includes a plurality of comment segments, and splitting the target comment to obtain at least two sub comments when the number of words of the target comment is greater than a second preset threshold value may include: extracting semantic features corresponding to the comment fragments; and splitting the target comment to obtain at least two sub-comments according to a mode of attributing the comment fragments with the same semantic features to one sub-comment.
As a specific example, the first preset threshold is 100, the number of the target comment words is 103, and the target comment includes four comment fragments p1, p2, p3 and p 4. After the electronic equipment acquires the target comment, firstly, the number of words of the target comment is determined to be more than 100, then, the semantic features of each comment fragment are extracted, and the semantic features y1 corresponding to p1, y2 corresponding to p2, y3 corresponding to p3 and y1 corresponding to p4 are obtained. Finally, the target comment is divided into three sub-comments a1, a2 and a3 in a manner that the comment segments with the same semantic features are attributed to one sub-comment, wherein the number of words of the three sub-comments is less than 100, the a1 comprises comment segments p1 and p4, the a2 comprises a comment segment p2, and the a3 comprises a comment segment p 3.
In this way, when the target comment is acquired, the electronic device can automatically split the target comment under the condition that the word number of the target comment is greater than the preset threshold value, so that at least two sub comments with the word number less than or equal to the preset threshold value are obtained. On the basis, the electronic equipment can send the sub-comments in sequence. Therefore, even if the comment word number of the user exceeds the range, the user does not need to manually send comments for multiple times or reduce the comment word number, and the experience of the user is effectively improved.
In the related art, before sending a photo, a user generally needs to process a part of the photo related to user privacy, for example, the user mosaics a part of an image related to own privacy and then sends the processed picture to another party. Therefore, the steps of sending the photos by the user are complicated, and the experience of the user is poor.
In some embodiments of the present application, in order to further improve the experience of a user, an embodiment of the present application further provides an image sending method, where an execution subject of the image sending method may be an electronic device, and the method may include: step 1, acquiring a target image; step 2, carrying out image segmentation on the target image to obtain at least two sub-images; step 3, carrying out image recognition on at least two sub-images to obtain a recognition feature corresponding to each sub-image; step 4, determining a first sub-image with identification characteristics meeting the preset privacy safety condition and a second sub-image with identification characteristics not meeting the preset privacy safety condition from at least two sub-images; step 5, blurring the first sub-image to obtain a blurred image; step 6, synthesizing the second sub-image and the blurred image to obtain a synthesized image; and 7, sending the composite image to a receiving party.
It should be noted that the preset privacy security condition may be set according to specific requirements, for example, the preset privacy security condition may be that the image does not include the identity information of the user, an indoor scene, and the like.
As a specific embodiment, the preset privacy security condition is that the image does not contain the identity information of the user, and after the electronic device acquires the target image X, the electronic device performs image segmentation on the target image X to obtain sub-images X1, X2, and X3; then, the electronic equipment respectively carries out image recognition on the three sub-images to obtain the recognition feature 'person' of X1, the recognition feature 'ticket' of X2 and the recognition feature 'scenery' of X3; the electronic equipment determines that the identification feature 'ticket' of the sub-image X2 contains the identity information of the user and does not meet the preset privacy security conditions, so that the X2 is subjected to fuzzy processing to obtain a fuzzy image, the fuzzy image is combined with the X1 and the X3, and the combined image is sent to a receiver.
In this way, when the target image is acquired, the electronic device can automatically process the target image and fuzzify the image part which does not meet the user privacy security. Therefore, the user can successfully send the image meeting the privacy safety of the user without manually carrying out image processing operation, the step of sending the photo by the user is simplified, and the user experience is effectively improved.
It should be noted that the electronic device in the embodiment of the present application may include at least one of the following: the mobile phone, the tablet personal computer, the intelligent wearable device and the like have the functions of receiving information and displaying information.
It should be noted that, in the file transmission method provided in the embodiment of the present application, the execution main body may be an electronic device, and may also be a file transmission apparatus or a module in the file transmission apparatus for executing the file transmission method.
Based on the file transmission method provided by the embodiment of the application, the embodiment of the application also provides a file transmission device. The document transfer apparatus will be described in detail below.
Fig. 9 is a schematic structural diagram of a document transportation device provided in the present application.
As shown in fig. 9, a document transmission apparatus 900 according to an embodiment of the present application may include: an acquisition module 901, a splitting module 902, an extraction module 903, a determination module 904, and a transmission module 905.
An obtaining module 901, configured to obtain a target file; the splitting module 902 is configured to split the target file to obtain at least two first subfiles when a storage space occupied by the target file is greater than a first preset threshold; the storage space occupied by the first subfile is not greater than a first preset threshold; an extracting module 903, configured to extract content features of at least two first subfiles; a determining module 904, configured to determine, from the at least two first subfiles, a target first subfile whose content features meet a preset security condition; a transmitting module 905 is configured to transmit the target first subfile to the recipient.
In some embodiments, the splitting module 902 is specifically configured to: and splitting the target file according to a first preset threshold value to obtain N first subfiles, wherein N is a numerical value obtained by rounding up the quotient of the storage space occupied by the target file and the first preset threshold value, and N is an integer not less than 2.
In some embodiments, the target file includes a plurality of file fragments, and the splitting module 902 is specifically configured to: extracting semantic features corresponding to the file fragments; splitting the target file according to a mode of attributing the file fragments with the same semantic features to one subfile to obtain at least two first subfiles.
In some embodiments, the first preset threshold is a maximum storage space occupied by the transmission file allowed by the application program for transmitting the target file.
In some embodiments, the extraction module 903 is specifically configured to: and under the condition that the residual operation memory capacity of the electronic equipment is larger than a second preset threshold value, extracting the content characteristics of at least two first subfiles in parallel.
In some embodiments, the transmission module 905 is specifically configured to: and under the condition that the remaining operation memory capacity of the electronic equipment is larger than a second preset threshold value or the network speed is larger than a preset speed threshold value, transmitting at least two target first subfiles in parallel.
In some embodiments, the apparatus further comprises: a receiving module 906, configured to receive a plurality of second subfiles, where the plurality of second subfiles are obtained from the same file; a merging module 907, configured to merge the plurality of second subfiles to obtain a second file.
In some embodiments, each second subfile corresponds to identification information, where the identification information is used to identify an appearance order of the second subfile in the second file, and the merging module 907 is specifically configured to: and sequentially combining the plurality of second subfiles according to the appearance sequence of each second subfile in the second file.
According to the file transmission device provided by the embodiment of the application, when the target file is obtained, the electronic equipment can automatically split the target file when the storage space occupied by the target file is larger than the preset threshold value, namely, the target file is a large file, so that at least two sub-files occupying the storage space smaller than or equal to the preset threshold value are obtained, and thus the large file can be successfully split into at least two small files. On the basis, the content characteristics of all the subfiles are extracted, the target subfiles with the content characteristics meeting preset safety conditions, namely the subfiles meeting the requirements of user privacy safety, are determined from all the subfiles, and the target subfiles are transmitted to a receiver of the files. Therefore, the user can split and send the large file while meeting the requirement of user privacy safety without manual splitting, so that high-efficiency safe transmission of the file is realized, and the problem that high-efficiency safe transmission of the file cannot be realized in the related technology is solved.
The file transmission apparatus provided in the embodiment of the present application can implement each process implemented by the electronic device in the method embodiments of fig. 2, fig. 7, or fig. 8, and is not described herein again to avoid repetition.
The file transmission device in the embodiment of the present application may be a device, and may also be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The file transfer device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
Optionally, as shown in fig. 10, an electronic device 1000 is further provided in this embodiment of the present application, and includes a processor 1001, a memory 1002, and a program or an instruction stored in the memory 1002 and executable on the processor 1001, where the program or the instruction is executed by the processor 1001 to implement each process of the file transmission method embodiment, and can achieve the same technical effect, and no further description is provided here to avoid repetition.
It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and the non-mobile electronic devices described above.
Fig. 11 is a schematic hardware structure diagram of another electronic device for implementing the embodiment of the present application.
The electronic device 1100 includes, but is not limited to: a radio frequency unit 1101, a network module 1102, an audio output unit 1103, an input unit 1104, a sensor 1105, a display unit 1106, a user input unit 1107, an interface unit 1108, a memory 1109, a processor 1110, and the like.
The processor 1110 is configured to determine, from the at least two first subfiles, a target first subfile whose content characteristics satisfy a preset security condition.
Those skilled in the art will appreciate that the electronic device 1100 may further include a power source (e.g., a battery) for supplying power to the various components, and the power source may be logically connected to the processor 1110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system. The electronic device structure shown in fig. 11 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is not repeated here.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the file transmission method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device in the above embodiment. Readable storage media, including computer-readable storage media, such as Read-Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, etc.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to execute a program or an instruction to implement each process of the above-mentioned file transmission method embodiment, and can achieve the same technical effect, and in order to avoid repetition, the description is omitted here.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
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 an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A method for file transfer, comprising:
acquiring a target file;
under the condition that the storage space occupied by the target file is larger than a first preset threshold value, the target file is split to obtain at least two first subfiles; the storage space occupied by the first subfile is not greater than the first preset threshold;
extracting content features of the at least two first subfiles;
determining a target first subfile with content characteristics meeting preset safety conditions from the at least two first subfiles;
transmitting the target first subfile to a recipient.
2. The method according to claim 1, wherein splitting the target file to obtain at least two first subfiles if the storage space occupied by the target file is greater than a first preset threshold comprises:
and splitting the target file according to the first preset threshold to obtain N first subfiles, wherein N is a numerical value obtained by rounding up a quotient of the storage space occupied by the target file and the first preset threshold, and N is an integer not less than 2.
3. The method according to claim 1, wherein the target file includes a plurality of file fragments, and the splitting the target file to obtain at least two first subfiles if the storage space occupied by the target file is greater than a first preset threshold includes:
extracting semantic features corresponding to the file fragments;
and splitting the target file according to a mode of attributing the file fragments with the same semantic features to one subfile to obtain at least two first subfiles.
4. The method according to claim 1, wherein the first predetermined threshold is a maximum storage space occupied by a transmission file allowed by an application program transmitting the target file.
5. The method according to any one of claims 1-4, further comprising:
receiving a plurality of second subfiles, wherein the plurality of second subfiles are obtained from the same file;
and combining the plurality of second subfiles to obtain a second file.
6. A file transfer apparatus, comprising:
the acquisition module is used for acquiring a target file;
the splitting module is used for splitting the target file to obtain at least two first subfiles under the condition that the storage space occupied by the target file is larger than a first preset threshold value; the storage space occupied by the first subfile is not greater than the first preset threshold;
the extraction module is used for extracting the content characteristics of the at least two first subfiles;
the determining module is used for determining a target first subfile with content characteristics meeting preset safety conditions from the at least two first subfiles;
and the transmission module is used for transmitting the target first subfile to a receiver.
7. The apparatus of claim 6, wherein the splitting module is specifically configured to:
and splitting the target file according to the first preset threshold to obtain N first subfiles, wherein N is a numerical value obtained by rounding up a quotient of the storage space occupied by the target file and the first preset threshold, and N is an integer not less than 2.
8. The apparatus of claim 6, wherein the target file comprises a plurality of file fragments:
the extraction module is specifically configured to: extracting semantic features corresponding to the file fragments;
the splitting module is specifically configured to: and splitting the target file according to a mode of attributing the file fragments with the same semantic features to one subfile to obtain at least two first subfiles.
9. The apparatus of claim 6, wherein the first predetermined threshold is a maximum storage space occupied by a transmission file allowed by an application program transmitting the target file.
10. An electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the file transfer method of any of claims 1-5.
CN202011174008.1A 2020-10-28 2020-10-28 File transmission method, device and equipment Pending CN112291341A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011174008.1A CN112291341A (en) 2020-10-28 2020-10-28 File transmission method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011174008.1A CN112291341A (en) 2020-10-28 2020-10-28 File transmission method, device and equipment

Publications (1)

Publication Number Publication Date
CN112291341A true CN112291341A (en) 2021-01-29

Family

ID=74373643

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011174008.1A Pending CN112291341A (en) 2020-10-28 2020-10-28 File transmission method, device and equipment

Country Status (1)

Country Link
CN (1) CN112291341A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113993164A (en) * 2021-10-29 2022-01-28 维沃移动通信有限公司 File transmission method and file transmission device
CN113986083A (en) * 2021-10-29 2022-01-28 维沃移动通信有限公司 File processing method and electronic equipment
CN115361374A (en) * 2022-07-26 2022-11-18 中电金信软件有限公司 File transmission method and device and electronic equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103997495A (en) * 2014-05-23 2014-08-20 中国人民解放军理工大学 Security isolation file transmission control method
CN105630855A (en) * 2015-04-24 2016-06-01 宇龙计算机通信科技(深圳)有限公司 File sharing method, file sharing system and terminal
CN107836083A (en) * 2015-05-21 2018-03-23 零点科技公司 Method, apparatus and system for semantic values data compression and decompression
CN107862214A (en) * 2017-06-16 2018-03-30 平安科技(深圳)有限公司 Prevent the method, apparatus and storage medium of sensitive information leakage
CN108833530A (en) * 2018-06-11 2018-11-16 联想(北京)有限公司 A kind of transmission method and device
CN109284631A (en) * 2018-10-26 2019-01-29 中国电子科技网络信息安全有限公司 A kind of document desensitization system and method based on big data
CN110266814A (en) * 2019-07-09 2019-09-20 联想(北京)有限公司 Transmission method and transmitting device
CN111327517A (en) * 2020-01-20 2020-06-23 深圳传音控股股份有限公司 Information sharing method, terminal and readable storage medium
CN111352751A (en) * 2020-03-04 2020-06-30 深圳乐信软件技术有限公司 Data file generation method and device, computer equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103997495A (en) * 2014-05-23 2014-08-20 中国人民解放军理工大学 Security isolation file transmission control method
CN105630855A (en) * 2015-04-24 2016-06-01 宇龙计算机通信科技(深圳)有限公司 File sharing method, file sharing system and terminal
CN107836083A (en) * 2015-05-21 2018-03-23 零点科技公司 Method, apparatus and system for semantic values data compression and decompression
CN107862214A (en) * 2017-06-16 2018-03-30 平安科技(深圳)有限公司 Prevent the method, apparatus and storage medium of sensitive information leakage
CN108833530A (en) * 2018-06-11 2018-11-16 联想(北京)有限公司 A kind of transmission method and device
CN109284631A (en) * 2018-10-26 2019-01-29 中国电子科技网络信息安全有限公司 A kind of document desensitization system and method based on big data
CN110266814A (en) * 2019-07-09 2019-09-20 联想(北京)有限公司 Transmission method and transmitting device
CN111327517A (en) * 2020-01-20 2020-06-23 深圳传音控股股份有限公司 Information sharing method, terminal and readable storage medium
CN111352751A (en) * 2020-03-04 2020-06-30 深圳乐信软件技术有限公司 Data file generation method and device, computer equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113993164A (en) * 2021-10-29 2022-01-28 维沃移动通信有限公司 File transmission method and file transmission device
CN113986083A (en) * 2021-10-29 2022-01-28 维沃移动通信有限公司 File processing method and electronic equipment
CN115361374A (en) * 2022-07-26 2022-11-18 中电金信软件有限公司 File transmission method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN112291341A (en) File transmission method, device and equipment
CN109408639B (en) Bullet screen classification method, bullet screen classification device, bullet screen classification equipment and storage medium
CN109670427B (en) Image information processing method and device and storage medium
CN102298533B (en) Method for activating application program and terminal equipment
US20180068197A1 (en) Apparatus and method for reproducing handwritten message by using handwriting data
CN108924662B (en) Continuous microphone interaction method, device, equipment and storage medium
EP2953055A1 (en) Two-dimensional code processing method and terminal
CN102984050A (en) Method, client and system for searching voices in instant messaging
CN103823858A (en) Information processing method and information processing device
CN112286887A (en) File sharing method and device and electronic equipment
CN110569127B (en) Virtual resource transferring, sending and obtaining method and device
US20210110214A1 (en) Selective image compression of an image stored on a device based on user preferences
CN104331515A (en) Method and system for generating travel journal automatically
CN110909241B (en) Information recommendation method, user identification recommendation method, device and equipment
CN109167939B (en) Automatic text collocation method and device and computer storage medium
CN102306167A (en) Recording method and system based on mobile handheld equipment
US20170171339A1 (en) Advertisement data transmission method, electrnoic device and system
US9906485B1 (en) Apparatus and method for coordinating live computer network events
CN113343895A (en) Target detection method, target detection device, storage medium, and electronic apparatus
CN113297453A (en) Network request response method and device, electronic equipment and storage medium
CN108573044A (en) A kind of photograph album processing method, device, terminal and storage medium
CN114221923B (en) Message processing method and device and electronic equipment
CN109960442B (en) Prompt information transmission method and device, storage medium and electronic device
CN107124353B (en) Message processing method and device, computer device and storage medium
CN112836127B (en) Method and device for recommending social users, storage medium and electronic equipment

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210129