Data transmission method and apparatus, device, and storage medium

By determining the target connection parameters in electronic devices and re-establishing the connection, the identification and transmission problems during the interconnection of electronic devices are solved, ensuring smooth and seamless data transmission.

CN119011648BActive Publication Date: 2026-05-08BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING XIAOMI MOBILE SOFTWARE CO LTD
Filing Date
2023-05-22
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

When electronic devices are interconnected with other devices via standard or non-standard data cables, problems such as recognition failure or data transmission interruption may occur.

Method used

By establishing a connection with the second electronic device in response to the initial connection parameters, it is determined whether the data transmission conditions are met. If not, the target connection parameters are determined, and a new connection is established based on these parameters for data transmission, including taking turns selecting alternative connection parameters for transmission testing and adaptation operations.

Benefits of technology

It enables smooth data transmission between electronic devices, avoids interconnection failures and transmission interruptions, and improves the smoothness of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119011648B_ABST
    Figure CN119011648B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a data transmission method, device, equipment and storage medium. The method is applied to a first electronic device, and includes: in response to establishing a first connection with a second electronic device based on initial connection parameters, determining whether the first connection meets a data transmission condition; in response to the first connection not meeting the data transmission condition, determining target connection parameters; establishing a second connection with the second electronic device based on the target connection parameters, and performing data transmission based on the second connection. The present disclosure can realize automatic adaptation of connection parameters, thereby ensuring smooth data transmission and improving the fluency of the data transmission process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of electronic equipment technology, and in particular to a data transmission method, apparatus, device, and storage medium. Background Technology

[0002] With the widespread use of electronic devices such as tablets, smartphones, in-vehicle terminals, digital cameras, and printers, data transmission between these devices and computers, or between devices themselves, is attracting increasing attention.

[0003] In related technologies, electronic devices are usually equipped with a set of USB (Universal Serial Bus) parameters according to the standard data cable and test equipment when they leave the factory. These parameters are only applicable to charging electronic devices by connecting them to a charger via the standard data cable, or to data transmission by interconnecting with other devices via the standard data cable.

[0004] However, with the increasing number of data cables and devices on the market, when electronic devices are interconnected with other devices for data transmission via standard or non-standard data cables, problems such as devices failing to connect (i.e., devices not being recognized) or data transmission interruptions after interconnection are easily encountered. Summary of the Invention

[0005] To overcome the problems existing in the related technologies, the present disclosure provides a data transmission method, apparatus, device and storage medium to solve the defects in the related technologies.

[0006] According to a first aspect of the present disclosure, a data transmission method is provided, applied to a first electronic device, the method comprising:

[0007] In response to establishing a first connection with a second electronic device based on initial connection parameters, determine whether the first connection meets data transmission conditions;

[0008] In response to the first connection not meeting the data transmission conditions, the target connection parameters are determined;

[0009] A second connection is established with the second electronic device based on the target connection parameters, and data is transmitted based on the second connection.

[0010] In some embodiments, determining whether the first connection meets the data transmission conditions includes:

[0011] In response to receiving a first preset message, it is determined that the first connection meets the data transmission conditions, wherein the first preset message is used to indicate that the connection with the second electronic device is successful.

[0012] In some embodiments, determining the target connection parameters includes:

[0013] Select each set of alternative connection parameters in turn from the multiple sets of alternative connection parameters in the first set;

[0014] A third connection is established with the second electronic device based on each set of alternative connection parameters;

[0015] Based on the third connection, a transmission test is performed to obtain the transmission test results corresponding to each set of alternative connection parameters;

[0016] Based on the transmission test results, the target connection parameter is determined from the multiple sets of alternative connection parameters.

[0017] In some embodiments, performing transmission tests based on the third connection to obtain transmission test results corresponding to each set of alternative connection parameters includes:

[0018] Based on the third connection, a preset number of test messages are sent to the second electronic device;

[0019] Receive the reply message returned by the second electronic device based on the received test message;

[0020] The packet loss rate is determined based on the preset quantity and the first quantity carried in the reply message, and is used as the transmission test result corresponding to each set of alternative connection parameters. The first quantity is used to characterize the number of test messages received by the second electronic device.

[0021] In some embodiments, the method further includes:

[0022] In response to the absence of the target connection parameter in the multiple sets of candidate connection parameters in the first set, a prompt message is generated to prompt the execution of a connection parameter adaptation operation. The connection parameter adaptation operation is used to determine the target connection parameter from the multiple sets of candidate connection parameters in the second set based on a parameter traversal method.

[0023] In response to receiving an operation execution instruction triggered based on the prompt information, the connection parameter adaptation operation is performed.

[0024] In some embodiments, determining the target connection parameters includes:

[0025] Generate prompt information to prompt the execution of connection parameter adaptation operation, wherein the connection parameter adaptation operation is used to determine the target connection parameter from multiple sets of candidate connection parameters in the second set based on parameter traversal method;

[0026] In response to receiving an operation execution instruction triggered based on the prompt information, the connection parameter adaptation operation is performed.

[0027] In some embodiments, the method further includes:

[0028] In response to the save command for the target connection parameters, a correspondence is created between the target connection parameters and the device information of the second electronic device;

[0029] Based on the correspondence, the target connection parameters are stored in at least one of the first electronic device, the second device, and the server.

