CN117412405A - 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
CN117412405A
CN117412405A CN202310199451.1A CN202310199451A CN117412405A CN 117412405 A CN117412405 A CN 117412405A CN 202310199451 A CN202310199451 A CN 202310199451A CN 117412405 A CN117412405 A CN 117412405A
Authority
CN
China
Prior art keywords
channel
transmission channel
target
transmission
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.)
Pending
Application number
CN202310199451.1A
Other languages
Chinese (zh)
Inventor
罗德文
王荣飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TCL Mobile Communication Technology Ningbo Ltd
Original Assignee
TCL Mobile Communication Technology Ningbo 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 TCL Mobile Communication Technology Ningbo Ltd filed Critical TCL Mobile Communication Technology Ningbo Ltd
Priority to CN202310199451.1A priority Critical patent/CN117412405A/en
Publication of CN117412405A publication Critical patent/CN117412405A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/20Manipulation of established connections
    • H04W76/25Maintenance of established connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/30Connection release
    • H04W76/34Selective release of ongoing connections

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application discloses a data transmission method, a data transmission device, electronic equipment and a computer readable storage medium, wherein the method comprises the following steps: determining a target transmission channel according to the application type of the current foreground application in the terminal equipment, and determining the connection state of the target channel which is required to be met by the terminal equipment; acquiring a current connected transmission channel of the terminal equipment; performing channel connection processing on the connected transmission channels according to the target channel connection state and the target transmission channels to obtain processed connected transmission channels; and transmitting the data to be transmitted of the current foreground application through the processed connected transmission channel. The processed connected transmission channel can meet the requirement of transmitting the data to be transmitted of the current foreground application, user experience is improved, the transmission channel connected with the terminal equipment is adjusted according to the channel connection state, and the diversity of data transmission is improved.

Description

