CN108566328B - Data transmission method, device, medium and electronic equipment - Google Patents

Data transmission method, device, medium and electronic equipment Download PDF

Info

Publication number
CN108566328B
CN108566328B CN201810048591.8A CN201810048591A CN108566328B CN 108566328 B CN108566328 B CN 108566328B CN 201810048591 A CN201810048591 A CN 201810048591A CN 108566328 B CN108566328 B CN 108566328B
Authority
CN
China
Prior art keywords
file
video file
video
transmission
target file
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
CN201810048591.8A
Other languages
Chinese (zh)
Other versions
CN108566328A (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.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN201810048591.8A priority Critical patent/CN108566328B/en
Publication of CN108566328A publication Critical patent/CN108566328A/en
Priority to PCT/CN2018/111093 priority patent/WO2019140963A1/en
Priority to KR1020207023720A priority patent/KR102445154B1/en
Priority to AU2018403361A priority patent/AU2018403361B2/en
Application granted granted Critical
Publication of CN108566328B publication Critical patent/CN108566328B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/06Message adaptation to terminal or network requirements
    • H04L51/066Format adaptation, e.g. format conversion or compression
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/07User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
    • H04L51/10Multimedia information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/214Monitoring or handling of messages using selective forwarding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • H04L65/401Support for services or applications wherein the services involve a main real-time session and one or more additional parallel real-time or time sensitive sessions, e.g. white board sharing or spawning of a subconference
    • H04L65/4015Support for services or applications wherein the services involve a main real-time session and one or more additional parallel real-time or time sensitive sessions, e.g. white board sharing or spawning of a subconference where at least one of the additional parallel sessions is real time or time sensitive, e.g. white board sharing, collaboration or spawning of a subconference
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/70Media network packetisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/07User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
    • H04L51/18Commands or executable codes

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)
  • Holo Graphy (AREA)
  • Refuse Collection And Transfer (AREA)

Abstract

The embodiment of the invention provides a data transmission method, a device, a medium and electronic equipment, wherein the data transmission method is applied to an instant messaging client and comprises the following steps: acquiring a target file; if the size of the target file does not exceed a preset threshold value, transmitting the target file through a first transmission form; and if the size of the target file exceeds the preset threshold value, transmitting the target file through a second transmission form. The technical scheme of the embodiment of the invention solves the problem that the transmission cannot be realized due to the fact that the file is large in instant messaging, and meanwhile, a transmission form with short sending pre-processing time can be selected for the large file, so that the processing load of a terminal can be reduced, the performance of instant messaging software can be improved, and the use experience of a user can also be improved.

Description