[0030] According to a second aspect of the present disclosure, a data transmission apparatus is provided, applied to a first electronic device, the apparatus comprising:

[0031] A connection determination module is used to determine whether the first connection satisfies data transmission conditions in response to establishing a first connection with a second electronic device based on initial connection parameters.

[0032] A parameter determination module is used to determine target connection parameters in response to the first connection not meeting the data transmission conditions.

[0033] The data transmission module is used to establish a second connection with the second electronic device based on the target connection parameters, and to perform data transmission based on the second connection.

[0034] In some embodiments, the connection determination module is further configured to determine, in response to receiving a first preset message, that the first connection meets the data transmission conditions, wherein the first preset message is used to indicate that the connection with the second electronic device is successful.

[0035] In some embodiments, the parameter determination module includes a first determination unit;

[0036] The first determining unit is used for:

[0037] Select each set of alternative connection parameters in turn from the multiple sets of alternative connection parameters in the first set;

[0038] A third connection is established with the second electronic device based on each set of alternative connection parameters;

[0039] Based on the third connection, a transmission test is performed to obtain the transmission test results corresponding to each set of alternative connection parameters;

[0040] Based on the transmission test results, the target connection parameter is determined from the multiple sets of alternative connection parameters.

[0041] In some embodiments, the first determining unit is further configured to:

[0042] Based on the third connection, a preset number of test messages are sent to the second electronic device;

[0043] Receive the reply message returned by the second electronic device based on the received test message;

[0044] The packet loss rate is determined based on the preset quantity and the first quantity carried in the reply message, and is used as the transmission test result corresponding to each set of alternative connection parameters. The first quantity is used to characterize the number of test messages received by the second electronic device.

[0045] In some embodiments, the first determining unit is configured to:

[0046] In response to the absence of the target connection parameter in the multiple sets of alternative connection parameters, a prompt message is generated to prompt the execution of a connection parameter adaptation operation. The connection parameter adaptation operation is used to determine the target connection parameter from the multiple sets of alternative connection parameters in the second set based on a parameter traversal method.

[0047] In response to receiving an operation execution instruction triggered based on the prompt information, the connection parameter adaptation operation is performed.

[0048] In some embodiments, the parameter determination module includes a second determination unit;

[0049] The second determining unit is used for:

[0050] Generate prompt information to prompt the execution of connection parameter adaptation operation, wherein the connection parameter adaptation operation is used to determine the target connection parameter from multiple sets of candidate connection parameters in the second set based on parameter traversal method;

[0051] In response to receiving an operation execution instruction triggered based on the prompt information, the connection parameter adaptation operation is performed.

[0052] In some embodiments, the device further includes a parameter storage module;

[0053] The parameter storage module includes:

[0054] A relationship creation unit is used to create a correspondence between the target connection parameters and the device information of the second electronic device in response to the save instruction of the target connection parameters;

[0055] A parameter storage unit is used to store the target connection parameters in at least one of the first electronic device, the second device, and the server, based on the correspondence.

[0056] According to a third aspect of the present disclosure, an electronic device is provided, the device comprising:

[0057] Processor and memory used to store computer programs;

[0058] The processor is configured to, when executing the computer program, implement:

[0059] In response to establishing a first connection with a second electronic device based on initial connection parameters, determine whether the first connection meets data transmission conditions;

[0060] In response to the first connection not meeting the data transmission conditions, the target connection parameters are determined;

[0061] A second connection is established with the second electronic device based on the target connection parameters, and data is transmitted based on the second connection.

[0062] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided having a computer program stored thereon, the program being implemented when executed by a processor:

[0063] In response to establishing a first connection with a second electronic device based on initial connection parameters, determine whether the first connection meets data transmission conditions;

[0064] In response to the first connection not meeting the data transmission conditions, the target connection parameters are determined;

[0065] A second connection is established with the second electronic device based on the target connection parameters, and data is transmitted based on the second connection.

[0066] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0067] This disclosure, in response to establishing a first connection with a second electronic device based on initial connection parameters, determines whether the first connection meets data transmission conditions, and in response to the first connection not meeting the data transmission conditions, determines target connection parameters. Then, a second connection can be established with the second electronic device based on the target connection parameters, and data transmission can be performed based on the second connection. Since the target connection parameters are determined when the first connection does not meet the data transmission conditions, automatic adaptation of connection parameters can be achieved. This effectively avoids problems such as the inability to interconnect between the first and second electronic devices during data transmission, or data transmission interruptions after interconnection, ensuring smooth data transmission and improving the fluency of the data transmission process.

[0068] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0069] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0070] Figure 1 This is a flowchart illustrating a data transmission method according to an exemplary embodiment of the present disclosure;

[0071] Figure 2 This is a flowchart illustrating how to determine target connection parameters according to an exemplary embodiment of the present disclosure;

[0072] Figure 3 This is a flowchart illustrating how to obtain the transmission test results corresponding to each set of alternative connection parameters according to an exemplary embodiment of this disclosure;

[0073] Figure 4 This is a flowchart illustrating how to determine target connection parameters according to another exemplary embodiment of this disclosure;

[0074] Figure 5 This is a flowchart illustrating how to determine target connection parameters according to yet another exemplary embodiment of this disclosure;

