WO2023169261A1 - 一种数据上传方法、装置、设备和介质 - Google Patents

一种数据上传方法、装置、设备和介质 Download PDF

Info

Publication number
WO2023169261A1
WO2023169261A1 PCT/CN2023/078820 CN2023078820W WO2023169261A1 WO 2023169261 A1 WO2023169261 A1 WO 2023169261A1 CN 2023078820 W CN2023078820 W CN 2023078820W WO 2023169261 A1 WO2023169261 A1 WO 2023169261A1
Authority
WO
WIPO (PCT)
Prior art keywords
upload
protocol
data
target
data upload
Prior art date
Application number
PCT/CN2023/078820
Other languages
English (en)
French (fr)
Inventor
马茜
孙黎阳
申明明
董昊
翟磊
Original Assignee
北京字节跳动网络技术有限公司
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 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Publication of WO2023169261A1 publication Critical patent/WO2023169261A1/zh

Links

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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning

Definitions

  • the embodiments of the present disclosure relate to Internet technology, for example, to a data upload method, device, equipment and medium.
  • Embodiments of the present disclosure provide a data upload method, device, equipment and medium to realize dynamic switching of data upload protocols, effectively ensure upload performance, and improve user experience.
  • embodiments of the present disclosure provide a data upload method, including:
  • the target application data currently to be uploaded is uploaded based on the target upload protocol.
  • embodiments of the present disclosure also provide a data upload device, including:
  • the data upload protocol acquisition module is configured to acquire at least two data upload protocols in response to a preset operation triggered by the user before applying data upload;
  • a performance testing module configured to perform a data upload performance test on each of the data upload protocols based on a preset performance test method, and determine a target upload protocol that matches the current network based on the performance test results;
  • the application data upload module is configured to respond to the application data upload operation triggered by the user and upload the target application data currently to be uploaded based on the target upload protocol.
  • embodiments of the present disclosure also provide an electronic device, where the electronic device includes:
  • a memory configured to store at least one program
  • the at least one processor When the at least one program is executed by the at least one processor, the at least one processor is caused to implement the data upload method provided by any embodiment of the present disclosure.
  • embodiments of the present disclosure also provide a computer-readable storage medium on which a computer program is stored.
  • the program is executed by a processor, the data upload method provided by any embodiment of the present disclosure is implemented.
  • Figure 1 is a flow chart of a data upload method provided by Embodiment 1 of the present disclosure
  • Figure 2 is a flow chart of a data upload method provided by Embodiment 2 of the present disclosure
  • Figure 3 is a schematic structural diagram of a data upload device provided in Embodiment 3 of the present disclosure.
  • FIG. 4 is a schematic structural diagram of an electronic device provided in Embodiment 4 of the present disclosure.
  • the term “include” and its variations are open-ended, ie, “including but not limited to.”
  • the term “based on” means “based at least in part on.”
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one additional embodiment”; and the term “some embodiments” means “at least some embodiments”. Relevant definitions of other terms will be given in the description below.
  • FIG. 1 is a flow chart of a data upload method provided in Embodiment 1 of the present disclosure. This embodiment can be applied to uploading application data, especially to uploading videos to be published by users.
  • the method can be executed by a data uploading device, which can be implemented by software and/or hardware, and integrated into an electronic device, such as a client. As shown in Figure 1, the method includes the following steps:
  • the application data may refer to data in the client that needs to be uploaded to the server in the application background.
  • application data may be, but is not limited to, audio and video, images or files.
  • Preset operations can be set in advance based on business scenarios, preparatory operations before users upload application data, that is, operations used to trigger the selection of a data upload protocol.
  • the preset operation may be but is not limited to: data collection operation, data import operation or data editing operation. For example, in a scenario where users post videos, you can use When users shoot videos, import videos, or edit captured or imported videos, subsequent protocol selection operations are triggered.
  • the data upload protocol may refer to a data upload protocol supported by the transport layer.
  • the data upload protocol may include but is not limited to: an upload protocol based on Transmission Control Protocol (TCP), an upload protocol based on User Datagram Protocol (UDP), or a custom upload protocol.
  • TCP Transmission Control Protocol
  • UDP User Datagram Protocol
  • the TCP-based upload protocol uses TCP-related strategies, including the "three-way handshake" to establish a connection, congestion control algorithm, etc.
  • the UDP-based upload protocol is more lightweight and has better performance under weak network conditions (high latency and high packet loss rate).
  • the UDP-based upload protocol may be but is not limited to the UDP-based low-latency Internet transport layer protocol QUIC (Quick UDP Internet Connection) protocol.
  • the custom upload protocol is a protocol self-developed by users based on business needs. This protocol has higher flexibility and can add custom transmission optimization strategies, such as FEC (Forward Error Correction), congestion control algorithms, etc.
  • a preset operation triggered by the user For example, if a preset operation triggered by the user is detected, it indicates that the user will next upload data. At this time, at least two data upload protocols currently supported by the client can be obtained, so that these data upload protocols can be used. Choose a currently optimal data upload protocol.
  • protocol selection process takes a certain amount of time and the current network conditions change dynamically, subsequent protocol selection operations after the user triggers the preset operation can ensure that there is free time for protocol performance testing, and at the same time, Ensure the timeliness of the chosen protocol.
  • the preset performance test method may refer to a method of testing the current upload performance of the data upload protocol under current network conditions.
  • the target upload protocol may refer to the data upload protocol with the best upload performance under the current network conditions.
  • "conduct data upload performance test for each data upload protocol based on the preset performance test method" in S120 may include: uploading preset data packets based on each data upload protocol, and determining whether each data Upload the performance test results corresponding to the protocol.
  • the preset data packet may refer to a speed measurement data packet with a fixed size and meaningless size.
  • the default data packet does not contain user information to protect user privacy.
  • the client can use each data upload protocol to upload preset data packets through the same domain name, so as to detect the upload performance and network quality of each data upload protocol. After the detection is completed, the performance test results corresponding to each data upload protocol under the current network conditions can be obtained.
  • performance test results may include but are not limited to: speed test success information, network speed information, round-trip delay (Round-Trip Time, RTT) information and other performance test indicator results.
  • Embodiments of the present disclosure can select the most suitable data upload protocol under the current network, that is, the target upload protocol, by comparing the performance test results of each data upload protocol, thereby effectively ensuring upload performance, such as reducing the upload time and improving the upload success rate. .
  • the determination process of the target upload protocol can be: give priority to the upload protocol with successful speed measurement; if there are at least two upload protocols with successful speed measurement, select the upload protocol with the highest network speed from the upload protocols with successful speed measurement; if there are at least two upload protocols with successful speed measurement, According to the upload protocol with the highest network speed, the upload protocol with the shortest round-trip delay is selected from the upload protocol with the highest network speed in order to obtain the target upload protocol with the best performance under the current network and optimize the subsequent upload experience.
  • a user-triggered application data upload operation for example, the user clicks a preset upload button
  • the target application data that the user needs to upload will be uploaded based on the currently selected target upload protocol, thereby reducing the cost of the target application data.
  • Upload time improve upload success rate, optimize the upload performance of target application data, thereby improving user experience, and achieve dynamic switching of data upload protocols by selecting different target upload protocols for data upload under different network conditions.
  • S130 may include: if the target upload protocol is a custom upload protocol, perform configuration optimization on the custom upload protocol based on the performance test results corresponding to the custom upload protocol, and obtain optimized target configuration information; Upload the protocol and target configuration information, and upload the target application data currently to be uploaded.
  • the configuration information of the custom upload protocol can be optimized twice to obtain the optimized target configuration information, such as the optimized forward error correction parameter configuration information and congestion control parameter configuration. information or connection establishment parameter configuration information, etc. Utilizing the customized upload protocol configured with target configuration information to upload target application data can further optimize upload performance and improve user experience.
  • the technical solution of the embodiment of the present disclosure obtains at least two data upload protocols by responding to the preset operation triggered by the user before uploading the application data, and performs data upload performance testing on each data upload protocol based on the preset performance testing method. , determine the target upload protocol that matches the current network based on the performance test results, respond to the application data upload operation triggered by the user, and upload the target application data currently to be uploaded based on the target upload protocol, so that before the application data is uploaded, through For performance testing, the optimal target upload protocol can be selected to upload application data, which effectively ensures upload performance. Different upload protocols can be selected for data upload under different network conditions, and the data upload protocol can be implemented every time data is uploaded. Dynamic switching optimizes upload performance and improves user experience.
  • the method may also include: if the performance test is not completed when the user triggers the application data upload operation, determining the target upload matching the current network based on at least two currently completed performance test results. protocol, or determine the target upload protocol that matches the current network based on the uploader's model information and/or the user's historical upload information.
  • this embodiment can also determine the performance category to which the uploader belongs, such as high-end machine, low-end machine, etc., based on the model information of the uploader (such as the client), such as model version information, model price information, etc. .
  • the TCP-based upload protocol can be used as the target upload protocol; if the upload end is a low-end machine, the UDP-based upload protocol can be used as the target upload protocol.
  • This embodiment can also be based on the user's historical upload information, for example, using the protocol used for the last upload as the target upload protocol used for this upload. Or, check Test whether the time interval between the triggering time of this upload and the triggering time of the last upload is greater than the preset effective time, and the time interval between the triggering time of this upload and the triggering time of the last upload is less than or equal to the preset effective time.
  • the protocol used in the last upload can be used as the target upload protocol used in this upload; when the time interval between the trigger time of this upload and the trigger time of the last upload is greater than the preset effective time, it indicates that the previous upload The protocol used for this upload has expired.
  • the target upload protocol can be determined based on the model information of the uploader.
  • the method may also include: monitoring the upload performance indicators during the upload process of the target application data; if the upload performance indicators meet the preset protocol switching conditions, stop the upload operation and re-determine the connection with the current network Match the target upload protocol, and upload the remaining application data that has not yet been uploaded based on the redetermined target upload protocol.
  • upload performance indicators may include but are not limited to: upload speed and the number of failed upload fragments.
  • the target upload protocol selected before uploading is not the protocol with the best upload performance.
  • another protocol switch can be triggered by monitoring the upload performance indicators in real time. For example, when it is detected that the upload performance indicators meet the preset protocol switching conditions, such as the upload speed is less than the preset speed, and/or the number of failed upload fragments is greater than the preset number, the current upload operation can be stopped and the upload operation can be stopped based on the preset performance.
  • Test method conduct data upload performance test again for each data upload protocol, re-determine the target upload protocol that matches the current network, and continue to upload the remaining application data that has not yet been uploaded based on the re-determined target upload protocol, thereby achieving It dynamically adjusts the protocol, optimizes upload performance, and improves user experience.
  • Figure 2 is a flow chart of a data upload method provided in Embodiment 2 of the present disclosure. Based on the above embodiment, after obtaining at least two data upload protocols, this embodiment also includes: calling the domain name acquisition interface of the server, Obtain the currently available domain names corresponding to each data upload protocol, and based on this, The data upload method has been refined. The explanations of terms that are the same as or corresponding to the above embodiments will not be repeated here.
  • the data upload method provided in this embodiment includes the following steps:
  • S220 Call the domain name acquisition interface of the server to obtain the currently available domain name corresponding to each data upload protocol.
  • the currently available domain name may refer to the currently available domain name specified when transmitting data using the data upload protocol.
  • Each data upload protocol can correspond to a dedicated domain name.
  • the client can obtain the currently available domain name and related domain name information from the server by calling the domain name acquisition interface of the server.
  • the domain name information includes the protocols supported by the domain name. Based on the obtained domain name information, each domain name can be determined.
  • S220 may include: detecting whether the current cache duration of the last available domain name corresponding to each data upload protocol is greater than the preset effective duration; detecting that the current cache duration of the last available domain name corresponding to each data upload protocol is greater than When the validity period is preset, call the domain name acquisition interface of the server to obtain the currently available domain name corresponding to the data upload protocol; when it is detected that the current cache duration of the previous available domain name corresponding to each data upload protocol is less than or equal to the default validity period If the duration is longer, the last available domain name corresponding to the data upload protocol will be used as the currently available domain name corresponding to the data upload protocol.
  • the preset validity period for example, 15 minutes
  • the last available domain name can be directly used as the currently available domain name for data upload, thereby avoiding frequent calls to the domain name acquisition interface and saving money. Got it Equipment resources.
  • the currently available domain name corresponding to each data upload protocol can be used to upload the preset data package to the server, thereby utilizing the dedicated domain name of each data upload protocol. Uploading data by domain name can improve upload efficiency and further optimize upload performance.
  • the currently available domain name corresponding to the target upload protocol can be used to upload the target application data to the server, thereby using the dedicated domain name of the target upload protocol to upload the target application data.
  • the dedicated domain name of the target upload protocol to upload the target application data.
  • the technical solution of this embodiment is to obtain the currently available domain name corresponding to each data upload protocol by calling the domain name acquisition interface of the server, and based on the preset performance test method and the currently available domain name corresponding to each data upload protocol, for each data
  • the upload protocol performs data upload performance testing, and uploads the target application data currently to be uploaded based on the target upload protocol and the currently available domain name corresponding to the target upload protocol, thereby using the protocol's dedicated domain name to upload data, which can improve upload efficiency and further optimize Improved upload performance.
  • Figure 3 is a schematic structural diagram of a data upload device provided in Embodiment 3 of the present disclosure. It is suitable for uploading application data, especially for uploading videos to be published by users.
  • the device includes: a data upload protocol acquisition module 310, a performance testing module 320 and an application data upload module 330.
  • the data upload protocol acquisition module 310 is configured to acquire at least two data upload protocols in response to a preset operation triggered by the user before uploading the application data;
  • the performance testing module 320 is configured to obtain at least two data upload protocols based on the preset performance testing method.
  • the data upload protocol performs data upload performance testing, and determines a target upload protocol that matches the current network based on the performance test results;
  • the application data upload module 330 is configured to respond to the application data upload operation triggered by the user, based on the target upload protocol, for the current Upload the target application data to be uploaded.
  • the technical solution of the embodiment of the present disclosure obtains at least two data upload protocols by responding to the preset operation triggered by the user before uploading the application data, and performs data upload performance testing on each data upload protocol based on the preset performance testing method. , based on the performance test results, determine the target upload protocol that matches the current network.
  • the target application data currently to be uploaded is uploaded based on the target upload protocol, so that before the application data is uploaded, through performance testing, the optimal target upload protocol can be selected to upload the application data. It effectively guarantees upload performance, and can select different upload protocols for data upload under different network conditions, realizing dynamic switching of data upload protocols, optimizing upload performance, and improving user experience.
  • application data includes: audio and video, images or files; preset operations include: data collection operation, data import operation or data editing operation.
  • the performance testing module 320 is configured to: upload preset data packets based on each data upload protocol, and determine the performance test results corresponding to each data upload protocol.
  • the performance test results include: speed measurement success information, network speed information and round-trip delay information.
  • the device also includes:
  • the target upload protocol determination module is set so that if the performance test is not completed when the user triggers the application data upload operation, it will determine the target upload protocol based on the results of at least two currently completed performance tests. Match the target upload protocol, or determine the target upload protocol that matches the current network based on the uploader's model information and/or the user's historical upload information.
  • data upload protocols include: upload protocols based on Transmission Control Protocol TCP, upload protocols based on User Datagram Protocol UDP, or customized upload protocols.
  • the application data upload module 330 is set as:
  • the target upload protocol is a custom upload protocol
  • perform configuration optimization on the custom upload protocol to obtain optimized target configuration information based on the custom upload protocol and target configuration information, Upload the target application data currently to be uploaded.
  • the device also includes:
  • the protocol switching module is set to monitor upload performance indicators during the upload process of target application data; if the upload performance indicators meet the preset protocol switching conditions, the upload operation will be stopped, and the target upload protocol that matches the current network will be re-determined, and based on The redefined target upload protocol is used to upload the remaining application data that has not yet been uploaded.
  • the device also includes:
  • the domain name acquisition module is configured to call the domain name acquisition interface of the server to obtain the currently available domain name corresponding to each data upload protocol after acquiring at least two data upload protocols.
  • the performance testing module 320 is set to: perform a data upload performance test on each data upload protocol based on the preset performance testing method and the currently available domain name corresponding to each data upload protocol;
  • the application data upload module 330 is configured to upload the target application data currently to be uploaded based on the target upload protocol and the currently available domain name corresponding to the target upload protocol.
  • the domain name acquisition module is set as:
  • the data upload device provided by the embodiment of the present disclosure can execute the data upload method provided by any embodiment of the present disclosure, and has corresponding functional modules for executing the data upload method.
  • FIG. 4 a schematic structural diagram of an electronic device 900 suitable for implementing embodiments of the present disclosure is shown.
  • the electronic device shown in FIG. 4 is only an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
  • the electronic device 900 may include a processing device (such as a central processing unit, a graphics processor, etc.) 901, which may process data according to a program stored in a read-only memory (Read-Only Memory, ROM) 902 or from a storage device. 908 loads the program in the random access memory (Random Access Memory, RAM) 903 to perform various appropriate actions and processing. In the RAM 903, various programs and data required for the operation of the electronic device 900 are also stored.
  • the processing device 901, ROM 902 and RAM 903 are connected to each other via a bus 904.
  • An input/output (I/O) interface 905 is also connected to bus 904.
  • the following devices can be connected to the I/O interface 905: input devices 906 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a Liquid Crystal Display (LCD) , an output device 907 such as a speaker, a vibrator, etc.; a storage device 908 including a magnetic tape, a hard disk, etc.; and a communication device 909.
  • the communication device 909 may allow the electronic device 900 to communicate wirelessly or wiredly with other devices to exchange data.
  • FIG. 4 illustrates an electronic device 900 having various means, it should be understood that implementation or having all illustrated means is not required. device. More or fewer means may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product including a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from the network via communication device 909, or from storage device 908, or from ROM 902.
  • the processing device 901 the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
  • the electronic device provided by the embodiments of the present disclosure and the data upload method provided by the above-mentioned embodiments belong to the same inventive concept.
  • Technical details that are not described in detail in the embodiments of the present disclosure can be referred to the above-mentioned embodiments.
  • Embodiments of the present disclosure provide a computer storage medium on which a computer program is stored.
  • the program is executed by a processor, the data upload method provided in the above embodiments is implemented.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer-readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof.
  • Computer readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard drive, random access memory (RAM), read only memory (ROM), removable Programmable read-only memory ((Erasable Programmable Read-Only Memory, EPROM) or flash memory), optical fiber, portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage device, magnetic storage device, or the above any suitable combination.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. code. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device .
  • Program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, radio frequency (Radio Frequency, RF), etc., or any suitable combination of the above.
  • the client and server can communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and can communicate with digital data in any form or medium.
  • Communications e.g., communications network
  • Examples of communication networks include Local Area Networks (LANs), Wide Area Networks (WANs), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any current network for knowledge or future research and development.
  • LANs Local Area Networks
  • WANs Wide Area Networks
  • the Internet e.g., the Internet
  • end-to-end networks e.g., ad hoc end-to-end networks
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; it may also exist independently without being assembled into the electronic device.
  • the computer-readable medium carries at least one program.
  • the electronic device acquires at least two data upload protocols in response to a preset operation triggered by the user before uploading the application data; Based on the preset performance test method, perform data upload performance testing on each data upload protocol, and determine the target upload protocol that matches the current network based on the performance test results; in response to the application data upload operation triggered by the user, based on the target upload protocol, Upload the target application data currently to be uploaded.
  • Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages—such as "C” or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • remote computing In the case of a computer, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through an Internet service provider). .
  • LAN local area network
  • WAN wide area network
  • each block in the flowchart or block diagram may represent a module, segment, or portion of code that contains one or more logic functions that implement the specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown one after another may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved.
  • each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration can be implemented by special purpose hardware-based systems that perform the specified functions or operations. , or can be implemented using a combination of specialized hardware and computer instructions.
  • the units involved in the embodiments of the present disclosure can be implemented in software or hardware.
  • the name of a unit does not constitute a limitation on the unit itself under certain circumstances.
  • an editable content display unit may also be described as an "editing unit”.
  • exemplary types of hardware logic components include: field programmable gate array (Field Programmable Gate Array, FPGA), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), application specific standard product (Application Specific Standard Parts (ASSP), System on Chip (SOC), Complex Programmable Logic Device (CPLD), etc.
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or Semiconductor systems, devices or equipment, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, laptop disks, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM portable compact disk read-only memory
  • magnetic storage device or any suitable combination of the above.
  • Example 1 provides a data upload method, including:
  • the target application data currently to be uploaded is uploaded based on the target upload protocol.
  • Example 2 provides a data upload method, further including:
  • the application data includes: audio and video, images or files;
  • the preset operations include: data collection operations, data import operations or data editing operations.
  • Example 3 provides a data upload method, further including:
  • the data upload performance corresponding to each of the data upload protocols is tested, including:
  • a preset data packet is uploaded, and the performance test results corresponding to each of the data upload protocols are determined.
  • Example 4 provides a data upload method, further including:
  • the performance test results include: speed measurement success information, network speed information and round-trip time delay information.
  • Example 5 provides a data upload method, further including:
  • the method also includes:
  • the target upload protocol matching the current network is determined based on the results of at least two currently completed performance tests, or based on the model information of the uploader and/or the user historical upload information to determine the target upload protocol that matches the current network.
  • Example 6 provides a data upload method, further including:
  • the data upload protocol includes: an upload protocol based on Transmission Control Protocol TCP, an upload protocol based on User Datagram Protocol UDP, or a custom upload protocol.
  • Example 7 provides a data upload method, further including:
  • uploading the target application data currently to be uploaded based on the target upload protocol includes:
  • the target upload protocol is a custom upload protocol, perform configuration optimization on the custom upload protocol based on the performance test results corresponding to the custom upload protocol, and obtain optimized target configuration information;
  • the target application data currently to be uploaded is uploaded.
  • Example 8 provides a data upload method, further including:
  • the method also includes:
  • the target upload protocol matches the current network, and based on the redetermined target upload protocol, the remaining application data that has not yet been uploaded is uploaded.
  • Example 9 provides a data upload method, further including:
  • Example 10 provides a data upload method, further including:
  • the data upload performance test is performed on each of the data upload protocols based on the preset performance test method, including:
  • Uploading the target application data currently to be uploaded based on the target upload protocol includes:
  • Example 11 provides a data upload method, further including:
  • the domain name acquisition interface of the server is called to obtain the currently available domain name corresponding to each of the data upload protocols, including:
  • the last available domain name corresponding to the data upload protocol is used as the currently available domain name corresponding to the data upload protocol.
  • Example 12 provides a data upload device, including:
  • the data upload protocol acquisition module is configured to acquire at least two data upload protocols in response to a preset operation triggered by the user before applying data upload;
  • a performance testing module configured to perform a data upload performance test on each of the data upload protocols based on a preset performance test method, and determine a target upload protocol that matches the current network based on the performance test results;
  • the application data upload module is configured to respond to the application data upload operation triggered by the user and upload the target application data currently to be uploaded based on the target upload protocol.

Landscapes

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

Abstract

本公开实施例公开了一种数据上传方法、装置、设备和介质。该方法包括:响应于用户在应用数据上传前触发的预设操作,获取至少两个数据上传协议;基于预设性能测试方式,对每个数据上传协议进行数据上传性能测试,并基于性能测试结果确定与当前网络相匹配的目标上传协议;响应于用户触发的应用数据上传操作,基于目标上传协议,对当前待上传的目标应用数据进行上传。

Description

一种数据上传方法、装置、设备和介质
本公开要求在2022年3月9日提交中国专利局、申请号为202210226539.3的中国专利申请的优先权,该申请的全部内容通过引用结合在本公开中。
技术领域
本公开实施例涉及互联网技术,例如涉及一种数据上传方法、装置、设备和介质。
背景技术
随着互联网的发展,用户可以通过网络将应用数据进行上传。例如,用户可以将拍摄好的视频上传至应用的服务端。应用数据的上传过程依赖于传输层的上传协议。目前,通常利用固定的上传协议对用户的应用数据进行上传。然而,在不同的网络状况下,利用单一固定的上传协议进行上传,无法有效保证上传性能,进而降低了用户体验。
发明内容
本公开实施例提供了一种数据上传方法、装置、设备和介质,以实现数据上传协议的动态切换,有效保证上传性能,提升用户体验。
第一方面,本公开实施例提供了一种数据上传方法,包括:
响应于用户在应用数据上传前触发的预设操作,获取至少两个数据上传协议;
基于预设性能测试方式,对每个所述数据上传协议进行数据上传性能测试,并基于性能测试结果确定与当前网络相匹配的目标上传协议;
响应于用户触发的应用数据上传操作,基于所述目标上传协议,对当前待上传的目标应用数据进行上传。
第二方面,本公开实施例还提供了一种数据上传装置,包括:
数据上传协议获取模块,设置为响应于用户在应用数据上传前触发的预设操作,获取至少两个数据上传协议;
性能测试模块,设置为基于预设性能测试方式,对每个所述数据上传协议进行数据上传性能测试,并基于性能测试结果确定与当前网络相匹配的目标上传协议;
应用数据上传模块,设置为响应于用户触发的应用数据上传操作,基于所述目标上传协议,对当前待上传的目标应用数据进行上传。
第三方面,本公开实施例还提供了一种电子设备,所述电子设备包括:
至少一个处理器;
存储器,设置为存储至少一个程序;
当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如本公开任意实施例提供的数据上传方法。
第四方面,本公开实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本公开任意实施例提供的数据上传方法。
附图说明
图1是本公开实施例一提供的一种数据上传方法的流程图;
图2是本公开实施例二提供的一种数据上传方法的流程图;
图3是本公开实施例三提供的一种数据上传装置的结构示意图;
图4是本公开实施例四提供的一种电子设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行 示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“至少一个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
实施例一
图1为本公开实施例一提供的一种数据上传方法的流程图,本实施例可适用于对应用数据进行上传的情况,尤其是可以用于对用户待发布的视频进行上传的情况。该方法可以由数据上传装置来执行,该装置可以由软件和/或硬件的方式来实现,集成于电子设备,比如客户端中。如图1所示,该方法包括以下步骤:
S110、响应于用户在应用数据上传前触发的预设操作,获取至少两个数据上传协议。
其中,应用数据可以是指客户端中需要上传至应用后台的服务端的数据。例如,应用数据可以是但不限于音视频、图像或者文件。预设操作可以是预先基于业务场景设置的,用户上传应用数据之前的准备操作,也就是用于触发开始选择数据上传协议的操作。例如,预设操作可以是但不限于:数据采集操作、数据导入操作或者数据编辑操作。例如,在用户发布视频的场景中,可以在用 户拍摄视频、导入视频、或者对拍摄或导入的视频进行编辑时,触发后续的协议选择操作。
其中,数据上传协议可以是指传输层所支持的数据上传协议。例如,数据上传协议可以包括但不限于:基于传输控制协议TCP(Transmission Control Protocol)的上传协议、基于用户数据报协议UDP(User Datagram Protocol)的上传协议或者自定义上传协议。其中,基于TCP的上传协议使用TCP相关的策略,其包括建立连接的“三次握手”、拥塞控制算法等。相比而言,基于UDP的上传协议更为轻量级,并且在弱网(高延迟、高丢包率)情况下性能更优。基于UDP的上传协议可以是但不限于基于UDP的低时延的互联网传输层协议QUIC(Quick UDP Internet Connection)协议。自定义上传协议是用户基于业务需求自研发的协议,该协议具有更高的灵活性,可以加入自定义的传输优化策略,例如FEC(Forward Error Correction,前向纠错)、拥塞控制算法等。
示例性地,若检测到用户触发的预设操作,则表明该用户接下来会有上传数据的操作,此时可以获取客户端当前所支持的至少两个数据上传协议,以便在这些数据上传协议中选择一个当前最优的数据上传协议。
需要说明的是,由于协议选择过程需要一定时间,并且当前网络状况是动态变化的,从而在用户触发预设操作后进行后续的协议选择操作,可以保证有空余时间进行协议性能测试,同时也可以保证所选择协议的时效性。
S120、基于预设性能测试方式,对每个数据上传协议进行数据上传性能测试,并基于性能测试结果确定与当前网络相匹配的目标上传协议。
其中,预设性能测试方式可以是指在当前网络状况下,对数据上传协议的当前上传性能进行测试的方式。目标上传协议可以是指在当前网络状况下,上传性能最优的数据上传协议。
示例性地,S120中的“基于预设性能测试方式,对每个数据上传协议进行数据上传性能测试”,可以包括:基于每个数据上传协议,对预设数据包进行上传,确定每个数据上传协议对应的性能测试结果。
其中,预设数据包可以是指一个固定大小没有意义的测速数据包。预设数据包中不包含用户信息,以便保护用户隐私。示例性地,客户端可以利用每个数据上传协议,通过同一域名来上传预设数据包,以便探测每个数据上传协议上传性能和网络质量。探测完成后可以获取在当前网络状况下每个数据上传协议对应的性能测试结果。
例如,性能测试结果可以包括但不限于:测速是否成功信息、网速信息和往返时延(Round-Trip Time,RTT)信息等性能测试指标结果。本公开实施例可以通过对比每个数据上传协议的性能测试结果,选择在当前网络下最适合的数据上传协议,即目标上传协议,从而有效保证上传性能,比如降低上传时长和提高上传成功率等。例如,目标上传协议的确定过程可以为:优先选择测速成功的上传协议;若存在至少两个测速成功的上传协议,则从测速成功的上传协议中选择网速最高的上传协议;若存在至少两个网速最高的上传协议,则从网速最高的上传协议中选择往返时延最短的上传协议,以便获得在当前网络下性能最优的目标上传协议,优化后续的上传体验。
S130、响应于用户触发的应用数据上传操作,基于目标上传协议,对当前待上传的目标应用数据进行上传。
示例性地,若检测到用户触发的应用数据上传操作,比如用户点击预设上传按钮,则基于当前选择的目标上传协议,对用户需要上传的目标应用数据进行上传,从而可以降低目标应用数据的上传时间,提高上传成功率,优化了目标应用数据的上传性能,进而提升了用户体验,并且通过在不同网络状况下选择不同的目标上传协议进行数据上传,实现了数据上传协议的动态切换。
示例性地,S130可以包括:若目标上传协议为自定义上传协议,则基于自定义上传协议对应的性能测试结果,对自定义上传协议进行配置优化,获得优化后的目标配置信息;基于自定义上传协议和目标配置信息,对当前待上传的目标应用数据进行上传。
示例性地,由于自定义上传协议具有更灵活的配置能力,可以动态配置, 从而可以基于自定义上传协议对应的性能测试结果,对自定义上传协议的配置信息进行二次优化,获得优化后的目标配置信息,比如优化后的前向纠错参数配置信息、拥塞控制参数配置信息或者建连方式参数配置信息等。利用目标配置信息配置后的自定义上传协议,对目标应用数据进行上传,可以进一步优化上传性能,提升用户体验。
本公开实施例的技术方案,通过响应于用户在应用数据上传前触发的预设操作,获取至少两个数据上传协议,并基于预设性能测试方式,对每个数据上传协议进行数据上传性能测试,基于性能测试结果确定与当前网络相匹配的目标上传协议,响应于用户触发的应用数据上传操作,基于目标上传协议,对当前待上传的目标应用数据进行上传,从而在应用数据上传前,通过性能测试,可以选择最优的目标上传协议来上传应用数据,有效保证了上传性能,并且在不同网络状况下可以选择不同的上传协议进行数据上传,进而在每次上传数据时实现了数据上传协议的动态切换,优化了上传性能,提升了用户体验。
在上述技术方案的基础上,该方法还可以包括:若用户触发应用数据上传操作时,性能测试未全部完成,则基于当前已完成的至少两个性能测试结果确定与当前网络相匹配的目标上传协议,或者,基于上传端的机型信息和/或用户的历史上传信息确定与当前网络相匹配的目标上传协议。
示例性地,在用户触发的预设操作与数据上传操作之间的时间间隔较短而导致未测试完所有数据上传协议的性能,此时若当前已经完成至少两个协议的性能测试,则可以将获得的至少两个性能测试结果进行性能对比,确定出与当前网络相匹配的目标上传协议。或者,本实施例也可以基于上传端(比如客户端)的机型信息,比如机型版本信息、机型价位信息等,确定出该上传端所属的性能类别,比如高端机、低端机等。例如,若该上传端为高端机,则可以将基于TCP的上传协议作为目标上传协议;若该上传端为低端机,则可以将基于UDP的上传协议作为目标上传协议。本实施例还可以基于用户的历史上传信息,比如,将上次上传所使用的协议作为本次传所使用的目标上传协议。或者,检 测本次上传触发时刻与上次上传触发时刻之间的时间间隔是否大于预设有效时长,在本次上传触发时刻与上次上传触发时刻之间的时间间隔小于或等于预设有效时长的情况下,可以将上次上传所使用的协议作为本次上传所使用的目标上传协议;在本次上传触发时刻与上次上传触发时刻之间的时间间隔大于预设有效时长的情况下,表明上次上传所使用的协议已过期,此时可以基于上传端的机型信息确定目标上传协议。
在上述各技术方案的基础上,该方法还可以包括:在目标应用数据的上传过程中,监测上传性能指标;若上传性能指标满足预设协议切换条件,则停止上传操作,重新确定与当前网络相匹配的目标上传协议,并基于重新确定的目标上传协议,对当前还未上传的剩余应用数据进行上传。
其中,上传性能指标可以包括但不限于:上传速度和上传失败的分片数。
示例性地,在网络状况变化较快,比如上传过程的网络状况与上传前的网络状况完全不同时,可能会导致上传前所选择的目标上传协议并不是上传性能最优的协议。针对这种情况,可以在以目标上次协议,上传目标应用数据的过程中,通过实时监测上传性能指标的方式,触发协议的再次切换。例如,在监测到上传性能指标满足预设协议切换条件,比如上传速度小于预设速度,和/或上传失败的分片数大于预设数量时,可以停止当前的上传操作,并基于预设性能测试方式,对每个数据上传协议再次进行数据上传性能测试,重新确定与当前网络相匹配的目标上传协议,并基于重新确定的目标上传协议,继续上传当前还未上传的剩余应用数据,从而实现了协议的动态调整,优化了上传性能,提升了用户体验。
实施例二
图2为本公开实施例二提供的一种数据上传方法的流程图,本实施例在上述实施例的基础上,在获取至少两个数据上传协议之后,还包括:调用服务端的域名获取接口,获取每个数据上传协议对应的当前可用域名,并在此基础上, 对数据上传方式进行了细化。其中与上述各实施例相同或相应的术语的解释在此不再赘述。
参见图2,本实施例提供的数据上传方法包括以下步骤:
S210、响应于用户在应用数据上传前触发的预设操作,获取至少两个数据上传协议。
S220、调用服务端的域名获取接口,获取每个数据上传协议对应的当前可用域名。
其中,当前可用域名可以是指利用数据上传协议传输数据时所指定的当前可用的域名。每个数据上传协议可以对应一个专用的域名。
示例性地,客户端可以通过调用服务端的域名获取接口,从服务端中获取当前可用域名以及相关的域名信息,其中域名信息包括该域名所支持的协议,基于获得的域名信息,可以确定出每个数据上传协议对应的当前可用域名。
示例性地,S220可以包括:检测每个数据上传协议对应的上一可用域名的当前缓存时长是否大于预设有效时长;在检测到每个数据上传协议对应的上一可用域名的当前缓存时长大于预设有效时长的情况下,调用服务端的域名获取接口,获取该数据上传协议对应的当前可用域名;在检测到每个数据上传协议对应的上一可用域名的当前缓存时长小于或等于预设有效时长的情况下,则将该数据上传协议对应的上一可用域名作为该数据上传协议对应的当前可用域名。
客户端每获取一次域名后,可以将每个数据上传协议对应的可用域名进行更新和缓存,从而在下次需要获取域名时,可以先检测每个数据上传协议对应的上一可用域名的当前缓存时长是否大于预设有效时长(比如15分钟),在数据上传协议对应的上一可用域名的当前缓存时长大于预设有效时长的情况下,表明上一可用域名已过期,需要通过调用服务端的域名获取接口的方式,获取该数据上传协议对应的当前可用域名。在数据上传协议对应的上一可用域名的当前缓存时长小于或等于预设有效时长的情况下,可以直接将上一可用域名作为当前可用域名进行数据上传,从而可以避免频繁调用域名获取接口,节省了 设备资源。
S230、基于预设性能测试方式和每个数据上传协议对应的当前可用域名,对每个数据上传协议进行数据上传性能测,并基于性能测试结果确定与当前网络相匹配的目标上传协议。
示例性地,在对每个数据上传协议进行数据上传性能测试时,可以利用每个数据上传协议对应的当前可用域名,将预设数据包上传至服务端,从而利用每个数据上传协议的专用域名上传数据,可以提高上传效率,进一步优化了上传性能。
S240、响应于用户触发的应用数据上传操作,基于目标上传协议和目标上传协议对应的当前可用域名,对当前待上传的目标应用数据进行上传。
示例性地,在检测到用户触发的应用数据上传操作时,可以利用目标上传协议对应的当前可用域名,将目标应用数据上传至服务端,从而利用目标上传协议的专用域名上传目标应用数据,可以提高上传效率,进而进一步优化了上传性能。
本实施例的技术方案,通过调用服务端的域名获取接口,获取每个数据上传协议对应的当前可用域名,并基于预设性能测试方式和每个数据上传协议对应的当前可用域名,对每个数据上传协议进行数据上传性能测试,以及基于目标上传协议和目标上传协议对应的当前可用域名,对当前待上传的目标应用数据进行上传,从而利用协议的专用域名上传数据,可以提高上传效率,进一步优化了上传性能。
以下是本公开实施例提供的数据上传装置的实施例,该装置与上述实施例的数据上传方法属于同一个发明构思,在数据上传装置的实施例中未详尽描述的细节内容,可以参考上述实施例的数据上传方法。
实施例三
图3为本公开实施例三提供的一种数据上传装置的结构示意图,本实施例 可适用于对应用数据进行上传的情况,尤其是可以用于对用户待发布的视频进行上传的情况。如图3所示,该装置包括:数据上传协议获取模块310、性能测试模块320和应用数据上传模块330。
其中,数据上传协议获取模块310,设置为响应于用户在应用数据上传前触发的预设操作,获取至少两个数据上传协议;性能测试模块320,设置为基于预设性能测试方式,对每个数据上传协议进行数据上传性能测试,并基于性能测试结果确定与当前网络相匹配的目标上传协议;应用数据上传模块330,设置为响应于用户触发的应用数据上传操作,基于目标上传协议,对当前待上传的目标应用数据进行上传。
本公开实施例的技术方案,通过响应于用户在应用数据上传前触发的预设操作,获取至少两个数据上传协议,并基于预设性能测试方式,对每个数据上传协议进行数据上传性能测试,基于性能测试结果确定与当前网络相匹配的目标上传协议。响应于用户触发的应用数据上传操作,基于目标上传协议,对当前待上传的目标应用数据进行上传,从而在应用数据上传前,通过性能测试,可以选择最优的目标上传协议来上传应用数据,有效保证了上传性能,并且在不同网络状况下可以选择不同的上传协议进行数据上传,实现了数据上传协议的动态切换,优化了上传性能,提升了用户体验。
在上述技术方案的基础上,应用数据包括:音视频、图像或者文件;预设操作包括:数据采集操作、数据导入操作或者数据编辑操作。
在上述各技术方案的基础上,性能测试模块320,设置为:基于每个数据上传协议,对预设数据包进行上传,确定每个数据上传协议对应的性能测试结果。
在上述各技术方案的基础上,性能测试结果包括:测速是否成功信息、网速信息和往返时延信息。
在上述各技术方案的基础上,该装置还包括:
目标上传协议确定模块,设置为若用户触发应用数据上传操作时,性能测试未全部完成,则基于当前已完成的至少两个性能测试结果确定与当前网络相 匹配的目标上传协议,或者,基于上传端的机型信息和/或用户的历史上传信息确定与当前网络相匹配的目标上传协议。
在上述各技术方案的基础上,数据上传协议包括:基于传输控制协议TCP的上传协议、基于用户数据报协议UDP的上传协议或者自定义上传协议。
在上述各技术方案的基础上,应用数据上传模块330,设置为:
若目标上传协议为自定义上传协议,则基于自定义上传协议对应的性能测试结果,对自定义上传协议进行配置优化,获得优化后的目标配置信息;基于自定义上传协议和目标配置信息,对当前待上传的目标应用数据进行上传。
在上述各技术方案的基础上,该装置还包括:
协议切换模块,设置为在目标应用数据的上传过程中,监测上传性能指标;若上传性能指标满足预设协议切换条件,则停止上传操作,重新确定与当前网络相匹配的目标上传协议,并基于重新确定的目标上传协议,对当前还未上传的剩余应用数据进行上传。
在上述各技术方案的基础上,该装置还包括:
域名获取模块,设置为在获取至少两个数据上传协议之后,调用服务端的域名获取接口,获取每个数据上传协议对应的当前可用域名。
在上述各技术方案的基础上,性能测试模块320,设置为:基于预设性能测试方式和每个数据上传协议对应的当前可用域名,对每个数据上传协议进行数据上传性能测试;
应用数据上传模块330,设置为:基于目标上传协议和目标上传协议对应的当前可用域名,对当前待上传的目标应用数据进行上传。
在上述各技术方案的基础上,域名获取模块,设置为:
检测每个数据上传协议对应的上一可用域名的当前缓存时长是否大于预设有效时长;响应于检测到每个所述数据上传协议对应的上一可用域名的当前缓存时长大于预设有效时长,调用服务端的域名获取接口,获取该数据上传协议对应的当前可用域名;响应于检测到每个所述数据上传协议对应的上一可用域 名的当前缓存时长小于或等于预设有效时长,将该数据上传协议对应的上一可用域名作为该数据上传协议对应的当前可用域名。
本公开实施例所提供的数据上传装置可执行本公开任意实施例所提供的数据上传方法,具备执行数据上传方法相应的功能模块。
值得注意的是,上述数据上传装置的实施例中,所包括的各个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本公开的保护范围。
实施例四
下面参考图4,其示出了适于用来实现本公开实施例的电子设备900的结构示意图。图4示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图4所示,电子设备900可以包括处理装置(例如中央处理器、图形处理器等)901,其可以根据存储在只读存储器(Read-Only Memory,ROM)902中的程序或者从存储装置908加载到随机访问存储器(Random Access Memory,RAM)903中的程序而执行各种适当的动作和处理。在RAM 903中,还存储有电子设备900操作所需的各种程序和数据。处理装置901、ROM 902以及RAM 903通过总线904彼此相连。输入/输出(Input/Output,I/O)接口905也连接至总线904。
通常,以下装置可以连接至I/O接口905:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置906;包括例如液晶显示器(Liquid Crystal Display,LCD)、扬声器、振动器等的输出装置907;包括例如磁带、硬盘等的存储装置908;以及通信装置909。通信装置909可以允许电子设备900与其他设备进行无线或有线通信以交换数据。虽然图4示出了具有各种装置的电子设备900,但是应理解的是,并不要求实施或具备所有示出的 装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置909从网络上被下载和安装,或者从存储装置908被安装,或者从ROM 902被安装。在该计算机程序被处理装置901执行时,执行本公开实施例的方法中限定的上述功能。
本公开实施例提供的电子设备与上述实施例提供的数据上传方法属于同一发明构思,未在本公开实施例中详尽描述的技术细节可参见上述实施例。
实施例五
本公开实施例提供了一种计算机存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述实施例所提供的数据上传方法。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器((Erasable Programmable Read-Only Memory,EPROM)或闪存)、光纤、便携式紧凑磁盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代 码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、射频(Radio Frequency,RF)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(Local Area Network,LAN),广域网(Wide Area Network,WAN),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有至少一个程序,当上述至少一个程序被该电子设备执行时,使得该电子设备:响应于用户在应用数据上传前触发的预设操作,获取至少两个数据上传协议;基于预设性能测试方式,对每个数据上传协议进行数据上传性能测试,并基于性能测试结果确定与当前网络相匹配的目标上传协议;响应于用户触发的应用数据上传操作,基于目标上传协议,对当前待上传的目标应用数据进行上传。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算 机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定,例如,可编辑内容显示单元还可以被描述为“编辑单元”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(Field Programmable Gate Array,FPGA)、专用集成电路(Application Specific Integrated Circuit,ASIC)、专用标准产品(Application Specific Standard Parts,ASSP)、片上系统(System on Chip,SOC)、复杂可编程逻辑设备(Complex Programmable Logic Device,CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或 半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的至少一个实施例,【示例一】提供了一种数据上传方法,包括:
响应于用户在应用数据上传前触发的预设操作,获取至少两个数据上传协议;
基于预设性能测试方式,对每个所述数据上传协议进行数据上传性能测试,并基于性能测试结果确定与当前网络相匹配的目标上传协议;
响应于用户触发的应用数据上传操作,基于所述目标上传协议,对当前待上传的目标应用数据进行上传。
根据本公开的至少一个实施例,【示例二】提供了一种数据上传方法,还包括:
可选的,所述应用数据包括:音视频、图像或者文件;所述预设操作包括:数据采集操作、数据导入操作或者数据编辑操作。
根据本公开的至少一个实施例,【示例三】提供了一种数据上传方法,还包括:
可选的,所述基于预设性能测试方式,对每个所述数据上传协议对应的数据上传性能进行测试,包括:
基于每个所述数据上传协议,对预设数据包进行上传,确定每个所述数据上传协议对应的性能测试结果。
根据本公开的至少一个实施例,【示例四】提供了一种数据上传方法,还包括:
可选的,所述性能测试结果包括:测速是否成功信息、网速信息和往返时 延信息。
根据本公开的至少一个实施例,【示例五】提供了一种数据上传方法,还包括:
可选的,所述方法还包括:
若用户触发应用数据上传操作时,性能测试未全部完成,则基于当前已完成的至少两个性能测试结果确定与当前网络相匹配的目标上传协议,或者,基于上传端的机型信息和/或用户的历史上传信息确定与当前网络相匹配的目标上传协议。
根据本公开的至少一个实施例,【示例六】提供了一种数据上传方法,还包括:
可选的,所述数据上传协议包括:基于传输控制协议TCP的上传协议、基于用户数据报协议UDP的上传协议或者自定义上传协议。
根据本公开的至少一个实施例,【示例七】提供了一种数据上传方法,还包括:
可选的,所述基于所述目标上传协议,对当前待上传的目标应用数据进行上传,包括:
若所述目标上传协议为自定义上传协议,则基于所述自定义上传协议对应的性能测试结果,对所述自定义上传协议进行配置优化,获得优化后的目标配置信息;
基于所述自定义上传协议和所述目标配置信息,对当前待上传的目标应用数据进行上传。
根据本公开的至少一个实施例,【示例八】提供了一种数据上传方法,还包括:
可选的,所述方法还包括:
在所述目标应用数据的上传过程中,监测上传性能指标;
若所述上传性能指标满足预设协议切换条件,则停止上传操作,重新确定 与当前网络相匹配的目标上传协议,并基于重新确定的目标上传协议,对当前还未上传的剩余应用数据进行上传。
根据本公开的至少一个实施例,【示例九】提供了一种数据上传方法,还包括:
可选的,在获取至少两个数据上传协议之后,还包括:
调用服务端的域名获取接口,获取每个所述数据上传协议对应的当前可用域名。
根据本公开的至少一个实施例,【示例十】提供了一种数据上传方法,还包括:
可选的,所述基于预设性能测试方式,对每个所述数据上传协议进行数据上传性能测试,包括:
基于预设性能测试方式和每个所述数据上传协议对应的当前可用域名,对每个所述数据上传协议进行数据上传性能测试;
所述基于所述目标上传协议,对当前待上传的目标应用数据进行上传,包括:
基于所述目标上传协议和所述目标上传协议对应的当前可用域名,对当前待上传的目标应用数据进行上传。
根据本公开的至少一个实施例,【示例十一】提供了一种数据上传方法,还包括:
可选的,所述调用服务端的域名获取接口,获取每个所述数据上传协议对应的当前可用域名,包括:
检测每个所述数据上传协议对应的上一可用域名的当前缓存时长是否大于预设有效时长;
响应于检测到每个所述数据上传协议对应的上一可用域名的当前缓存时长大于预设有效时长,调用服务端的域名获取接口,获取该数据上传协议对应的当前可用域名;
响应于检测到每个所述数据上传协议对应的上一可用域名的当前缓存时长小于或等于预设有效时长,将该数据上传协议对应的上一可用域名作为该数据上传协议对应的当前可用域名。
根据本公开的至少一个实施例,【示例十二】提供了一种数据上传装置,包括:
数据上传协议获取模块,设置为响应于用户在应用数据上传前触发的预设操作,获取至少两个数据上传协议;
性能测试模块,设置为基于预设性能测试方式,对每个所述数据上传协议进行数据上传性能测试,并基于性能测试结果确定与当前网络相匹配的目标上传协议;
应用数据上传模块,设置为响应于用户触发的应用数据上传操作,基于所述目标上传协议,对当前待上传的目标应用数据进行上传。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。

Claims (14)

  1. 一种数据上传方法,包括:
    响应于用户在应用数据上传前触发的预设操作,获取至少两个数据上传协议;
    基于预设性能测试方式,对每个所述数据上传协议进行数据上传性能测试,并基于性能测试结果确定与当前网络相匹配的目标上传协议;
    响应于用户触发的应用数据上传操作,基于所述目标上传协议,对当前待上传的目标应用数据进行上传。
  2. 根据权利要求1所述的方法,其中,所述应用数据包括:音视频、图像或者文件;所述预设操作包括:数据采集操作、数据导入操作或者数据编辑操作。
  3. 根据权利要求1所述的方法,其中,所述基于预设性能测试方式,对每个所述数据上传协议对应的数据上传性能进行测试,包括:
    基于每个所述数据上传协议,对预设数据包进行上传,确定每个所述数据上传协议对应的性能测试结果。
  4. 根据权利要求3所述的方法,其中,所述性能测试结果包括:测速是否成功信息、网速信息和往返时延信息。
  5. 根据权利要求1所述的方法,还包括:
    响应于用户触发应用数据上传操作时,性能测试未全部完成,基于当前已完成的至少两个性能测试结果确定与当前网络相匹配的目标上传协议,或者,基于上传端的机型信息和用户的历史上传信息中的至少之一确定与当前网络相匹配的目标上传协议。
  6. 根据权利要求1所述的方法,其中,所述数据上传协议包括:基于传输控制协议TCP的上传协议、基于用户数据报协议UDP的上传协议或者自定义上传协议。
  7. 根据权利要求6所述的方法,其中,所述基于所述目标上传协议,对当前待上传的目标应用数据进行上传,包括:
    响应于所述目标上传协议为自定义上传协议,基于所述自定义上传协议对应的性能测试结果,对所述自定义上传协议进行配置优化,获得优化后的目标配置信息;
    基于所述自定义上传协议和所述目标配置信息,对当前待上传的目标应用数据进行上传。
  8. 根据权利要求1所述的方法,还包括:
    在所述目标应用数据的上传过程中,监测上传性能指标;
    响应于所述上传性能指标满足预设协议切换条件,停止上传操作,重新确定与当前网络相匹配的目标上传协议,并基于重新确定的目标上传协议,对当前还未上传的剩余应用数据进行上传。
  9. 根据权利要求1-8任一项所述的方法,在获取至少两个数据上传协议之后,还包括:
    调用服务端的域名获取接口,获取每个所述数据上传协议对应的当前可用域名。
  10. 根据权利要求9所述的方法,其中,所述基于预设性能测试方式,对每个所述数据上传协议进行数据上传性能测试,包括:
    基于预设性能测试方式和每个所述数据上传协议对应的当前可用域名,对每个所述数据上传协议进行数据上传性能测试;
    所述基于所述目标上传协议,对当前待上传的目标应用数据进行上传,包括:
    基于所述目标上传协议和所述目标上传协议对应的当前可用域名,对当前待上传的目标应用数据进行上传。
  11. 根据权利要求9所述的方法,其中,所述调用服务端的域名获取接口,获取每个所述数据上传协议对应的当前可用域名,包括:
    检测每个所述数据上传协议对应的上一可用域名的当前缓存时长是否大于预设有效时长;
    响应于检测到每个所述数据上传协议对应的上一可用域名的当前缓存时长大于预设有效时长,调用服务端的域名获取接口,获取该数据上传协议对应的当前可用域名;
    响应于检测到每个所述数据上传协议对应的上一可用域名的当前缓存时长小于或等于预设有效时长,将该数据上传协议对应的上一可用域名作为该数据上传协议对应的当前可用域名。
  12. 一种数据上传装置,包括:
    数据上传协议获取模块,设置为响应于用户在应用数据上传前触发的预设操作,获取至少两个数据上传协议;
    性能测试模块,设置为基于预设性能测试方式,对每个所述数据上传协议进行数据上传性能测试,并基于性能测试结果确定与当前网络相匹配的目标上传协议;
    应用数据上传模块,设置为响应于用户触发的应用数据上传操作,基于所述目标上传协议,对当前待上传的目标应用数据进行上传。
  13. 一种电子设备,包括:
    至少一个处理器;
    存储器,设置为存储至少一个程序;
    当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如权利要求1-11中任一所述的数据上传方法。
  14. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-11中任一所述的数据上传方法。
PCT/CN2023/078820 2022-03-09 2023-02-28 一种数据上传方法、装置、设备和介质 WO2023169261A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210226539.3A CN114500516A (zh) 2022-03-09 2022-03-09 一种数据上传方法、装置、设备和介质
CN202210226539.3 2022-03-09

Publications (1)

Publication Number Publication Date
WO2023169261A1 true WO2023169261A1 (zh) 2023-09-14

Family

ID=81486142

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/078820 WO2023169261A1 (zh) 2022-03-09 2023-02-28 一种数据上传方法、装置、设备和介质

Country Status (2)

Country Link
CN (1) CN114500516A (zh)
WO (1) WO2023169261A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140075326A1 (en) * 2012-09-12 2014-03-13 Tencent Technology (Shenzhen) Company Limited Method and apparatus for uploading a file
CN104539596A (zh) * 2014-12-18 2015-04-22 华为技术有限公司 流媒体传输的方法、装置及系统
CN105871509A (zh) * 2016-03-25 2016-08-17 乐视控股(北京)有限公司 数据传输方法及装置
CN110290067A (zh) * 2019-07-01 2019-09-27 北京云端智度科技有限公司 一种基于多次协议测试的端到端网络路径的发现方法

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060009159A1 (en) * 2004-07-09 2006-01-12 Leung Hung F Protocol layer analysis in mobile device testing
CN106161523B (zh) * 2015-04-02 2019-11-22 腾讯科技(深圳)有限公司 一种数据处理方法和设备
US10938820B2 (en) * 2018-06-11 2021-03-02 International Business Machines Corporation Data transfer prevention
US10728333B2 (en) * 2018-08-01 2020-07-28 International Business Machines Corporation Dynamically switching between object storage transfer protocols
US11089137B2 (en) * 2019-04-02 2021-08-10 International Business Machines Corporation Dynamic data transmission
US10855813B1 (en) * 2019-07-01 2020-12-01 EMC IP Holding Company LLC Controlled activation of performance monitoring component of network protocol
CN112688824B (zh) * 2019-10-17 2022-09-27 中国移动通信集团浙江有限公司 Rtp丢包检测方法、装置、设备及计算机可读存储介质
CN113382062A (zh) * 2021-06-08 2021-09-10 北京天空卫士网络安全技术有限公司 一种数据传输方法、装置和系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140075326A1 (en) * 2012-09-12 2014-03-13 Tencent Technology (Shenzhen) Company Limited Method and apparatus for uploading a file
CN104539596A (zh) * 2014-12-18 2015-04-22 华为技术有限公司 流媒体传输的方法、装置及系统
CN105871509A (zh) * 2016-03-25 2016-08-17 乐视控股(北京)有限公司 数据传输方法及装置
CN110290067A (zh) * 2019-07-01 2019-09-27 北京云端智度科技有限公司 一种基于多次协议测试的端到端网络路径的发现方法

Also Published As

Publication number Publication date
CN114500516A (zh) 2022-05-13

Similar Documents

Publication Publication Date Title
US10735296B2 (en) Monitoring network traffic in association with an application
CN111294385B (zh) 数据传输方法、装置、可读介质及电子设备
WO2022105591A1 (zh) 缓存服务器性能测试方法、装置、设备和介质
CN111930709B (zh) 数据存储方法、装置、电子设备和计算机可读介质
US20190051147A1 (en) Remote control method, apparatus, terminal device, and computer readable storage medium
WO2019057089A1 (zh) 网卡镜像抓包方法、终端以及可读存储介质
WO2020026018A1 (zh) 文件的下载方法、装置、设备/终端/服务器及存储介质
EP4113985A1 (en) Multimedia conference data processing method and apparatus, and electronic device
WO2021120544A1 (zh) 用于调试设备的方法及装置
CN114039926B (zh) 传输控制协议确定方法、装置、可读介质及电子设备
CN115297164A (zh) 网络代理方法、装置、电子设备及计算机可读存储介质
CN114071544B (zh) 网络测试方法、装置和电子设备
WO2020044092A9 (zh) 数据传输方法及其装置
WO2023169261A1 (zh) 一种数据上传方法、装置、设备和介质
WO2023173876A1 (zh) 数据通信方法、装置、设备和介质
CN111265852A (zh) 一种基于udp的低延时信息传输方法及装置
WO2023083367A1 (zh) 文件后台续传方法、装置、存储介质及电子设备
CN108737378B (zh) 一种基于介质访问控制层的双模通信组网方法及系统
CN113839828B (zh) 一种网络质量探测方法、装置、终端设备及介质
CN110401603B (zh) 用于处理信息的方法和装置
WO2024093534A1 (zh) Npn识别方法、装置及相关设备
CN116954809B (zh) 基于安卓设备的远程控制方法、装置、系统及电子设备
US11736963B2 (en) Server farm solution for network performance testing
CN112804768B (zh) 处理通信连接的方法及装置、终端和非暂时性存储介质
CN115550464B (zh) 基于工业互联网云平台的系统监控方法、电子设备与介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23765839

Country of ref document: EP

Kind code of ref document: A1