Data transmission method, device, medium and electronic equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data transmission method, an apparatus, a medium, and an electronic device.
Background
With the popularization of instant messaging software, the frequency of file transmission by a user using the instant messaging software is higher and higher, but the user can suffer from various problems when transmitting files in the instant messaging software, for example, the video is too large to be transmitted, the processing time of a large video before transmission is longer, and the like, and the problems not only affect the experience of the user, but also increase the processing burden of a terminal and reduce the performance of the software.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present invention and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
Embodiments of the present invention provide a data transmission method, an apparatus, a medium, and an electronic device, so as to overcome, at least to a certain extent, the problems that a transmission scheme for instant messaging in the prior art cannot transmit a large file and user experience is low.
Additional features and advantages of the invention will be set forth in the detailed description which follows, or may be learned by practice of the invention.
According to a first aspect of the embodiments of the present invention, there is provided a data transmission method applied to an instant messaging client, the data transmission method including: acquiring a target file; if the size of the target file does not exceed a preset threshold value, transmitting the target file through a first transmission form; and if the size of the target file exceeds the preset threshold value, transmitting the target file through a second transmission form.
In some embodiments of the present invention, based on the foregoing solution, the target file includes a video file, and the transmitting the target file through the first transmission form includes: carrying out format conversion processing on the video file to obtain a multimedia file with a specified format which can be directly played in the instant messaging software; and transmitting the multimedia file with the specified format.
In some embodiments of the present invention, based on the foregoing scheme, before the size of the target file does not exceed the predetermined threshold and the target file is transmitted in the first transmission form, the method further includes: judging whether the video file can be subjected to format conversion processing or not; if the video file can be subjected to format conversion processing, transmitting the target file in the first transmission form; and if the video file cannot be subjected to format conversion processing, transmitting the target file through the second transmission form.
In some embodiments of the present invention, based on the foregoing solution, before transmitting the multimedia file in the specified format, the method further includes: and compressing the multimedia file with the specified format.
In some embodiments of the present invention, based on the foregoing scheme, the data transmission method further includes: generating a preview corresponding to the multimedia file with the specified format; and after the transmission of the multimedia file with the specified format is finished, displaying the preview image, and displaying a playing identifier on the preview image.
In some embodiments of the present invention, based on the foregoing solution, the target file includes a video file, and the transmitting the target file through the second transmission form includes: and directly transmitting the video file in a transmission file form.
In some embodiments of the present invention, based on the foregoing scheme, the data transmission method further includes: and after the transmission of the video file is completed, displaying the file identification and the information of the video file.
In some embodiments of the present invention, based on the foregoing solution, the target file includes a video file, and the data transmission method further includes: judging whether the playing time length of the video file exceeds a preset time length and/or judging whether the data volume of the video file exceeds a preset data volume; if the playing time length of the video file exceeds the preset time length and/or if the data volume of the video file exceeds the preset data volume, determining that the size of the target file exceeds the preset threshold value; and if the playing time length of the video file does not exceed the preset time length and/or if the data volume of the video file does not exceed the preset data volume, determining that the size of the target file does not exceed the preset threshold value.
According to a second aspect of the embodiments of the present invention, there is provided a data transmission apparatus applied to an instant messaging client, the data transmission apparatus including: an acquisition unit configured to acquire a target file; the first transmission unit is used for transmitting the target file through a first transmission form when the size of the target file does not exceed a preset threshold; and the second transmission unit is used for transmitting the target file through a second transmission form when the size of the target file exceeds the preset threshold value.
According to a third aspect of embodiments of the present invention, there is provided a computer-readable medium, on which a computer program is stored, which when executed by a processor, implements the data transmission method as described in the first aspect of the embodiments above.
According to a fourth aspect of embodiments of the present invention, there is provided an electronic apparatus, including: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the data transmission method as described in the first aspect of the embodiments above.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the technical solutions provided by some embodiments of the present invention, in the instant messaging, by acquiring a target file, and transmitting the target file through a first transmission form when the size of the target file does not exceed a predetermined threshold, and transmitting the target file through a second transmission form when the size of the target file exceeds the predetermined threshold, a file with any size can be transmitted in an instant messaging client, and a problem that the file cannot be transmitted due to a large file in the instant messaging is solved. Meanwhile, the technical scheme of the embodiment of the invention can select different transmission forms based on the size of the target file, so that the transmission form with shorter sending pre-processing time can be selected for a larger file, the processing load of the terminal can be further reduced, the performance of the instant messaging software is improved, and the use experience of a user can also be improved.
In the technical solutions provided in some embodiments of the present invention, when the target file is a video file and the target file is transmitted in the first transmission form, the format conversion processing is performed on the video file to obtain a multimedia file in a specified format that can be directly played in the instant messaging software, so that when the video file is small, the format conversion processing can be performed on the video file, and it is further ensured that the transmitted multimedia file can be directly played in the instant messaging software, and thus the use experience of a user can be improved on the premise of ensuring the processing efficiency.
In the technical solutions provided in some embodiments of the present invention, when it is determined that the format conversion processing cannot be performed on the video file, the target file is transmitted in the second transmission format, so that transmission of the video file in any format can be realized.
In the technical solutions provided in some embodiments of the present invention, when the target file is a video file and the target file is transmitted in the second transmission form, the video file is directly transmitted in the form of a transmission file, so that when the video file is large, the video file can be directly transmitted without processing the video file, thereby reducing the waiting time of a user, reducing the processing load of a terminal, improving the performance of software, and simultaneously transmitting the video file of any size.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
fig. 1 schematically shows a flow chart of a data transmission method according to an embodiment of the invention;
fig. 2 schematically shows a flow chart of a data transmission method according to another embodiment of the invention
FIG. 3 shows a schematic view of a display interface of a video file after transmission according to one embodiment of the invention;
FIG. 4 shows a schematic view of a display interface when a video file is selected according to one embodiment of the invention;
FIG. 5 shows a schematic view of a display interface of a video file after transmission according to another embodiment of the invention;
fig. 6 schematically shows a block diagram of a data transmission arrangement according to an embodiment of the invention;
FIG. 7 illustrates a schematic structural diagram of a computer system suitable for use with the electronic device to implement an embodiment of the invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to provide a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations or operations have not been shown or described in detail to avoid obscuring aspects of the invention.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
Fig. 1 schematically shows a flow chart of a data transmission method according to an embodiment of the present invention, the data transmission method is applied to instant messaging, such as may be applied to an instant messaging client.
Referring to fig. 1, a data transmission method according to an embodiment of the present invention includes the steps of:
step S110, a target file is acquired.
In one embodiment of the invention, a current file to be transmitted in the instant messaging software can be acquired. The instant messaging software is software for realizing online chatting and exchanging through an instant messaging technology. The target file transmitted in the instant messaging software can be a video file, an audio file, a picture, a document and the like.
Step S120, if the size of the target file does not exceed a preset threshold value, transmitting the target file through a first transmission form;
step S130, if the size of the target file exceeds the predetermined threshold, transmitting the target file through a second transmission form.
In an embodiment of the invention, the first form of transfer is used to transfer smaller target files and the second form of transfer is used to transfer larger target files. The cooperation of the first transmission form and the second transmission form can realize the transmission of files with any size in the instant messaging client, and the problem that the files cannot be transmitted due to the fact that the files are large is solved. Meanwhile, the technical scheme of the embodiment of the invention can select different transmission forms based on the size of the target file, so that the transmission form with shorter sending pre-processing time can be selected for a larger file, the processing load of the terminal can be further reduced, the performance of the instant messaging software is improved, and the use experience of a user can also be improved.
The implementation details of the technical scheme of the embodiment of the invention are elaborated below by taking the transmission of the video file in the instant messaging software as an example:
in an embodiment of the present invention, for a video file, whether the size of the video file exceeds a predetermined threshold may be determined by the following three embodiments:
embodiment 1 of determining whether the size of a video file exceeds a predetermined threshold:
in an embodiment of the present invention, it may be determined whether the playing time of the video file exceeds a predetermined time; if the playing time length of the video file exceeds the preset time length, determining that the size of the video file exceeds the preset threshold value; and if the playing time of the video file does not exceed the preset time, determining that the size of the video file does not exceed the preset threshold.
In this embodiment, whether the size of the video file exceeds the predetermined threshold may be determined by the play time length of the video file.
Embodiment 2 of determining whether the size of the video file exceeds a predetermined threshold:
in one embodiment of the present invention, it may be determined whether the data amount of the video file exceeds a predetermined data amount; if the data volume of the video file exceeds the preset data volume, determining that the size of the video file exceeds the preset threshold value; and if the data volume of the video file does not exceed the preset data volume, determining that the size of the video file does not exceed the preset threshold.
In this embodiment, whether the size of the video file exceeds the predetermined threshold may be determined by the data amount of the video file.
Example 3 of determining whether the size of the video file exceeds a predetermined threshold:
in an embodiment of the present invention, it may be determined whether the playing time of the video file exceeds a predetermined time, and whether the data volume of the video file exceeds a predetermined data volume; if the playing time of the video file exceeds the preset time and the data volume of the video file exceeds the preset data volume, determining that the size of the video file exceeds the preset threshold; and if the playing time length of the video file does not exceed the preset time length and the data volume of the video file does not exceed the preset data volume, determining that the size of the video file does not exceed the preset threshold value.
In this embodiment, whether the size of the video file exceeds the predetermined threshold may be determined by the data amount and the play time length of the video file.
The following details the transmission of a video file by a first transmission form and by a second transmission form, respectively:
transmitting a video file via a first transmission form:
in one embodiment of the invention, transmitting the video file via the first transmission form comprises: carrying out format conversion processing on the video file to obtain a multimedia file with a specified format which can be directly played in the instant messaging software; and transmitting the multimedia file with the specified format.
In the embodiment, the format conversion processing is performed on the video file to obtain the multimedia file with the specified format, which can be directly played in the instant messaging software, so that when the video file is small, the format conversion processing can be performed on the video file, and the transmitted multimedia file can be directly played in the instant messaging software, so that the use experience of a user can be improved on the premise of ensuring the processing efficiency.
In one embodiment of the present invention, the multimedia file of the specified format may be a video file of the specified format (e.g., a video file of MP4 format) or a dynamic picture. It should be noted that if the video file to be transmitted is in the above-mentioned specified format, the format conversion process may not be performed.
In an embodiment of the present invention, before transmitting the multimedia file with the specified format, the method further includes: and compressing the multimedia file with the specified format.
In the embodiment, the multimedia file in the specified format is compressed before being transmitted, so that the data volume of the multimedia file in the specified format during transmission can be reduced, and the transmission efficiency can be improved.
In one embodiment of the present invention, when transmitting the video file through the first transmission form, further includes: generating a preview image corresponding to the multimedia file with the specified format; and after the transmission of the multimedia file with the specified format is finished, displaying the preview image in the instant messaging software, and displaying a playing identifier on the preview image.
In the embodiment, after the transmission of the multimedia file with the specified format is completed, the preview image is displayed in the instant messaging software, and the playing identifier is displayed on the preview image, so that a user can very intuitively know that the multimedia file can be directly played according to the displayed preview image and the displayed playing identifier, and further operation of the user is facilitated.
In addition, in an embodiment of the present invention, if the size of the video file does not exceed the predetermined threshold, it may be determined whether the video file to be transmitted is capable of performing format conversion processing, and if the video file is capable of performing format conversion processing, the video file may be transmitted in the first transmission form; if the format conversion process is not possible, the video file may be transmitted via the second transmission form.
The technical scheme of the embodiment can realize the transmission of the video files with any format.
Transmitting the video file through a second transmission form:
in one embodiment of the invention, transmitting the video file via the second transmission form comprises: and directly transmitting the video file in a transmission file form.
In this embodiment, the video file is directly transmitted in the form of a transmission file, so that when the video file is large, the video file can be directly transmitted without processing the video file, thereby reducing the waiting time of a user, reducing the processing load of a terminal, improving the performance of software, and transmitting the video file with any size.
In one embodiment of the present invention, when transmitting the video file through the second transmission form, the method further includes: and after the transmission of the video file is completed, displaying the file identification and the information of the video file. For example, information of file identification and video file can be displayed in instant messaging software.
In the embodiment, after the transmission of the video file is completed, the file identifier and the information of the video file are displayed in the instant messaging software, so that a user can intuitively know the related information of the video file according to the displayed file identifier and the information of the video file, and further operation of the user is facilitated.
A specific application scenario of the data transmission scheme according to the embodiment of the present invention is described in detail below with reference to fig. 2 to 5:
in a specific Application scenario of the present invention, the data transmission scheme of the embodiment of the present invention may be applied to an instant messaging APP (Application, Application program) on a mobile phone, and a specific implementation flow is shown in fig. 2, and includes the following steps:
step S210, receiving a video to be transmitted selected by a user.
Step S220, determining whether the video duration is greater than 5min (the specific numerical value is only an example here), if so, executing step S250; otherwise, step S230 is performed.
In the embodiment of the present invention, it is also possible to determine whether to perform step S250 or step S230 by determining whether the data amount of the video is greater than a predetermined data amount. Specifically, when the data amount of the video is larger than a predetermined data amount (for example, 10MB), step S250 is performed; otherwise, step S230 is performed.
Step S230, determining whether the video format supports conversion, if yes, executing step S240; otherwise, step S250 is executed.
In one embodiment of the present invention, if the video duration size does not exceed 5min, but the video format does not support conversion, step S250 is performed to ensure that all formats of video can be transmitted.
And step S240, processing the video and transmitting.
In one embodiment of the invention, processing the video includes converting the video format and compressing the converted video.
In step S250, the file is directly transmitted without processing.
In summary, the following processing methods are mainly used in the embodiment of the present invention when sending a video:
1. when the video size is within a predetermined range and the video format supports conversion, format conversion and compression processing are directly performed on the video, and the video is transmitted. After the video is sent in this way, as shown at 302 in fig. 3, the video is displayed in the form of [ preview ] and [ play button ] in the interface of the instant messaging software.
2. When the size of the video selected by the user exceeds a predetermined range, a pop-up prompt informs the user that it will be sent in file form. Specifically, as shown in the prompt box 402 in fig. 4, when the user selects "continue" in the prompt box, the video is directly transmitted in the form of a file without being processed. As shown in 502 in fig. 5, after the video is sent in this way, the video is displayed in the form of [ file icon ] + [ file name ] + [ file size ] in the interface of the instant messaging software.
3. When the size of the video selected by the user is within a predetermined range but the video format does not support conversion, a pop-up prompt may also inform the user that it will be sent in file form. And if the user confirms the sending, the video is not processed and is directly sent in a file form. As shown in 502 in fig. 5, after the video is sent in this way, the video is displayed in the form of [ file icon ] + [ file name ] + [ file size ] in the interface of the instant messaging software.
It should be noted that, in the foregoing embodiment, the technical solution of the embodiment of the present invention is described in detail by taking sending video as an example, and the technical solution of the embodiment of the present invention is also applicable to transmitting other types of files, such as pictures, documents, audio, and the like, and the following brief descriptions are provided:
when the picture needs to be sent in the instant messaging software, if the data volume of the picture is large and/or the resolution is high, the picture can be sent in a file form, and the picture can be displayed in a form of (file icon) ] + (file name) ] + (file size) ] in an interface of the instant messaging software after the picture is sent; if the data size of the picture is small and/or the resolution is low, the picture may be subjected to format conversion processing (converted into a format capable of being directly displayed in the instant messaging software), compressed (in other embodiments of the present invention, the compression processing may not be performed), and then sent, and after sending, the picture may be displayed in the form of a preview image in the interface of the instant messaging software.
When the audio needs to be sent in the instant messaging software, if the data volume of the audio is large and/or the playing time is long, the audio can be sent in a file form, and the audio can be displayed in a form of (file icon) + (file name) + (file size) in an interface of the instant messaging software after being sent; if the data volume of the audio is small and/or the playing time is short, format conversion processing (conversion into a format capable of being directly played in the instant messaging software) can be performed on the audio, compression is performed (in other embodiments of the present invention, compression processing may not be performed), and then the audio is sent, and after the audio is sent, an identifier capable of being directly played can be displayed in an interface of the instant messaging software.
When a document needs to be sent in the instant messaging software, if the data volume of the document is large, the document can be compressed and then sent; if the data volume of the document is small, the document can be directly transmitted.
The following describes embodiments of the apparatus of the present invention, which can be used to implement the above-mentioned data transmission method of the present invention.
Fig. 6 schematically shows a block diagram of a data transmission apparatus applied to an instant messaging client according to an embodiment of the present invention.
Referring to fig. 6, a data transmission apparatus 600 according to an embodiment of the present invention includes: an acquisition unit 602, a first transmission unit 604 and a second transmission unit 606.
The obtaining unit 602 is configured to obtain a target file; the first transmission unit 604 is configured to transmit the target file through a first transmission form when the size of the target file does not exceed a predetermined threshold; the second transmission unit 606 is configured to transmit the target file through a second transmission form when the size of the target file exceeds the predetermined threshold.
In some embodiments of the present invention, based on the foregoing solution, the target file includes a video file, and the first transmission unit 604 is configured to: carrying out format conversion processing on the video file to obtain a multimedia file with a specified format which can be directly played in the instant messaging software; and transmitting the multimedia file with the specified format.
In some embodiments of the present invention, based on the foregoing solution, the data transmission apparatus 600 further includes: a first judgment unit configured to judge whether the video file can be subjected to format conversion processing when the size of the target file does not exceed the predetermined threshold; the first transmission unit 604 is configured to transmit the target file in the first transmission format when the first determination unit determines that the video file can be subjected to format conversion processing; the second transmission unit 606 is configured to transmit the target file in the second transmission format when the first determination unit determines that the video file cannot be subjected to format conversion processing.
In some embodiments of the present invention, based on the foregoing solution, the first transmission unit 604 is further configured to perform compression processing on the multimedia file in the specified format before transmitting the multimedia file in the specified format.
In some embodiments of the present invention, based on the foregoing solution, the data transmission apparatus 600 further includes: the generating unit is used for generating a preview image corresponding to the multimedia file with the specified format; and the first display unit is used for displaying the preview image after the transmission of the multimedia file with the specified format is finished, and displaying a playing identifier on the preview image.
In some embodiments of the present invention, based on the foregoing solution, the target file includes a video file, and the second transmission unit 606 is configured to: and directly transmitting the video file in a transmission file form.
In some embodiments of the present invention, based on the foregoing solution, the data transmission apparatus 600 further includes: and a second display unit, configured to display a file identifier and information of the video file after the second transmission unit 606 completes transmission of the video file.
In some embodiments of the present invention, based on the foregoing solution, the target file includes a video file, and the data transmission apparatus 600 further includes: the second judging unit is used for judging whether the playing time length of the video file exceeds a preset time length and/or judging whether the data volume of the video file exceeds a preset data volume; if the playing time length of the video file exceeds the preset time length and/or if the data volume of the video file exceeds the preset data volume, determining that the size of the target file exceeds the preset threshold value; and if the playing time length of the video file does not exceed the preset time length and/or if the data volume of the video file does not exceed the preset data volume, determining that the size of the target file does not exceed the preset threshold value.
For details that are not disclosed in the embodiments of the apparatus of the present invention, reference is made to the above-described embodiments of the data transmission method of the present invention for the functional modules of the data transmission apparatus of the exemplary embodiment of the present invention correspond to the steps of the above-described exemplary embodiment of the data transmission method.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use with the electronic device implementing an embodiment of the present invention. The computer system 700 of the electronic device shown in fig. 7 is only an example, and should not bring any limitation to the function and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for system operation are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the invention include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program executes the above-described functions defined in the system of the present application when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to implement the data transmission method as described in the above embodiments.
For example, the electronic device may implement the following as shown in fig. 1: step S110, acquiring a target file; step S120, if the size of the target file does not exceed a preset threshold value, transmitting the target file through a first transmission form; step S130, if the size of the target file exceeds the predetermined threshold, transmitting the target file through a second transmission form.
As another example, the electronic device may implement the steps shown in FIG. 2.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the invention. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiment of the present invention.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (5)