Data transmission method, device, electronic equipment and computer readable storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a data transmission method, a data transmission device, electronic equipment and a computer readable storage medium.
Background
At present, the terminal device supports multiple transmission channels to transmit data, for example, the data can be transmitted through a mobile data channel or a wireless fidelity channel, and in general, in order to reduce the consumption of mobile data traffic, the priority of the wireless fidelity channel is further improved, so that the data can be transmitted through the wireless fidelity channel preferentially.
However, the data transmission mode is single, the data transmission channel cannot be adjusted according to the application requirement, and the user experience is poor.
Disclosure of Invention
The embodiment of the application provides a data transmission method, a data transmission device, electronic equipment and a computer readable storage medium, which can improve the diversity of data transmission modes and user experience.
The embodiment of the application provides a data transmission method, which is applied to current equipment and comprises the following steps:
determining a target transmission channel according to the application type of the current foreground application in the terminal equipment, and determining the connection state of the target channel which is required to be met by the terminal equipment;
acquiring a current connected transmission channel of the terminal equipment;
performing channel connection processing on the connected transmission channels according to the target channel connection state and the target transmission channels to obtain processed connected transmission channels;
And transmitting the data to be transmitted of the current foreground application through the processed connected transmission channel.
Correspondingly, the embodiment of the application also provides a data transmission device, which comprises:
the determining module is used for determining a target transmission channel according to the application type of the current foreground application in the terminal equipment and determining the connection state of the target channel which is required to be met by the terminal equipment;
the acquisition module is used for acquiring the current connected transmission channel of the terminal equipment;
the processing module is used for carrying out channel connection processing on the connected transmission channels according to the target channel connection state and the target transmission channels to obtain processed connected transmission channels;
and the transmission module is used for transmitting the data to be transmitted of the current foreground application through the processed connected transmission channel.
Optionally, in some embodiments of the present application, the target channel connection state describes that the terminal device connects only the target transmission channel, and the processing module includes:
a first determining unit, configured to use, as a transmission channel to be disconnected, other connected transmission channels except the target transmission channel among the connected transmission channels;
And the first processing unit is used for disconnecting the transmission channel to be disconnected in the connected transmission channels to obtain the processed connected transmission channels.
Wherein, in some embodiments of the present application, the transmission module comprises:
the first transmission unit is used for transmitting the data to be transmitted of the current foreground application through the target transmission channel if the processed connected transmission channel comprises the target transmission channel;
and the second transmission unit is used for stopping the transmission of the data to be transmitted of the current foreground application if the processed connected transmission channel does not comprise the target transmission channel.
Wherein, in some embodiments of the present application, the target transmission channel includes at least two, and the first transmission unit includes:
the screening subunit is used for screening a final target transmission channel from at least two target transmission channels according to the transmission performance parameters of each target transmission channel;
a transmission subunit, configured to transmit, through the final target transmission channel, data to be transmitted of the current foreground application;
wherein the transmission performance parameter includes at least one of signal quality, transmission stability, or reliability.
Wherein, in some embodiments of the present application, the processing module comprises:
an identifying unit, configured to identify a transmission channel to be processed having a higher priority than the target transmission channel from the connected transmission channels;
and the second processing unit is used for disconnecting the transmission channel to be processed and taking the target transmission channel as a connected transmission channel after processing if the transmission channel to be processed cannot transmit the data to be transmitted of the current foreground application.
Wherein, in some embodiments of the present application, the determining module comprises:
the device comprises an acquisition unit, a mapping relation acquisition unit and a processing unit, wherein the acquisition unit is used for acquiring a mapping relation set, and the mapping relation set comprises a mapping relation of a preset application type, a preset transmission channel and a preset channel connection state;
and the second determining unit is used for determining a target transmission channel and a target channel connection state corresponding to the application type of the current foreground application in the terminal equipment according to the mapping relation.
Wherein, in some embodiments of the present application, the apparatus further comprises a recovery module, the recovery module comprising:
and the recovery unit is used for recovering the connection with the connected transmission channel if the current foreground application is switched to the background application.
In a third aspect, an embodiment of the present application further provides an electronic device, where the electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program when executed by the processor implements the steps in the data transmission method described above.
In a fourth aspect, embodiments of the present application further provide a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor implements the steps in the data transmission method described above.
According to the method and the device, a target transmission channel is determined according to the application type of the current foreground application in the terminal device, the target channel connection state which is required to be met by the terminal device is determined, channel connection processing is carried out on the current connected transmission channel of the terminal device according to the target channel connection state and the target transmission channel, the processed connected transmission channel is obtained, and data to be transmitted of the current foreground application are transmitted through the processed connected transmission channel. The method comprises the steps of determining a target transmission channel through the application type of the current foreground application, determining a channel connection state through the application type, and carrying out channel connection processing on the connected transmission channel of the terminal equipment according to the channel connection state, so that the processed connected transmission channel can meet the requirement of transmitting data to be transmitted of the current foreground application, user experience is improved, and the transmission channel connected with the terminal equipment is adjusted according to the channel connection state, so that the diversity of data transmission is improved.
Drawings
In order to more clearly illustrate the technical solutions of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of a scenario of a data transmission method provided in an embodiment of the present application;
fig. 2 is a schematic flow chart of a data transmission method according to an embodiment of the present application;
fig. 3 is a flow chart of a data transmission method of a card punching service provided in an embodiment of the present application;
fig. 4 is a schematic state diagram of a terminal device connected to each channel according to an embodiment of the present application;
fig. 5 is a flow chart of a data transmission method of a video service according to an embodiment of the present application;
fig. 6 is another schematic state diagram of connection between channels of a terminal device provided in an embodiment of the present application;
fig. 7 is a schematic structural diagram of a data transmission device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
The embodiment of the application provides a data transmission method, a data transmission device, electronic equipment and a computer readable storage medium. Specifically, the embodiment of the application provides a data transmission device suitable for an electronic device, where the electronic device includes a terminal or a server, the terminal includes, but is not limited to, a mobile phone, a computer, a tablet computer, and other devices, the server may be an independent physical server, or may be a server cluster or a distributed system formed by multiple physical servers, or may be a cloud server that provides cloud services, a cloud database, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, a content distribution network (CDN, content Delivery Network), and basic cloud computing services such as big data and an artificial intelligent platform, where the servers may be directly or indirectly connected through wired or wireless communication modes.
Accordingly, the data transmission method may be executed by the terminal device alone, or may be executed by the server alone, or may be executed by the terminal device and the server together, referring to fig. 1, taking the terminal device and the server together execute the data transmission method as an example, the specific execution process is as follows:
The terminal device 10 determines a target transmission channel and a target channel connection state to be satisfied by the terminal device 10 according to an application type of a current foreground application in the terminal device 10, performs channel connection processing on the current connected transmission channel of the terminal device 10 according to the target transmission channel and the target channel connection state to obtain a processed connected transmission channel, and then, the terminal device 10 transmits data to be transmitted of the current foreground application to the server 11 through the processed connected transmission channel.
For example, when a user performs a card punching operation through interaction between a card punching application program of a mobile phone and a server, data transmission is required through a card punching transmission channel corresponding to the card punching operation, and other transmission channels cannot be connected between the mobile phone and the server.
It can be understood that the target transmission channel is determined according to the application type of the current foreground application, the channel connection state is determined according to the application type, and the channel connection processing is performed on the connected transmission channel of the terminal device according to the channel connection state, so that the processed connected transmission channel can meet the requirement of the current foreground application for transmitting data to be transmitted to the server, the user experience is improved, the transmission channel of the terminal device connected with the server is adjusted according to the channel connection state, the data transmission is performed according to the transmission channel, and the diversity of the data transmission is improved.
The following will describe in detail. It should be noted that the following description order of embodiments is not a limitation of the priority order of embodiments.
Referring to fig. 2, fig. 2 is a flow chart of a data transmission method according to an embodiment of the present application. The data transmission method comprises the following specific processes:
101. and determining a target transmission channel according to the application type of the current foreground application in the terminal equipment, and determining the connection state of the target channel which is required to be met by the terminal equipment.
It will be appreciated that the current foreground application is an application that is running in the foreground of the terminal device at the current moment, where the application is running in the foreground, indicating that the user is using the application on the terminal device.
It should be noted that the application types are application types, and application types of different applications are different, and accordingly, each application type may be divided according to different functions of the application, and may also be divided according to service requirements of vendors corresponding to different applications, for example, the application types include a card punching type, a video type, a communication type, an audio type, and the like.
It should be noted that, the transmission channel is a channel for transmitting data, and the channel may include a mobile data channel or a wireless fidelity channel, for example, the terminal device performs data transmission through mobile data or performs data transmission through WIFI.
Correspondingly, in the embodiment of the application, different application types are provided with different transmission channels according to different service requirements, so that a target transmission channel meeting data transmission can be determined according to the application type of the foreground application aiming at the current foreground application of the terminal equipment. It can be appreciated that a correspondence between the application type and the transmission channel may be established in advance, and a target transmission channel suitable for the current application type may be determined according to the correspondence.
The channel connection state describes a state of a transmission channel to which the terminal device is connected, including connection or disconnection of the transmission channel, and the like. For different applications, the connection states of the corresponding transmission channels are different, for example, for a card punching application, the card punching operation can be performed only when a specific WIFI is connected and no mobile data is connected, so that the terminal device is hoped to be connected with the corresponding WIFI and does not hope to be connected with the mobile data, and for the application type in the case, the corresponding connection state of the target channel is represented as disconnection of the mobile data channel and connection of the WIFI channel.
The method comprises the steps of determining a target transmission channel and a target channel connection state through application types, and processing the transmission channel connected with the terminal equipment according to the target transmission channel and the target channel connection state so as to provide a channel foundation for data transmission of corresponding applications in the terminal equipment.
102. And acquiring the current connected transmission channel of the terminal equipment.
It is understood that the connected transmission channel is a transmission channel in which the terminal device has established a connection at the current moment, for example, when the terminal device is currently connected to both mobile data and WIFI, the current connected transmission channel of the terminal device includes a mobile data channel and a WIFI channel.
Correspondingly, the number of transmission channels that can be supported by different terminal devices is different based on different hardware and software configurations of the terminal devices.
103. And carrying out channel connection processing on the connected transmission channels according to the target channel connection state and the target transmission channels to obtain the processed connected transmission channels.
It will be appreciated that, since the target channel connection state describes the state of the transmission channel to which the terminal device is connected, the processing of the state of a part of the transmission channels in the transmission channel to which the terminal device is connected is implemented based on the processing of the transmission channel to which the terminal device is connected by the target channel connection state, for example, when the target channel connection state describes that the mobile data network needs to be disconnected, the mobile data network to which the terminal device is connected is disconnected.
Correspondingly, the connected transmission channels are subjected to channel connection processing based on the target transmission channels, so that the channel connection processing can refer to the target transmission channels, and the accuracy of the channel connection processing is improved.
It will be appreciated that after the channel connection process is performed on the connected transmission channels, the transmission channels with changed states may be obtained, for example, a part of the transmission channels may be disconnected. Correspondingly, the transmission channel after each state change is the connected transmission channel after processing. In this embodiment of the present application, the transmission channel after the state change may be filtered, for example, the transmission channel in the disconnected state is filtered, to obtain the transmission channel in the connected state, and the transmission channel in the connected state is used as the transmission channel connected after the processing.
104. And transmitting the data to be transmitted of the current foreground application through the processed connected transmission channel.
It can be understood that the data to be transmitted of the foreground application is transmitted by the transmission channel whose state in the processed connected transmission channel remains connected, for example, if the connected transmission channel includes the target transmission channel, after the channel connection processing, the target transmission channel in the processed connected transmission channel remains connected, and the data to be transmitted of the foreground application can be transmitted through the target transmission channel.
It can be understood that, in the embodiment of the present application, the target transmission channel is determined according to the application type of the current foreground application, the channel connection state is determined according to the application type, and the channel connection processing is performed on the connected transmission channel of the terminal device according to the channel connection state, so that the processed connected transmission channel can meet the requirement of the current foreground application for transmitting the data to be transmitted to the server, user experience is improved, the transmission channel connected with the server by the terminal device is adjusted according to the channel connection state, and data transmission is performed according to the transmission channel, thereby improving the diversity of data transmission.
Optionally, based on the difference of application types of the foreground application, there are different channel connection states corresponding to each other, for example, for a card punching application, if the card punching application can perform a card punching operation only if the terminal device is connected with a corresponding WIFI, during starting or using the card punching application, a transmission channel connected to the terminal device except for the WIFI needs to be disconnected, for example, a mobile data channel is disconnected, so if a target channel connection state describes that the terminal device is connected to only the target transmission channel, and disconnection processing needs to be performed on other transmission channels connected to the terminal device, that is, optionally, in some embodiments of the present application, the target channel connection state describes that the terminal device is connected to only the target transmission channel, and the step of performing channel connection processing on the connected transmission channel according to the target channel connection state and the target transmission channel to obtain a processed connected transmission channel includes:
Taking other connected transmission channels except the target transmission channel in the connected transmission channels as transmission channels to be disconnected;
and disconnecting the transmission channels to be disconnected in the connected transmission channels to obtain the processed connected transmission channels.
The data transmission requirements of the foreground application are met by disconnecting the transmission channels except the target transmission channel, so that the foreground application can conveniently transmit data on the basis of only connecting the target transmission channel.
Accordingly, if the connected transmission channel includes a target transmission channel, the channel connection processed connected transmission channel further includes a target transmission channel, and then the data transmission of the foreground application may be performed by using the target transmission channel, that is, optionally, in some embodiments of the present application, the step of "transmitting, through the processed connected transmission channel, the data to be transmitted of the current foreground application" includes:
if the processed connected transmission channel comprises the target transmission channel, transmitting the data to be transmitted of the current foreground application through the target transmission channel;
and if the processed connected transmission channel does not comprise the target transmission channel, stopping the transmission of the data to be transmitted of the current foreground application.
It can be understood that the processed connected transmission channel does not include the target transmission channel, mainly because the terminal device does not include the target transmission channel in the current connected transmission channel, and then after the channel connection processing, the transmission channel connected with the terminal device still does not include the target transmission channel, and the non-target transmission channel does not meet the data transmission requirement of the foreground application, so that the data transmission of the foreground application cannot be performed.
Optionally, in this embodiment of the present application, the target transmission channels according to the foreground application may include a plurality of or multiple target transmission channels, so after the channel connection is processed, the processed connected transmission channels may still include a plurality of connected transmission channels, therefore, when data transmission is performed according to the plurality of transmission channels, the screening of the transmission channels may also be performed according to the performance of each transmission channel, and the transmission of the application data is performed based on the screened transmission channels, that is, optionally, in some embodiments of the present application, the target transmission channel includes at least two target transmission channels, and the step of "if the processed connected transmission channels include the target transmission channel, transmitting the data to be transmitted of the current foreground application through the target transmission channel" includes:
Screening a final target transmission channel from at least two target transmission channels according to the transmission performance parameters of each target transmission channel;
transmitting the data to be transmitted of the current foreground application through the final target transmission channel;
wherein the transmission performance parameter includes at least one of signal quality, transmission stability, or reliability.
It will be appreciated that the signal quality, transmission stability or reliability are all parameters describing the transmission performance of the target transmission channel, so when the final target transmission channel is screened from the target transmission channels, screening can be performed according to one or more conditions of the signal quality, the transmission stability or reliability, so as to ensure the stability, the effectiveness and the transmission quality of the application data transmission.
It should be noted that, with the improvement of the hardware and software performance of the terminal device, the transmission channels that the terminal device can simultaneously connect and support are not limited to a single transmission channel, but in the case that a plurality of transmission channels are simultaneously connected, in order to save mobile data traffic of a user, different priorities are usually set for different transmission channels, for example, WIFI has a priority higher than that of mobile data, so when WIFI and mobile data are simultaneously connected, the terminal device preferentially uses WIFI for communication.
However, the manner of setting the priority has certain drawbacks, for example, when the use of a part of applications needs to depend on the corresponding transmission channel, the application cannot be timely and accurately switched to the corresponding transmission channel, for example, for video applications, the application cannot transmit data under a part of WIFI channels, but, due to the higher priority of WIFI, the application cannot respond, and the like, due to the fact that the request of the video applications fails.
In view of the above, in the embodiment of the present application, data transmission detection is performed on a transmission channel that takes precedence over a target transmission channel, and if the transmission channel cannot perform application data transmission, the transmission channel is disconnected until switching to the target transmission channel that can transmit application data.
Optionally, in this embodiment of the present application, there is a difference in priority between each transmission channel, so when performing channel connection processing on a connected transmission channel of a terminal device, a channel to be processed with a higher priority than a target transmission channel may be selected, and the channel connection processing is performed on the channel to be processed, that is, optionally, in some embodiments of the present application, the step of "performing channel connection processing on the connected transmission channel according to the target channel connection state and the target transmission channel, to obtain a processed connected transmission channel" includes:
Identifying a transmission channel to be processed with a higher priority than the target transmission channel from the connected transmission channels;
if the to-be-processed transmission channel cannot transmit the to-be-transmitted data of the current foreground application, the to-be-processed transmission channel is disconnected, and the target transmission channel is used as a processed connected transmission channel.
It can be understood that whether the transmission channel to be processed can transmit the data to be transmitted can be judged by whether the request is sent smoothly, whether the interface responds to the result state and the like.
Correspondingly, the transmission channels to be processed with higher priority than the target transmission channels are disconnected, so that the priority of the target transmission channels is higher in the transmission channels connected with the terminal equipment, and further, the data to be transmitted of the foreground application can be transmitted by utilizing the target transmission channels.
Optionally, in the embodiment of the present application, the target transmission channel and the target channel connection state corresponding to the application type may be obtained through corresponding mapping relationships, for example, a mapping relationship set for the application type, the transmission channel and the channel connection state is preconfigured, and based on each mapping relationship in the mapping relationship set, the target transmission channel and the target channel connection state corresponding to the application type of the current foreground application are obtained, that is, optionally, in some embodiments of the present application, the step of determining the target transmission channel according to the application type of the current foreground application in the terminal device, and determining the target channel connection state required to be satisfied by the terminal device includes:
Obtaining a mapping relation set, wherein the mapping relation set comprises a mapping relation of a preset application type, a preset transmission channel and a preset channel connection state;
and determining a target transmission channel and a target channel connection state corresponding to the application type of the current foreground application in the terminal equipment according to the mapping relation.
It can be appreciated that the mapping relation set can be configured in advance according to requirements, for example, application programs of various companies and areas are different according to different service or scene requirements, and an end user can manually add an application list white list to customize a scene. The specific information comprises: corresponding WIFI name, account number and password, specified application program, GPS information within a certain range, and the like. At the same time, a corresponding policy (deciding which data channel to use preferentially, mobile data or WIFI channel, etc.) may be selected.
Accordingly, in the application process, after the terminal device moves to a corresponding position and is connected to a corresponding WIFI, a target transmission channel and a target channel connection state are determined according to requirements of an application type, and channel connection processing is performed on the current connected transmission channel of the terminal device based on the target transmission channel and the target channel connection state, for example, when a user enters a card punching range and is connected to a WIFI of a company, based on data transmission requirements of the card punching application, the terminal device needs to perform card punching operation through the WIFI of the company, and the terminal device needs to disconnect mobile data, so that after the user enters the card punching range, the terminal device performs operations of connecting the WIFI of the company and disconnecting the mobile data, immediately, performs data interaction with a server in response to the card punching operation of the user, and completes card punching.
Optionally, since the foreground application has a limitation on a transmission channel connected to the terminal device, when the foreground application runs, the transmission channel connected to the terminal device is adjusted, and accordingly, when the running of the foreground application is finished, in order to ensure the stability of data transmission of the terminal device, in this embodiment, the adjusted transmission channel is recovered, that is, optionally, in some embodiments of this application, after the step of "transmitting the data to be transmitted of the current foreground application through the processed connected transmission channel", the method further includes:
and if the current foreground application is switched to the background application, restoring the connection with the connected transmission channel.
For example, when mobile data connected with a terminal device is disconnected according to the requirement that a card punching application is only connected with a corresponding WIFI, after the card punching application is switched from a foreground to a background after the card punching application is finished, the scheme can facilitate the terminal device to perform data transmission by using the mobile data channel by recovering the mobile data channel of the terminal device, for example, when the mobile data channel needs to be connected according to the requirement that the corresponding WIFI (the WIFI cannot perform data request and response) needs to be disconnected according to the video application, the connected corresponding WIFI channel can be disconnected after the terminal device recovers the mobile data channel, and the video data request and the corresponding response are performed by using the mobile data.
It may be understood that, in the embodiment of the present application, a target transmission channel is determined according to an application type of a current foreground application in a terminal device, a target channel connection state that needs to be met by the terminal device is determined, and channel connection processing is performed on a current connected transmission channel of the terminal device according to the target channel connection state and the target transmission channel, so as to obtain a processed connected transmission channel, and data to be transmitted of the current foreground application is transmitted through the processed connected transmission channel. The method comprises the steps of determining a target transmission channel through the application type of the current foreground application, determining a channel connection state through the application type, and carrying out channel connection processing on the connected transmission channel of the terminal equipment according to the channel connection state, so that the processed connected transmission channel can meet the requirement of transmitting data to be transmitted of the current foreground application, user experience is improved, and the transmission channel connected with the terminal equipment is adjusted according to the channel connection state, so that the diversity of data transmission is improved.
Referring to fig. 3, fig. 3 is a flow chart of a data transmission method of a card punching service according to an embodiment of the present application, where a specific flow of data transmission of the card punching service includes:
201. The terminal equipment is connected with the mobile data channel based on the user identification card;
202. detecting that the terminal equipment moves to a punching position;
203. the terminal equipment is connected with a wireless fidelity network channel provided by the card punching place;
204. judging whether the mobile data channel needs to be disconnected according to the application type of the card punching application or the card punching service of the terminal equipment, and executing step 205 if yes;
205. the terminal equipment disconnects the connected mobile data channel and only reserves the connection of the wireless fidelity network channel;
206. and the card punching application of the terminal equipment responds to the card punching operation of the user, and interacts data with the card punching server through the wireless fidelity network channel to finish the card punching operation.
It can be understood that when the signal of the channel connected to the terminal device is poor, the priority of connection and data transmission is generally low, and in the embodiment of the present application, even if the signal of the channel required by the application is poor, the connection of the channel is still maintained according to the requirement of transmitting data by the application, and other channels with high signals are disconnected, so as to meet the requirement of the application service.
For example, referring to fig. 4, fig. 4 is a schematic diagram of a state of connection between channels of a terminal device provided in an embodiment of the present application, where a user identification card (sim) is built in the terminal device (abbreviated as a terminal) a, so that the terminal device a keeps connection with a mobile data channel, and when the terminal device moves to a WIFI area range C provided by a wireless WIFI device B, the terminal device a establishes connection with the WIFI channel based on a pre-connected record or a corresponding account number password, as shown in fig. 4, the terminal device is located at an edge of the WIFI area, so that a WIFI channel signal of the terminal device is poor, and because a data transmission channel required by a card punching application is the WIFI channel, the terminal device still executes disconnection of the mobile data channel and uses the WIFI channel to perform data transmission.
It can be understood that the data transmission mode accords with the service requirement of the corresponding application, the priority selection of the channels is not carried out simply because of the parameters such as the signal intensity, the quality, the performance and the like of each channel, the defect that the channel which is used for transmitting data cannot be selected because of the poor signal quality of the channel in the prior art is overcome, the service requirement of the corresponding application is favorably realized, the diversity of data transmission is improved, and the user experience is improved.
Correspondingly, when the terminal equipment selects a channel according to the application type or the service requirement, the priority of other channels is higher in time, the signal quality is better, and the other channels still need to be disconnected to realize the specific service requirement of the equipment.
For example, referring to fig. 5, fig. 5 is a flow chart of a data transmission method of a video service according to an embodiment of the present application, where a specific flow of data transmission of the video service includes:
211. the terminal equipment is connected with the mobile data channel based on the user identification card;
212. detecting that the terminal equipment moves to a punching position;
213. the terminal equipment is connected with a wireless fidelity network channel provided by the card punching place;
214. judging whether the wireless fidelity network channel is required to be disconnected according to the application type of the video application of the terminal equipment or the video service, if so, executing step 215;
215. The terminal equipment disconnects the connected wireless fidelity network channel and only reserves the connection of the mobile data channel;
216. the video application of the terminal equipment responds to the video operation of the user, and the video operation is completed by the interaction of the data between the mobile data channel and the video server.
Because part of wireless fidelity (WIFI) networks can only perform card punching operation and do not support sending video requests and video responses, according to the application and WIFI characteristics of the type, the embodiment of the application actively disconnects the wireless fidelity network channel with higher priority, and uses the mobile data channel to send and receive video data.
For example, referring to fig. 6, fig. 6 is another state schematic diagram of a connection between channels of a terminal device provided in the embodiment of the present application, where a terminal device (abbreviated as a terminal) a is built in with a subscriber identity module (sim), so that the terminal device a maintains a connection with a mobile data channel, and when the terminal device moves to a WIFI area range C provided by a wireless WIFI device B, the terminal device a establishes a connection with the WIFI channel based on a pre-connected record or a corresponding account number and password, as shown in fig. 6, the terminal device is located near the center of the WIFI area, and has a stronger WIFI signal, and accordingly, in general, in order to save mobile data traffic, the WIFI channel has a higher priority than the mobile data channel, so that in a conventional situation, data transmission is mainly performed through the WIFI channel. However, because part of WIFI does not have the characteristic of video data transmission, in this case, after determining that the mobile data channel is the target transmission channel according to the application type or service requirement, the WIFI channel with higher priority and which cannot perform video data transmission is disconnected, so as to ensure that the terminal device can perform video data transmission through the mobile data channel.
In order to facilitate better implementation of the data transmission method, the application also provides a data transmission device based on the data transmission method. Wherein the meaning of the terms is the same as in the above data transmission method, specific implementation details can be referred to in the description of the method embodiment.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a data transmission device according to an embodiment of the present application, where the data transmission device may specifically be as follows:
a determining module 301, configured to determine a target transmission channel according to an application type of a current foreground application in a terminal device, and determine a target channel connection state that needs to be met by the terminal device;
an obtaining module 302, configured to obtain a current connected transmission channel of the terminal device;
a processing module 303, configured to perform a channel connection process on the connected transmission channel according to the target channel connection state and the target transmission channel, so as to obtain a processed connected transmission channel;
and the transmission module 304 is configured to transmit the data to be transmitted of the current foreground application through the processed connected transmission channel.
Optionally, in some embodiments of the present application, the target channel connection state describes that the terminal device connects only the target transmission channel, and the processing module 303 includes:
A first determining unit, configured to use, as a transmission channel to be disconnected, other connected transmission channels except the target transmission channel among the connected transmission channels;
and the first processing unit is used for disconnecting the transmission channel to be disconnected in the connected transmission channels to obtain the processed connected transmission channels.
Wherein, in some embodiments of the present application, the transmission module 304 includes:
the first transmission unit is used for transmitting the data to be transmitted of the current foreground application through the target transmission channel if the processed connected transmission channel comprises the target transmission channel;
and the second transmission unit is used for stopping the transmission of the data to be transmitted of the current foreground application if the processed connected transmission channel does not comprise the target transmission channel.
Wherein, in some embodiments of the present application, the target transmission channel includes at least two, and the first transmission unit includes:
the screening subunit is used for screening a final target transmission channel from at least two target transmission channels according to the transmission performance parameters of each target transmission channel;
a transmission subunit, configured to transmit, through the final target transmission channel, data to be transmitted of the current foreground application;
Wherein the transmission performance parameter includes at least one of signal quality, transmission stability, or reliability.
Wherein, in some embodiments of the present application, the processing module 303 comprises:
an identifying unit, configured to identify a transmission channel to be processed having a higher priority than the target transmission channel from the connected transmission channels;
and the second processing unit is used for disconnecting the transmission channel to be processed and taking the target transmission channel as a connected transmission channel after processing if the transmission channel to be processed cannot transmit the data to be transmitted of the current foreground application.
Wherein, in some embodiments of the present application, the determining module 301 includes:
the device comprises an acquisition unit, a mapping relation acquisition unit and a processing unit, wherein the acquisition unit is used for acquiring a mapping relation set, and the mapping relation set comprises a mapping relation of a preset application type, a preset transmission channel and a preset channel connection state;
and the second determining unit is used for determining a target transmission channel and a target channel connection state corresponding to the application type of the current foreground application in the terminal equipment according to the mapping relation.
Wherein, in some embodiments of the present application, the apparatus further comprises a recovery module, the recovery module comprising:
And the recovery unit is used for recovering the connection with the connected transmission channel if the current foreground application is switched to the background application.
In the embodiment of the present application, a determining module 301 determines a target transmission channel according to an application type of a current foreground application in a terminal device, determines a connection state of the target channel required to be met by the terminal device, then an acquiring module 302 acquires a current connected transmission channel of the terminal device, a processing module 303 performs channel connection processing on the connected transmission channel according to the connection state of the target channel and the target transmission channel to obtain a processed connected transmission channel, and then a transmitting module 304 transmits data to be transmitted of the current foreground application through the processed connected transmission channel.
It can be understood that the target transmission channel is determined according to the application type of the current foreground application, the channel connection state is determined according to the application type, and the channel connection processing is performed on the connected transmission channel of the terminal device according to the channel connection state, so that the processed connected transmission channel can meet the requirement of transmitting the data to be transmitted of the current foreground application, the user experience is improved, the transmission channel connected with the terminal device is adjusted according to the channel connection state, and the diversity of data transmission is improved.
In addition, the present application further provides an electronic device, as shown in fig. 8, which shows a schematic structural diagram of the electronic device according to the present application, specifically:
the electronic device may include one or more processing cores 'processors 401, one or more computer-readable storage media's memory 402, power supply 403, and input unit 404, among other components. It will be appreciated by those skilled in the art that the electronic device structure shown in fig. 8 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. Wherein:
the processor 401 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 402, and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by executing the software programs and modules stored in the memory 402. The memory 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the electronic device, etc. In addition, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
The electronic device further comprises a power supply 403 for supplying power to the various components, preferably the power supply 403 may be logically connected to the processor 401 by a power management system, so that functions of managing charging, discharging, and power consumption are performed by the power management system. The power supply 403 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The electronic device may further comprise an input unit 404, which input unit 404 may be used for receiving input digital or character information and generating keyboard, mouse, joystick, optical or trackball signal inputs in connection with user settings and function control.
Although not shown, the electronic device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 401 in the electronic device loads executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 executes the application programs stored in the memory 402, so as to implement the steps in any data transmission method provided in the embodiments of the present application.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
According to the method and the device, a target transmission channel is determined according to the application type of the current foreground application in the terminal device, the target channel connection state which is required to be met by the terminal device is determined, channel connection processing is carried out on the current connected transmission channel of the terminal device according to the target channel connection state and the target transmission channel, the processed connected transmission channel is obtained, and data to be transmitted of the current foreground application are transmitted through the processed connected transmission channel. The method comprises the steps of determining a target transmission channel through the application type of the current foreground application, determining a channel connection state through the application type, and carrying out channel connection processing on the connected transmission channel of the terminal equipment according to the channel connection state, so that the processed connected transmission channel can meet the requirement of transmitting data to be transmitted of the current foreground application, user experience is improved, and the transmission channel connected with the terminal equipment is adjusted according to the channel connection state, so that the diversity of data transmission is improved.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, the present application provides a computer readable storage medium having stored thereon a computer program that can be loaded by a processor to perform the steps of any of the data transmission methods provided herein.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the computer-readable storage medium may comprise: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
Because the instructions stored in the computer readable storage medium can execute the steps in any data transmission method provided in the present application, the beneficial effects that can be achieved by any data transmission method provided in the present application can be achieved, which are detailed in the previous embodiments and are not repeated here.
The foregoing has described in detail a data transmission method, apparatus, electronic device and computer readable storage medium provided in the present application, and specific examples have been applied to illustrate the principles and embodiments of the present invention, and the above examples are only used to help understand the method and core idea of the present invention; meanwhile, as those skilled in the art will vary in the specific embodiments and application scope according to the ideas of the present invention, the present description should not be construed as limiting the present invention in summary.
In the specific embodiment of the present application, data related to type information, data channel connection information, terminal device and user location information, application foreground and background status information, etc. are related, and when the above embodiments of the present application are applied to specific products or technologies, user permission or consent needs to be obtained, and collection, use and processing of related data need to comply with related laws and regulations and standards of related countries and regions.