[0075] Figure 6 This is a flowchart illustrating how to save the target connection parameters according to an exemplary embodiment of the present disclosure;

[0076] Figure 7 This is a block diagram illustrating a data transmission apparatus according to an exemplary embodiment of the present disclosure;

[0077] Figure 8 This is a block diagram illustrating yet another data transmission apparatus according to an exemplary embodiment of the present disclosure;

[0078] Figure 9 This is a block diagram illustrating an electronic device according to an exemplary embodiment of the present disclosure. Detailed Implementation

[0079] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0080] Figure 1 This is a flowchart illustrating a data transmission method according to an exemplary embodiment. The method of this embodiment can be executed by a data transmission device, which can be configured in a first electronic device, such as a server, workstation, personal computer, mobile terminal (e.g., mobile phone, tablet computer, vehicle terminal, etc.), wearable device (e.g., glasses, watch, etc.). Specifically, as... Figure 1As shown, the method includes the following steps S101-S103:

[0081] In step S101, in response to establishing a first connection with the second electronic device based on the initial connection parameters, it is determined whether the first connection meets the data transmission conditions: if yes, then step S102 is executed; if no, then step S103 is executed.

[0082] In step S102, data transmission is performed based on the first connection.

[0083] In step S103, the target connection parameters are determined.

[0084] In step S104, a second connection is established with the second electronic device based on the target connection parameters, and data transmission is performed based on the second connection.

[0085] In this embodiment, after a first connection is established with a second electronic device based on initial connection parameters, it can be determined whether the first connection meets the data transmission conditions.

[0086] The aforementioned initial connection parameters can be the default connection parameters preset in the first electronic device (e.g., a set of connection parameters adapted at the factory based on the standard data cable and the test equipment), or a set of connection parameters used when previously interconnecting with the second electronic device.

[0087] For example, the first electronic device can detect whether it has received a first preset message indicating a successful connection with the second electronic device. If it receives the first preset message, it can determine that the first connection meets the data transmission conditions. Conversely, if the first electronic device does not receive the first preset message, but instead receives a second notification message indicating a failed connection with the second electronic device, it can determine that the first connection does not meet the data transmission conditions. Based on this, target connection parameters can be determined according to a preset method, and then a second connection can be established with the second electronic device based on these target connection parameters, and data transmission can be performed based on the second connection.

[0088] The connection parameters mentioned above can be connection parameters based on the USB (Universal Serial Bus) protocol, such as the connection parameters used by data cables with interface types such as type-A, type-B, or type-C. This embodiment does not limit this.

[0089] It is worth noting that the specific content of the above connection parameters can be set based on the actual application scenario, such as setting at least one of the following parameters: drive capability parameter, termination impedance matching parameter, TX (Transport) current source, HOST Disconnect level, RX (Receive) noise margin, etc.

[0090] In some embodiments, the method for determining the target connection parameters described above can be selected from solutions in related technologies based on actual business needs, and this embodiment does not limit this method.

[0091] In other embodiments, the method for determining the target connection parameters described above may also be referred to below. Figure 2 , Figure 4 or Figure 5 The embodiments shown will not be described in detail here.

[0092] As described above, the method of this embodiment determines whether the first connection meets the data transmission conditions in response to establishing a first connection with the second electronic device based on initial connection parameters, and determines the target connection parameters in response to the first connection not meeting the data transmission conditions. Then, a second connection can be established with the second electronic device based on the target connection parameters, and data transmission can be performed based on the second connection. Since the target connection parameters are determined when the first connection does not meet the data transmission conditions, the connection parameters can be automatically adapted, thereby effectively avoiding problems such as the inability to interconnect between the first electronic device and the second electronic device during data transmission, or data transmission interruption after interconnection. This ensures smooth data transmission and improves the fluency of the data transmission process.

[0093] Figure 2 This is a flowchart illustrating how to determine target connection parameters according to an exemplary embodiment of the present disclosure; this embodiment is based on the above embodiment and takes how to determine target connection parameters as an example for illustrative explanation.

[0094] like Figure 2 As shown, determining the target connection parameters in step S103 above may include the following steps S201-S204:

[0095] In step S201, each set of alternative connection parameters is selected in turn from the multiple sets of alternative connection parameters in the first set.

[0096] In this embodiment, when the target connection parameters are determined, multiple sets of candidate connection parameters from a pre-constructed first set can be obtained, and each set of candidate connection parameters can be selected in turn from these multiple sets of candidate connection parameters. It should be noted that the first set is used to store candidate connection parameters, which can be connection parameters that match commonly used terminal types. For example, the candidate connection parameters include at least one or more of the following: connection parameters corresponding to terminal devices that are bound to the first electronic device, connection parameters corresponding to second electronic devices that have previously established a connection with the first electronic device, and connection parameters of commonly available electronic devices.

[0097] For example, the types of data cables on the market can be investigated and categorized. Data cables can be divided into several categories: Category 1 (compatible), Category 2 (high insertion loss, e.g., cables longer than 2 meters), Category 3 (high capacitive load), and Category 4 (high inductive load). Then, for each type of data cable, suitable connection parameters can be determined based on eye diagrams and other information. Furthermore, these connection parameters for different types of data cables can be used to construct multiple sets of alternative connection parameters for the first set mentioned above. Based on this, each set of alternative connection parameters can be selected sequentially from these multiple sets of alternative connection parameters to perform subsequent steps.

[0098] In step S202, a third connection is established with the second electronic device based on each set of alternative connection parameters.

[0099] In this embodiment, after selecting each set of alternative connection parameters, a connection can be established with the second electronic device based on each set of alternative connection parameters (for ease of distinction, it is named "third connection").

[0100] In step S203, a transmission test is performed based on the third connection to obtain the transmission test results corresponding to each set of alternative connection parameters.

[0101] In this embodiment, after a third connection is established with the second electronic device based on each set of alternative connection parameters, a transmission test can be performed based on the third connection to obtain the transmission test results corresponding to each set of alternative connection parameters.

[0102] It is worth noting that the above transmission test content can be selected from relevant technologies based on actual business needs. Any test that can detect the data transmission capability of the currently established third connection is acceptable, and this embodiment does not limit it.

[0103] In other embodiments, the content of the above transmission test can be found below. Figure 3 The embodiments shown will not be described in detail here.

[0104] In step S204, based on the transmission test results, the target connection parameter is determined from the multiple sets of alternative connection parameters.

[0105] In this embodiment, after performing a transmission test based on the third connection and obtaining the transmission test results corresponding to each set of alternative connection parameters, the target connection parameter can be determined from the multiple sets of alternative connection parameters based on the transmission test results.

[0106] For example, based on the transmission test results, the set of connection parameters with the best transmission test results can be selected from the multiple sets of alternative connection parameters and used as the target connection parameters.

[0107] As can be seen from the above description, this embodiment improves the efficiency of determining the target connection parameter by pre-specifying multiple sets of alternative connection parameters and determining the target connection parameter from the pre-specified multiple sets of alternative connection parameters. This, in turn, improves the efficiency of establishing a second connection based on the target connection parameter and transmitting data based on the second connection.

[0108] Figure 3 This is a flowchart illustrating how to obtain the transmission test results corresponding to each set of alternative connection parameters according to an exemplary embodiment of this disclosure; this embodiment is based on the above embodiment and takes how to obtain the transmission test results corresponding to each set of alternative connection parameters as an example for illustrative explanation.

[0109] like Figure 3 As shown, the transmission test performed based on the third connection in step S203 above, to obtain the transmission test results corresponding to each set of alternative connection parameters, may include the following steps S301-S303:

[0110] In step S301, a preset number of test messages are sent to the second electronic device based on the third connection;

[0111] In step S302, a reply message returned by the second electronic device based on the received test message is received;

[0112] In step S303, the packet loss rate is determined based on the preset quantity and the first quantity carried in the reply message, and is used as the transmission test result corresponding to each set of alternative connection parameters.

[0113] In this embodiment, when a transmission test is performed based on the third connection and the transmission test results corresponding to each set of alternative connection parameters are obtained, a preset number of test messages can be sent to the second electronic device based on the third connection. After receiving the first number of test messages based on the third connection, the second electronic device can send a reply message to the first electronic device. The reply message can carry the number of test messages received by the second electronic device, i.e., the first number mentioned above. Based on this, after receiving the reply message, the first electronic device can extract the first number from the reply message and compare it with the preset number to obtain the packet loss rate. The packet loss rate can then be used as the transmission test result corresponding to the currently selected set of connection parameters.

[0114] It is understandable that a lower packet loss rate indicates a better transmission test result for the corresponding connection parameters. Therefore, the target connection parameters can be determined from multiple sets of alternative connection parameters in the first set based on the packet loss rate.

[0115] As described above, this embodiment can determine the transmission test results corresponding to each set of alternative connection parameters based on the packet loss rate. Subsequently, based on the transmission test results, the target connection parameters can be determined from the multiple sets of alternative connection parameters. This allows for the reasonable and accurate determination of the target connection parameters, thereby ensuring the smooth and fluid transmission of subsequent data.

[0116] Figure 4 This is a flowchart illustrating how to determine target connection parameters according to another exemplary embodiment of the present disclosure; this embodiment is an exemplary description based on the above embodiment, taking the determination of target connection parameters as an example.

[0117] like Figure 4 As shown, the step S204 above, which involves determining the target connection parameter from the multiple sets of alternative connection parameters, may include the following steps S401-S406:

[0118] In step S401, each set of alternative connection parameters is selected in turn from the multiple sets of alternative connection parameters in the first set;

[0119] In step S402, a third connection is established with the second electronic device based on each set of alternative connection parameters;

[0120] In step S403, a transmission test is performed based on the third connection to obtain the transmission test results corresponding to each set of alternative connection parameters;

[0121] In step S404, based on the transmission test results, the target connection parameter is determined from the multiple sets of alternative connection parameters;

[0122] The explanations and descriptions of steps S401-S404 above can be found in the above... Figure 2 Steps S201-S204 in the illustrated embodiment will not be described in detail here.

[0123] In step S405, in response to the absence of the target connection parameter among the multiple sets of alternative connection parameters, a prompt message is generated to prompt the user to perform a connection parameter adaptation operation.

[0124] In step S406, in response to receiving an operation execution instruction triggered based on the prompt information, the connection parameter adaptation operation is performed.

[0125] In this embodiment, after the operation of step S404 is performed, it can be determined whether there is a target connection parameter (e.g., a set of candidate connection parameters whose corresponding first transmission test result meets the set test result requirements) among the multiple sets of candidate connection parameters in the first set.

