CN111064782A - Method and device for transmitting data, electronic equipment and storage medium - Google Patents

Method and device for transmitting data, electronic equipment and storage medium Download PDF

Info

Publication number
CN111064782A
CN111064782A CN201911272668.0A CN201911272668A CN111064782A CN 111064782 A CN111064782 A CN 111064782A CN 201911272668 A CN201911272668 A CN 201911272668A CN 111064782 A CN111064782 A CN 111064782A
Authority
CN
China
Prior art keywords
data
transmission structure
coded
server
target
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.)
Granted
Application number
CN201911272668.0A
Other languages
Chinese (zh)
Other versions
CN111064782B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911272668.0A priority Critical patent/CN111064782B/en
Publication of CN111064782A publication Critical patent/CN111064782A/en
Application granted granted Critical
Publication of CN111064782B publication Critical patent/CN111064782B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/566Grouping or aggregating service requests, e.g. for unified processing

Abstract

The application discloses a method and a device for transmitting data, electronic equipment and a storage medium, and belongs to the technical field of communication. The method comprises the following steps: acquiring target data; encoding the target data to obtain first encoded data, and copying the first encoded data to a common transmission structure; and coding the public transmission structure to obtain a coded public transmission structure, and sending the coded public transmission structure to the first server. According to the method and the device, the first server does not need to select different decoding modes according to different transmission structures, but selects one decoding mode for a public transmission structure in a unified mode, and therefore data transmission efficiency is improved. In addition, the first server does not need to perform assignment conversion on the data, so that the second server obtains the original user behavior data acquired by the terminal after decoding twice, and the data provides a more accurate data basis for user behavior analysis performed by the second server.

Description