Claims (10)

1. A data transmission method, comprising:
determining a target transmission channel according to the application type of the current foreground application in the terminal equipment, and determining the connection state of the target channel which is required to be met by the terminal equipment;
Acquiring a current connected transmission channel of the terminal equipment;
performing channel connection processing on the connected transmission channels according to the target channel connection state and the target transmission channels to obtain processed connected transmission channels;
and transmitting the data to be transmitted of the current foreground application through the processed connected transmission channel.
2. The method according to claim 1, wherein the target channel connection state describes that the terminal device connects only the target transmission channel, and the channel connection processing is performed on the connected transmission channel according to the target channel connection state and the target transmission channel, so as to obtain a processed connected transmission channel, including:
taking other connected transmission channels except the target transmission channel in the connected transmission channels as transmission channels to be disconnected;
and disconnecting the transmission channels to be disconnected in the connected transmission channels to obtain the processed connected transmission channels.
3. The method according to claim 2, wherein said transmitting data to be transmitted of said current foreground application over said processed connected transmission channel comprises:
If the processed connected transmission channel comprises the target transmission channel, transmitting the data to be transmitted of the current foreground application through the target transmission channel;
and if the processed connected transmission channel does not comprise the target transmission channel, stopping the transmission of the data to be transmitted of the current foreground application.
4. A method according to claim 3, wherein the target transmission channel includes at least two, and the transmitting the data to be transmitted of the current foreground application through the target transmission channel if the processed connected transmission channel includes the target transmission channel includes:
screening a final target transmission channel from at least two target transmission channels according to the transmission performance parameters of each target transmission channel;
transmitting the data to be transmitted of the current foreground application through the final target transmission channel;
wherein the transmission performance parameter includes at least one of signal quality, transmission stability, or reliability.
5. The method according to claim 1, wherein the performing the channel connection processing on the connected transmission channel according to the target channel connection state and the target transmission channel to obtain a processed connected transmission channel includes:
Identifying a transmission channel to be processed with a higher priority than the target transmission channel from the connected transmission channels;
if the to-be-processed transmission channel cannot transmit the to-be-transmitted data of the current foreground application, the to-be-processed transmission channel is disconnected, and the target transmission channel is used as a processed connected transmission channel.
6. The method according to claim 1, wherein the determining the target transmission channel according to the application type of the current foreground application in the terminal device, and determining the target channel connection state to be satisfied by the terminal device, includes:
obtaining a mapping relation set, wherein the mapping relation set comprises a mapping relation of a preset application type, a preset transmission channel and a preset channel connection state;
and determining a target transmission channel and a target channel connection state corresponding to the application type of the current foreground application in the terminal equipment according to the mapping relation.
7. The method of claim 1, wherein after the transmitting the data to be transmitted of the current foreground application over the processed connected transmission channel, the method further comprises:
and if the current foreground application is switched to the background application, restoring the connection with the connected transmission channel.
8. A data transmission apparatus, comprising:
the determining module is used for determining a target transmission channel according to the application type of the current foreground application in the terminal equipment and determining the connection state of the target channel which is required to be met by the terminal equipment;
the acquisition module is used for acquiring the current connected transmission channel of the terminal equipment;
the processing module is used for carrying out channel connection processing on the connected transmission channels according to the target channel connection state and the target transmission channels to obtain processed connected transmission channels;
and the transmission module is used for transmitting the data to be transmitted of the current foreground application through the processed connected transmission channel.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps in the data transmission method according to any one of claims 1-7 when the computer program is executed.
10. A computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps in the data transmission method according to any one of claims 1 to 7.
CN202310199451.1A 2023-02-24 2023-02-24 Data transmission method, device, electronic equipment and computer readable storage medium Pending CN117412405A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310199451.1A CN117412405A (en) 2023-02-24 2023-02-24 Data transmission method, device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310199451.1A CN117412405A (en) 2023-02-24 2023-02-24 Data transmission method, device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN117412405A true CN117412405A (en) 2024-01-16

Family

ID=89485855

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310199451.1A Pending CN117412405A (en) 2023-02-24 2023-02-24 Data transmission method, device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN117412405A (en)

Similar Documents

Publication Publication Date Title
CA3091172C (en) Communication method and communications device in centralized unit-distributed unit architecture
US20190261159A1 (en) Network Slice Selection Policy Updating Method and Apparatus
US9918219B2 (en) Call management method and apparatus for multi-SIM multi-active terminal
US9532359B2 (en) Resource allocation method and device
JP7027453B2 (en) Methods and terminals for determining the reason for establishment
US20220272522A1 (en) Data transmission method and apparatus
CN113746821B (en) Intelligent device control method and device, storage medium and electronic device
JP2022517973A (en) User identification card authentication method, devices, electronic devices and storage media
CN110677885A (en) Network switching method, device, storage medium and terminal
CN109348434B (en) Scene information sending method, sending device and terminal equipment
CN107181825B (en) Online processing method of terminal equipment data
CN107148035B (en) Frequency band selection method and device and wireless equipment
CN112491951B (en) Request processing method, server and storage medium in peer-to-peer network
CN110784510A (en) Method for accessing target service node to bus and information interaction method of service node
CN108632355B (en) Routing method for household appliance network, control terminal, readable storage medium and equipment
CN117412405A (en) Data transmission method, device, electronic equipment and computer readable storage medium
CN116709226A (en) Communication relay method, electronic device, communication system, and storage medium
JP2018174404A (en) Communication control apparatus, communication control method, and program
CN111277982B (en) Face retrieval method and system for reducing IOT platform server consumption
CN114745809A (en) Network connection method, device, terminal equipment and storage medium
CN114726711A (en) Method and system for cooperative processing service between devices
CN113448744B (en) Application program selection method and device
CN113535402A (en) Load balancing processing method and device based on 5G MEC and electronic equipment
CN113746909A (en) Network connection method, device, electronic equipment and computer readable storage medium
CN112738053A (en) Video color ring playing method, system, server, network equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination