Data transmission method and device of wireless equipment, equipment and storage medium
By selecting the main link in at least two links of the wireless device and analyzing the data transmission instructions, the data transmission loop problem is solved, more efficient data transmission and network stability are achieved, and the dependence on the wireless controller is reduced.
Patent Information
- Application Number
- CN202510531131.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-08-12
AI Technical Summary
In the prior art, data transmission loop problems caused by multiple frequency bands simultaneously connecting the same wireless access point or interconnection between multiple frequency bands and APs lead to unstable network data transmission and affecting data transmission efficiency.
The first link is selected among at least two links, and the remaining links are determined as the second link, and in response to the data transmission instruction analysis parameters, the type and identification of the data transmission instruction are determined, and the target data is transmitted through the first link or the second link to avoid a data transmission loop.
It improves the stability of the network and data transmission efficiency, reduces the dependence on wireless controllers, and increases convenience and applicability.
Smart Images

Figure CN120475474A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data transmission method, apparatus, device and storage medium for a wireless device. Background Art
[0002] During network communication, a device might experience data transmission loops due to multiple frequency bands connecting to the same wireless access point (AP) or multiple frequency bands connecting to two or more APs. This can cause unstable network data transmission and reduce data transmission efficiency.
[0003] The related communication method is mainly to add a wireless controller to achieve loop containment, thereby achieving data transmission.
[0004] However, the above method is costly and has low applicability, thus failing to improve the data transmission efficiency of the network. Summary of the Invention
[0005] The present application provides a data transmission method, apparatus, device and storage medium for a wireless device, which are used to solve the problem in the prior art that network loops affect data transmission efficiency.
[0006] In a first aspect, the present application provides a data transmission method for a wireless device, which is applied to an electronic device, wherein the electronic device includes an omnidirectional antenna and at least two links. The data transmission method for the wireless device includes:
[0007] Selecting a first link from the at least two links, and determining each non-first link as a second link;
[0008] In response to receiving the data transmission instruction, parsing the data transmission instruction to obtain data transmission parameters;
[0009] When the data transmission parameter includes an identifier, determining a type of the data transmission instruction;
[0010] Based on the type of the data transmission instruction and the identifier, a target link is determined in the first link or each of the second links, and the omnidirectional antenna is controlled to transmit the target data carried by the data transmission instruction based on the target link.
[0011] In one possible design, determining a target link in the first link or each of the second links based on the type of the data transmission instruction and the identifier, and controlling the omnidirectional antenna to transmit target data carried by the data transmission instruction based on the target link includes:
[0012] When the type of the data transmission instruction is a data sending instruction, determining a first matching result between the identifier and the target identifier;
[0013] When the first matching result indicates that the identifier matches the target identifier, determining first target data carried by the data transmission instruction;
[0014] The first link is determined as a first target link, and the omnidirectional antenna is controlled to transmit the first target data based on the first target link.
[0015] In a possible design, after determining a first matching result between the identifier and the target identifier, the method includes:
[0016] When the first matching result indicates that the identifier does not match the target identifier, determining the first target data;
[0017] Selecting one second link from each of the second links and determining it as a second target link;
[0018] The omnidirectional antenna is controlled to send the first target data based on the second target link.
[0019] In one possible design, determining a target link in the first link or each of the second links based on the type of the data transmission instruction and the identifier, and controlling the omnidirectional antenna to transmit target data carried by the data transmission instruction based on the target link includes:
[0020] When the type of the data transmission instruction is a data receiving instruction, determining a second matching result between the identifier and the target identifier;
[0021] When the second matching result indicates that the identifier matches the target identifier, determining the second target data carried by the data receiving instruction, and determining the first link as a third target link;
[0022] The omnidirectional antenna is controlled to receive the second target data based on the third target link.
[0023] In one possible design, in response to receiving a data transmission instruction, parsing the data transmission instruction, and obtaining data transmission parameters includes:
[0024] When the data transmission parameter does not include the identifier, discarding the data transmission instruction;
[0025] or,
[0026] After determining a second matching result between the identifier and the target identifier, the method further includes:
[0027] When the second matching result indicates that the identifier does not match the target identifier, the data transmission instruction is discarded.
[0028] In one possible design, selecting the first link from the at least two links and determining each non-first link as the second link includes:
[0029] In response to receiving the initialization instruction, performing initialization;
[0030] When the initialization is completed, determining each of the links as a second link;
[0031] collecting signal parameters of each of the second links;
[0032] Among the signal parameters, the link corresponding to the signal parameter with the largest value is determined as the first link.
[0033] In one possible design, after determining, among the signal parameters, the link corresponding to the signal parameter having the largest value as the first link, the following steps may be performed:
[0034] Periodically collecting a first signal parameter of the first link and a second signal parameter of each of the second links;
[0035] When there is a second signal parameter among the second signal parameters of each of the second links that is greater than the first signal parameter, updating the first link to a new second link;
[0036] Among the second signal parameters that are greater than the first signal parameter, a second link corresponding to the second signal parameter is selected and updated as a new first link.
[0037] In a second aspect, the present application provides a data transmission device for a wireless device, which is applied to an electronic device, wherein the electronic device includes an omnidirectional antenna and at least two links, and the data transmission device for the wireless device includes:
[0038] A first determining module, configured to select a first link from the at least two links, and determine each non-first link as a second link;
[0039] a parsing module, configured to, in response to receiving a data transmission instruction, parse the data transmission instruction to obtain data transmission parameters;
[0040] a second determining module, configured to determine a type of the data transmission instruction when the data transmission parameter includes an identifier;
[0041] A data transmission module is used to determine a target link in the first link or each of the second links based on the type of the data transmission instruction and the identifier, and control the omnidirectional antenna to transmit the target data carried by the data transmission instruction based on the target link.
[0042] In a third aspect, an embodiment of the present application provides an electronic device comprising: at least one processor and a memory; the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the data transmission method of the wireless device described in the first aspect and various possible designs of the first aspect.
[0043] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer-executable instructions. When the processor executes the computer-executable instructions, it implements the data transmission method of the wireless device described in the first aspect and various possible designs of the first aspect.
[0044] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the data transmission method of the wireless device described in the first aspect and various possible designs of the first aspect.
[0045] The data transmission method, apparatus, device, and storage medium for a wireless device provided herein can achieve data transmission via a single link by selecting a first link from at least two links and determining each non-first link as a second link. In response to receiving a data transmission instruction, the data transmission instruction is parsed to obtain data transmission parameters. When the data transmission parameters include an identifier, the type of the data transmission instruction is determined. Based on the type and identifier of the data transmission instruction, a target link is determined in the first link or each second link, and an omnidirectional antenna is controlled to transmit the target data carried by the data transmission instruction based on the target link. Therefore, data transmission loop issues in related technologies can be resolved, improving network stability and data transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0047] Figure 1 This is an application scenario diagram of the data transmission loop;
[0048] Figure 2 A schematic diagram of a data transmission system for a wireless device provided in an embodiment of the present application;
[0049] Figure 3A flowchart of a data transmission method for a wireless device provided in an embodiment of the present application;
[0050] Figure 4 This is a flowchart of step S104 of the data transmission method for a wireless device provided in an embodiment of the present application;
[0051] Figure 5 This is the second flowchart of step S104 of the data transmission method for a wireless device provided in an embodiment of the present application;
[0052] Figure 6 Another flowchart of the data transmission method of the wireless device provided in an embodiment of the present application;
[0053] Figure 7 A schematic diagram illustrating an application of a data transmission method for a wireless device according to an embodiment of the present application;
[0054] Figure 8 A schematic diagram of the structure of a data transmission device of a wireless device provided in an embodiment of the present application;
[0055] Figure 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0056] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0057] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0058] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0059] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned. They should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0060] Explanation of terms:
[0061] Data transmission loop. It refers to a complete data cycle process in which data forms a closed loop structure from collection, transmission, storage, processing, analysis to application and feedback.
[0062] During network communication, there may be data transmission loops caused by multiple frequency bands connecting to the same AP at the same time, or by the interconnection between multiple frequency bands and two or more APs. This makes network data transmission unstable and affects data transmission efficiency.
[0063] See also Figure 1 , when the terminal includes at least two frequency bands ( Figure 1 Only four frequency bands are shown, including frequency band 1, frequency band 2, frequency band 3, and frequency band 4. When wireless AP1 is connected through link 1 and link 2 at the same time, a data transmission loop 1 is formed between frequency band 1, frequency band 2 and wireless AP1. Or, when the two frequency bands of the terminal, such as Figure 1 In the example, frequency band 3 is connected to wireless AP 1 via link 3, and frequency band 4 is connected to wireless AP 2 via link 4. A common switch is used for wired connection, forming a data transmission loop 2 between frequency band 3, frequency end 4, wireless AP 1, and wireless AP 2. This situation may cause broadcast storms, multiple duplicate data frames, and MAC address table instability.
[0064] The related communication method is mainly to add wireless controllers to achieve the containment loop (such as Figure 1 The data transmission loop 1 or the data transmission loop 2 shown in the figure) is used to realize data transmission.
[0065] However, this method relies on a wireless controller, is costly and inefficient, has a small scope of application, and still cannot improve the data transmission efficiency of the network.
[0066] In response to the above technical problems, the present application proposes a data transmission method, apparatus, device, and storage medium for a wireless device. The method includes: selecting a first link from at least two links, and determining each non-first link as a second link; in response to receiving a data transmission instruction, parsing the data transmission instruction to obtain data transmission parameters; when the data transmission parameters include an identifier, determining the type of the data transmission instruction; based on the type and identifier of the data transmission instruction, determining a target link in the first link or each second link; and controlling the omnidirectional antenna to transmit the target data carried by the data transmission instruction based on the target link, thereby achieving data transmission through a single link. Therefore, it is possible to avoid the problem of data transmission loops and improve network stability and data transmission efficiency.
[0067] The above method is applied to electronic devices, including tablets, mobile phones, PCs and other devices, which are not specifically limited here.
[0068] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0069] Figure 2 A schematic diagram of a data transmission system for a wireless device provided in an embodiment of the present application.
[0070] See also Figure 2 , the data transmission system of the wireless device includes an electronic device, at least one wireless access point AP ( Figure 2 Only two are shown, including wireless AP1 and wireless AP2) and a switch. Wireless AP1 and wireless AP2 are connected through the switch.
[0071] The electronic device includes at least two frequency bands ( Figure 2 Only 3 are shown), where frequency band 1 is connected to wireless AP1 and frequency band 2 is connected to wireless AP2.
[0072] During data transmission, the electronic device identifies the type of data transmission instruction and the identifier it carries. If the identifier is the target identifier, it selects one of Link 1 and Link 2 as the target link and transmits the data. For example, using Link 1 as the primary link, data can be sent simultaneously via Link 1, or via Link 2. Alternatively, data can be received simultaneously via Link 1. This prevents data transmission loops caused by simultaneous data transmission.
[0073] Figure 3 Flowchart of the data transmission method of the wireless device provided in the embodiment of the present application. Figure 3 As shown, the data transmission method of the wireless device includes:
[0074] S101: Select a first link from the at least two links, and determine each non-first link as a second link.
[0075] Specifically, the electronic device includes an omnidirectional antenna and at least two links. A first link is selected from the at least two links, and each non-first link is determined as a second link. The first link, which may also be referred to as a primary link, is used to perform the primary data transmission task during the data transmission process. The second link, which may also be referred to as a backup link, is used to perform a secondary data transmission task during the data transmission process.
[0076] The method for selecting the first link can be specifically set according to actual conditions. For example, the link with the largest signal parameter (such as signal strength) among all links can be selected as the first link. Alternatively, a link can be randomly selected as the first link.
[0077] S102: In response to receiving the data transmission instruction, parse the data transmission instruction to obtain data transmission parameters.
[0078] Specifically, in response to receiving the data transmission instruction, the data transmission instruction is parsed to obtain the data transmission parameters carried by the data transmission instruction.
[0079] Optionally, the data transmission parameters of the data transmission instruction include but are not limited to at least one of an identifier, target data to be transmitted, etc.
[0080] Optionally, the current electronic terminal includes an omnidirectional antenna, wherein each frequency band can be connected to a wireless access point AP. For ease of explanation, the channel connecting the frequency bands can also be called a link. When the primary and backup link mode is adopted, at least two of the channels are selected to connect to the wireless access point AP through the link, and the networking connection between APs is realized through the switch.
[0081] S103: When the data transmission parameter includes an identifier, determine the type of the data transmission instruction.
[0082] Specifically, when the data transmission instruction carries an identifier, the type of the data transmission instruction is determined.
[0083] Optionally, the types of data transmission instructions include but are not limited to data receiving instructions and data sending instructions.
[0084] The data receiving instruction is used to instruct the current terminal to receive the second target data carried by the data receiving instruction. The data sending instruction is used to instruct the current terminal to send the first target data carried by the data sending instruction to the outside.
[0085] In some embodiments, in response to receiving the data transmission instruction, parsing the data transmission instruction and obtaining the data transmission parameters includes:
[0086] When the data transmission parameter does not include the identifier, the data transmission instruction is discarded.
[0087] Optionally, when the data transmission instruction does not carry an identifier, the data transmission instruction is discarded, and there is no need to perform operations such as parsing the data transmission instruction, thereby saving device power consumption.
[0088] S104: Determine a target link in the first link or each of the second links based on the type of the data transmission instruction and the identifier, and control the omnidirectional antenna to transmit target data carried by the data transmission instruction based on the target link.
[0089] Specifically, based on the data transmission type and an identifier carried in the data transmission instruction, a target link is determined in the first link or each second link, and the target data carried in the data transmission instruction is transmitted over the target link using an omnidirectional antenna. The target data includes the second target data carried in the data reception instruction or the first target data carried in the data transmission instruction.
[0090] The identifier is a unique ID for indicating a designated link of target data to be transmitted.
[0091] In an embodiment of the present application, a first link is selected from at least two links, and each non-first link is determined as a second link. In response to receiving a data transmission instruction, an identifier carried by the data transmission instruction is determined. If the identifier is a target identifier, the type of the data transmission instruction is determined. Based on the type and identifier of the data transmission instruction, a target link is determined in the first link or each second link, and an omnidirectional antenna is controlled to transmit the target data carried by the data transmission instruction based on the target link. This allows data to be sent or received only through a single target link during data transmission, avoiding data transmission loops and thereby improving data transmission efficiency and network stability. Furthermore, the present invention does not rely on devices such as wireless controllers, thereby improving convenience, flexibility, and applicability.
[0092] Figure 4 This is a flow chart of step S104 of the data transmission method for a wireless device provided in an embodiment of the present application. Figure 4 As shown, step S104 of the data transmission method of the wireless device includes the following steps:
[0093] S1041. When the type of the data transmission instruction is a data sending instruction, determine a first matching result between the identifier and the target identifier;
[0094] S1042. When the first matching result indicates that the identifier matches the target identifier, determine first target data carried by the data transmission instruction;
[0095] S1043: Determine the first link as a first target link, and control the omnidirectional antenna to transmit the first target data based on the first target link.
[0096] Specifically, when the data transmission instruction type is a data sending instruction, a first matching result between the identifier carried in the data sending instruction and the target identifier is determined, wherein the target identifier is used to indicate a unique identity identifier (ID) of the first link, which may also be referred to as an identifier of the primary link.
[0097] Specifically, when the first matching result indicates that the identifier carried in the data transmission instruction matches the target identifier, the data transmission instruction is parsed to determine the first target data carried in the data transmission instruction. The first link is determined as the first target link for data transmission, and the omnidirectional antenna is controlled to transmit the first target data over the first target link (i.e., the first link).
[0098] The first target data is used to indicate the data to be received by the current device.
[0099] In some embodiments, after determining a first matching result between the identifier and the target identifier, the method further includes:
[0100] When the first matching result indicates that the identifier does not match the target identifier, determining the first target data;
[0101] Selecting one second link from each of the second links and determining it as a second target link;
[0102] The omnidirectional antenna is controlled to send the first target data based on the second target link.
[0103] Specifically, when the first matching result indicates that the identifier carried in the data sending instruction does not match the target identifier, the first target data to be received by the current device carried in the data sending instruction is determined, and a second link is selected from each second link and determined as the second target link.
[0104] The method for selecting the second link as the second target link can be specifically set based on actual circumstances. For example, the second link with the highest signal parameter (e.g., signal strength) among the second links can be selected as the second target link. Alternatively, a second link can be randomly selected as the second target link.
[0105] In this way, when a data sending instruction is received and the data sending instruction carries a target identifier, data can be sent through the first link; when it does not carry a target identifier, data can be sent through the second link, avoiding data transmission loops during the data sending process and improving network stability and data sending efficiency.
[0106] Figure 5 Another flow chart of step S104 of the data transmission method for a wireless device provided in an embodiment of the present application. Figure 5 As shown, step S104 of the data transmission method of the wireless device includes the following steps:
[0107] S1044. When the type of the data transmission instruction is a data receiving instruction, determine a second matching result between the identifier and the target identifier;
[0108] S1045. When the second matching result indicates that the identifier matches the target identifier, determine the second target data carried by the data receiving instruction, and determine the first link as a third target link;
[0109] S1046. Control the omnidirectional antenna to receive the second target data based on the third target link.
[0110] Specifically, when the type of the data transmission instruction is a data reception instruction, a second matching result between the identifier carried by the data reception and the target identifier is determined. When the second matching result indicates that the identifier carried by the data reception matches the target identifier, the data reception instruction is parsed to obtain second target data carried by the data reception instruction, where the second target data is used to indicate data to be sent by the current terminal.
[0111] The first target link is configured to, upon receiving a data sending instruction carrying a target identifier, send the first target data carried in the data sending instruction. The second target link is configured to, upon receiving a data sending instruction not carrying a target identifier, send the first target data carried in the data sending instruction. The third target link is configured to, upon receiving a data receiving instruction carrying a target identifier, receive the second target data carried in the data receiving instruction.
[0112] In some embodiments, after determining a second matching result between the identifier and the target identifier, the method further includes:
[0113] When the second matching result indicates that the identifier does not match the target identifier, the data transmission instruction is discarded.
[0114] Specifically, when the second matching result indicates that the identifier carried by the data receiving instruction does not match the target identifier, it is determined that the first target data cannot be received, and the data transmission instruction is discarded.
[0115] By transmitting data through the main link when the data reception instruction carries the target identifier, and discarding the data transmission instruction when it does not carry the target identifier, the formation of a data transmission loop is avoided while reducing power consumption, thereby improving the efficiency of data reception and network stability.
[0116] In some embodiments, selecting the first link from the at least two links and determining each non-first link as the second link includes:
[0117] In response to receiving the initialization instruction, performing initialization;
[0118] When the initialization is completed, determining each of the links as a second link;
[0119] collecting signal parameters of each of the second links;
[0120] Among the signal parameters, the link corresponding to the signal parameter with the largest value is determined as the first link.
[0121] Specifically, in response to receiving the initialization instruction, initialization is performed, and when the initialization is completed, each link is determined as a second link. Signal parameters of each second link are collected, where the signal parameters include but are not limited to signal strength and / or signal quality.
[0122] Specifically, among the signal parameters of the second links, the link corresponding to the signal parameter with the largest value is determined as the first link, and the other second links are still determined as the second links.
[0123] Figure 6 Another flow chart of the data transmission method of the wireless device provided in the embodiment of the present application. Figure 6 As shown, the data transmission method of the wireless device includes the following steps:
[0124] S201: Periodically collect first signal parameters of the first link and second signal parameters of each of the second links.
[0125] Specifically, based on a preset period, signal parameters of each link are collected, including a first signal parameter of the first link and a second signal parameter of each second target link.
[0126] Optionally, the preset period can be specifically set according to actual conditions. For example, the preset period is 5 seconds, or the preset period is 10 seconds.
[0127] S202: When there is a second signal parameter of each second link that is greater than the first signal parameter, update the first link to a new second link.
[0128] S203: Select a second link corresponding to each second signal parameter greater than the first signal parameter, and update it as a new first link.
[0129] Specifically, the second signal parameters of each second link are compared with the first signal parameters. If a second signal parameter is greater than the first signal parameter, the first link corresponding to the first signal parameter is updated to the second link. Among the second signal parameters that are greater than the first signal parameter, a second link corresponding to the second signal is selected and updated as the new first link.
[0130] Optionally, the second link corresponding to the second signal parameter with the largest value is determined as the new first link, and correspondingly: the identifier of the second link corresponding to the second signal parameter with the largest value is determined as the new target identifier.
[0131] By periodically collecting signal parameters, the signal status of each target link is determined, and the link with the strongest signal is updated as the new main link, further improving the efficiency of data transmission.
[0132] Figure 7 An application flow chart of a data transmission method for a wireless device is exemplarily shown.
[0133] See also Figure 7 The electronic device includes a creation module, a transmission module, a detection module and an operating system network module. The creation module is connected to the transmission module, and the transmission module is connected to the operating system network module and the detection module.
[0134] The creation module provides a data transmission and reception interface between the current terminal and the operating system network module. The creation module includes an initialization unit, a virtual network card creation unit, an interface unit (including a data transmission interface and a data reception interface), and a first registration unit. The initialization unit, virtual network card creation unit, interface unit, and first registration unit are connected in sequence, and the first registration unit is connected to the operating system network module.
[0135] The virtual network card creation unit is used to create a virtual network card. A virtual network card is a software-implemented network interface that exists in the operating system's memory and has no physical hardware. A virtual network card can be used to simulate a network environment and perform data packet capture, analysis, and data transmission and reception.
[0136] The data sending interface is the interface that sends network data packets from the current device / module to other modules of the operating system, such as the network module of the operating system.
[0137] Data receiving interface: refers to the interface that receives network data packets from other modules of the operating system (such as the operating system's network module) to the current device / module.
[0138] The first registration unit is configured to add a new hardware or virtual device to the list of known devices when it is connected to the operating system, thereby enabling management and use of the new device. The first registration unit is connected to the operating system's network module and connects (i.e., establishes a connection) the virtual network card to the network module, thereby enabling management and use of the virtual network card. For example, the operating system's network module can send data packets to the virtual network card via the data receiving interface provided by the virtual network card, and the virtual network card can also send data to the operating system's network module via the data sending interface.
[0139] Operating system network module: refers to the core module in the operating system responsible for network communication. By implementing various protocols and algorithms, it enables devices to exchange data and communicate in the network.
[0140] The transmission module is used to determine the target link to transmit the target data based on the identifier carried by the data transmission instruction. The detection module is used to periodically collect signal parameters of each target link and update the first target link.
[0141] The detection module includes an initialization unit, a collection unit, a comparison unit, and an update unit, wherein the initialization unit, the collection unit, the comparison unit, and the update unit are connected in sequence.
[0142] The initialization unit is used to perform initialization and set each link as the second link.
[0143] The collection unit and the comparison unit are used to periodically collect the signal parameters of each link and perform matching. The update unit is used to update the main link and the backup link according to the matching results.
[0144] Signal parameters include but are not limited to: wireless frequency band (such as 2.4G / 5G / 6G), wireless bandwidth (such as 20 / 40 / 80 / 160 / 320), wireless channel, link rate of connecting to wireless access point (AP), and signal strength of connecting to wireless access point (AP). Each parameter has a coefficient, and the sum of all coefficients is 1.
[0145] Optionally, each signal parameter can be converted to a specific value. For example, wireless band 6 GHz can be converted to 100, 5 GHz to 90, and 2.4 GHz to 70. The final signal parameter value is obtained by multiplying the value of each signal parameter by its coefficient for each link and adding them together.
[0146] Figure 8 This is a structural diagram of a data transmission device of a wireless device provided in an embodiment of the present application. The data transmission device of the wireless device is applied to an electronic device, and the electronic device includes an omnidirectional antenna and at least two links. Figure 8 As shown, the data transmission device of the wireless device includes:
[0147] A first determining module 801 is configured to select a first link from the at least two links and determine each non-first link as a second link;
[0148] The parsing module 802 is configured to, in response to receiving a data transmission instruction, parse the data transmission instruction to obtain data transmission parameters;
[0149] A second determining module 803 is configured to determine a type of the data transmission instruction when the data transmission parameter includes an identifier;
[0150] The data transmission module 804 is used to determine a target link in the first link or each of the second links based on the type of the data transmission instruction and the identifier, and control the omnidirectional antenna to transmit the target data carried by the data transmission instruction based on the target link.
[0151] In some embodiments, the data transmission module 804 includes:
[0152] a first determining unit, configured to determine a first matching result between the identifier and a target identifier when the type of the data transmission instruction is a data sending instruction;
[0153] a second determining unit, configured to determine first target data carried by the data transmission instruction when the first matching result indicates that the identifier matches the target identifier;
[0154] A first control unit is configured to determine the first link as a first target link, and control the omnidirectional antenna to transmit the first target data based on the first target link.
[0155] In some embodiments, the data transmission module 804 includes:
[0156] a third determining unit, configured to determine the first target data when the first matching result indicates that the identifier does not match the target identifier;
[0157] a fourth determining unit, configured to select a second link from each of the second links and determine it as a second target link;
[0158] A second control unit is configured to control the omnidirectional antenna to send the first target data based on the second target link.
[0159] In some embodiments, the data transmission module 804 includes:
[0160] a fifth determining unit, configured to determine a second matching result between the identifier and the target identifier when the type of the data transmission instruction is a data receiving instruction;
[0161] a sixth determining unit, configured to determine second target data carried by the data receiving instruction and determine the first link as a third target link when the second matching result indicates that the identifier matches the target identifier;
[0162] A third control unit is configured to control the omnidirectional antenna to receive the second target data based on the third target link.
[0163] In some embodiments, the data transmission device of the wireless device includes:
[0164] a first deleting module, configured to discard the data transmission instruction when the data transmission parameter does not include the identifier;
[0165] or,
[0166] A second deleting module is configured to discard the data transmission instruction when the second matching result indicates that the identifier does not match the target identifier.
[0167] In some embodiments, the first determining module 801 includes:
[0168] an initialization module, configured to perform initialization in response to receiving an initialization instruction;
[0169] a seventh determining unit, configured to determine each of the links as a second link when the initialization is completed;
[0170] a first collecting unit, configured to collect signal parameters of each of the second links;
[0171] The eighth determining unit is configured to determine, among the signal parameters, a link corresponding to a signal parameter having a maximum value as the first link.
[0172] In some embodiments, the first determining module 801 includes:
[0173] a second collecting unit, configured to periodically collect a first signal parameter of the first link and a second signal parameter of each of the second links;
[0174] a first updating unit, configured to update the first link to a new second link when, among the second signal parameters of each of the second links, there is a second signal parameter that is greater than the first signal parameter;
[0175] The second updating unit is configured to select a second link corresponding to a second signal parameter from among the second signal parameters that are greater than the first signal parameter, and update the second link as a new first link.
[0176] The data transmission device of the wireless device provided in the embodiment of the present application can be used to execute the technical solution of the data transmission method of the wireless device in the above embodiment. Its implementation principle and technical effects are similar and will not be repeated here.
[0177] It should be noted that the division of the various modules of the above device is merely a division of logical functions. In actual implementation, they can be fully or partially integrated into a single physical entity or physically separated. Furthermore, these modules can be implemented entirely in the form of software called by a processing element; or entirely in the form of hardware; or some modules can be implemented in the form of software called by a processing element, and some modules can be implemented in the form of hardware. For example, data transmission module 804 can be a separate processing element, or it can be integrated into a chip of the above device. Furthermore, it can be stored in the form of program code in the memory of the above device, and called by a processing element of the above device to perform the functions of the above data transmission module 804. The implementation of other modules is similar. Furthermore, these modules can be fully or partially integrated together, or implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. During implementation, each step of the above method or each of the above modules can be completed by hardware integrated logic circuits in the processor element or by software instructions.
[0178] Figure 9 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present application. Figure 9 As shown, the electronic device may include: a transceiver 901 , a processor 902 and a memory 903 .
[0179] The processor 902 executes the computer-executable instructions stored in the memory, so that the processor 902 implements the solution in the above embodiment. The processor 902 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0180] The memory 903 is connected to the processor 902 via a system bus and communicates with the processor 902. The memory 903 is used to store computer program instructions.
[0181] The transceiver 901 may be used to obtain data transmission instructions, signal parameters, and the like.
[0182] The system bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, among others. Buses can be divided into address buses, data buses, control buses, and others. For ease of presentation, the buses in the drawings of this application are not limited to just one bus or just one type of bus. System buses can be divided into address buses, data buses, control buses, and others. For ease of presentation, only one thick line is used in the drawings, but this does not mean that there is just one bus or just one type of bus. The transceiver is used to enable communication between the database access device and other computers (e.g., clients, read-write libraries, and read-only libraries).
[0183] The memory may include random access memory (RAM) and may also include non-volatile memory (VNM).
[0184] An embodiment of the present application also provides a chip for executing instructions, which is used to execute the technical solution of the data transmission method of the wireless device in the above embodiment.
[0185] An embodiment of the present application further provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the technical solution of the data transmission method of the wireless device of the above embodiment.
[0186] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, it can implement the technical solution of the data transmission method of the wireless device in the above embodiment.
[0187] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or module, which can be electrical, mechanical or other forms.
[0188] Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of these modules may be selected to implement the solution of this embodiment based on actual needs.
[0189] In addition, the functional modules in the various embodiments of the present application may be integrated into a single processing unit, or each module may exist physically separately, or two or more modules may be integrated into a single unit. The above-mentioned modules may be implemented in the form of hardware or hardware plus software functional units.
[0190] The integrated modules implemented in the form of software function modules can be stored in a computer-readable storage medium. The software function modules stored in a storage medium include a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute some of the steps of the methods of various embodiments of the present application.
[0191] The storage medium may be implemented by any type of volatile or non-volatile memory 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. The storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0192] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic control unit or a main control device.
[0193] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0194] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A data transmission method for a wireless device, characterized in that: Applied to an electronic device, the electronic device includes an omnidirectional antenna and at least two links, and the data transmission method of the wireless device includes: Selecting a first link from the at least two links, and determining each non-first link as a second link; In response to receiving the data transmission instruction, parsing the data transmission instruction to obtain data transmission parameters; When the data transmission parameter includes an identifier, determining a type of the data transmission instruction; Based on the type of the data transmission instruction and the identifier, a target link is determined in the first link or each of the second links, and the omnidirectional antenna is controlled to transmit the target data carried by the data transmission instruction based on the target link.
2. The method according to claim 1, characterized in that The determining a target link in the first link or each of the second links based on the type of the data transmission instruction and the identifier, and controlling the omnidirectional antenna to transmit the target data carried by the data transmission instruction based on the target link, includes: When the type of the data transmission instruction is a data sending instruction, determining a first matching result between the identifier and the target identifier; When the first matching result indicates that the identifier matches the target identifier, determining first target data carried by the data transmission instruction; The first link is determined as a first target link, and the omnidirectional antenna is controlled to transmit the first target data based on the first target link.
3. The method according to claim 2, characterized in that After determining a first matching result between the identifier and the target identifier, the method further includes: When the first matching result indicates that the identifier does not match the target identifier, determining the first target data; Selecting one second link from each of the second links and determining it as a second target link; The omnidirectional antenna is controlled to send the first target data based on the second target link.
4. The method according to claim 1, wherein The determining a target link in the first link or each of the second links based on the type of the data transmission instruction and the identifier, and controlling the omnidirectional antenna to transmit the target data carried by the data transmission instruction based on the target link, includes: When the type of the data transmission instruction is a data receiving instruction, determining a second matching result between the identifier and the target identifier; When the second matching result indicates that the identifier matches the target identifier, determining the second target data carried by the data receiving instruction, and determining the first link as a third target link; The omnidirectional antenna is controlled to receive the second target data based on the third target link.
5. The method according to claim 4, characterized in that The method further comprises: in response to receiving the data transmission instruction, parsing the data transmission instruction, and obtaining the data transmission parameters, comprising: When the data transmission parameter does not include the identifier, discarding the data transmission instruction; or, After determining a second matching result between the identifier and the target identifier, the method further includes: When the second matching result indicates that the identifier does not match the target identifier, the data transmission instruction is discarded.
6. The method according to any one of claims 1 to 5, characterized in that Selecting a first link from the at least two links and determining each non-first link as a second link includes: In response to receiving the initialization instruction, performing initialization; When the initialization is completed, determining each of the links as a second link; collecting signal parameters of each of the second links; Among the signal parameters, the link corresponding to the signal parameter with the largest value is determined as the first link.
7. The method according to claim 6, characterized in that After determining the link corresponding to the signal parameter having the largest value among the signal parameters as the first link, the method further includes: Periodically collecting a first signal parameter of the first link and a second signal parameter of each of the second links; When there is a second signal parameter among the second signal parameters of each of the second links that is greater than the first signal parameter, updating the first link to a new second link; Among the second signal parameters that are greater than the first signal parameter, a second link corresponding to the second signal parameter is selected and updated as a new first link.
8. A data transmission device for a wireless device, characterized in that: Applicable to electronic equipment, the electronic equipment includes an omnidirectional antenna and at least two links, and the data transmission device of the wireless device includes: A first determining module, configured to select a first link from the at least two links, and determine each non-first link as a second link; a parsing module, configured to, in response to receiving a data transmission instruction, parse the data transmission instruction to obtain data transmission parameters; a second determining module, configured to determine a type of the data transmission instruction when the data transmission parameter includes an identifier; A data transmission module is used to determine a target link in the first link or each of the second links based on the type of the data transmission instruction and the identifier, and control the omnidirectional antenna to transmit the target data carried by the data transmission instruction based on the target link.
9. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when executed by a processor.