Method and device for transmitting data, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for transmitting data, an electronic device, and a storage medium.
Background
With the development of communication technology, the amount of data required to be transmitted is increasing. For example, when the server needs to analyze the user behavior, a plurality of terminals transmit the relevant data of the user to the server. Therefore, it is desirable to provide a method to implement data transmission.
In the related art, a terminal collects source data, assigns the source data to different transmission structures according to the types of the source data, and then sends the transmission structures to a data receiving server after coding processing. And after receiving the coded transmission structure, the data receiving server adopts different decoding modes according to different correspondence of the transmission structure to obtain the transmission structure. And then, the data receiving server performs assignment conversion on the transmission structure and encodes the transmission structure, so as to send the transmission structure to other servers.
However, since the data receiving server needs to select different decoding methods according to different transmission structures, the process of transmitting data is complicated, and the transmission efficiency is not high.
Disclosure of Invention
The embodiment of the application provides a method and a device for transmitting data, electronic equipment and a storage medium, and aims to solve the problem of low transmission efficiency in the related technology. The technical scheme is as follows:
in one aspect, a method for transmitting data is provided, and the method includes:
acquiring target data;
encoding the target data to obtain first encoded data, and copying the first encoded data to a common transmission structure;
and coding the public transmission structure to obtain a coded public transmission structure, and sending the coded public transmission structure to the first server.
In one aspect, a method for transmitting data is provided, and the method includes:
receiving the coded public transmission structure sent by the terminal;
acquiring a coded target transmission structure based on the coded common transmission structure;
and sending the coded target transmission structure to a second server.
In an exemplary embodiment, the obtaining the encoded target transport structure based on the encoded common transport structure includes:
in one aspect, a method for transmitting data is provided, and the method includes:
receiving an encoded target transmission structure sent by a first server;
decoding the coded target transmission structure to obtain a target transmission structure;
and decoding the target transmission structure to obtain user behavior data.
In one aspect, an apparatus for transmitting data is provided, the apparatus comprising:
the acquisition module is used for acquiring target data;
the copying module is used for coding the target data to obtain first coded data and copying the first coded data to a public transmission structure;
and the sending module is used for coding the public transmission structure to obtain a coded public transmission structure and sending the coded public transmission structure to the first server.
In an exemplary embodiment, the obtaining module is configured to obtain a plurality of pieces of source data, and determine a data type of each piece of source data; and determining user behavior data from a plurality of source data according to the data type, and taking the user behavior data as the target data.
In an exemplary embodiment, the obtaining module is configured to obtain a plurality of pieces of source data, and use the plurality of pieces of source data as the target data; the copying module is used for determining the data type of each piece of source data; carrying the data type and the first encoded data in the common transmission structure.
In one aspect, an apparatus for transmitting data is provided, the apparatus comprising:
the receiving module is used for receiving the coded public transmission structure sent by the terminal;
an obtaining module, configured to obtain a coded target transmission structure based on the coded common transmission structure;
and the sending module is used for sending the coded target transmission structure to a second server.
In an exemplary embodiment, the obtaining module is configured to use the encoded common transport structure as the encoded target transport structure.
In an exemplary embodiment, the apparatus further comprises: the decoding module is used for decoding the coded public transmission structure to obtain a public transmission structure, and the public transmission structure comprises a data type and first coded data; determining second coded data from the first coded data according to the data type, wherein the second coded data are data obtained by coding user behavior data; the obtaining module is configured to copy the second encoded data into a reference transmission structure; and coding the reference transmission structure to obtain a coded reference transmission structure, and taking the coded reference transmission structure as the coded target transmission structure.
In an exemplary embodiment, the sending module is configured to store the encoded target transport structure in a reference file, and the second server is configured to receive the encoded target transport structure by reading the reference file.
In one aspect, an apparatus for transmitting data is provided, the apparatus comprising:
the receiving module is used for receiving the coded target transmission structure sent by the first server;
the first decoding module is used for decoding the coded target transmission structure to obtain a target transmission structure;
and the second decoding module is used for decoding the target transmission structure to obtain user behavior data.
In an exemplary embodiment, the receiving module is configured to read the encoded target transmission structure from a reference file, where the reference file is used for the first server to store the encoded target transmission structure.
In one aspect, an electronic device is provided, the device comprising a memory and a processor; the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the method for transmitting data provided by any possible implementation manner of the embodiment of the application.
In another aspect, a readable storage medium is provided, and at least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor to implement the method for transmitting data provided in any possible implementation manner of the embodiments of the present application.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application;
fig. 2 is a flowchart of a method for transmitting data according to an embodiment of the present application;
FIG. 3 is a schematic diagram of obtaining user data according to an embodiment of the present application;
FIG. 4 is a schematic diagram of obtaining user data according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a common transmission structure provided in an embodiment of the present application;
FIG. 6 is a flow chart of a method for transmitting data according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of transmission data provided in an embodiment of the present application;
fig. 8 is a schematic structural diagram of transmission data provided in an embodiment of the present application;
fig. 9 is a schematic structural diagram of transmission data provided in an embodiment of the present application;
fig. 10 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The embodiment of the application provides a method for transmitting data, which can be applied to the implementation environment shown in fig. 1. Fig. 1 includes at least one terminal 11, a first server 12, a second server 14, and a third server 13. Wherein the first server 12 is communicatively connected to each terminal 11 and the third server 13, and the third server 13 is further communicatively connected to the second server 14. The server and the server, and the terminal and the server in communication connection can transmit the coded data.
The terminal 11 may be any electronic product that can perform human-Computer interaction with a user through one or more modes such as a keyboard, a touch pad, a touch screen, a remote controller, voice interaction, or handwriting equipment, for example, a PC (Personal Computer), a mobile phone, a smart phone, a PDA (Personal Digital Assistant), a wearable device, a pocket PC (pocket PC), a tablet Computer, a smart car, a smart television, a smart sound box, and the like.
The first server 12, the second server 14, and the third server 13 may be one server, a server cluster composed of a plurality of servers, or a cloud computing service center. The first server 12, the second server 14 and the third server 13 may also be integrated in the same server.
It should be understood by those skilled in the art that the terminal 11, the first server 12, the second server 14 and the third server 13 are only examples, and other existing or future terminals or servers may be suitable for the present application and are included in the scope of the present application and are herein incorporated by reference.
Based on the implementation environment shown in fig. 1, referring to fig. 2, an embodiment of the present application provides a method for transmitting data, where the method is applicable to the terminal shown in fig. 1. As shown in fig. 2, the method includes:
step 201, the terminal acquires target data.
During operation of the terminal, data may be generated due to user interaction with the terminal. The terminal can store the detected data in the memory after detecting the data each time. Then, the terminal can read the stored data from the memory at the reference time point, thereby realizing the acquisition of the data. The reference time point may be set according to actual needs or experience, and the reference time point is not limited in this embodiment. For example, the reference time point may be one or more times fixed every day, or, if the data is data generated based on interaction between the user and an APP (Application) installed on the terminal, the time when the user exits the APP may be used as the reference time point.
In an exemplary embodiment, obtaining target data includes: a plurality of pieces of source data are acquired, and the data type of each piece of source data is determined. And determining user behavior data from the plurality of source data according to the data type, and taking the user behavior data as target data.
Where the source data includes, but is not limited to, base data and user behavior data. The basic data refers to data that is not affected by user behavior, such as registration information, account ID (identity), and operation data of the terminal itself. The user behavior data is data generated by user operation, and the user behavior data may be different in different APPs. For example, referring to fig. 3, in the game APP, the user behavior data includes, but is not limited to, data such as a slide length, a slide strength, a slide time, a click number, and a click time. In shopping APP, as shown in fig. 4, the user behavior data includes, but is not limited to, data of user operation of selecting item page, data of page stay time, data of user operation of selecting item, and the like.
As for the manner of determining the data type of each piece of source data, the data type of the source data may be determined after the terminal detects the source data, for example, the type of the source data is basic data, and the like. And then correspondingly storing the source data and the data types in the memory. The data type of the source data can be directly determined when the source data is acquired from the memory. Of course, the process of determining the data type of the source data may also be performed after the source data is acquired from the memory, and the manner of determining the data type of the source data is not limited in this embodiment.
According to the determined data type of the source data, the source data with the data type being the user behavior data can be determined from all the source data, namely all the user behavior data are screened from the source data, and the user behavior data are used as target data. Alternatively, in the exemplary embodiment, all the source data may be directly used as the target data without filtering the source data according to the data type. It should be noted that, for two ways of only using the user behavior data as the target data and using the source data as the target data, different processing ways may be corresponded in some subsequent steps, which will be described in detail later.
Step 202, the terminal encodes the target data to obtain first encoded data, and copies the first encoded data to the common transmission structure.
The terminal may copy the byte stream to the common transport structure after obtaining the byte stream. It should be noted that the format of the byte stream is matched with the common transmission structure. In this embodiment, since the target data in different formats are all encoded into the byte stream in the format matching the common transmission structure, it is not necessary to select different transmission structures for the target data in different formats, but the same common transmission structure can be used for all the target data in the formats.
The common transport structure can be seen in fig. 5, where char sbuff [ MAX _ BUFF _ SIZE ] is a byte stream variable, and copying the first encoded data into the common transport structure is followed by representing the first encoded data by the byte stream variable. In addition, intiLength is an integer value used to record the actual byte length of the first encoded data copied into the common transport structure. In the process of reading the first encoded data, the device such as the terminal or the server stops the accumulated calculation of the byte length if the character 0 is read. The integer value is needed to record the true byte length since the first encoded data may include the character 0, resulting in a calculation error of the byte length.
Further, in the case that the target data only includes the user behavior data, the present embodiment directly copies the first encoded data obtained by encoding the target data in the common transmission structure, so that the common transmission structure carries the first encoded data. In an exemplary embodiment, copying the first encoded data into the common transport structure in the case where the target data is source data comprises: the data type of each piece of source data is determined. The data type and the first encoded data are carried in a common transmission structure. The data type and the first encoded data are both carried in the common transmission structure, which is beneficial for the subsequent first server to obtain the part of the first encoded data obtained by encoding the user behavior data by screening from the first encoded data according to the data type, and the description is not repeated here. In addition, besides the data type, other auxiliary data, such as data transmission time, etc., may be carried in the common transmission structure. The present embodiment does not limit the types of other auxiliary data.
And step 203, the terminal encodes the public transmission structure to obtain an encoded public transmission structure, and sends the encoded public transmission structure to the first server.
Wherein the amount of processing resources required for transmitting the encoded common transport structure is less than the amount of processing resources required for encoding the common transport structure. That is, the terminal encodes the common transport structure in order to conveniently transmit the encoded common transport structure to the first server. In addition, the encoding modes that can be adopted by the two times of encoding performed by the terminal in steps 202 and 203 include, but are not limited to, tdr encoding, json encoding, msgpack encoding, protocol buff encoding, and the like. The encoding methods used in step 202 and step 203 may be the same or different.
Step 204, the first server receives the encoded common transmission structure sent by the terminal.
The first server may also be referred to as a data receiving server. Since the terminal sends the encoded common transmission structure to the first server, the first server may receive the encoded common transmission structure sent by the terminal accordingly.
In step 205, the first server obtains an encoded target transport structure based on the encoded common transport structure.
If the common transmission structure only includes the first encoded data, that is, the first encoded data are data obtained by encoding the user behavior data, the encoded common transmission structure can be directly used as the encoded target transmission structure. Or, if the common transmission structure includes a data type in addition to the first encoded data, it indicates that the first encoded data is data obtained by encoding the source data. Therefore, the portion of the first encoded data for encoding the user behavior data in the source data needs to be obtained by screening from the first encoded data according to the data type, so as to obtain the encoded target transmission structure, so that the subsequent server can directly obtain the user behavior data by decoding the encoded target transmission structure.
Thus, in an exemplary embodiment, for the latter case, after receiving the encoded common transmission structure sent by the terminal, the method further comprises: and decoding the encoded common transmission structure to obtain the common transmission structure, wherein the common transmission structure comprises a data type and first encoded data. And determining second coded data from the first coded data according to the data type, wherein the second coded data is data obtained by coding the user behavior data.
In implementation, since each piece of source data has a corresponding data type, after each piece of source data is encoded to obtain first encoded data, each piece of first encoded data also has a corresponding data type. Therefore, the part of the first coded data obtained by coding the user behavior data can be screened out from the first coded data according to the data type to be used as the second coded data, so that the acquisition of the second coded data is realized.
Accordingly, obtaining an encoded target transport structure based on the encoded common transport structure comprises: copying the second coded data into the reference transmission structure, coding the reference transmission structure to obtain a coded reference transmission structure, and taking the coded reference transmission structure as a coded common transmission structure.
As can be seen from the above description, the common transport structure further includes an integer value for recording the actual byte length of the first encoded data. Therefore, when the second encoded data is copied to the reference transmission structure, the integer value can be updated according to the actual byte length of the second encoded data, and the updated integer value and the second encoded data are copied to the reference transmission structure together, so that a complete reference transmission structure is obtained. Then, the encoded reference transmission structure can be used as the encoded target transmission structure, so as to achieve the acquisition of the encoded target transmission structure.
As can be seen from the above description, no matter whether the target data acquired by the terminal only includes the user behavior data or includes the source data, the finally obtained encoded target transmission structure only includes the data obtained by encoding based on the user behavior data through the above step 202 and 205. Therefore, the encoded target transmission structure may be sent to the second server, so that the second server can obtain the user behavior data based on the encoded target transmission structure, thereby performing user behavior analysis, which is detailed in step 206 and step 208.
In step 206, the first server sends the encoded target transport structure to the second server.
In an implementation, the second server is also referred to as a data processing server. The first server can directly send the encoded target transmission structure to the second server, so that the second server obtains the encoded target transmission structure in a receiving mode. Alternatively, in an exemplary embodiment, referring to fig. 6, the first server may send the encoded target transport structure to a third server, and the third server stores the encoded target transport structure in a reference file, so that the second server may obtain the encoded target transport structure by reading from the reference file.
Note that the third server is also referred to as a data center server. In addition, in the embodiment, the first server, the second server, and the third server may be independent servers, or two or three of the first server, the second server, and the third server may be integrated into the same server.
Step 207, the second server receives the encoded target transmission structure sent by the first server.
As can be seen from the description in step 206, the second server may directly receive the encoded target transmission structure sent by the first server, or may read the encoded target transmission structure from a reference file stored in the third server. In the reading process of the second server, the second server can read one by one or in batches according to the processing speed of the second server, so that the situation that the coded target transmission structure beyond the processing capacity range of the second server is accumulated in the second server to influence the processing speed of the second server is avoided.
And step 208, the second server decodes the encoded target transmission structure to obtain the target transmission structure. And decoding the target transmission structural part to obtain user behavior data.
And under the condition that the coded target transmission structure is the coded common transmission structure, the second server decodes the coded target transmission structure to obtain the common transmission structure used by the terminal. And then decoding the public data structure to obtain user behavior data screened from the source data by the terminal. Or, in the case that the encoded target transmission structure is the encoded reference transmission structure, the second server decodes the encoded target transmission structure, and the obtained reference transmission structure is used by the first server. And decoding the reference transmission structure to obtain user behavior data screened from the source data by the first server.
Of course, no matter how the second server obtains the user behavior data, the second server can perform analysis according to the obtained user behavior data, and the behavior of the user of one or more terminals for the terminal can be obtained through the analysis.
In summary, in this embodiment, the first server does not need to select different decoding manners according to different transmission structures, but selects one decoding manner for a common transmission structure, so as to improve the data transmission efficiency. In addition, the first server does not need to perform assignment conversion on the data, so that the second server obtains the original user behavior data acquired by the terminal after decoding twice, and the data provides a more accurate data basis for user behavior analysis performed by the second server.
Based on the same concept, the embodiment of the present application provides an apparatus for transmitting data, referring to fig. 7, the apparatus including:
an obtaining module 701, configured to obtain target data;
a copy module 702, configured to encode target data to obtain first encoded data, and copy the first encoded data to a common transmission structure;
the sending module 703 is configured to encode the common transmission structure to obtain an encoded common transmission structure, and send the encoded common transmission structure to the first server.
In an exemplary embodiment, the obtaining module 701 is configured to obtain a plurality of pieces of source data, and determine a data type of each piece of source data; and determining user behavior data from the plurality of source data according to the data type, and taking the user behavior data as target data.
In an exemplary embodiment, the obtaining module 701 is configured to obtain a plurality of pieces of source data, and use the plurality of pieces of source data as target data; the copying module is used for determining the data type of each piece of source data; the data type and the first encoded data are carried in a common transmission structure.
Based on the same concept, the embodiment of the present application provides an apparatus for transmitting data, referring to fig. 8, the apparatus includes:
a receiving module 801, configured to receive the encoded common transmission structure sent by the terminal;
an obtaining module 802, configured to obtain a coded target transmission structure based on the coded common transmission structure;
a sending module 803, configured to send the encoded target transmission structure to the second server.
In an exemplary embodiment, the obtaining module 801 is configured to use the encoded common transport structure as the encoded target transport structure.
In an exemplary embodiment, the apparatus further comprises: the decoding module is used for decoding the coded public transmission structure to obtain a public transmission structure, and the public transmission structure comprises a data type and first coded data; determining second coded data from the first coded data according to the data type, wherein the second coded data are data obtained by coding user behavior data; an obtaining module 802, configured to copy the second encoded data into the reference transmission structure; and coding the reference transmission structure to obtain a coded reference transmission structure, and taking the coded reference transmission structure as a coded public transmission structure.
In an exemplary embodiment, the sending module 803 is configured to store the encoded target transport structure in a reference file, and the second server is configured to receive the encoded target transport structure by reading the reference file.
Based on the same concept, the embodiment of the present application provides an apparatus for transmitting data, referring to fig. 9, the apparatus including:
a receiving module 901, configured to receive an encoded target transmission structure sent by a first server;
a first decoding module 902, configured to decode the encoded target transmission structure to obtain a target transmission structure;
a second decoding module 903, configured to decode the target transmission structure to obtain user behavior data.
In an exemplary embodiment, the receiving module is configured to read the encoded target transmission structure from a reference file, and the reference file is used for the first server to store the encoded target transmission structure.
In summary, in this embodiment, the first server does not need to select different decoding manners according to different transmission structures, but selects one decoding manner for a common transmission structure, so as to improve the data transmission efficiency. In addition, the first server does not need to perform assignment conversion on the data, so that the second server obtains the original user behavior data acquired by the terminal after decoding twice, and the data provides a more accurate data basis for user behavior analysis performed by the second server.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus may be divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
Referring to fig. 10, a schematic structural diagram of a terminal 1000 according to an embodiment of the present application is shown. The terminal 1000 can be a portable mobile terminal such as: a smart phone, a tablet computer, an MP3 player (Moving picture Experts Group Audio Layer III, motion picture Experts compression standard Audio Layer 3), an MP4 player (Moving picture Experts Group Audio Layer IV, motion picture Experts compression standard Audio Layer 4), a notebook computer or a desktop computer. Terminal 1000 can also be referred to as user equipment, portable terminal, laptop terminal, desktop terminal, or the like by other names.
In general, terminal 1000 can include: a processor 1001 and a memory 1002.
Processor 1001 may include one or more processing cores, such as a 4-core processor, a 10-core processor, or the like. The processor 1001 may be implemented in at least one hardware form selected from the group consisting of a DSP (Digital Signal Processing), a Field-Programmable Gate Array (FPGA), and a Programmable Logic Array (PLA). The processor 1001 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also referred to as a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1001 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed by the display screen 1005. In some embodiments, the processor 1001 may further include an AI (Artificial Intelligence) processor for processing a computing operation related to machine learning.
Memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1002 is used to store at least one instruction for execution by processor 1001 to implement a method of transmitting data as provided by method embodiments herein.
In some embodiments, terminal 1000 can also optionally include: a peripheral interface 1003 and at least one peripheral. The processor 1001, memory 1002 and peripheral interface 1003 may be connected by a bus or signal line. Various peripheral devices may be connected to peripheral interface 1003 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of the group consisting of radio frequency circuitry 1004, display screen 1005, camera 1006, audio circuitry 1007, positioning component 1008, and power supply 1009.
The peripheral interface 1003 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 1001 and the memory 1002. In some embodiments, processor 1001, memory 1002, and peripheral interface 1003 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1001, the memory 1002, and the peripheral interface 1003 may be implemented on separate chips or circuit boards, which are not limited by this embodiment.
The Radio Frequency circuit 1004 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 1004 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency circuit 1004 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1004 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 1004 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 1004 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 1005 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1005 is a touch display screen, the display screen 1005 also has the ability to capture touch signals on or over the surface of the display screen 1005. The touch signal may be input to the processor 1001 as a control signal for processing. At this point, the display screen 1005 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, display screen 1005 can be one, providing a front panel of terminal 1000; in other embodiments, display 1005 can be at least two, respectively disposed on different surfaces of terminal 1000 or in a folded design; in still other embodiments, display 1005 can be a flexible display disposed on a curved surface or on a folded surface of terminal 1000. Even more, the display screen 1005 may be arranged in a non-rectangular irregular figure, i.e., a shaped screen. The Display screen 1005 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The camera assembly 1006 is used to capture images or video. Optionally, the camera assembly 1006 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 1006 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuit 1007 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 1001 for processing or inputting the electric signals to the radio frequency circuit 1004 for realizing voice communication. For stereo sound collection or noise reduction purposes, multiple microphones can be provided, each at a different location of terminal 1000. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 1001 or the radio frequency circuit 1004 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuit 1007 may also include a headphone jack.
A location component 1008 is employed to locate a current geographic location of terminal 1000 for navigation or LBS (location based Service). The positioning component 1008 may be a positioning component based on the GPS (global positioning System) in the united states, the beidou System in china, the graves System in russia, or the galileo System in the european union.
Power supply 1009 is used to supply power to various components in terminal 1000. The power source 1009 may be alternating current, direct current, disposable batteries, or rechargeable batteries. When the power source 1009 includes a rechargeable battery, the rechargeable battery may support wired charging or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 1000 can also include one or more sensors 1010. The one or more sensors 1010 include, but are not limited to: acceleration sensor 1011, gyro sensor 1012, pressure sensor 1013, fingerprint sensor 1014, optical sensor 1015, and proximity sensor 1016.
Acceleration sensor 1010 can detect acceleration in three coordinate axes of a coordinate system established with terminal 1000. For example, the acceleration sensor 1011 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 1001 may control the display screen 1005 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1011. The acceleration sensor 1011 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 1012 may detect a body direction and a rotation angle of the terminal 1000, and the gyro sensor 1012 and the acceleration sensor 1011 may cooperate to acquire a 3D motion of the user on the terminal 1000. From the data collected by the gyro sensor 1012, the processor 1001 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensor 1013 can be disposed on a side frame of terminal 1000 and/or underneath display screen 1005. When pressure sensor 1013 is disposed on a side frame of terminal 1000, a user's grip signal on terminal 1000 can be detected, and processor 1001 performs left-right hand recognition or shortcut operation according to the grip signal collected by pressure sensor 1013. When the pressure sensor 1013 is disposed at a lower layer of the display screen 1005, the processor 1001 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 1005. The operability control comprises at least one of a group consisting of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 1014 is used to collect a fingerprint of the user, and the processor 1001 identifies the user according to the fingerprint collected by the fingerprint sensor 1014, or the fingerprint sensor 1014 identifies the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, the processor 1001 authorizes the user to perform relevant sensitive operations including unlocking a screen, viewing encrypted information, downloading software, paying, and changing settings, etc. Fingerprint sensor 1014 can be disposed on the front, back, or side of terminal 1000. When a physical key or vendor Logo is provided on terminal 1000, fingerprint sensor 1014 can be integrated with the physical key or vendor Logo.
The optical sensor 1015 is used to collect the ambient light intensity. In one embodiment, the processor 1001 may control the display brightness of the display screen 1005 according to the ambient light intensity collected by the optical sensor 1015. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1005 is increased; when the ambient light intensity is low, the display brightness of the touch screen 10010 is reduced. In another embodiment, the processor 1001 may also dynamically adjust the shooting parameters of the camera assembly 1006 according to the intensity of the ambient light collected by the optical sensor 1015.
Proximity sensor 1016, also known as a distance sensor, is typically disposed on a front panel of terminal 1000. Proximity sensor 1016 is used to gather the distance between the user and the front face of terminal 1000. In one embodiment, when proximity sensor 1016 detects that the distance between the user and the front surface of terminal 1000 is gradually reduced, processor 1001 controls display screen 1005 to switch from a bright screen state to a dark screen state; when proximity sensor 1016 detects that the distance between the user and the front of terminal 1000 is gradually increased, display screen 1005 is controlled by processor 1001 to switch from a breath-screen state to a bright-screen state.
Those skilled in the art will appreciate that the configuration shown in FIG. 10 is not intended to be limiting and that terminal 1000 can include more or fewer components than shown, or some components can be combined, or a different arrangement of components can be employed.
Based on the same conception, the embodiment of the application provides electronic equipment, which comprises a memory and a processor; the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the method for transmitting data provided by any possible implementation manner of the embodiment of the application.
In another aspect, a readable storage medium is provided, in which at least one instruction is stored, and the instruction is loaded and executed by a processor to implement the method for transmitting data provided in any possible implementation manner of the embodiments of the present application.
All the above optional technical solutions may be combined arbitrarily to form optional embodiments of the present application, and are not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (14)

1. A method of transmitting data, the method comprising:
acquiring target data;
encoding the target data to obtain first encoded data, and copying the first encoded data to a common transmission structure;
and coding the public transmission structure to obtain a coded public transmission structure, and sending the coded public transmission structure to the first server.
2. The method of claim 1, wherein the obtaining target data comprises:
acquiring a plurality of pieces of source data, and determining the data type of each piece of source data;
and determining user behavior data from a plurality of source data according to the data type, and taking the user behavior data as the target data.
3. The method of claim 1, wherein the obtaining target data comprises:
acquiring a plurality of pieces of source data, and taking the plurality of pieces of source data as the target data;
copying the first encoded data into a common transport structure, comprising:
determining the data type of each piece of source data;
carrying the data type and the first encoded data in the common transmission structure.
4. A method of transmitting data, the method comprising:
receiving the coded public transmission structure sent by the terminal;
acquiring a coded target transmission structure based on the coded common transmission structure;
and sending the coded target transmission structure to a second server.
5. The method of claim 4, wherein obtaining the encoded target transport structure based on the encoded common transport structure comprises:
and taking the coded common transmission structure as the coded target transmission structure.
6. The method of claim 4, wherein after receiving the encoded common transmission structure sent by the terminal, the method further comprises:
decoding the coded public transmission structure to obtain a public transmission structure, wherein the public transmission structure comprises a data type and first coded data;
determining second coded data from the first coded data according to the data type, wherein the second coded data are data obtained by coding user behavior data;
the obtaining a coded target transport structure based on the coded common transport structure includes:
copying the second encoded data into a reference transmission structure;
and coding the reference transmission structure to obtain a coded reference transmission structure, and taking the coded reference transmission structure as the coded target transmission structure.
7. The method according to any of claims 4-6, wherein said sending said encoded target transport structure to a second server comprises:
and storing the coded target transmission structure in a reference file, wherein the second server is used for receiving the coded target transmission structure by reading the reference file.
8. A method of transmitting data, the method comprising:
receiving an encoded target transmission structure sent by a first server;
decoding the coded target transmission structure to obtain a target transmission structure;
and decoding the target transmission structure to obtain user behavior data.
9. The method of claim 8, wherein receiving the encoded target transport structure sent by the first server comprises:
and reading the coded target transmission structure from a reference file, wherein the reference file is used for storing the coded target transmission structure by the first server.
10. An apparatus for transmitting data, the apparatus comprising:
the acquisition module is used for acquiring target data;
the copying module is used for coding the target data to obtain first coded data and copying the first coded data to a public transmission structure;
and the sending module is used for coding the public transmission structure to obtain a coded public transmission structure and sending the coded public transmission structure to the first server.
11. An apparatus for transmitting data, the apparatus comprising:
the receiving module is used for receiving the coded public transmission structure sent by the terminal;
an obtaining module, configured to obtain a coded target transmission structure based on the coded common transmission structure;
and the sending module is used for sending the coded target transmission structure to a second server.
12. An apparatus for transmitting data, the apparatus comprising:
the receiving module is used for receiving the coded target transmission structure sent by the first server;
the first decoding module is used for decoding the coded target transmission structure to obtain a target transmission structure;
and the second decoding module is used for decoding the target transmission structure to obtain user behavior data.
13. An electronic device, comprising a memory and a processor; the memory has stored therein at least one instruction that is loaded and executed by the processor to implement the method of transferring data of any of claims 1-9.
14. A readable storage medium having stored therein at least one instruction, which is loaded and executed by a processor, to implement the method of transferring data according to any one of claims 1-9.
CN201911272668.0A 2019-12-12 2019-12-12 Method and device for transmitting data, electronic equipment and storage medium Active CN111064782B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911272668.0A CN111064782B (en) 2019-12-12 2019-12-12 Method and device for transmitting data, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911272668.0A CN111064782B (en) 2019-12-12 2019-12-12 Method and device for transmitting data, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111064782A true CN111064782A (en) 2020-04-24
CN111064782B CN111064782B (en) 2021-09-03