1. A data transmission method is applied to an instant messaging client, and is characterized by comprising the following steps:
acquiring a target file, wherein the target file comprises a video file;
if the playing time length of the video file does not exceed a preset time length and/or if the data volume of the video file does not exceed a preset data volume, determining that the size of the target file does not exceed a preset threshold value;
if the playing time length of the video file exceeds a preset time length and/or if the data volume of the video file exceeds a preset data volume, determining that the size of the target file exceeds the preset threshold value;
if the size of the target file does not exceed a preset threshold value, carrying out format conversion processing on the video file to obtain a multimedia file with a specified format which can be directly played in instant messaging software, and carrying out compression processing on the multimedia file with the specified format to transmit the multimedia file with the specified format;
after the transmission of the multimedia file with the specified format is finished, displaying the video file in the instant messaging software in the forms of a preview and a play button;
if the size of the target file exceeds the preset threshold value, popping up a prompt to inform that the target file is to be sent in a file form, and transmitting the target file in a second transmission form; wherein the transmitting the target file through the second transmission form comprises directly transmitting the video file through a transmission file form;
and after the target file is transmitted according to the second transmission form, displaying the video file in the instant messaging software in the forms of a file icon, a file name and a file size.
2. The data transmission method of claim 1, further comprising:
judging whether the video file can be subjected to format conversion processing or not;
if the video file can be subjected to format conversion processing, the video file is subjected to format conversion processing to obtain a multimedia file with a specified format, wherein the multimedia file can be directly played in instant messaging software, and the multimedia file with the specified format is compressed to transmit the multimedia file with the specified format;
and if the video file cannot be subjected to format conversion processing, transmitting the target file through the second transmission form.
3. A data transmission device is applied to an instant messaging client, and is characterized by comprising:
the device comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring a target file, and the target file comprises a video file;
the first judging unit is used for determining that the size of the target file does not exceed a preset threshold value if the playing time of the video file does not exceed a preset time and/or the data volume of the video file does not exceed a preset data volume;
a second determining unit, configured to determine that the size of the target file exceeds the predetermined threshold if the playing time of the video file exceeds a predetermined time and/or if the data volume of the video file exceeds a predetermined data volume;
the first transmission unit is used for carrying out format conversion processing on the video file to obtain a multimedia file with a specified format which can be directly played in instant messaging software if the size of the target file does not exceed a preset threshold value, and compressing the multimedia file with the specified format to transmit the multimedia file with the specified format;
after the transmission of the multimedia file with the specified format is finished, displaying the video file in the instant messaging software in the forms of a preview and a play button;
the second transmission unit is used for popping up a prompt notice to be sent in a file form when the size of the target file exceeds the preset threshold value, and transmitting the target file in a second transmission form; wherein the transmitting the target file through the second transmission form comprises directly transmitting the video file through a transmission file form;
and after the target file is transmitted according to the second transmission form, displaying the video file in the instant messaging software in the forms of a file icon, a file name and a file size.
4. A computer-readable medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the data transmission method according to any one of claims 1 to 2.
5. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out a data transmission method as claimed in any one of claims 1 to 2.
CN201810048591.8A 2018-01-18 2018-01-18 Data transmission method, device, medium and electronic equipment Active CN108566328B (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201810048591.8A CN108566328B (en) 2018-01-18 2018-01-18 Data transmission method, device, medium and electronic equipment
PCT/CN2018/111093 WO2019140963A1 (en) 2018-01-18 2018-10-19 Data transmission
KR1020207023720A KR102445154B1 (en) 2018-01-18 2018-10-19 data transfer
AU2018403361A AU2018403361B2 (en) 2018-01-18 2018-10-19 Data transmission

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810048591.8A CN108566328B (en) 2018-01-18 2018-01-18 Data transmission method, device, medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN108566328A CN108566328A (en) 2018-09-21
CN108566328B true CN108566328B (en) 2021-03-02

Family

ID=63529850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810048591.8A Active CN108566328B (en) 2018-01-18 2018-01-18 Data transmission method, device, medium and electronic equipment

Country Status (4)

Country Link
KR (1) KR102445154B1 (en)
CN (1) CN108566328B (en)
AU (1) AU2018403361B2 (en)
WO (1) WO2019140963A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108566328B (en) * 2018-01-18 2021-03-02 北京三快在线科技有限公司 Data transmission method, device, medium and electronic equipment
CN112784534A (en) * 2020-05-06 2021-05-11 北京金山办公软件股份有限公司 Electronic document weight reduction method and device, electronic equipment and storage medium
CN116233805B (en) * 2021-12-06 2024-04-05 荣耀终端有限公司 File sharing method and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101599986A (en) * 2008-06-02 2009-12-09 宏碁股份有限公司 The method of increasing transmission speed of files and computer system
CN102685159A (en) * 2011-03-10 2012-09-19 腾讯科技(深圳)有限公司 File transmission method and device
CN106161633A (en) * 2016-07-20 2016-11-23 柏科数据技术(深圳)股份有限公司 A kind of based on the transmission method of packaging file under cloud computing environment and system

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7366779B1 (en) * 2000-06-19 2008-04-29 Aol Llc, A Delaware Limited Liability Company Direct file transfer between subscribers of a communications system
CN100407708C (en) * 2003-08-27 2008-07-30 腾讯科技(深圳)有限公司 Voice frequency/video frequency share method and system in instantaneous communication
CN101547161B (en) * 2008-03-28 2012-09-26 阿里巴巴集团控股有限公司 Folder transmission system, folder transmission device and folder transmission method
US20140359431A1 (en) * 2011-12-12 2014-12-04 Motorola Solutions, Inc. Effectively communicating large presence documents within high latency and lossy network environments
KR101720778B1 (en) * 2014-08-13 2017-03-28 에스프린팅솔루션 주식회사 Cloud system and method for displaying contents thereof
US20160234494A1 (en) * 2015-02-10 2016-08-11 Qualcomm Incorporated Restriction on palette block size in video coding
RU2634224C2 (en) * 2015-06-30 2017-10-24 Общество С Ограниченной Ответственностью "Яндекс" System and method and persistent computer-readable medium for file replication on client device for cloud storage
KR20170036300A (en) * 2015-09-24 2017-04-03 삼성전자주식회사 Method and electronic device for providing video
WO2017128068A1 (en) * 2016-01-26 2017-08-03 陈学良 Method for sending technical data when mobile phone transmits file and transmitting system
WO2017128070A1 (en) * 2016-01-26 2017-08-03 陈学良 File transmission method and transmission system
WO2017128069A1 (en) * 2016-01-26 2017-08-03 陈学良 Information pushing method in file transmission and transmission system
CN106657269B (en) * 2016-11-16 2020-05-15 西安诺瓦星云科技股份有限公司 File transmission method
CN108566328B (en) * 2018-01-18 2021-03-02 北京三快在线科技有限公司 Data transmission method, device, medium and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101599986A (en) * 2008-06-02 2009-12-09 宏碁股份有限公司 The method of increasing transmission speed of files and computer system
CN102685159A (en) * 2011-03-10 2012-09-19 腾讯科技(深圳)有限公司 File transmission method and device
CN106161633A (en) * 2016-07-20 2016-11-23 柏科数据技术(深圳)股份有限公司 A kind of based on the transmission method of packaging file under cloud computing environment and system

Also Published As

Publication number Publication date
KR102445154B1 (en) 2022-09-19
KR20200108348A (en) 2020-09-17
WO2019140963A1 (en) 2019-07-25
AU2018403361B2 (en) 2021-07-08
CN108566328A (en) 2018-09-21
AU2018403361A1 (en) 2020-09-10

Similar Documents

Publication Publication Date Title
CN109168026B (en) Instant video display method and device, terminal equipment and storage medium
CN108566328B (en) Data transmission method, device, medium and electronic equipment
CN112073307B (en) Mail processing method, mail processing device, electronic equipment and computer readable medium
CN108965098B (en) Message pushing method, device, medium and electronic equipment based on online live broadcast
CN110781373B (en) List updating method and device, readable medium and electronic equipment
CN111526411A (en) Video processing method, device, equipment and medium
US11758087B2 (en) Multimedia conference data processing method and apparatus, and electronic device
EP4344236A1 (en) Video processing method and apparatus, electronic device and storage medium
CN110349107B (en) Image enhancement method, device, electronic equipment and storage medium
CN107786415B (en) Service processing method and related equipment and system
CN110618848A (en) Page display method, device, equipment and storage medium
CN110083768B (en) Information sharing method, device, equipment and medium
CN111352957A (en) Remote dictionary service optimization method and related equipment
CN112311720A (en) Data transmission method and device
CN115775290A (en) Animation frame rate processing method, device, equipment and storage medium
CN111367592B (en) Information processing method and device
US8755677B2 (en) Moving-picture processing device and moving-picture processing method
CN111240758A (en) Material display method and device, electronic equipment and storage medium
CN113747100B (en) Audio and video call method and device, storage medium and electronic equipment
CN107786581B (en) Method and system for displaying image by mobile terminal
CN113824915B (en) Video picture acquisition method, apparatus and computer readable storage medium
CN110381146B (en) Batch operation processing method and device and storage medium
CN111368223B (en) Page display method and device
CN113765886B (en) Multimedia playing method and device, storage medium and electronic equipment
CN114237752B (en) Push page display method and device, electronic equipment and 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