[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN111917661B - Data transmission method, device, electronic equipment and computer readable storage medium - Google Patents

Data transmission method, device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN111917661B
CN111917661B CN202010744589.1A CN202010744589A CN111917661B CN 111917661 B CN111917661 B CN 111917661B CN 202010744589 A CN202010744589 A CN 202010744589A CN 111917661 B CN111917661 B CN 111917661B
Authority
CN
China
Prior art keywords
frame
client
data frame
full
data
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
CN202010744589.1A
Other languages
Chinese (zh)
Other versions
CN111917661A (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.)
Douyin Vision Co Ltd
Original Assignee
Douyin Vision 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 Douyin Vision Co Ltd filed Critical Douyin Vision Co Ltd
Priority to CN202010744589.1A priority Critical patent/CN111917661B/en
Publication of CN111917661A publication Critical patent/CN111917661A/en
Application granted granted Critical
Publication of CN111917661B publication Critical patent/CN111917661B/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
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/22Traffic shaping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

The present disclosure proposes a data transmission method, apparatus, electronic device, and computer-readable storage medium, wherein the method includes: determining whether a frame interval of the full-size data frame which is transmitted to the client last time accords with a set frame number, if the frame interval accords with the set frame number, determining to transmit the full-size data frame to the client, and if the frame interval does not accord with the set frame number, determining to transmit the full-size data frame or the difference data frame to the client according to a time interval of the full-size data frame which is transmitted to the client last time. In this embodiment, based on the set frame number and the sending time interval, the sending of the full-volume data frame or the difference data frame is determined, and because the difference data frame is the difference data sent for each client, the data volume is smaller, so that the client flow is controllable, and because the full-volume data frame contains comprehensive data, no data loss exists, and therefore the accuracy of issuing data is also satisfied.

Description

Data transmission method, device, electronic equipment and computer readable storage medium
Technical Field
The present disclosure relates to the technical field of data transmission, and in particular, to a data transmission method, apparatus, electronic device, and computer readable storage medium.
Background
In industries needing large-flow data transmission, such as stock and securities industries, the data amount is greatly changed, and when the data amount is changed, the data needs to be transmitted to a client for display, so that more scenes needing large-flow data transmission exist, such as scenes of implementing disc opening, thousand-file data and the like. And because the data volume changes faster, the data issued by the server has the characteristics of higher frequency, larger data volume and small fluctuation of adjacent data changes in the issued data.
The change of the data volume can be used for guiding the subsequent selection and operation of a user in the securities industry, so that the accurate data delivery is very heavy, and meanwhile, the consumption of the flow is also required to be reduced because the data volume delivered is also large, so that the technical problem of how to deliver the data under the conditions of ensuring the accuracy and reducing the flow consumption is urgently solved.
Disclosure of Invention
The present disclosure aims to solve, at least to some extent, one of the technical problems in the related art.
Therefore, a first object of the present disclosure is to provide a data transmission method, which reduces the traffic of a client and ensures the accuracy of data distribution by applying the principle of video transmission in a scenario of large data volume distribution.
A second object of the present disclosure is to propose a data transmission device.
A third object of the present disclosure is to propose an electronic device.
A fourth object of the present disclosure is to propose a non-transitory computer readable storage medium.
To achieve the above object, an embodiment of a first aspect of the present disclosure provides a data transmission method, including:
determining whether the frame interval of the last full data frame transmission to the client accords with the set frame number;
if the frame interval accords with the set frame number, determining to send a full data frame to the client;
and if the frame interval does not accord with the set frame number, determining to send the full-size data frame or the difference data frame to the client according to the time interval of the last full-size data frame sent to the client.
To achieve the above object, an embodiment of a second aspect of the present disclosure proposes a data transmission apparatus, the apparatus comprising:
the interval determining module is used for determining whether the frame interval of the full data frame which is transmitted to the client last time accords with the set frame number;
the first determining module is used for determining to send the full data frame to the client if the frame interval accords with the set frame number;
and the second determining module is used for determining to send the full data frame or the difference data frame to the client according to the time interval of the last full data frame sent to the client if the frame interval does not accord with the set frame number.
To achieve the above object, an embodiment of a third aspect of the present disclosure provides an electronic device, including
At least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor, the instructions being arranged to perform the data transmission method of the first aspect described above.
In order to achieve the above object, a fourth aspect of the present disclosure provides a computer-readable storage medium storing computer instructions for causing the computer to execute the data transmission method according to the first aspect.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
determining whether a frame interval of the full-size data frame which is transmitted to the client last time accords with a set frame number, if the frame interval accords with the set frame number, determining to transmit the full-size data frame to the client, and if the frame interval does not accord with the set frame number, determining to transmit the full-size data frame or the difference data frame to the client according to a time interval of the full-size data frame which is transmitted to the client last time. In this embodiment, based on the set frame number and the sending time interval, the sending of the full-volume data frame or the difference data frame is determined, and because the difference data frame is the difference data sent for each client, the data volume is smaller, so that the client flow is controllable, and because the full-volume data frame contains comprehensive data, no data loss exists, and therefore the accuracy of issuing data is also satisfied.
Additional aspects and advantages of the disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the disclosure.
Drawings
The foregoing and/or additional aspects and advantages of the present disclosure will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
fig. 1 is a flow chart of a data transmission method according to an embodiment of the disclosure;
fig. 2 is a flow chart of another data transmission method according to an embodiment of the disclosure;
fig. 3 is a schematic structural diagram of a data transmission device according to an embodiment of the disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure; and
fig. 5 is a schematic structural view of a computer-readable storage medium provided by an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and intended for the purpose of explaining the present disclosure and are not to be construed as limiting the present disclosure.
Data transmission methods, apparatuses, electronic devices, and computer-readable storage media of the embodiments of the present disclosure are described below with reference to the accompanying drawings.
Fig. 1 is a flowchart of a data transmission method according to an embodiment of the disclosure. In the present disclosure, the inventor finds that in the field of video coding, a GOP (video compression technology used by MPEG) has a good compression effect, so that transmission efficiency can be improved, and the GOP can completely play video content without concern about its context.
In the present disclosure, a standard GOP is set to include a full-size data frame I and a difference data frame P, where the full-size data frame includes complete data, and the difference data frame includes a difference between data sent this time and data of the full-size data frame sent last time.
As shown in fig. 1, the method comprises the steps of:
step 101, determining whether the frame interval of the last transmission of the full data frame to the client accords with the set frame number.
The execution subject of the data transmission method of the present disclosure is a server. The data transmission method of the embodiment of the present disclosure may be performed by the data transmission device of the embodiment of the present disclosure, and the data transmission device of the embodiment of the present disclosure may be configured in any server to perform the data transmission method of the embodiment of the present disclosure, where the server may be a local server or a server disposed in a cloud.
The client refers to an application program, a web page, a terminal device, or the like which is served by the server.
Wherein the frame interval is used to indicate the last time a full data frame was transmitted to the total number of frames that have been currently transmitted. The set frame number is a preset frame number indicating the frame number included between two transmission of the full-size data frame. That is, it is set in the present disclosure that the full data frame is transmitted every set number of frames. For example, if the number of frames is 10, a full-frame data frame is transmitted every 10 frames.
In the present disclosure, the number of frames that have been transmitted for the last transmission of the full-size data frame is compared with the set number of frames according to the distance indicated by the frame interval to determine whether the set number of frames is met.
For example, the frame number is set to be 10 frames, the full-quantity data frames are sent by 0 frames, and if the frame interval between the frame to be sent currently and the frame which is sent the full-quantity data frames to the client last time is determined to be 7 frames, the frame interval 7 frames do not accord with the set frame number of 10 frames; if the frame interval between the frame to be transmitted and the frame which transmits the full data frame to the client last time is 10 frames, the frame interval 10 frames accords with the set frame number 10 frames.
Step 102, if the frame interval accords with the set frame number, determining to send the full data frame to the client.
In this embodiment, when the frame interval accords with the set frame number, the full-volume data frame with larger data volume is sent to the client, and compared with the mode of only sending the full-volume data frame in the prior art, the flow data consumed by the client when receiving the data frame is reduced, so that the flow of the client is controllable.
Step 103, if the frame interval does not meet the set frame number, determining to send the full data frame or the difference data frame to the client according to the time interval of the last full data frame sent to the client.
In this embodiment, if it is determined that the sent frame number indicated by the frame interval meets the set frame number, the requirement of sending the full-size data frame to the client based on the set frame number is met, the full-size data frame is sent to the client, if the requirement of sending the full-size data frame to the client based on the set frame number is not met, the full-size data frame or the difference data frame can be determined to be sent to the client according to the time interval of sending the full-size data frame to the client last time, so as to meet the accuracy requirement of data sending, meanwhile, the flow consumption of the client is considered, and compared with the prior art, the accuracy of displaying data by the client is improved by only sending the difference data frame.
In a possible implementation manner of the embodiment of the present disclosure, it is determined that the frame interval does not conform to the set frame number, and according to a time interval of last sending of a full-size data frame to the client, if the time interval is greater than or equal to a threshold duration, it is determined that the full-size data frame is sent to the client, and if the time interval is less than the threshold duration, it is determined that the difference data frame is sent to the client, so that when the frame interval does not conform to the set frame number, it is determined whether to send the full-size data frame or the difference data frame according to the time interval, so as to meet a requirement of data frame sending, and improve accuracy of data sending.
In the data transmission method of this embodiment, it is determined whether the frame interval of the full-size data frame that was last transmitted to the client matches the set frame number, if the frame interval matches the set frame number, it is determined to transmit the full-size data frame to the client, and if the frame interval does not match the set frame number, it is determined to transmit the full-size data frame or the difference data frame to the client according to the time interval of the full-size data frame that was last transmitted to the client. In this embodiment, based on the set frame number and the sending time interval, the sending of the full-volume data frame or the difference data frame is determined, and because the difference data frame is the difference data sent for each client, the data volume is smaller, so that the client flow is controllable, and because the full-volume data frame contains comprehensive data, no data loss exists, and therefore the accuracy of issuing data is also satisfied.
Based on the above embodiment, the present embodiment provides another data transmission method, taking a securities application scenario among application scenarios issued by large-flow data as an example, and fig. 2 is a flow chart of another data transmission method provided by the embodiment of the present disclosure.
As shown in fig. 2, the method comprises the steps of:
step 201, successfully establishing connection with the client, and setting the round value corresponding to the client as an initial value.
The execution subject of the present disclosure is a server, where the server is a server of a security application, and the client is all applications of the security installed in a terminal device of a user, or may be a web page, an application program, or the like used by a manager or a developer of the security application to manage and maintain the security application, which is not limited in the embodiments of the present disclosure.
In this embodiment, after a connection is established between the server and the client, the round value corresponding to the client is set to an initial value to indicate that no service data communication has been performed between the client and the server, that is, the server has not sent any data frame to the client.
Step 202, inquiring a round value corresponding to the client, wherein the round value is used for indicating the total frame number of the data frames sent to the client, and the data frames comprise a full data frame and a difference data frame.
The round value is dynamically changed, and when the server transmits the data frames to the client, the round value corresponding to the client is added with 1, so that the round value is used for indicating the total frame number of the data frames sent to the client, and the data frames comprise full data frames and difference data frames.
In step 203, if the round value is an integer multiple of the set frame number, it is determined that the frame interval matches the set frame number.
Step 204, determining to send the full data frame to the client, and sending the full data frame to the client.
In the embodiment of the disclosure, according to the obtained round value, it is determined whether the round value is an integer multiple of the set frame number, if the round value is the integer multiple, it is determined that the frame interval accords with the set frame number, that is, the frame which has been transmitted currently accords with the set frame number relative to the frame which has been transmitted last time to the client, and the full-size data frame can be transmitted to the client.
For example, the number of frames is set to 10 frames, that is, a full-frame data frame is transmitted every 10 frames, the acquired round value is 30 frames, the round value is 30 frames which are 3 times as large as the set number of frames 10 frames, and the frame interval between the frame to be currently transmitted and the full-frame data frame to be transmitted last is determined to be 10 frames, and the 10 frames are consistent with the set number of frames 10 frames, so that it is determined that the full-frame data frame can be transmitted again to the client.
In a possible implementation manner of the embodiment of the present disclosure, before the full-size data frame is sent to the client, the full-size data frame to be sent may be obtained from the first interface, that is, the full-size data frame is obtained through a dedicated first interface, and by setting an independent first interface at the server, the full-size data frame is obtained through the first interface, so that protocol analysis is not required, and the full-size data frame can be directly sent to the corresponding client after being obtained, thereby reducing the delay of data sending.
In step 205, if the round value is not an integer multiple of the set frame number, it is determined that the frame interval does not conform to the set frame number.
For example, the obtained round value is 36 frames, the 36 frames are not integer multiples of the set frame number 10 frames, the frame interval is determined to be 6, the set frame number 10 frames are not met, whether the full-size data frames can be transmitted or not is determined according to the frame interval, further, in order to improve the accuracy of the frames to be transmitted, the time interval for transmitting the full-size data frames can be set, whether the full-size data frames are transmitted or the difference data frames are transmitted is determined according to the time interval, and the accuracy of data transmission is improved.
Step 206, determining whether the time interval is greater than or equal to the threshold duration according to the time interval of the last transmission of the full data frame to the client, if so, executing step 204, and if not, executing step 207.
In this embodiment, when it is determined that the frame interval does not meet the set frame number, it is further determined whether the time interval for retransmitting the full-size data frame is satisfied according to the time interval for retransmitting the full-size data frame to the client, and when the time interval for retransmitting the full-size data frame is not satisfied, the transmission of the difference data frame is performed, so as to improve the accuracy of the data displayed to the client, and reduce the traffic consumption of the client.
Step 207, determining to send the difference data frame to the client, and sending the difference data frame to the client.
In this embodiment, when it is determined that the difference data frame is sent to the client, so that when the total data frame is not sent again, the difference data frame is sent, so as to reduce the flow requirement of the client, and ensure the accuracy of the display data of the client.
In another embodiment of the present disclosure, before sending the difference data frame to the client, the difference data frame to be sent may be obtained from the second interface, that is, the difference data frame is obtained through a dedicated second interface, and by setting an independent second interface at the server, the difference data frame is obtained through the second interface, so that protocol analysis is not required, and the difference data frame can be directly sent to the corresponding client after being obtained, thereby reducing the delay of data sending.
The first interface and the second interface are independent interfaces.
In another embodiment of the present disclosure, before sending the difference data frame to the client, it may be queried to determine that the round value corresponding to the client is not an initial value, that is, when the round value corresponding to the client is not an initial value, it may be determined that the server and the client have performed service data communication, and the difference data frame may be sent to the client, and conversely, if the query determines that the round value corresponding to the client is an initial value, it may be determined that the server and the client have not performed service data communication, and cannot send the difference data frame to the client, and discard the obtained difference data frame and do not send the difference data frame to the corresponding client.
When the full-size data frame and the difference data frame in the video are applied to the stock industry, the full-size data frame represents all stock data, and the difference data frame represents a difference data frame which is different from the last transmitted full-size data frame.
For example, there are 5000 stocks, the total data frame is all data of 5000 stocks, and the difference data frame indicates that only 200 stocks are updated compared with the 5000 stocks transmitted last time, so the difference data frame transmitted this time is the data of 200 stocks updated with data, and the data of 4800 stocks not updated is not transmitted.
Wherein the data of each stock may contain the following fields:
head: a header field holding some meta information, wherein frame_type is key parameter information for representing a frame type;
op_code: an operation code;
code: a security code;
buy_value: total commission purchase amount;
sel_value: total commission sales;
but_volume: total commission purchase amount;
sel_volume: total commission sales;
detail: list of specific structures, detailed information.
The specific structure list may include the following fields:
price: price of securities;
volume: stock exchange;
level: a transaction gear;
and (3) flag: a transaction direction;
major_volume: stock order consignment;
and the order list is the detailed order information.
And step 208, updating the round value corresponding to the client.
In this embodiment, the round value is used to indicate the total frame number of the data frames sent to the client, where the data frames include a full data frame and a difference data frame, so that after the difference data frame or the full data frame is sent to the client, the round value corresponding to the client needs to be updated, and optionally, the round value corresponding to the client may be added by 1 in an accumulated manner to update.
In the data transmission method of this embodiment, it is determined whether the frame interval of the full-size data frame that was last transmitted to the client matches the set frame number, if the frame interval matches the set frame number, it is determined to transmit the full-size data frame to the client, and if the frame interval does not match the set frame number, it is determined to transmit the full-size data frame or the difference data frame to the client according to the time interval of the full-size data frame that was last transmitted to the client. In this embodiment, based on the set frame number and the sending time interval, the sending of the full-volume data frame or the difference data frame is determined, and because the difference data frame is the difference data sent for each client, the data volume is smaller, so that the client flow is controllable, and because the full-volume data frame contains comprehensive data, no data loss exists, and therefore the accuracy of issuing data is also satisfied.
In order to implement the above embodiment, the present disclosure further proposes a data transmission device.
Fig. 3 is a schematic structural diagram of a data transmission device according to an embodiment of the disclosure.
As shown in fig. 3, the apparatus includes: an interval determining module 31, a first transmitting module and a second transmitting module.
The interval determining module is used for determining whether the frame interval of the full data frame which is transmitted to the client last time accords with the set frame number;
the first determining module is used for determining to send the full data frame to the client if the frame interval accords with the set frame number;
and the second determining module is used for determining to send the full data frame or the difference data frame to the client according to the time interval of the last full data frame sent to the client if the frame interval does not accord with the set frame number.
Further, in one possible implementation manner of the embodiment of the disclosure, the second determining module is specifically configured to:
if the time interval is greater than or equal to a threshold duration, determining to send the full data frame to the client; and if the time interval is smaller than the threshold time length, determining to send the difference data frame to the client.
In one possible implementation of the embodiments of the present disclosure, the interval determining module includes:
the inquiring unit is used for inquiring the round value corresponding to the client; the round value is used for indicating the total frame number of the data frames sent to the client; the data frames comprise the full data frame and the difference data frame;
a determining unit, configured to determine that the frame interval conforms to the set frame number if the round value is an integer multiple of the set frame number; and if the round value is not an integral multiple of the set frame number, determining that the frame interval does not accord with the set frame number.
In one possible implementation of an embodiment of the disclosure, the apparatus further includes:
the acquisition module is used for acquiring the total data frames to be transmitted from the first interface; and/or obtaining the difference data frame to be transmitted from the second interface.
The sending module is used for sending the data frames to the client;
and the updating module is used for updating the round value corresponding to the client.
In one possible implementation manner of the embodiment of the present disclosure, the interval determining module further includes:
and the setting unit is used for successfully establishing the connection with the client, and setting the round value corresponding to the client as an initial value.
Furthermore, as a possible implementation manner, the apparatus further includes a query module, configured to query to determine that the round value corresponding to the client is not the initial value if the difference data frame is to be sent.
It should be noted that the foregoing explanation of the embodiment of the data transmission method is also applicable to the data transmission device of this embodiment, and the principle is the same, and will not be repeated here.
In the data transmission device of this embodiment, it is determined whether the frame interval of the full-size data frame that was last transmitted to the client matches the set frame number, if the frame interval matches the set frame number, it is determined to transmit the full-size data frame to the client, and if the frame interval does not match the set frame number, it is determined to transmit the full-size data frame or the difference data frame to the client according to the time interval of the full-size data frame that was last transmitted to the client. In this embodiment, based on the set frame number and the sending time interval, the sending of the full-volume data frame or the difference data frame is determined, and because the difference data frame is the difference data sent for each client, the data volume is smaller, so that the client flow is controllable, and because the full-volume data frame contains comprehensive data, no data loss exists, and therefore the accuracy of issuing data is also satisfied.
To achieve the above embodiments, an embodiment of the present disclosure proposes an electronic device including at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being configured to perform the data transmission method of the foregoing method embodiment.
In one embodiment of the present disclosure, an electronic device is presented, and referring now to FIG. 4, a schematic diagram of a configuration of an electronic device suitable for use in implementing embodiments of the present disclosure is shown. The electronic device in the embodiment of the disclosure may be a single server or a server cluster. The electronic device shown in fig. 4 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 4, the electronic device 800 may include a processing means (e.g., a central processor, a graphics processor, etc.) 801, which may perform various appropriate actions and processes according to programs stored in a Read Only Memory (ROM) 802 or programs loaded from a storage 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
In general, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 807 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, etc.; storage 808 including, for example, magnetic tape, hard disk, etc.; communication means 809. The communication means 809 may allow the electronic device 800 to communicate wirelessly or by wire with other devices to exchange data. While fig. 4 shows an electronic device 800 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure 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 shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication device 809, or installed from storage device 808, or installed from ROM 802. When the computer program is executed by the processing device 801, the above-described functions defined in the data transmission method of the embodiment of the present disclosure are performed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure 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 shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication device 809, or installed from storage device 808, or installed from ROM 802. When the computer program is executed by the processing device 801, the above-described functions defined in the data transmission method of the embodiment of the present disclosure are performed.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 context of this disclosure, 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 disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the access control server; or may exist alone without being assembled into the access control server.
The above computer-readable medium carries one or more programs that, when executed by the access control server, cause the access control server to: determining whether a frame interval of the full-size data frame which is transmitted to the client last time accords with a set frame number, if the frame interval accords with the set frame number, determining to transmit the full-size data frame to the client, and if the frame interval does not accord with the set frame number, determining to transmit the full-size data frame or the difference data frame to the client according to a time interval of the full-size data frame which is transmitted to the client last time.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language 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. In the case of a remote computer, the remote computer may 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 may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts 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 disclosure. 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 and/or flowchart illustration, and combinations of blocks in the block diagrams and/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 involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
In order to implement the above-mentioned embodiments, the present disclosure also proposes a computer-readable storage medium storing computer-readable instructions for causing a computer to execute the data transmission method according to the above-mentioned method embodiments.
Fig. 5 is a schematic structural view of a computer-readable storage medium provided by an embodiment of the present disclosure. As shown in fig. 5, a computer-readable storage medium 300 according to an embodiment of the present disclosure has computer instructions 301 stored thereon. When executed by a processor, the computer instructions 301 perform all or part of the steps of the data transmission methods of the various embodiments of the present disclosure described previously.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a non-transitory storage medium, such as a magnetic disk, an optical disk, a read-only memory (ROM) or a random-access memory (RAM), etc., and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the data transmission method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are merely for illustrating the technical solution of the present disclosure, and are not limiting thereof; although the present disclosure has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present disclosure.

Claims (8)

1. A method of data transmission, the method comprising:
determining whether the frame interval of the last full data frame transmission to the client accords with the set frame number;
if the frame interval accords with the set frame number, determining to send a full data frame to the client;
if the frame interval does not accord with the set frame number, determining to send the full-size data frame or the difference data frame to the client according to the time interval of the last full-size data frame sent to the client;
wherein the determining, according to the time interval of the last transmission of the full-size data frame to the client, to transmit the full-size data frame or the difference data frame to the client includes:
if the time interval is greater than or equal to a threshold duration, determining to send the full data frame to the client;
and if the time interval is smaller than the threshold time length, determining to send the difference data frame to the client.
2. The data transmission method according to claim 1, wherein determining whether the frame interval of the last transmission of the full-size data frame to the client corresponds to the set frame number includes:
inquiring the round value corresponding to the client; the round value is used for indicating the total frame number of the data frames sent to the client; the data frames comprise the full data frame and the difference data frame;
if the round value is an integer multiple of the set frame number, determining that the frame interval accords with the set frame number;
and if the round value is not an integral multiple of the set frame number, determining that the frame interval does not accord with the set frame number.
3. The data transmission method according to claim 2, characterized in that the method further comprises:
transmitting a data frame to the client;
and updating the round value corresponding to the client.
4. The data transmission method according to claim 3, wherein before the querying the round value corresponding to the client, further comprises:
setting a round value corresponding to the client as an initial value if the connection with the client is successfully established;
before the data frame is sent to the client, the method further comprises:
and if the difference data frame is to be sent, inquiring to determine that the round value corresponding to the client is not the initial value.
5. The data transmission method according to claim 3, wherein before the sending of the data frame to the client, further comprising:
acquiring a full data frame to be transmitted from a first interface;
and/or obtaining the difference data frame to be transmitted from the second interface.
6. A data transmission apparatus, the apparatus comprising:
the interval determining module is used for determining whether the frame interval of the full data frame which is transmitted to the client last time accords with the set frame number;
the first determining module is used for determining to send the full data frame to the client if the frame interval accords with the set frame number;
the second determining module is used for determining to send the full data frame or the difference data frame to the client according to the time interval of the last sending of the full data frame to the client if the frame interval does not accord with the set frame number;
the second determining module is specifically configured to:
if the time interval is greater than or equal to a threshold duration, determining to send the full data frame to the client;
and if the time interval is smaller than the threshold time length, determining to send the difference data frame to the client.
7. An electronic device, comprising
At least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor, the instructions being arranged to perform the data transmission method of any of the preceding claims 1-5.
8. A computer-readable storage medium storing computer instructions for causing the computer to perform the data transmission method of any one of claims 1 to 5.
CN202010744589.1A 2020-07-29 2020-07-29 Data transmission method, device, electronic equipment and computer readable storage medium Active CN111917661B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010744589.1A CN111917661B (en) 2020-07-29 2020-07-29 Data transmission method, device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010744589.1A CN111917661B (en) 2020-07-29 2020-07-29 Data transmission method, device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111917661A CN111917661A (en) 2020-11-10
CN111917661B true CN111917661B (en) 2023-05-02

Family

ID=73286797

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010744589.1A Active CN111917661B (en) 2020-07-29 2020-07-29 Data transmission method, device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111917661B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113556289B (en) * 2021-07-26 2023-06-30 南方电网数字电网研究院有限公司 Data transmission method and device and field programmable gate array
CN114095438B (en) * 2021-11-25 2023-07-25 北京百度网讯科技有限公司 Data transmission method, apparatus, device, storage medium and computer program product
CN114513385B (en) * 2022-03-24 2024-04-02 深圳市元征科技股份有限公司 Data transmission method, device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101686370A (en) * 2008-09-27 2010-03-31 乐金电子(中国)研究开发中心有限公司 System, terminal and method for reducing video-data transmission delay of visual phones
CN101742271A (en) * 2008-11-10 2010-06-16 华为技术有限公司 Method, system and device for transmitting stream media data
WO2012079406A1 (en) * 2010-12-17 2012-06-21 华为技术有限公司 Detection method and device for frame type

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7936819B2 (en) * 2005-07-08 2011-05-03 Tag Networks, Inc. Video encoder with latency control
CN102457727A (en) * 2010-10-28 2012-05-16 武汉磐大科技有限公司 Transmission method of multi-channel H.264 video frame for 3G network
CN102547375A (en) * 2010-12-23 2012-07-04 上海讯垒网络科技有限公司 Transmission method for quickly previewing H.264 coded picture
JP6066561B2 (en) * 2012-01-26 2017-01-25 キヤノン株式会社 Video processing apparatus, video processing method, and program
CN104125429B (en) * 2013-04-27 2018-07-06 杭州海康威视数字技术股份有限公司 The adjusting method and device of video data transmission
CN103929682B (en) * 2014-03-27 2017-03-22 广州华多网络科技有限公司 Method and device for setting key frames in video live broadcast system
CN105072345B (en) * 2015-08-25 2018-12-25 深圳市通则技术股份有限公司 Method for video coding and device
US10554368B2 (en) * 2015-10-07 2020-02-04 Microsoft Technology Licensing, Llc Wireless data-acknowledgement communication using frame aggregation
CN105262836A (en) * 2015-10-30 2016-01-20 惠州高盛达科技有限公司 Information push method of server and push information reception method of client
CN108696427B (en) * 2017-04-11 2020-05-08 华为技术有限公司 Data transmission method and device
CN107197192B (en) * 2017-05-05 2019-05-24 中广热点云科技有限公司 A kind of method and system for face video in compressed video communication
CN106973066A (en) * 2017-05-10 2017-07-21 福建星网智慧科技股份有限公司 H264 encoded videos data transmission method and system in a kind of real-time communication
CN110213206B (en) * 2018-04-26 2022-06-21 腾讯科技(深圳)有限公司 Stream data processing method, server, and computer-readable storage medium
CN109150741B (en) * 2018-08-10 2022-05-20 Oppo广东移动通信有限公司 Message sending method and device, electronic equipment and storage medium
CN110519632B (en) * 2019-07-30 2021-08-20 华为技术有限公司 Screen projection method and equipment
CN110796053B (en) * 2019-10-21 2022-07-29 北京奇艺世纪科技有限公司 Video detection method and device, electronic equipment and computer readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101686370A (en) * 2008-09-27 2010-03-31 乐金电子(中国)研究开发中心有限公司 System, terminal and method for reducing video-data transmission delay of visual phones
CN101742271A (en) * 2008-11-10 2010-06-16 华为技术有限公司 Method, system and device for transmitting stream media data
WO2012079406A1 (en) * 2010-12-17 2012-06-21 华为技术有限公司 Detection method and device for frame type

Also Published As

Publication number Publication date
CN111917661A (en) 2020-11-10

Similar Documents

Publication Publication Date Title
US10929180B2 (en) Task scheduling method, apparatus, electronic device and storage medium
CN111917661B (en) Data transmission method, device, electronic equipment and computer readable storage medium
CN114401447B (en) Video clamping prediction method, device, equipment and medium
CN111367687A (en) Inter-process data communication method and device
CN113010131B (en) Display content updating method, device, terminal, server and storage medium
CN110706675A (en) Information display method and device
CN111246228B (en) Method, device, medium and electronic equipment for updating gift resources of live broadcast room
CN110275886B (en) Account management method, device, readable medium and system of information display system
CN113542856B (en) Method, device, equipment and computer readable medium for reverse playing of online video
CN111478916B (en) Data transmission method, device and storage medium based on video stream
CN113365140A (en) MP4 online playing method, device, equipment, storage medium and program product
CN111225255B (en) Target video push playing method and device, electronic equipment and storage medium
CN115842789B (en) Data packet scheduling method, device and readable storage medium
CN111274104B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN112019406B (en) Flow monitoring method and device, electronic equipment and computer readable medium
CN112203103B (en) Message processing method, device, electronic equipment and computer readable storage medium
CN116361254B (en) Image storage method, apparatus, electronic device, and computer-readable medium
CN111343468A (en) Message processing method and device and electronic equipment
CN112163176A (en) Data storage method and device, electronic equipment and computer readable medium
CN114968621B (en) Data communication method, device, equipment, storage medium and system
CN113127222B (en) Data transmission method, device, equipment and medium
CN115134641B (en) Screen projection method and device and electronic equipment
CN117520228B (en) Command processing method, device, equipment and computer readable storage medium
CN113656645B (en) Log consumption method and device
US20240152504A1 (en) Data interaction method, apparatus, and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Tiktok vision (Beijing) Co.,Ltd.

Address before: Room B0035, 2nd floor, No. 3 Courtyard, 30 Shixing Street, Shijingshan District, Beijing, 100041

Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: Tiktok vision (Beijing) Co.,Ltd.

GR01 Patent grant
GR01 Patent grant