Family

ID=70298986

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911272668.0A Active CN111064782B (en) 2019-12-12 2019-12-12 Method and device for transmitting data, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111064782B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008165447A (en) * 2006-12-27 2008-07-17 Ntt Data Corp Data access device, data access method and computer program
CN101431388A (en) * 2007-11-08 2009-05-13 联发科技股份有限公司 Method and apparatus of decoding encoded data frame
CN104184672A (en) * 2014-09-10 2014-12-03 四川九洲电器集团有限责任公司 Method and device of transmitting message
CN108184161A (en) * 2017-12-26 2018-06-19 努比亚技术有限公司 A kind of video broadcasting method, mobile terminal and computer readable storage medium
CN108205540A (en) * 2016-12-16 2018-06-26 腾讯科技(深圳)有限公司 The methods, devices and systems of information browse
CN110457380A (en) * 2019-08-07 2019-11-15 广州市百果园信息技术有限公司 A kind of data-storage system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008165447A (en) * 2006-12-27 2008-07-17 Ntt Data Corp Data access device, data access method and computer program
CN101431388A (en) * 2007-11-08 2009-05-13 联发科技股份有限公司 Method and apparatus of decoding encoded data frame
CN104184672A (en) * 2014-09-10 2014-12-03 四川九洲电器集团有限责任公司 Method and device of transmitting message
CN108205540A (en) * 2016-12-16 2018-06-26 腾讯科技(深圳)有限公司 The methods, devices and systems of information browse
CN108184161A (en) * 2017-12-26 2018-06-19 努比亚技术有限公司 A kind of video broadcasting method, mobile terminal and computer readable storage medium
CN110457380A (en) * 2019-08-07 2019-11-15 广州市百果园信息技术有限公司 A kind of data-storage system