[0126] For example, the first transmission test result described above meeting the set test result requirements may include at least one of the following (a) and (b):

[0127] (a) The value of the first transmission test result reaches a set threshold. Taking packet loss rate as an example, the value of the first transmission test result reaching the set threshold may include: the packet loss rate corresponding to the target connection parameter is lower than or equal to the set packet loss rate threshold.

[0128] (b) The ranking of the first transmission test result among the multiple transmission test results meets the set ranking conditions. The multiple transmission test results include the transmission test results corresponding to each of the multiple sets of alternative connection parameters.

[0129] Taking packet loss rate as an example, the ranking of the first transmission test result among multiple transmission test results meets the set ranking conditions, which may include: the packet loss rate corresponding to the target connection parameter is the lowest among multiple packet loss rates (i.e., the packet loss rates corresponding to each of the above multiple sets of alternative connection parameters).

[0130] Based on this, if a connection parameter exists that meets the above-mentioned test result requirements, it can be determined as the target connection parameter; conversely, if no connection parameter exists that meets the above-mentioned test result requirements, a prompt message can be generated to prompt the execution of a connection parameter adaptation operation. This connection parameter adaptation operation can be used to determine the target connection parameter from multiple sets of candidate connection parameters in the second set (e.g., all or some connection parameters within the known range in related technologies) based on a parameter traversal method.

[0131] The form and content of the above-mentioned prompts can be set according to the needs of the actual application scenario, such as being set to text or voice, etc. This embodiment does not limit this.

[0132] Based on this, when the user triggers the operation execution instruction for performing connection parameter adaptation based on the above prompt information, the electronic device can respond to receiving the instruction and execute the connection parameter adaptation operation to determine the target connection parameter from multiple sets of alternative connection parameters in the second set based on parameter traversal.

[0133] It is worth noting that the multiple sets of alternative connection parameters in the second set may be at least partially the same as or completely different from the multiple sets of alternative connection parameters in the first set. In other words, the second set may contain at least some of the alternative connection parameters in the first set, or may not contain any of the alternative connection parameters in the first set.

[0134] In some embodiments, when determining the target connection parameters from multiple sets of candidate connection parameters in the second set based on parameter traversal, a suitable set of connection parameters can also be selected by combining methods such as packet loss rate detection. For specific methods of packet loss rate detection, please refer to the descriptions in related technologies or the above. Figure 3 The embodiments shown are not described in detail here.

[0135] As described above, this embodiment can determine the target connection parameters based on the set of parameters when the target connection parameters exist, and prompt the user to trigger the connection parameter adaptation operation when the target connection parameters do not exist, so as to search for a suitable set of connection parameters from a wider range as the target connection parameters, which can ensure the smooth progress and fluency of subsequent data transmission.

[0136] Figure 5 This is a flowchart illustrating how to determine target connection parameters according to yet another exemplary embodiment of this disclosure; this embodiment is an exemplary description based on the above embodiment, taking the determination of target connection parameters as an example.

[0137] like Figure 5 As shown, determining the target connection parameters in step S103 above may include the following steps S501-S502:

[0138] In step S501, a prompt message is generated to prompt the user to perform a connection parameter adaptation operation.

[0139] In step S502, in response to receiving an operation execution instruction triggered based on the prompt information, the connection parameter adaptation operation is performed.

[0140] In this embodiment, when it is detected that the first connection does not meet the data transmission conditions and it is necessary to determine the target connection parameters, a prompt message can be generated to prompt the execution of a connection parameter adaptation operation. This connection parameter adaptation operation can be used to determine the target connection parameters from multiple sets of candidate connection parameters in a second set (e.g., all or part of the connection parameters known in related technologies) based on a parameter traversal method.

[0141] The form and content of the above-mentioned prompts can be set according to the needs of the actual application scenario, such as being set to text or voice, etc. This embodiment does not limit this.

[0142] Based on this, when the user triggers the operation execution instruction for performing connection parameter adaptation based on the above prompt information, the electronic device can respond to receiving the instruction and execute the connection parameter adaptation operation to determine the target connection parameter from multiple sets of alternative connection parameters in the second set based on parameter traversal.

[0143] In some embodiments, when determining the target connection parameters from multiple sets of candidate connection parameters in the second set based on parameter traversal, a suitable set of connection parameters can also be selected by combining methods such as packet loss rate detection. Specific methods for packet loss rate detection can be found in related technical documents or as described above. Figure 3 The embodiments shown are not described in detail here.

[0144] As described above, this embodiment can prompt the user to trigger a connection parameter adaptation operation when it is detected that the first connection does not meet the data transmission conditions and the target connection parameters need to be determined. This allows for the search of a suitable set of connection parameters from a wider range as the target connection parameters, ensuring the smooth progress and fluency of subsequent data transmission.

[0145] Figure 6 This is a flowchart illustrating how to save the target connection parameters according to an exemplary embodiment of the present disclosure; this embodiment is based on the above embodiment and takes the method of saving the target connection parameters as an example for illustrative explanation.

[0146] like Figure 6 As shown, the data transmission method of this embodiment may further include saving the target connection parameters based on the following steps S601-S602:

[0147] In step S601, in response to the save instruction of the target connection parameters, a correspondence between the target connection parameters and the device information of the second electronic device is created;

[0148] In step S602, based on the correspondence, the target connection parameters are stored in at least one of the first electronic device, the second device, and the server.

[0149] In this embodiment, when based on Figure 4 or Figure 5 After determining the target connection parameters in the connection parameter adaptation operation of the illustrated embodiment, the target connection parameters can be saved. For example, an interface for triggering a save command can be provided in the user interface. When the user triggers the save command for the target connection parameters, the electronic device can respond to receiving the command and create a correspondence between the target connection parameters and the device information (e.g., device model and / or device identification information) of the second electronic device (e.g., a correspondence table, key-value pairs, etc.). Based on the correspondence, the target connection parameters can be stored locally on the first electronic device (e.g., the target connection parameters can be stored separately in a preset storage location on the first electronic device, and / or stored in a preset first set for subsequent selection of each set of alternative connection parameters from the first set to attempt interconnection with the second device), locally on the second electronic device, and on the server, at least one of these locations, for other users of the platform to query and use.

[0150] In this way, when the first electronic device (or other electronic devices on the platform) subsequently interconnects with the second electronic device (or a device with the same device information as the second electronic device), it can directly use the locally stored connection parameters (or the connection parameters obtained from the server) to interconnect, thereby avoiding the repeated execution of the above connection parameter adaptation operation and achieving the goal of improving data transmission efficiency.

[0151] Figure 7 This is a block diagram illustrating a data transmission apparatus according to an exemplary embodiment of the present disclosure. The apparatus of this embodiment can be executed by a data transmission device, which can be configured in a first electronic device, such as a server, workstation, personal computer, mobile terminal (e.g., mobile phone, tablet computer, vehicle terminal, etc.), wearable device (e.g., glasses, watch, etc.). Specifically, as... Figure 7 As shown, the device includes: a connection determination module 110, a parameter determination module 120, and a data transmission module 130, wherein:

[0152] The connection determination module 110 is used to determine whether the first connection meets the data transmission conditions in response to establishing a first connection with the second electronic device based on initial connection parameters.

[0153] The parameter determination module 120 is used to determine the target connection parameters in response to the first connection not meeting the data transmission conditions.

[0154] The data transmission module 130 is used to establish a second connection with the second electronic device based on the target connection parameters, and to perform data transmission based on the second connection.

[0155] As described above, the device in this embodiment determines whether the first connection meets the data transmission conditions in response to establishing a first connection with the second electronic device based on initial connection parameters, and determines the target connection parameters in response to the first connection not meeting the data transmission conditions. Then, it can establish a second connection with the second electronic device based on the target connection parameters and perform data transmission based on the second connection. Since the target connection parameters are determined when the first connection does not meet the data transmission conditions, automatic adaptation of connection parameters can be achieved. This effectively avoids problems such as the inability to interconnect between the first and second electronic devices during data transmission, or data transmission interruption after interconnection, ensuring smooth data transmission and improving the fluency of the data transmission process.

[0156] Figure 8 This is a block diagram illustrating another data transmission device according to an exemplary embodiment of the present disclosure; the device in this embodiment can be executed by a data transmission device, which can be configured in a first electronic device, such as a server, workstation, personal computer, mobile terminal (such as mobile phone, tablet computer, vehicle terminal, etc.), wearable device (such as glasses, watch, etc.).

[0157] Among them, the connection determination module 210, the parameter determination module 220, and the data transmission module 230 are the same as those mentioned above. Figure 7 The connection determination module 110, parameter determination module 120, and data transmission module 130 in the illustrated embodiment have the same functions, which will not be described in detail here.

[0158] Specifically, such as Figure 8 As shown, the connection determination module 210 can also be used to determine, in response to receiving a first preset message, that the first connection meets the data transmission conditions, wherein the first preset message is used to indicate that the connection with the second electronic device is successful.

[0159] In some embodiments, the parameter determination module 220 includes a first determination unit 221;

[0160] The first determining unit 221 can be used for:

[0161] Select each set of alternative connection parameters in turn from the multiple sets of alternative connection parameters in the first set;

[0162] A third connection is established with the second electronic device based on each set of alternative connection parameters;

[0163] Based on the third connection, a transmission test is performed to obtain the transmission test results corresponding to each set of alternative connection parameters;

[0164] Based on the transmission test results, the target connection parameter is determined from the multiple sets of alternative connection parameters.

[0165] In some embodiments, the first determining unit 221 may also be used for:

[0166] Based on the third connection, a preset number of test messages are sent to the second electronic device;

[0167] Receive the reply message returned by the second electronic device based on the received test message;

[0168] The packet loss rate is determined based on the preset quantity and the first quantity carried in the reply message, and is used as the transmission test result corresponding to each set of alternative connection parameters. The first quantity is used to characterize the number of test messages received by the second electronic device.

[0169] In some embodiments, the first determining unit 221 may also be used for:

[0170] In response to the absence of the target connection parameter in the multiple sets of alternative connection parameters, a prompt message is generated to prompt the execution of a connection parameter adaptation operation. The connection parameter adaptation operation is used to determine the target connection parameter from the multiple sets of alternative connection parameters in the second set based on a parameter traversal method.

[0171] In response to receiving an operation execution instruction triggered based on the prompt information, the connection parameter adaptation operation is performed.

[0172] In some embodiments, the parameter determination module 220 may include a second determination unit 222;

[0173] The second determining unit 222 is used for:

[0174] Generate prompt information to prompt the execution of connection parameter adaptation operation, wherein the connection parameter adaptation operation is used to determine the target connection parameter from multiple sets of candidate connection parameters in the second set based on parameter traversal method;

[0175] In response to receiving an operation execution instruction triggered based on the prompt information, the connection parameter adaptation operation is performed.

[0176] In some embodiments, the above-described apparatus may further include a parameter storage module 240;

[0177] The parameter storage module 240 may include:

[0178] The relationship creation unit 241 is used to create a correspondence between the target connection parameters and the device information of the second electronic device in response to the save instruction of the target connection parameters;

[0179] The parameter storage unit 242 is used to store the target connection parameters in at least one of the first electronic device, the second device, and the server based on the correspondence.

[0180] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0181] Figure 9 This is a block diagram illustrating an electronic device according to an exemplary embodiment. For example, device 900 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, etc.

[0182] Reference Figure 9 The device 900 may include one or more of the following components: a processing component 902, a memory 904, a power supply component 906, a multimedia component 908, an audio component 910, an input / output (I / O) interface 912, a sensor component 914, and a communication component 916.

[0183] Processing component 902 typically controls the overall operation of device 900, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 902 may include one or more processors 920 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 902 may include one or more modules to facilitate interaction between processing component 902 and other components. For example, processing component 902 may include a multimedia module to facilitate interaction between multimedia component 908 and processing component 902.

[0184] Memory 904 is configured to store various types of data to support the operation of device 900. Examples of this data include instructions for any application or method operating on device 900, contact data, phonebook data, messages, pictures, videos, etc. Memory 904 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0185] Power supply component 906 provides power to various components of device 900. Power supply component 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 900.

[0186] Multimedia component 908 includes a screen that provides an output interface between the device 900 and the user. In some embodiments, the screen may include a liquid crystal display panel and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 908 includes a front-facing camera and / or a rear-facing camera. When the device 900 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0187] Audio component 910 is configured to output and / or input audio signals. For example, audio component 910 includes a microphone (MIC) configured to receive external audio signals when device 900 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 904 or transmitted via communication component 916. In some embodiments, audio component 910 also includes a speaker for outputting audio signals.

[0188] I / O interface 912 provides an interface between processing component 902 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0189] Sensor assembly 914 includes one or more sensors for providing status assessments of various aspects of device 900. For example, sensor assembly 914 can detect the on / off state of device 900, the relative positioning of components such as the display panel and keypad of device 900, changes in the position of device 900 or a component of device 900, the presence or absence of user contact with device 900, the orientation or acceleration / deceleration of device 900, and temperature changes of device 900. Sensor assembly 914 may also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 914 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 914 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.

[0190] Communication component 916 is configured to facilitate wired or wireless communication between device 900 and other devices. Device 900 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, 4G or 5G, or combinations thereof. In one exemplary embodiment, communication component 916 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 916 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0191] In an exemplary embodiment, device 900 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0192] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 904 including instructions, which can be executed by a processor 920 of device 900 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0193] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0194] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A data transmission method, characterized in that, Applied to a first electronic device, the method includes: In response to establishing a first connection with a second electronic device based on initial connection parameters, determine whether the first connection meets data transmission conditions; In response to the first connection not meeting the data transmission conditions, the target connection parameters are determined; A second connection is established with the second electronic device based on the target connection parameters, and data transmission is performed based on the second connection; The determination of the target connection parameters includes: From the multiple sets of alternative connection parameters in the first set, each set of alternative connection parameters is selected in turn; the alternative connection parameters include connection parameters corresponding to various types of data lines; A third connection is established with the second electronic device based on each set of alternative connection parameters; Based on the third connection, a transmission test is performed to obtain the transmission test results corresponding to each set of alternative connection parameters; Based on the transmission test results, the target connection parameter is determined from the multiple sets of alternative connection parameters.

2. The method according to claim 1, characterized in that, Determining whether the first connection meets the data transmission conditions includes: In response to receiving a first preset message, it is determined that the first connection meets the data transmission conditions, wherein the first preset message is used to indicate that the connection with the second electronic device is successful.

3. The method according to claim 1, characterized in that, The transmission test performed based on the third connection, obtaining the transmission test results corresponding to each set of alternative connection parameters, includes: Based on the third connection, a preset number of test messages are sent to the second electronic device; Receive the reply message returned by the second electronic device based on the received test message; The packet loss rate is determined based on the preset quantity and the first quantity carried in the reply message, and is used as the transmission test result corresponding to each set of alternative connection parameters. The first quantity is used to characterize the number of test messages received by the second electronic device.

4. The method according to claim 1, characterized in that, The method further includes: In response to the absence of the target connection parameter in the multiple sets of candidate connection parameters in the first set, a prompt message is generated to prompt the execution of a connection parameter adaptation operation. The connection parameter adaptation operation is used to determine the target connection parameter from the multiple sets of candidate connection parameters in the second set based on a parameter traversal method. In response to receiving an operation execution instruction triggered based on the prompt information, the connection parameter adaptation operation is performed.

5. The method according to claim 1, characterized in that, The determination of the target connection parameters includes: Generate prompt information to prompt the execution of connection parameter adaptation operation, wherein the connection parameter adaptation operation is used to determine the target connection parameter from multiple sets of candidate connection parameters in the second set based on parameter traversal method; In response to receiving an operation execution instruction triggered based on the prompt information, the connection parameter adaptation operation is performed.

6. The method according to claim 4 or 5, characterized in that, The method further includes: In response to the save command for the target connection parameters, a correspondence is created between the target connection parameters and the device information of the second electronic device; Based on the correspondence, the target connection parameters are stored in at least one of the first electronic device, the second electronic device, and the server.

7. A data transmission device, characterized in that, Applied to a first electronic device, the device includes: A connection determination module is used to determine whether the first connection satisfies data transmission conditions in response to establishing a first connection with a second electronic device based on initial connection parameters. A parameter determination module is used to determine target connection parameters in response to the first connection not meeting the data transmission conditions. The data transmission module is used to establish a second connection with the second electronic device based on the target connection parameters, and to perform data transmission based on the second connection; The parameter determination module includes a first determination unit; The first determining unit is used for: From the multiple sets of alternative connection parameters in the first set, each set of alternative connection parameters is selected in turn; the alternative connection parameters include connection parameters corresponding to various types of data lines; A third connection is established with the second electronic device based on each set of alternative connection parameters; Based on the third connection, a transmission test is performed to obtain the transmission test results corresponding to each set of alternative connection parameters; Based on the transmission test results, the target connection parameter is determined from the multiple sets of alternative connection parameters.

8. The apparatus according to claim 7, characterized in that, The connection determination module is further configured to determine, in response to receiving a first preset message, that the first connection meets the data transmission conditions, wherein the first preset message is used to indicate that the connection with the second electronic device is successful.

9. The apparatus according to claim 7, characterized in that, The first determining unit is further configured to: Based on the third connection, a preset number of test messages are sent to the second electronic device; Receive the reply message returned by the second electronic device based on the received test message; The packet loss rate is determined based on the preset quantity and the first quantity carried in the reply message, and is used as the transmission test result corresponding to each set of alternative connection parameters. The first quantity is used to characterize the number of test messages received by the second electronic device.

10. The apparatus according to claim 7, characterized in that, The first determining unit is used for: In response to the absence of the target connection parameter in the multiple sets of alternative connection parameters, a prompt message is generated to prompt the execution of a connection parameter adaptation operation. The connection parameter adaptation operation is used to determine the target connection parameter from the multiple sets of alternative connection parameters in the second set based on a parameter traversal method. In response to receiving an operation execution instruction triggered based on the prompt information, the connection parameter adaptation operation is performed.

11. The apparatus according to claim 7, characterized in that, The parameter determination module includes a second determination unit; The second determining unit is used for: Generate prompt information to prompt the execution of connection parameter adaptation operation, wherein the connection parameter adaptation operation is used to determine the target connection parameter from multiple sets of candidate connection parameters in the second set based on parameter traversal method; In response to receiving an operation execution instruction triggered based on the prompt information, the connection parameter adaptation operation is performed.

12. The apparatus according to claim 10 or 11, characterized in that, The device also includes a parameter storage module; The parameter storage module includes: A relationship creation unit is used to create a correspondence between the target connection parameters and the device information of the second electronic device in response to the save instruction of the target connection parameters; A parameter storage unit is used to store the target connection parameters in at least one of the first electronic device, the second electronic device, and the server, based on the correspondence.

13. An electronic device, characterized in that, The device includes: Processor and memory used to store computer programs; The processor is configured to, when executing the computer program, implement: In response to establishing a first connection with a second electronic device based on initial connection parameters, determine whether the first connection meets data transmission conditions; In response to the first connection not meeting the data transmission conditions, the target connection parameters are determined; A second connection is established with the second electronic device based on the target connection parameters, and data transmission is performed based on the second connection; The determination of the target connection parameters includes: From the multiple sets of alternative connection parameters in the first set, each set of alternative connection parameters is selected in turn; the alternative connection parameters include connection parameters corresponding to various types of data lines; A third connection is established with the second electronic device based on each set of alternative connection parameters; Based on the third connection, a transmission test is performed to obtain the transmission test results corresponding to each set of alternative connection parameters; Based on the transmission test results, the target connection parameter is determined from the multiple sets of alternative connection parameters.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, the following is achieved: In response to establishing a first connection with a second electronic device based on initial connection parameters, determine whether the first connection meets data transmission conditions; In response to the first connection not meeting the data transmission conditions, the target connection parameters are determined; A second connection is established with the second electronic device based on the target connection parameters, and data transmission is performed based on the second connection; The determination of the target connection parameters includes: From the multiple sets of alternative connection parameters in the first set, each set of alternative connection parameters is selected in turn; the alternative connection parameters include connection parameters corresponding to various types of data lines; A third connection is established with the second electronic device based on each set of alternative connection parameters; Based on the third connection, a transmission test is performed to obtain the transmission test results corresponding to each set of alternative connection parameters; Based on the transmission test results, the target connection parameter is determined from the multiple sets of alternative connection parameters.

Citation Information

Patent Citations

  • A parameter adjustment method and communication equipment

    CN109921959A