Also Published As

Publication number Publication date
CN111064782B (en) 2021-09-03

Similar Documents

Publication Publication Date Title
CN108401124B (en) Video recording method and device
CN110022489B (en) Video playing method, device and storage medium
CN108966008B (en) Live video playback method and device
CN108965757B (en) Video recording method, device, terminal and storage medium
CN110368689B (en) Game interface display method, system, electronic equipment and storage medium
CN110837426A (en) Message processing method, device and system and storage medium
CN110839174A (en) Image processing method and device, computer equipment and storage medium
CN110705614A (en) Model training method and device, electronic equipment and storage medium
CN115766490A (en) Calibration data acquisition method, calibration data storage method, device and equipment
CN109819314B (en) Audio and video processing method and device, terminal and storage medium
CN109697113B (en) Method, device and equipment for requesting retry and readable storage medium
CN111083554A (en) Method and device for displaying live gift
CN108401194B (en) Time stamp determination method, apparatus and computer-readable storage medium
CN110677713A (en) Video image processing method and device and storage medium
CN112560435B (en) Text corpus processing method, device, equipment and storage medium
CN109714628B (en) Method, device, equipment, storage medium and system for playing audio and video
CN117215990A (en) Inter-core communication method and device of multi-core chip and multi-core chip
CN110086814B (en) Data acquisition method and device and storage medium
CN111064782B (en) Method and device for transmitting data, electronic equipment and storage medium
CN111464829B (en) Method, device and equipment for switching media data and storage medium
CN110996115B (en) Live video playing method, device, equipment, storage medium and program product
CN114594885A (en) Application icon management method, device and equipment and computer readable storage medium
CN113301422A (en) Method, terminal and storage medium for acquiring video cover
CN108664421B (en) Method, device and storage medium for acquiring multimedia data
CN113495770A (en) Method, device, terminal and storage medium for displaying application page

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40022556

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant