CN115734344A - Communication method and electronic device - Google Patents

Communication method and electronic device Download PDF

Info

Publication number
CN115734344A
CN115734344A CN202111235326.9A CN202111235326A CN115734344A CN 115734344 A CN115734344 A CN 115734344A CN 202111235326 A CN202111235326 A CN 202111235326A CN 115734344 A CN115734344 A CN 115734344A
Authority
CN
China
Prior art keywords
lane
electronic device
target
resources
communication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111235326.9A
Other languages
Chinese (zh)
Inventor
谭延营
李�杰
侯选哲
冯永辉
李世军
侯伟波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202111551238.XA priority Critical patent/CN114364026B/en
Priority to PCT/CN2022/114502 priority patent/WO2023025191A1/en
Publication of CN115734344A publication Critical patent/CN115734344A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The application provides a communication method and electronic equipment, and relates to the technical field of terminals. According to the method and the device, the network resources can be divided according to the granularity of the lane, and the electronic equipment can automatically distribute the corresponding lane for the data to be transmitted under the condition that the user does not perceive the lane, so that the operation difficulty of the user is reduced. The method comprises the following steps: when the first electronic equipment determines that data needs to be sent to the second electronic equipment, the first electronic equipment can select a target lane for transmitting the data from different types of network paths and different channels of the same type of network paths, and send the data to the second electronic equipment through the target lane.

Description

Communication method and electronic device
The present application claims priority of chinese patent application having application number 202110996592.7 entitled "communication method and electronic device" filed by the national intellectual property office on 27/08/2021, the entire contents of which are incorporated herein by reference.
Technical Field
The embodiment of the application relates to the technical field of terminals, in particular to a communication method and electronic equipment.
Background
With the development of terminal technology, the forms of electronic devices (such as mobile phones, tablets, smart watches, and the like) and supported communication modes (such as bluetooth communication, wireless fidelity (Wi-Fi) communication, wired connection communication, and the like) are more and more abundant. And generally, the electronic device can support multiple communication modes, and different communication modes correspond to independent interfaces provided by different network protocols (for example, a Wi-Fi interface is independent of a bluetooth interface).
Therefore, in the process of developing the application program, the developer develops the application program according to the independent interfaces corresponding to different communication modes as required. Then, the user can select different communication modes in the application program to perform data transmission with other electronic devices during the application program using process. Illustratively, as shown in an interface 101 in fig. 1 (a), the electronic device starts up a gallery application and displays a photo, and after detecting an operation of clicking the sharing control 11 by the user, an interface 102 shown in fig. 1 (b) is displayed. In the interface 102, the user may select a plurality of modes such as bluetooth, wireless Local Area Network (WLAN) direct connection, email, and the like to share photos. For example, after detecting that the user clicks the bluetooth sharing control 12, the electronic device performs picture sharing in a bluetooth connection manner.
As can be seen, although an application can support multiple communication methods, the application requires a user to select one of the communication methods before communication can be performed based on the selected communication method. With the increase of communication modes, the selection difficulty of the user is increased, and the use experience of the user is reduced. Moreover, the communication method selected by the user may not be the optimal communication method in the current network environment, and the application program may not provide the best communication experience for the user.
Disclosure of Invention
In order to solve the above technical problem, an embodiment of the present application provides a communication method and an electronic device. According to the technical scheme, the network resources are divided according to the lane granularity, and the electronic equipment can automatically allocate the corresponding lane to the data to be transmitted under the condition that a user does not sense the lane, so that the operation difficulty of the user is reduced. And the electronic equipment can provide better data transmission experience for the user by using the allocated lane in the communication process.
In order to achieve the technical purpose, the embodiment of the application provides the following technical solutions:
in a first aspect, a communication method is provided and applied to a first electronic device. The method comprises the following steps: when determining that data needs to be sent to the second electronic device, determining a target lane for transmitting the data in the first logical lane, the second lane and the third lane, wherein the first lane corresponds to the first type of network path, the second lane corresponds to the first channel in the second type of network path, and the third lane corresponds to the second channel in the second type of network path. And sending the data to the second electronic equipment through the target lane.
In some embodiments, when the first electronic device needs to send data, it may select a lane resource for the current data transmission from all the lane resources corresponding to the communication methods supported by the local terminal. For example, it is assumed that the first electronic device supports two communication modes, namely a BLE communication mode and a Wi-Fi2.4G communication mode, wherein the first type of network path is a network path of the BLE communication mode, and the second type of network path is a network path of the Wi-Fi2.4G communication mode. Then, the first lane corresponds to 78 channels included in BLE communication, and the second lane and the third lane correspond to 78 channels included in Wi-Fi2.4G communication. Wherein the first type of network path and the second type of network path are used to represent different types of physical characteristic paths.
Therefore, the electronic equipment uniformly manages and plans the network resources, and divides and schedules the network resources by taking the lane as a unit, so that the application program can be not limited by an independent interface of a communication mode. The developer can directly develop the application program according to the service type; the electronic equipment can directly allocate corresponding lane resources according to the service type requested by the application program; the user does not need to select the communication mode any more, and the operation difficulty of the user is reduced. And moreover, the electronic equipment can distribute lane resources with better quality for the application program according to the network environment, and the network transmission quality is improved.
According to the first aspect, when it is determined that data needs to be sent to the second electronic device, the determining, by the first electronic device, a target lane for data transmission among the first lane, the second lane, and the third lane includes: and when determining that the data needs to be sent to the second electronic equipment, determining the service type corresponding to the data. And determining the target lane in the first lane, the second lane and the third lane according to the service types.
In some embodiments, the traffic types include, for example, high bandwidth traffic, high bandwidth low latency, low bandwidth low latency traffic, low latency traffic high reliability, and the like. The communication network including the first electronic device and the second electronic device may further include a central device (i.e., a central node), where the central device may be the first electronic device, the second electronic device, or another device in the communication network. And the central equipment classifies the lane resources according to the service types, and the subsequent electronic equipment allocates the lane resources with the lane resource types matched with the service types to the corresponding application programs for use in the process of allocating the lane resources. For example, the lane resource classification result includes a high-bandwidth lane resource, a high-bandwidth low-delay lane resource, a low-delay high-reliability lane resource, and the like.
Therefore, the electronic equipment can configure the corresponding lane resources according to the requirement of the data to be transmitted, and the data transmission quality is ensured. For example, the type of high-bandwidth service requires that the bandwidth of lane meet the requirement, and the electronic device may allocate high-bandwidth lane resources to the high-bandwidth service.
According to the first aspect, or any implementation manner of the first aspect, before the first electronic device determines that the target lane for transmitting data is needed to be sent to the second electronic device in the first lane, the second lane, and the third lane, the method further includes: the method includes the steps of obtaining first usage information of a first lane, a second lane and a third lane recorded locally, and obtaining second usage information of the first lane, the second lane and the third lane broadcasted by a plurality of electronic devices in a communication network including the first electronic device. Determining a target lane in the first lane, the second lane and the third lane according to the service types, including: and determining the target lane according to the first use information, the second use information and the service type.
According to the first aspect, or any implementation manner of the first aspect, the first electronic device locally stores a first ledger and a second ledger, the first ledger is used for recording usage information of the first lane, the second lane, and the third lane, and the second ledger is used for recording usage information of all lanes in a communication system including the first electronic device. Before the first electronic device determines that the target lane for transmitting data is needed to be sent to the second electronic device in the first lane, the second lane and the third lane, the method further includes: the method comprises the steps of obtaining first use information of the first lane, the second lane and the third lane recorded in the first account book, and obtaining second use information of the first lane, the second lane and the third lane recorded in the second account book. Determining a target lane in the first lane, the second lane and the third lane according to the service types, wherein the method comprises the following steps: and determining the target lane according to the first use information, the second use information and the service type.
According to a first aspect, or any implementation manner of the first aspect above, the first usage information or the second usage information includes one or more of the following: the use times of the lane, the service type corresponding to the historical transmission data of the lane and the quality parameter information of the lane.
In some embodiments, an account book for recording lane usage is preset in the electronic device, wherein the account book includes a score of the electronic device for a lane resource quality measurement result. When the first electronic device needs to send data, the first electronic device obtains a local account book and account books broadcasted by other electronic devices in the communication network. And the first electronic equipment integrates the scores of the lane resources monitored by the local terminal according to the scores of the lane resources supported by the first electronic equipment recorded in the broadcast account book, so as to obtain the integrated scores of the lane resources, and the subsequent first electronic equipment allocates the lane resources according to the integrated scores. And if the first electronic equipment obtains the target lanes with previous scores and different types according to the scores, wherein the first number is the number of lanes required for data transmission.
In other embodiments, two accounts are stored in the electronic device, one account is used for recording the usage information of the lane resources supported by the electronic device, and the other account is a public account and is used for recording the usage information of all the lane resources included in the communication system (lane net). The public accounts stored in each electronic device in the communication system are synchronized. The electronic device can determine the optimal lane resource according to the latest locally recorded use information of the lane and the use information of the lane recorded in the public ledger. Or the electronic equipment directly determines the optimal lane resource according to the use information of the lane recorded in the public ledger.
Therefore, the electronic equipment determines the lane resources which meet the transmission requirements of the electronic equipment at two ends of data transmission and have the best quality through comprehensive scoring. The electronic equipment can select the optimal lane for the user under the condition that the user does not sense the lane, and the user experience is improved.
According to the first aspect, or any implementation manner of the first aspect, the number of target lanes is one or more; wherein, under the condition that the number of the target lanes is multiple, the multiple target lanes are channels of different types; in the case that the number of the target lanes is one, the target lanes are transmitting first data; alternatively, in the case where the number of target lanes is one, the target lanes are idle.
In some embodiments, the lane hub can allocate multiple lanes to the same service in the frequency domain through statistical multiplexing in a counting manner, so that the transmission efficiency is improved. Then the number of target lanes may be one or more.
In other embodiments, the lane hub may also perform statistical multiplexing according to the bandwidth in a time domain, and allocate one lane to carry multiple services. For example, a plurality of services use the same lane according to the time sequence. For example, the high priority traffic with higher time limit requirement uses lane first, and then the low priority traffic with lower time limit requirement uses lane later. Therefore, the completion of the service is not influenced, the interference problem caused by simultaneously executing a plurality of services is avoided, and the application transmission quality is improved. Then, in the case that the priority of the data to be transmitted is low, the lane hub may allocate, to the service, a lane that is transmitting first data with a higher priority, and after the transmission of the first data with a higher priority is completed, the first electronic device may transmit the data through the target lane. Or the priority of the data to be transmitted is higher, the target lane which is transmitting the first data can be preempted, the data to be transmitted is transmitted through the target lane, and then the first data is transmitted.
It can be appreciated that if there are free lane resources and the free lane resources meet the requirements for transmitting data to be transmitted, the lane resources can be determined as a target lane. For example, if the first electronic device has a lane resource corresponding to a wired transmission mode (e.g., a USB transmission mode) and is idle, it may be preferentially determined that the lane resource corresponding to the wired transmission mode is the target lane.
According to a first aspect, or any one of the above implementations of the first aspect, the method further comprises: and monitoring the use condition of the target lane to obtain third use information of the target lane. And updating the locally recorded use information of the target lane into third use information. Third usage information is broadcast.
Therefore, the electronic equipment broadcasts the lane use information according to the preset period or the preset time, so that the interaction of the lane use information of different electronic equipment in the communication network is realized, and the requirement of the electronic equipment for selecting the target lane is further met.
Furthermore, a central node (such as a central device) is further arranged in the communication network, and the central device can adjust the lane resource type according to the received lane usage information broadcasted by the electronic device, so that the classified lane resource classification result can be the optimal classification result suitable for the current communication network. The lane resource type corresponds to the service type, and for example, the lane resource type includes a high-bandwidth lane resource, a high-bandwidth low-delay lane resource, a low-delay high-reliability lane resource and the like. For example, after setting lane1 as a high-bandwidth lane resource, the central device determines that the transmission quality of lane1 is poor according to the received broadcast information, and adjusts lane1 to lane of other resource types.
According to the first aspect, or any implementation manner of the first aspect above, the broadcasting the third usage information includes: and broadcasting the third use information under the condition that the use time length of the target lane exceeds the preset time length. Or, according to a preset period, broadcasting the third usage information.
In some embodiments, synchronization of the book by the lane hub is divided into strong synchronization and weak synchronization. Optionally, the lane hub may determine that the manner of synchronizing the ledger is strong synchronization or weak synchronization according to the service type carried by the lane resource.
Illustratively, some services need to maintain communication for a longer time, or have a larger data volume, or need to maintain low-interference transmissions, etc. Therefore, after the lane hub allocates the lane resources to such services, the use condition of the allocated lane resources needs to be synchronized to other lane hubs in the lane net, so that the other lane hubs avoid interfering with the lane resources in the process of allocating the lane resources. Such lane resources are those that require strong synchronization.
For another example, some lan resources are temporarily preempted, after the use of the lan resources is locally updated by the lan hub, the lan resources are released again within a short time, and the use of the lan resources is updated to the previous state by the lan hub or the previous update is directly cancelled, so that if broadcast synchronization is performed for each update, the power consumption is increased. Therefore, a preset period can be set, the account book is broadcasted according to the preset period, and unnecessary power consumption cannot be increased due to repeated synchronization while timeliness and credibility of account book synchronization are guaranteed. Such lane resources are those that require weak synchronization.
Therefore, through strong synchronization or weak synchronization, records of the use conditions of the lane resources by each lane hub in the lane net are ensured to be uniform, and the problem of lane resource allocation conflict caused by non-uniform use conditions of the lane resources is solved.
According to the first aspect, or any implementation manner of the first aspect above, the method further includes: and when the quality of part or all of the lanes in the target lanes does not meet the preset condition, adjusting the parameters of the first target lane of which the quality does not meet the preset condition.
According to the first aspect, or any implementation manner of the first aspect, adjusting a parameter of a first target lane whose quality does not meet a preset condition includes: and adjusting the power of the first target lane of which the quality does not meet the preset condition. Or determining the type corresponding to the first target lane, determining a second target lane which corresponds to the service type, has the same type as the first target lane and meets the preset conditions in the first lane, the second lane and the third lane according to the service type and the type corresponding to the first target lane, and switching the first target lane to be the second target lane.
According to the first aspect, or any implementation manner of the first aspect, after the parameters are adjusted, the quality of part or all of the first target lane does not meet a preset condition; the method further comprises the following steps: and acquiring fourth use information of the lane broadcasted by the second electronic equipment. And determining the lane of the target type supported by the first electronic equipment and the second electronic equipment according to the fourth use information. And determining a third target lane of which the quality meets the preset condition in the lanes of the target types, and taking the lane which does not meet the preset condition after the adjustment parameters in the first target lane are switched as the third target lane.
In some embodiments, the Lanehub monitors the use condition of the lane resources after allocating the lane resources to the application program, and can adjust the lane resources when detecting that the communication quality is poor, so as to meet the data transmission requirement of the application program (for example, the packet loss rate is less than a preset threshold value). Adjusting the lane resources comprises adjusting parameters of the lane resources, switching the lane resources and the like. In the data transmission process, the lane hub can adjust the lane resources once or for many times, and the transmission quality is ensured.
For example, the lane resources are divided based on the frequency domain angle with the channel as granularity, and then a time-sharing strategy may be adopted, which allows different transmission tasks to time-share and invoke the same lane resources according to the time sequence. And allocating lane resources through time sharing strategies such as Wi-Fi hierarchical clock technology, BR Bluetooth hierarchical clock technology and the like. Then, the lane hub needs to monitor the use condition of the lane resources from the time domain perspective, and determine whether the allocation condition of the lane resources needs to be adjusted.
For another example, the lane hub can obtain the quality measurement result of the lane resources, perform service quality analysis on the lane resources, determine whether the QoS policy needs to be adjusted (such as adjusting the QoS standard for evaluating the lane resources), and analyze the use condition of the lane net.
For another example, the allocation scheduling condition of the lane resources is monitored, for example, the lane resource scheduling condition of each lane hub in the lane net is monitored, and whether the use of the currently applied lane resources is influenced or not is determined. For example, qoS coordination can be realized, and decision adjustment including service speed limitation, avoidance and the like can be performed on low-priority services, so that long-time services (such as screen projection services and the like) are not affected by short-time services (such as picture sharing services and the like), or services with higher transmission quality requirements are not affected by other services.
Therefore, in the data transmission process, the electronic equipment can dynamically adjust the lane resources directly by a parameter adjustment method or a communication mode adjustment method under the condition that a user does not sense, so that the data transmission quality is ensured, and the user experience is improved.
In a second aspect, an electronic device is provided. This electronic equipment is first electronic equipment, includes: a processor and a memory coupled to the processor, the memory for storing computer program code, the computer program code including computer instructions that, when read from the memory by the processor, cause the electronic device to perform operations comprising: when determining that data needs to be sent to the second electronic device, determining a target lane for transmitting the data in the first logic lane, the second lane and the third lane, wherein the first lane corresponds to a first type of network path, the second lane corresponds to a first channel in a second type of network path, and the third lane corresponds to a second channel in the second type of network path. And sending data to the second electronic equipment through the target lane.
According to a second aspect, when determining that data needs to be sent to a second electronic device, a first electronic device determines a target lane for data transmission among a first lane, a second lane and a third lane, and the method includes: and when the data are determined to be required to be sent to the second electronic equipment, determining the service type corresponding to the data. And determining the target lane in the first lane, the second lane and the third lane according to the service type.
According to a second aspect, or any implementation manner of the second aspect above, when the processor reads the computer instructions from the memory, the electronic device is further caused to perform the following operations: the method includes the steps of obtaining first usage information of a first lane, a second lane and a third lane recorded locally, and obtaining second usage information of the first lane, the second lane and the third lane broadcasted by a plurality of electronic devices in a communication network including the first electronic device. Determining a target lane in the first lane, the second lane and the third lane according to the service types, including: and determining the target lane according to the first use information, the second use information and the service type.
According to the second aspect, or any implementation manner of the second aspect, the first electronic device locally stores a first ledger and a second ledger, the first ledger is used for recording usage information of the first lane, the second lane and the third lane, and the second ledger is used for recording usage information of all lanes in a communication system including the first electronic device. Then, when the processor reads the computer instructions from the memory, the electronic device is further caused to perform the following operations: the method comprises the steps of obtaining first use information of the first lane, the second lane and the third lane recorded in the first account book, and obtaining second use information of the first lane, the second lane and the third lane recorded in the second account book. Then, determining a target lane in the first lane, the second lane and the third lane according to the service types comprises: and determining the target lane according to the first use information, the second use information and the service type.
According to a second aspect, or any implementation manner of the second aspect above, the first usage information or the second usage information includes one or more of the following: the use times of the lane, the service type corresponding to the historical transmission data of the lane and the quality parameter information of the lane.
According to the second aspect, or any implementation manner of the second aspect above, the number of target lanes is one or more; under the condition that the number of the target lanes is multiple, the multiple target lanes are channels of different types; in the case that the number of the target lanes is one, the target lanes are transmitting first data; alternatively, in the case where the number of target lanes is one, the target lanes are idle.
According to a second aspect, or any implementation manner of the second aspect above, when the processor reads the computer instructions from the memory, the electronic device is further caused to perform the following operations: and monitoring the use condition of the target lane to obtain third use information of the target lane. And updating the locally recorded use information of the target lane into third use information. Third usage information is broadcast.
According to a second aspect, or any implementation manner of the second aspect above, the broadcasting third usage information includes: and broadcasting the third use information under the condition that the use time length of the target lane exceeds the preset time length. Or, according to a preset period, broadcasting the third usage information.
According to a second aspect or any implementation manner of the second aspect above, when the processor reads the computer instructions from the memory, the electronic device is further caused to perform the following operations: and when the quality of part or all of the lans in the target lans does not meet the preset condition, adjusting the parameters of the first target lans, the quality of which does not meet the preset condition.
According to a second aspect, or any implementation manner of the second aspect, adjusting a parameter of the first target lane whose quality does not meet a preset condition includes: and adjusting the power of the first target lane with the quality not meeting the preset condition. Or determining the type corresponding to the first target lane, determining a second target lane which corresponds to the service type, is the same as the type corresponding to the first target lane and has quality meeting preset conditions in the first lane, the second lane and the third lane according to the service type and the type corresponding to the first target lane, and switching the first target lane to be the second target lane.
According to a second aspect or any implementation manner of the second aspect above, when the processor reads the computer instructions from the memory, the electronic device is further caused to perform the following operations: and acquiring fourth use information of the lane broadcasted by the second electronic equipment. And determining the lane of the target type supported by the first electronic equipment and the second electronic equipment according to the fourth use information. And determining a third target lane of which the quality meets the preset conditions in the lanes of the target types, and taking the lane which does not meet the preset conditions after the adjustment parameters in the first target lane are switched as the third target lane.
For technical effects corresponding to any one of the implementation manners in the second aspect and the second aspect, reference may be made to the technical effects corresponding to any one of the implementation manners in the first aspect and the first aspect, and details are not repeated here.
In a third aspect, an electronic device is provided. The electronic device is a first electronic device including: a processing module and a transceiver module. The processing module is used for determining a target lane for transmitting data in a first logic lane, a second lane and a third lane when data needs to be sent to the second electronic equipment, wherein the first lane corresponds to a first type of network path, the second lane corresponds to a first channel in a second type of network path, and the third lane corresponds to a second channel in the second type of network path. And the transceiving module is used for sending data to the second electronic equipment through the target lane.
According to a third aspect, when it is determined that data needs to be sent to a second electronic device, a first electronic device determines a target lane for data transmission among a first lane, a second lane, and a third lane, including: and when determining that the data needs to be sent to the second electronic equipment, determining the service type corresponding to the data. And determining the target lane in the first lane, the second lane and the third lane according to the service types.
According to the third aspect, or any implementation manner of the above third aspect, the processing module is specifically configured to obtain first usage information of the first lane, the second lane, and the third lane recorded locally, and obtain second usage information of the first lane, the second lane, and the third lane broadcasted by a plurality of electronic devices in a communication network including the first electronic device. Determining a target lane in the first lane, the second lane and the third lane according to the service types, including: and determining the target lane according to the first use information, the second use information and the service type.
According to the third aspect or any implementation manner of the third aspect, the first electronic device locally stores a first ledger and a second ledger, the first ledger is used for recording usage information of the first lane, the second lane and the third lane, and the second ledger is used for recording usage information of all lanes in a communication system including the first electronic device. When the first electronic device determines that data needs to be sent to the second electronic device, before determining a target lane for data transmission in the first lane, the second lane and the third lane, the processing module is further configured to acquire first usage information of the first lane, the second lane and the third lane recorded in the first account book, and acquire second usage information of the first lane, the second lane and the third lane recorded in the second account book. Determining a target lane in the first lane, the second lane and the third lane according to the service types, including: and determining the target lane according to the first use information, the second use information and the service type.
According to the third aspect, or any implementation manner of the third aspect above, the first usage information or the second usage information includes one or more of the following: the use times of the lane, the service type corresponding to the historical transmission data of the lane and the quality parameter information of the lane.
According to the third aspect, or any implementation manner of the third aspect above, the number of target lanes is one or more; wherein, under the condition that the number of the target lanes is multiple, the multiple target lanes are channels of different types; in the case that the number of the target lanes is one, the target lanes are transmitting first data; or, in the case that the number of the target lanes is one, the target lanes are idle.
According to the third aspect, or any implementation manner of the third aspect, the processing module is further configured to monitor usage of the target lane, and obtain third usage information of the target lane. And updating the locally recorded use information of the target lane into third use information. Third usage information is broadcast.
According to the third aspect, or any implementation manner of the third aspect above, the broadcasting third usage information includes: and broadcasting the third use information under the condition that the use time length of the target lane exceeds the preset time length. Or, according to a preset period, broadcasting the third usage information.
According to the third aspect, or any implementation manner of the third aspect, the processing module is further configured to, when the quality of part or all of the lanes in the target lanes does not meet a preset condition, adjust a parameter of a first target lane whose quality does not meet the preset condition.
According to the third aspect, or any implementation manner of the third aspect above, adjusting the parameter of the first target lane whose quality does not meet the preset condition includes: and adjusting the power of the first target lane with the quality not meeting the preset condition. Or determining the type corresponding to the first target lane, determining a second target lane which corresponds to the service type, has the same type as the first target lane and meets the preset conditions in the first lane, the second lane and the third lane according to the service type and the type corresponding to the first target lane, and switching the first target lane to be the second target lane.
According to the third aspect, or any implementation manner of the third aspect, the transceiver module is further configured to acquire fourth usage information of the lane broadcasted by the second electronic device. Then, the processing module is further configured to determine, according to the fourth usage information, a lane of the target type supported by both the first electronic device and the second electronic device. And determining a third target lane of which the quality meets the preset conditions in the lanes of the target types, and taking the lane which does not meet the preset conditions after the adjustment parameters in the first target lane are switched as the third target lane.
Optionally, the transceiver module may include a receiving module and a transmitting module, may be implemented by a transceiver or a transceiver-related circuit component, and may be a transceiver or a transceiver module. In order to implement the communication method according to any one of the first aspect and the first aspect, all relevant contents related to any one of the implementations of the first aspect and the first aspect may be referred to as corresponding functional modules.
Optionally, the first electronic device may further include a storage module, where the program or the instruction is stored in the storage module. When the processing module and the transceiver module execute the program or the instruction, the first electronic device may perform the communication method described in any one of the implementation manners of the first aspect and the first aspect.
For technical effects corresponding to any one of the implementation manners of the third aspect and the third aspect, reference may be made to the technical effects corresponding to any one of the implementation manners of the first aspect and the first aspect, and details are not described here.
In a fourth aspect, an embodiment of the present application provides a communication system, including: a first electronic device and a second electronic device. The first electronic device is used for determining a target lane for transmitting data in a first logic lane, a second lane and a third lane when the fact that data needs to be transmitted to the second electronic device is determined, wherein the first lane corresponds to a first type of network path, the second lane corresponds to a first channel in a second type of network path, and the third lane corresponds to a second channel in the second type of network path. The first electronic equipment is also used for sending data to the second electronic equipment through the target lane. And the second electronic equipment is used for receiving the data sent by the first electronic equipment through the target lane.
According to the fourth aspect, the first electronic equipment is further used for monitoring the use condition of the target lane and obtaining third use information of the target lane. And updating the locally recorded use information of the target lane into third use information. Third usage information is broadcast.
According to a fourth aspect, or any implementation manner of the second aspect above, the first electronic device is specifically configured to broadcast the third usage information when the usage duration of the target lane exceeds a preset duration. Or, according to a preset period, broadcasting the third usage information.
According to a fourth aspect or any implementation manner of the second aspect, the first electronic device holds a first account book and a second account book, the first account book is used for recording usage information of the first lane, the second lane and the third lane, and the second account book is used for recording usage information of all lanes in the communication system.
According to a fourth aspect, or any implementation manner of the second aspect above, the communication system further comprises: a third electronic device; and the third electronic equipment is used for receiving the third use information and synchronizing the use information of the target lane recorded in the second account book stored locally according to the third use information.
In some embodiments, more than two electronic devices are included in the communication system, each having a lane hub configured therein. After the local-end lane hub determines that the lane resource use information changes, the changed lane resource use information can be broadcast to other electronic equipment in the communication system in a strong synchronization or weak synchronization mode. The lane hubs of other electronic devices (such as a third electronic device) can receive the broadcast information, and synchronize the locally stored lane resource use information according to the broadcast information, so that the lane resource information recorded by each lane hub is synchronized, and the problem of lane resource allocation conflict caused by non-uniform lane resource use information is avoided.
In some embodiments, the second electronic device also receives an update of the usage information of the first electronic device for the target lane. That is, each electronic device in the communication system is provided with a lane hub. The lane hub maintains two accounts, wherein one account is used for recording the use condition of local lane resources; the other account book is used for recording the use condition of the lane resources in the lane net (such as a public account book). And after the local lane resource use condition is updated, the local account book is updated, the public account book is updated at the same time, and then the public account book is broadcasted. After receiving the broadcast, the other lane hubs in the lane net can synchronize the public account book and perform merging and updating on the related content of the local account book, so that each lane hub in the lane net can be guaranteed to store the same public account book, that is, each lane hub can synchronize the actual use condition of the lane resources in the lane net. For example, the local account book in the lane hub records the usage of the lane1 managed by the local account book, and after the public accounts of other lane hubs are obtained, the records of the usage of the lane1 by other lane hubs are determined, and then whether the local account book needs to be modified is determined. If so, after modification, synchronizing the modification information to a public ledger for synchronization of other lane hubs.
According to a fourth aspect, or any implementation manner of the second aspect above, the first electronic device, the second electronic device, and the third electronic device are further configured to determine a target device for adjusting the lane resource type, where the target device is any one of the first electronic device, the second electronic device, and the third electronic device. And the target device is used for acquiring the use information of the fourth lane broadcasted by the first electronic device, the second electronic device and the third electronic device, and adjusting the lane resource types of part or all of the lanes in the fourth lane according to the use information of the fourth lane, wherein the lane resource types comprise at least one of high-bandwidth lane resources, high-bandwidth low-latency lane resources, low-bandwidth low-latency lane resources and low-latency high-reliability lane resources.
According to a fourth aspect, or any implementation manner of the second aspect above, the communication system further comprises: a central device. The central device is used for acquiring the use information of a fifth lane broadcasted by the electronic device in the communication network, and adjusting the lane resource types of part or all of the lanes in the fifth lane according to the use information of the fifth lane, wherein the lane resource types comprise at least one of high-bandwidth lane resources, high-bandwidth low-latency lane resources, low-bandwidth low-latency lane resources and low-latency high-reliability lane resources.
In some embodiments, the fifth lane is a lane supported by each electronic device, so that the central device can determine the usage information of all lanes in the communication network according to the broadcast information, and can further determine the lane requiring adjustment of the lane resource type. Thus, the transmission quality of the communication network can be improved.
Further, in the case where the center node apparatus is included in the communication system, the lane resource usage type is adjusted by the center node apparatus. In the case where the communication system does not include a central node, devices in the communication system may employ, for example, block chain techniques to elect a device for adjusting the lane resource type. Therefore, the requirement of adjusting the lane resource types of different types of communication systems is met.
According to a fourth aspect, or any implementation manner of the second aspect above, the number of target lanes is one or more; under the condition that the number of the target lanes is multiple, the multiple target lanes are channels of different types; in the case that the number of the target lanes is one, the target lanes are transmitting first data; alternatively, in the case where the number of target lanes is one, the target lanes are idle.
For technical effects corresponding to any one of the implementation manners in the fourth aspect and the fourth aspect, reference may be made to the technical effects corresponding to any one of the implementation manners in the first aspect and the first aspect, and details are not described here.
In a fifth aspect, an embodiment of the present application provides an electronic device having a function of implementing the communication method as described in the first aspect and any one of the possible implementation manners. The function can be realized by hardware, and can also be realized by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions described above.
For technical effects corresponding to any one of the implementation manners of the fifth aspect and the fifth aspect, reference may be made to the technical effects corresponding to any one of the implementation manners of the first aspect and the first aspect, and details are not repeated here.
In a sixth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program (also referred to as instructions or code) that, when executed by the electronic device, causes the electronic device to perform the first aspect or the method of any one of the embodiments of the first aspect.
For technical effects corresponding to any one of the implementations of the sixth aspect and the sixth aspect, reference may be made to the technical effects corresponding to any one of the implementations of the first aspect and the first aspect, and details are not described here.
In a seventh aspect, this application provides a computer program product, which when run on an electronic device, causes the electronic device to execute the method of the first aspect or any one of the implementation manners of the first aspect.
For technical effects corresponding to any one of the implementation manners in the seventh aspect and the seventh aspect, reference may be made to the technical effects corresponding to any one of the implementation manners in the first aspect and the first aspect, and details are not repeated here.
In an eighth aspect, embodiments of the present application provide a circuit system, which includes a processing circuit configured to perform the method of any one of the first aspect or the first aspect.
For technical effects corresponding to any one of the implementation manners in the eighth aspect and the eighth aspect, reference may be made to the technical effects corresponding to any one of the implementation manners in the first aspect and the first aspect, and details are not described here.
In a ninth aspect, an embodiment of the present application provides a chip system, including at least one processor and at least one interface circuit, where the at least one interface circuit is configured to perform a transceiving function and send an instruction to the at least one processor, and when the at least one processor executes the instruction, the at least one processor performs the method of the first aspect or any one of the first aspect.
For technical effects corresponding to any one of the implementations of the ninth aspect and the ninth aspect, reference may be made to the technical effects corresponding to any one of the implementations of the first aspect and the first aspect, and details are not described here again.
Drawings
FIG. 1 is a first schematic view of an interface provided in an embodiment of the present application;
fig. 2 is a schematic view of a form of an electronic device according to an embodiment of the present disclosure;
fig. 3A is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure;
fig. 3B is a block diagram illustrating a software structure of an electronic device according to an embodiment of the present disclosure;
fig. 4A is a first schematic diagram of a scenario in which a communication method according to an embodiment of the present application is applied;
fig. 4B is a schematic diagram of a scenario in which the communication method provided in the embodiment of the present application is applied;
FIG. 5A is a schematic diagram of module interaction provided by an embodiment of the present application;
fig. 5B is a third schematic diagram of a scenario in which the communication method provided in the embodiment of the present application is applied;
FIG. 6 is a second schematic interface diagram provided in an embodiment of the present application;
FIG. 7 is a third schematic view of an interface provided in an embodiment of the present application;
fig. 8 is a flowchart of a communication method provided in an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solution in the embodiments of the present application is described below with reference to the drawings in the embodiments of the present application. In the description of the embodiments of the present application, the terminology used in the following embodiments is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in the specification of the present application and the appended claims, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as "one or more", unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" means one or more than two (including two).
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless otherwise specifically stated. The term "coupled" includes both direct and indirect connections, unless otherwise noted. "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
In the embodiments of the present application, words such as "exemplary" or "for example" are used to mean serving as examples, illustrations or descriptions. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
The communication method provided by the embodiment of the application can be applied to the first electronic equipment. For example, as shown in fig. 2, the first electronic device may specifically be a mobile phone 21, a notebook computer 22, a tablet computer 23, a large screen display device 24, a wearable device (such as a smart watch, a smart bracelet, etc.) 25, an in-vehicle device, an ultra-mobile personal computer (UMPC), a netbook, a laptop computer, a Personal Digital Assistant (PDA), a VR device, an AR device, a sound box, an artificial intelligence (artificial intelligence) device, and other terminal devices with a transmission function. The operating system installed in the first electronic device includes but is not limited toIn that
Figure BDA0003317489990000101
Or other operating system. In some embodiments, the first electronic device may be a stationary device or a portable device. The specific type of the first electronic device and the installed operating system are not limited by the application.
In some embodiments, the first electronic device may support multiple communication modes, such as Near Field Communication (NFC), bluetooth (BT) (e.g., conventional bluetooth, bluetooth Low Energy (BLE), basic Rate (BR) bluetooth, enhanced rate (EDR) bluetooth, etc.), wireless Local Area Network (WLAN) (e.g., wireless fidelity (Wi-Fi) network), zigbee (Zigbee), frequency Modulation (FM), infrared (IR), etc.), and wired communication modes such as Universal Serial Bus (USB) connection.
In some embodiments, the first electronic device becomes an electronic device in the soft bus networking after establishing a communication connection with one or more other electronic devices (e.g., a second electronic device) in a communication manner supported by the first electronic device. The soft bus network may include a homogeneous network or a heterogeneous network. For example, electronic devices in a communication network communicate in the same communication mode, and the communication network is a homogeneous network. As if each electronic device in a homogeneous network communicates over Wi-Fi. For another example, the electronic devices in the communication network communicate by two or more communication methods, and the communication network is a heterogeneous network. If the first electronic device and the second electronic device support Bluetooth communication and Wi-Fi communication, the first electronic device and the second electronic device access the same router in a Wi-Fi communication mode, and Bluetooth connection is established between the first electronic device and the second electronic device, two communication modes exist in a communication network formed by the first electronic device, the second electronic device and the router, and a heterogeneous network is formed.
It is understood that the softbus network should include 2 or more than 2 electronic devices, and different electronic devices may execute respective services. For example, data transmission can be performed between electronic devices included in the soft bus networking as required. For example, the soft bus networking includes a plurality of electronic devices such as electronic device 1, electronic device 2, electronic device 3, and electronic device 4. The service 1 is executed between the electronic device 1 and the electronic device 2, the service 2 is executed between the electronic device 1 and the electronic device 3, the service 3 is executed between the electronic device 3 and the electronic device 4, and the service 1, the service 2, and the service 3 are different data transmission services, for example. Then the available network resources need to be allocated for each service. The specific allocation manner of the network resources is described in the following specific embodiments, which are not described herein again.
Optionally, each application installed in the first electronic device may communicate with the second electronic device through one or more communication modes of the communication modes supported by the first electronic device. For example, as shown in fig. 1, a gallery application is installed in a first electronic device, and the gallery application may share a photo to a second electronic device through various manners such as bluetooth, wi-Fi direct, email, and the like.
For example, both the first electronic device and the second electronic device support proximity discovery functionality. Illustratively, both the first electronic device and the second electronic device can realize the proximity discovery function through NFC induction. After the first electronic device approaches the second electronic device, the first electronic device and the second electronic device can discover each other, and then, wireless communication connection such as Wi-Fi peer-to-peer (P2P) connection and bluetooth connection is established.
For another example, the first electronic device and the second electronic device establish a wireless communication connection through a local area network. For example, the first electronic device and the second electronic device are both connected to the same router. The first electronic device and the second electronic device are used as Station (STA) devices, the router is used as an Access Point (AP) device, and connection of an STA-AP-STA communication mode is established.
As another example, the first electronic device and the second electronic device establish a wireless communication connection through a cellular network, the internet, and the like. For example, the second electronic device accesses the internet through the router, and the first electronic device accesses the internet through the cellular network; further, the first electronic device establishes a wireless communication connection with the second electronic device.
For another example, the first electronic device establishes a wired communication connection with the second electronic device through the USB interface connection.
Illustratively, the second electronic device is the same as or different from the first electronic device in device type, and includes, but is not limited to, a smart phone, a tablet computer, a Personal Computer (PC), a wearable device (e.g., a smart watch, a smart bracelet, etc.), a Laptop computer (Laptop), a Personal Digital Assistant (PDA), an in-vehicle device, a Virtual Reality (VR) device, an Augmented Reality (AR) device, a sound box, an Artificial Intelligence (AI) device, etc. The second electronic device installed operating system includes but is not limited to
Figure BDA0003317489990000111
Or other operating system. The second electronic device 200 may not be equipped with an operating system. In some embodiments, the second electronic device may be a stationary device or a portable device. The embodiment of the application does not limit the specific type of the second electronic device, whether the operating system is installed or not, and the type of the operating system under the condition that the operating system is installed.
Fig. 3A is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device may be the first electronic device or the second electronic device.
The electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a Subscriber Identity Module (SIM) card interface 195, among others.
It should be understood that the illustrated structure of the embodiments of the present application does not constitute a specific limitation to the electronic device. In other embodiments of the present application, an electronic device may include more or fewer components than illustrated, or some components may be combined, or some components may be split, or a different arrangement of components may be used. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processor (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), among others. Wherein, the different processing units may be independent devices or may be integrated in one or more processors.
The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose-input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device, and may also be used to transmit data between the electronic device and a peripheral device. And the method can also be used for connecting a headset and playing audio through the headset. The interface may also be used to connect other second electronic devices, such as AR devices and the like.
In some embodiments, the electronic device establishes a wired connection with the other electronic device through the USB interface. For example, the electronic device establishes a USB connection with another electronic device, and transmits the stored application file to the other electronic device through the USB connection.
It should be understood that the connection relationship between the modules illustrated in the embodiments of the present application is only an exemplary illustration, and does not limit the structure of the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device. The charging management module 140 may also supply power to the second electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like.
The wireless communication function of the electronic device may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in an electronic device may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including wireless communication of 2G/3G/4G/5G, etc. applied to the electronic device. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave.
The wireless communication module 160 may provide solutions for wireless communication applied to electronic devices, including Wireless Local Area Networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global Navigation Satellite Systems (GNSS), frequency Modulation (FM), near Field Communication (NFC), infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of the electronic device is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that the electronic device can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), general Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou satellite navigation system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device implements the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may be a Liquid Crystal Display (LCD), and may be manufactured by using organic light-emitting diodes (OLEDs), active matrix organic light-emitting diodes (AMOLEDs), flexible light-emitting diodes (FLEDs), mini-leds, micro-leds, quantum dot light-emitting diodes (QLEDs), and the like. In some embodiments, the electronic device may include 1 or N display screens 194, N being a positive integer greater than 1.
The sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
Touch sensors, also known as "touch devices". The touch sensor may be disposed on the display screen 194, and the touch sensor and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor may be disposed on a surface of the electronic device at a different location than the display screen 194.
The electronic device may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, the application processor, and the like.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV and other formats. In some embodiments, the electronic device may include 1 or N cameras 193, N being a positive integer greater than 1.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the storage capability of the electronic device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, and the like) required by at least one function, and the like. The data storage area can store data (such as audio data, phone book and the like) created in the using process of the electronic device. In addition, the internal memory 121 may include a high speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a Universal Flash Storage (UFS), and the like. The processor 110 executes various functional applications of the electronic device and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The electronic device may implement audio functions through the audio module 170, as well as the application processor, etc. Such as music playing, recording, etc. The audio module 170 may include a speaker, a receiver, a microphone, an earphone interface, and the like. For converting digital audio information into an analog audio signal output and for converting an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic device may receive a key input, and generate a key signal input related to user settings and function control of the electronic device.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be attached to and detached from the electronic device by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic equipment can support 1 or N SIM card interfaces, and N is a positive integer greater than 1.
The software system of the electronic device may employ a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the application takes an Android system with a layered architecture as an example, and exemplarily illustrates a software structure of an electronic device.
Fig. 3B is a block diagram of a software structure of an electronic device according to an embodiment of the present application.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 3B, the application package may include applications such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc.
In some embodiments, different applications may interact with other electronic devices via some or all of the communications supported by the electronic devices. The picture stored in the first electronic device is sent to the second electronic device through Bluetooth by the gallery application.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 3B, the application framework layer may include a window manager, content provider, view system, resource manager, notification manager, phone manager, lane management service, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
Content providers are used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide communication functions of the electronic device. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a brief dwell, and does not require user interaction. Such as a notification manager used to notify download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
And the lane management service is used for planning and managing all lanes (lanes) of the communication modes supported by the electronic equipment. The lane is a unit granularity for segmenting after abstracting network resources corresponding to the communication mode. For example, all network resources corresponding to communication methods included in the communication network (e.g., wi-Fi resources corresponding to Wi-Fi communication methods, bluetooth resources corresponding to bluetooth communication methods, etc.) are divided into lane resources in units of lanes. And then, the lane management service in the electronic equipment allocates lane resources to the application program of the data to be sent according to the service type of the data to be sent, so that the application program can communicate through the allocated lane resources, wherein the allocated lane resources can include one or more lanes. And if the allocated lane resources are one channel determined after the Wi-Fi resources are segmented by the channel segmentation granularity for the lane in the Wi-Fi communication mode, the application program sends data through the allocated Wi-Fi channel. In some embodiments, the lane management service may be described as a logical path center (lanehub).
For example, assuming that the electronic device supports Wi-Fi2.4G communication and BLE communication, lane resources are divided according to physical characteristics of the Wi-Fi communication and bluetooth communication, for example, a Wi-Fi2.4G communication mode includes 13 channels and may be divided into 13 lane resources, a BLE communication mode includes 78 channels and may be divided into 78 lane resources, and lane management service manages these lane resources. And the lane management service provides an external uniform interface for the application program of the application layer to call, for example, the application program sends data to other electronic devices through the uniform interface by using the allocated lane resources.
The physical characteristics are used to indicate characteristics of a physical path for implementing a communication method. For example, the electronic device is equipped with a bluetooth chip, which can implement bluetooth communication and support 78 channels for bluetooth communication. Then, the lane resources are divided into 78 lane resources in the bluetooth communication mode according to the physical characteristics of the bluetooth chip. For another example, a Wi-Fi chip is installed in the electronic device, and the Wi-Fi chip supports Dual Band Dual Current (DBDC), that is, has two physical paths (e.g., physical path 1 and physical path 2). Suppose that physical path 1 of the Wi-Fi chip is used to implement Wi-Fi2.4G communication, and physical path 2 of the Wi-Fi chip is used to implement Wi-Fi 5G communication. And dividing the lane resources into lane resources of a Wi-Fi2.4G communication mode and lane resources of a Wi-Fi 5G communication mode according to the physical characteristics of the Wi-Fi chip. Or, assuming that the physical path 1 and the physical path 2 of the Wi-Fi chip are both used for realizing Wi-Fi2.4G communication, dividing the lane resources into the lane resources corresponding to the physical path 1 in the Wi-Fi2.4G communication mode and the lane resources corresponding to the physical path 2 in the Wi-Fi2.4G communication mode according to the physical characteristics of the Wi-Fi chip. It is understood that the Wi-Fi chip can also support more physical paths, for example, a Wi-Fi chip supporting four-frequency and four-data can support 4 physical paths, which may correspond to 4 types of lane resources. In the communication method provided in the embodiment of the present application, lane resources are divided by characteristics of physical paths, which is not described in detail below.
It should be noted that the name of lane may be different in different systems or architectures. For example, in some systems or architectures, where the lan is managed by a lane management service, the name of the lane used to support the application to implement inter-device communication may be a virtual path, and the name of the corresponding lane resource may be a virtual path resource. For example, lane is used to indicate a corresponding channel in the communication scheme, and lane resources are channel resources. For example, the Wi-Fi2.4G communication mode includes 13 channels (corresponding to 13 virtual paths), which may be divided into 13 lanes, and the lane resources corresponding to the Wi-Fi2.4G communication mode include 13 lanes. Alternatively, the name of a lane may be a physical path and the name of the corresponding lane resource may be a physical path resource. If the communication mode is a USB wired communication mode, the USB connection comprises 1 physical channel and can be divided into 1 lane, and lane resources corresponding to the USB wired communication mode comprise 1 physical channel resource. However, whatever the name of lane, the technical idea of the method provided by the embodiments of the present application shall be covered by the scope of the present application as long as the network resources for implementing communication have similar functions. In the embodiments of the present application, the name of lane is taken as a logical path (for example, a virtual path and a physical path) as an example, and the communication method provided in the embodiments of the present application is described.
The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), two-dimensional graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The two-dimensional graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
In some embodiments, the electronic device may support at least one communication mode, and different electronic devices may support the same or different communication modes, where the communication modes supported by the electronic device include a wired communication mode (e.g., a USB communication mode, an Ethernet (ETH) communication mode, a Programmable Logic Controller (PLC) communication mode, etc.) and/or a wireless communication mode (e.g., a Wi-Fi communication mode, a bluetooth communication mode, etc.). After the electronic equipment is connected with other electronic equipment, a communication network is formed, the communication network allows the other electronic equipment to access, and the electronic equipment in the communication network shares network resources. For example, a mobile phone accesses a router, and a PC also accesses the router, so that the mobile phone and the PC share the Wi-Fi network provided by the router. Furthermore, the mobile phone can also establish Bluetooth connection with the PAD, and the communication of the mobile phone, the PC, the PAD and the router forms a communication network.
Because different independent interfaces are provided for network protocols of different communication modes, a developer needs to complete the development of an application program according to the different independent interfaces, so that the application program can support one or more communication modes. The application program can only select one communication mode to communicate with other electronic equipment according to user operation or default modes, but cannot independently select the optimal communication mode according to network resource conditions. Or after the application program selects a communication mode for communication, if the current communication is not completed, the communication mode is not generally switched. However, the signal quality of different communication modes is related to specific network environments, and therefore, due to the limitation of independent interfaces of different communication modes, an application program has difficulty in providing a user with an optimal network experience.
In addition, in the network selection process, a user needs to select a communication mode for transmission, and under the condition that the communication modes supported by the electronic device are more, the user needs to search for the communication mode for many times to determine the applied communication mode, so that the user operation difficulty is higher, and the user use experience is influenced. As shown in fig. 1 (b), the interface 102 is limited in display area, and only a part of the communication modes supported by the electronic device can be displayed on the interface 102. The electronic device can display the other communication modes only after detecting the sliding operation of the user (such as the sliding operation along the direction indicated by the arrow 13). If the electronic device supports more communication modes, the user needs to perform sliding search for many times to complete the selection of the communication mode, and the process is complicated.
In addition, in a distributed scenario including multiple electronic devices, there may be multiple end-to-end relationships used in a composite manner, but one electronic device may not be able to consider multiple Wi-Fi P2P connections, so that services cannot be paralleled. Specifically, the Wi-Fi P2P technology can support two Wi-Fi devices to directly connect and communicate with each other without the intervention of a Wi-Fi hotspot. After the Wi-Fi P2P connection is established, the device distinguishes two roles of a client (GO client, GC) and a manager (GO owner, GO), and meanwhile, the Wi-Fi P2P connection mode is explained and limited in the protocol specification of the Wi-Fi P2P technology, and the following three points exist: (1) GO can only be connected with GC, and cannot be connected with GO; (2) The GC can only be connected with the GO and cannot be connected with other GO or GC; (3) there is an upper limit to the number of GO-linked GCs. Besides the limitation of the protocol specification, different chip manufacturers and different electronic device operating systems have some other limitation on Wi-Fi P2P connection. For example, chip platforms such as Haisi and MTK do not support multiple P2P roles (GO/GO, GO/GC and GC/GC) on the same device. For another example, android open-source project (AOSP) does not support multiple P2P roles of the same device to coexist.
Then, it is assumed that, in the process of the mobile phone a projecting the screen to the PC through the P2P connection, the mobile phone a receives a P2P connection request sent by the mobile phone B to request to establish the P2P connection. Handset a may need to be set to multiple P2P roles in the P2P connection established with the PC and the P2P connection that may be established with handset B. However, the mobile phone a may not support coexistence of multiple P2P roles, and common-frequency and common-channel conflicts in a communication process may occur, which may cause abnormalities such as service non-parallelism or service non-guarantee due to too large conflicts.
Based on this, the embodiment of the present application provides a communication method, which performs unified planning on all network resources and provides a unified external interface for each application program. When the application program requests communication, the Lanehub automatically allocates corresponding communication resources according to the service type of the requested communication and the current network environment, and the selection is not needed by the user. Therefore, in the process of developing the application program, a developer is not limited by an interface protocol any more, and the application program can provide better communication experience for a user under the condition of reducing the operation difficulty of the user. In addition, in a distributed scenario, the electronic device directly determines available communication resources according to the service type, and communication abnormality caused by the existence of multiple P2P roles on one device does not occur.
In some embodiments, the network resources are divided according to physical characteristics of different communication modes, and the network resources are divided into lane resources. For example, the channels are used as the partition granularity, and each channel corresponds to one lane resource.
For example, as shown in fig. 4A, it is assumed that the communication network includes a Wi-Fi2.4G communication mode, a Wi-Fi 5G communication mode, a BR bluetooth communication mode, a BLE communication mode, and a USB communication mode, and network resources are divided by channel as lane division granularity. The Wi-Fi2.4G communication mode comprises 13 channels and can be divided into 13 lane resources; the Wi-Fi 5G communication mode comprises 165 channels and can be divided into 165 lane resources; the BR Bluetooth communication mode comprises 30 channels which can be divided into 30 lane resources; the BLE communication mode comprises 78 channels which can be divided into 78 lane resources; the USB communication scheme may be assumed to correspond to 1 channel, and may be divided into 1 lane resource, etc.
It is to be understood that the above-mentioned manner of dividing the network resources by the channel as the division granularity is only an exemplary illustration, and the network resources may be divided by other division granularities. For example, network resources are divided by the lane granularity in a communication manner. For example, the Wi-Fi2.4G communication mode is divided into 1 lane resource, the Wi-Fi 5G communication mode is divided into 1 lane resource, and the BR bluetooth communication mode is divided into 1 lane resource. For another example, the network resources are divided at a preset number of channels for lane division granularity. For example, the Wi-Fi2.4G communication mode includes that 3 adjacent channels in 13 channels are divided into a group of lane resources, channels 1 to 3 are divided into a group of lane resources, channels 4 to 6 are divided into a group of lane resources, channels 7 to 9 are divided into a group of lane resources, channels 10 to 12 are divided into a group of lane resources, and the extra channels 13 are divided into a group of lane resources, so that the network resource division of the Wi-Fi2.4G communication mode is completed. As another example, the channels are divided into lane resources in a predetermined manner. For example, odd-numbered channels in the Wi-Fi2.4G communication mode including 13 channels (lane 1-lane 13) are divided into a set of lane resources (including lane1, lane3, lane5, lane7, lane9, lane11, and lane13, for example), and even-numbered channels are divided into a set of lane resources (including lane2, lane4, lane6, lane8, lane10, and lane12, for example).
In some embodiments, after lane resources are partitioned, each lane is numbered and labeled. Then, subsequently, the lanehub distinguishes different lanes according to the labels, and allocates corresponding lanes according to the application program requirements. For example, as shown in FIG. 4A, lane1-Lane13 is a Lane resource corresponding to Wi-Fi2.4G communication. Furthermore, the lane tag may also include a communication mode corresponding to the lane. For example, the number of each lane is marked in the label of lane1-lane13, and the corresponding communication mode is the Wi-Fi2.4G communication mode. Then, after receiving the allocated lane, the subsequent application program can determine the number of the lane and the corresponding communication mode according to the lane tag.
In some embodiments, an account book is preset in the electronic device, and the account book is used for recording use information of the lane supported by the local terminal, such as information including use condition of the lane, monitored lane quality and the like. The use condition of the lane comprises the use times of the lane, the service type corresponding to data transmitted by the lane and the like. The service types include high bandwidth service, high bandwidth low delay, low bandwidth low delay service, low delay high reliability service, etc. Optionally, the use of the lane may also include monitored lane quality information. The electronic equipment determines the quality of the lane by monitoring parameters such as signal-to-noise ratio (SNR), load, interference value, received Signal Strength Indication (RSSI) and the like in the communication process of the lane. Furthermore, the electronic equipment performs account book management through the Lanehub.
Illustratively, as shown in fig. 4A, the communication modes supported by device a include Wi-Fi2.4G communication, BR bluetooth communication, BLE communication, and USB communication. The lanehub 1 in the device a is used to collectively manage Lane resources of the above communication method, for example, to manage an account book recording Lane resources.
In some embodiments, the electronic device broadcasts the ledger according to a preset period, and interaction of lane information in the communication network is achieved. Or, the electronic device broadcasts the account book according to a preset rule. If the electronic equipment needs to occupy certain lane resources for a long time and needs to ensure the transmission quality, the use conditions of the lane resources can be directly broadcasted, and the influence on communication caused by the use of the lane resources by other electronic equipment is avoided. The account book managed by the lanehub can also record the received lane information of the lane supported by the electronic devices in the account book broadcasted by other electronic devices. For example, the electronic device 1 in the communication network supports 5 lanes 1-lane5, and the account book records local lane information of the 5 lanes. Assuming that the land supported by the electronic device 2 in the same communication network as the electronic device 1 includes land 1-land 3 and land 7-land 10, the electronic device 1 can receive the broadcast account book of the electronic device 2, the electronic device 1 determines the opposite-end land information of the land 1-land 3 from the received broadcast account book, and the land information recorded in the account book managed by the lanhub includes the local-end land information of the land 1-land 5 supported by the electronic device 1 and the opposite-end land information of the land 1-land 3. Subsequently, the lanehub can determine the allocated lane resources according to the local-end lane information and the opposite-end lane information recorded in the account book after detecting the request that the application needs to communicate with the electronic device 2. For example, lanehub in the electronic device 1 determines that lane1 and lane2 can both realize communication with the electronic device 2 according to the local-end lane information, and the communication quality is relatively good. And the Lanehub determines that the Lane1 communication quality recorded by the electronic equipment 2 is poor according to the obtained opposite-end Lane information of the electronic equipment 2, and then the Lanehub can select to allocate Lane2 to the application program for use.
For example, corresponding to fig. 4A, as shown in fig. 4B, all lanes supported by the electronic device in the communication network may form a lane network (lane net) 41, and after the electronic device accesses the network, the lane hub configured therein may be used to synchronize the lane resource usage. If the device a supports part of lane resources in the lane net 41, the lane hub 1 in the device a is used for managing the lane resources supported by the device a; the equipment B supports part of lane resources in the lane net 41, and the lane hub 2 in the equipment B is used for managing the lane resources supported by the equipment B; the equipment C supports part of lane resources in the lane net 41, and the lane hub3 in the equipment C is used for managing the lane resources supported by the equipment C; the lane net 41 is a union of the individual lane hubs in the communication network, and there may be an overlap of the lane resources managed by the individual lane hubs in the lane net. For example, device a and device B perform data transmission through lane1 in lane net. Then the lane hub 1 needs to record the use of lane1 on the side of the device a, and the lane hub 2 needs to record the use of lane1 on the side of the device B, that is, there is an overlap between the lane resources managed by the lane hub 1 and the lane hub 2.
In addition, as shown in fig. 4B, the lane resources managed by the lane hub of each electronic device include an exclusive lane resource (e.g., the area indicated by the letter M in fig. 4B) and/or a shared lane resource (e.g., the area indicated by the letter N in fig. 4B).
The exclusive lane resource is used to indicate a lane resource that is not occupied by other services, that is, a lane resource that is not required to be shared with other services is the exclusive lane resource. For example, the lane resources that are not used in the lane resources corresponding to the communication mode supported by the device a are determined by the lane hub 1 to be the exclusive lane resources of the device a. For another example, the lan resource is a wired connection of the electronic device. For another example, where lane1 is only used to carry traffic between device a and device B, then lane1 is an exclusive lane resource for lane hub 1 in device a and lane hub 2 in device B.
The shared lane resource is used for representing a lane resource for bearing a plurality of services. For example, the lane hub 1 in the device a determines to use lane1 to execute the service 1, where the lane1 is carrying the service 2, and the service 1 and the service 2 are different services, then the lane hub 1 determines that the lane1 is the shared lane resource.
Further, the exclusive lane resources and the shared lane resources managed by the lane hub are not fixed. For example, lane hub 1 is used to manage 5 lanes corresponding to the communication modes supported by device a, such as lane1-lane5, and it is assumed that current lane1-lane3 are exclusive lane resources and lane4 and lane5 are shared lane resources. Lane hub 2 in device B determines to transmit data through Lane1 device C and broadcasts the use of Lane 1. Then, after the lane hub 1 acquires the broadcast information, it is determined to change the lane1 partition into shared lane resources.
Then, as shown in fig. 4B, the lane resources available to the device a managed by the lane hub 1 include an exclusive lane resource, shown at reference numeral 42, and a shared lane resource, shown at reference numeral 43, that overlaps with the lane resource managed by the lane hub 3. The overlapped shared lane resources are used to indicate the lane resources occupied by both the services of the device a and the services of the device C, and do not include the lane resources occupied by only a single service between the device a and the device C.
Based on this, when the lane hub needs to allocate the lane resources, it needs to determine which lane resources are exclusive lane resources and which lane resources are shared lane resources according to the obtained account book. Further, when determining that the shared lane resources need to be allocated, the lane hub also needs to determine the finally allocated lane resources according to the obtained shared lane resource usage conditions broadcast by the other electronic devices, so as to avoid affecting the communication processes of the two parties.
Optionally, in the process of allocating the lane resources, the lane hub preferentially allocates the exclusive lane resources, and then allocates the shared lane resources. The allocation mode of the shared lane resources may be a shared negotiation allocation mode, for example, the lane hubs of the related electronic devices may negotiate to allocate the lane resources, or the allocation mode is configured as a first-come-first-serve mode. Or the lane hub allocates the lane resources according to the service requirements. Optionally, the reference parameters for lane resource allocation include bandwidth, reliability, interference, and the like. And the lane hub preferentially allocates the lane resources with high bandwidth, high reliability and small interference to the service. If the interference of the wired communication mode is low and the reliability is high, the lane hub can preferentially allocate the lane resources corresponding to the wired communication mode to the service when determining that the allocable lane resources include the lane resources corresponding to the wired communication mode.
For example, when an application program requests to transmit screen projection data, the screen projection service needs a large bandwidth, and the bandwidth of the exclusive lane resource is high, the exclusive lane resource is preferentially allocated, and the shared lane resource is reallocated when the exclusive lane resource is occupied. Assuming that the lane resources managed by the lane hub include the lane resources shown in table 1 below, the lane hub may allocate the lane resources to the screen-casting service according to the lane resource allocation priority shown in table 1 below, and preferably allocate the lane resources with the priority first (where the order of the allocation priorities is 1-2-3). Optionally, in the course of lane resource allocation, the lane hub may also allocate the lane resource by referring to the use condition of the lane resource that receives the account book record.
As shown in table 1 below, it is assumed that the exclusive lane resources include a lane resource corresponding to a USB communication scheme, a lane resource corresponding to an ETH communication scheme, a lane resource corresponding to a Wi-Fi P2P communication scheme, and a lane resource corresponding to an STA-AP-STA communication scheme. The USB communication method and the ETH communication method are wired communication methods and have lower interference, so the lane hub determines the allocation priority of the lane resources corresponding to the two communication methods as "1", that is, allocates the two lane resources first. In addition, the Wi-Fi P2P communication mode is end-to-end communication, and in the STA-AP-STA communication mode, the STA device needs to relay with another STA device. Then, the transmission path of the STA-AP-STA communication scheme is long, which may increase the possibility of communication failure. Therefore, the lane hub determines that the allocation priority of the lane resources corresponding to the Wi-Fi P2P communication mode is higher than that of the lane resources corresponding to the STA-AP-STA communication mode, and the allocation priorities of the two communication modes are respectively determined to be '2' and '3'.
The shared lane resources are assumed to comprise lane resources corresponding to a Wi-Fi P2P communication mode and lane resources corresponding to an STA-AP-STA communication mode. Then, the lane hub may determine the allocation priority of the lane resource corresponding to the Wi-Fi P2P communication scheme as "1" and determine the allocation priority of the lane resource corresponding to the STA-AP-STA communication scheme as "2".
TABLE 1
Figure BDA0003317489990000201
It should be noted that, lane resources with the same priority are allocated in table 1 above, and lane hubs may randomly allocate the lane resources therein; or allocating the previously used lane resources according to the historical usage record; or prompting the user to select the lane resources, and determining the finally used lane resources according to the user selection; or simultaneously selecting a plurality of lane resources with the same distribution priority to jointly carry the service; or, the user configures a use scheme of the lane resources in advance, determines the used lane resources according to the use scheme of the user, for example, the allocation priorities of the lane1 and the lane2 are the same, but the use order of the lane1 in the use scheme of the user is prior to the use order of the lane2, so that the lane hub can select the lane1 to carry the service; or, a user or a developer pre-configures an allocation rule, and under the condition that the allocation priority of the lane resources is the same, the lane hub determines the allocated lane resources according to the pre-configured allocation rule; or, the user sets a preferred lane resource (or sets a preferred communication mode, and the lane hub can determine the corresponding lane resource), so that the lane hub can allocate the preferred lane resource set by the user to the service when determining that a plurality of lane resources with the same allocation priority exist.
Moreover, table 1 above is used for exemplary purposes only to illustrate the order in which the allocation priorities of the exclusive lane resources and the shared lane resources may exist, and is not used to limit the types of the exclusive lane resources and the shared lane resources, and to limit the order in which the allocation priorities are assigned.
For another example, the gallery application requests to transmit data, and the transmission service requires bandwidth flexibility, for example, the thumbnail needs to be transmitted in a small bandwidth, and the large map needs to be transmitted in a large bandwidth. Assuming that the lane resources managed by the lane hub include the lane resources shown in table 2 below, the lane hub may allocate the lane resources to the transmission service according to the lane resource allocation priority shown in table 2 below. Wherein the order of the assigned priorities is 1-2-3. Optionally, in the allocation process, the lane hub may further perform lane resource allocation with reference to the lane resource usage condition of the received account book record.
As shown in table 2 below, it is assumed that the exclusive lane resource includes a lane resource corresponding to the USB communication scheme, a lane resource corresponding to the ETH communication scheme, and a lane resource corresponding to the BR bluetooth communication scheme. Among these, the USB communication scheme and the ETH communication scheme are wired communication schemes and have lower interference, and therefore the lane hub determines the allocation priority of the lane resources corresponding to these two communication schemes to be "1". Since the bandwidth of BR bluetooth communication is also high, the lane hub also determines the allocation priority of the lane resource corresponding to the BR bluetooth communication to be "1".
The shared lane resources are assumed to comprise lane resources corresponding to a BR Bluetooth communication mode, lane resources corresponding to a Wi-Fi P2P communication mode and lane resources corresponding to an STA-AP-STA communication mode. The BR Bluetooth communication mode and the Wi-Fi P2P communication mode are end-to-end communication. Therefore, the lane hub determines that the allocation priority of the lane resources corresponding to the BR bluetooth communication scheme and the lane resources corresponding to the Wi-Fi P2P communication scheme is "1", and determines that the allocation priority of the lane resources corresponding to the Wi-Fi P2P communication scheme having a long transmission path is "2".
TABLE 2
Figure BDA0003317489990000211
It should be noted that, lane resources with the same priority are allocated in table 2 above, and the lane resources in the lane hub can be randomly allocated; or allocating the previously used lane resources according to the historical usage record; or prompting the user to select the lane resources, and determining the finally used lane resources according to the user selection; or simultaneously selecting a plurality of lane resources with the same distribution priority to jointly carry the service; or, the user configures a use scheme of the lane resources in advance, determines the used lane resources according to the use scheme of the user, for example, the allocation priorities of the lane1 and the lane2 are the same, but the use order of the lane1 in the use scheme of the user is prior to the use order of the lane2, so that the lane hub can select the lane1 to carry the service; or, a user or a developer pre-configures an allocation rule, and under the condition that the allocation priority of the lane resources is the same, the lane hub determines the allocated lane resources according to the pre-configured allocation rule; or, the user sets a preferred lane resource (or sets a preferred communication mode, and the lane hub can determine the corresponding lane resource), so that the lane hub can allocate the preferred lane resource set by the user to the service when determining that a plurality of lane resources with the same allocation priority exist.
Moreover, table 2 above is only used for exemplary illustration of the order of allocation priorities that may exist for the exclusive lane resources and the shared lane resources, and is not used for limiting the kinds of the exclusive lane resources and the shared lane resources, and for limiting the order of allocation priorities.
In some embodiments, the lane hub maintains two accounts, wherein one of the accounts is used for recording the use condition of the local lane resource; the other account book is used for recording the use condition of the lane resources in the lane net (such as a public account book). And after the local lane resource use condition is updated, the local account book is updated, the public account book is updated at the same time, and then the public account book is broadcasted. After receiving the broadcast, the other lane hubs in the lane net can synchronize the public account book and perform merging and updating on the related content of the local account book, so that each lane hub in the lane net can be guaranteed to store the same public account book, that is, each lane hub can synchronize the actual use condition of the lane resources in the lane net. For example, the local account in the lane hub records the usage of the lane1 managed by the local account, and after the public accounts broadcasted by other lane hubs are obtained, the records of the usage of the lane1 by other lane hubs are determined, and then whether the local account needs to be modified is determined. If so, after modification, synchronizing the modification information to a public ledger for synchronization of other lane hubs.
Or only one account book is maintained by the lane hub, the updated account book is directly broadcasted after the account book is updated, and the use conditions of the corresponding lane resources in the local account book are synchronized after the other lane hubs acquire the broadcasted account book, so that the synchronization of the use conditions of the lane resources in the lane net can be ensured. Or the land hub maintains an account book and an update record, the land hub correspondingly generates and broadcasts the update record after updating the local account book, and other land hubs synchronize the local account book according to the update record, so that synchronization of the use condition of the land resources in the land net can be ensured.
In some embodiments, synchronization of the book by the lane hub is divided into strong synchronization and weak synchronization. Optionally, the lane hub may determine that the manner of synchronizing the ledger is strong synchronization or weak synchronization according to the service type carried by the lane resource.
Illustratively, some services need to maintain communication for a longer time, or have a larger data volume, or need to maintain low-interference transmissions, etc. Therefore, after the lane hubs allocate the lane resources for the services, the use conditions of the allocated lane resources need to be synchronized to other lane hubs in the lane net, so that the other lane hubs avoid interference with the lane resources in the process of allocating the lane resources. Then, after the lane hub allocates the lane resources, the use condition of the lane resources is updated in the account book, and the updated account book is broadcasted, so that other lane hubs in the lane net can determine the updated use condition of the lane resources to realize synchronous update of the local account book of each lane hub, and the process of avoiding the problem of lane resource allocation conflict caused by update lag is a strong synchronization process. For example, the application A requests the lane resources to be used for transmitting the screen projection data, the lane hub allocates the lane1 for the application A to use, after the use condition of the lane1 recorded by the local account book is updated, strong synchronization can be selected, the updated account book is broadcast, and the situation that the transmission of the screen projection data of the application A is influenced by the fact that other lane hubs occupy the lane1 is avoided. Therefore, the screen projection quality of the application A cannot be influenced in the long-time screen projection process.
As another example, the used lane resources are temporarily preempted, after the lane resource usage is locally updated by the lane hub, the lane resource is released again by the application within a short time, and the lane hub updates the lane resource usage to the previous state or directly cancels the previous update, so that if broadcast synchronization is performed for each update, power consumption is increased. Consequently, can set up and predetermine the cycle, carry out the account book broadcast according to predetermineeing the cycle, when guaranteeing synchronous promptness and credibility of account book, can not increase unnecessary consumption because of the synchronization repeatedly again. The process of synchronizing the ledger according to the preset period is a weak synchronization process. For example, the application B needs to transmit a photo, the lane hub determines the size of data to be transmitted, and after the lane resource is allocated, it is determined that the required duration of the transmission process is lower than a preset threshold (for example, lower than 3 minutes), so that the usage condition of the lane resource does not need to be synchronized temporarily, but the ledger is synchronized at the subsequent time when the ledger needs to be synchronized directly according to a preset period.
In some embodiments, the land hub may sign and encrypt the account book and then broadcast the account book to increase the credibility of the account book. Correspondingly, after receiving the broadcast account book, other land hubs in the land net confirm the signature, acquire corresponding synchronous data, and update the local account book.
Optionally, the ledger may be implemented in a block chain, a linked list, or the like. The block chain is a chain data structure formed by combining data blocks in a sequential connection mode according to a time sequence, and a distributed account book which cannot be tampered and forged is guaranteed through the principle of cryptography. In order to ensure consistency of block chain accounts, after the use condition of local lane resources changes, each lane hub in the lane net synchronizes the use condition of the public accounts according to a strong synchronization or weak synchronization mode. A linked list is a non-sequential, non-sequential storage structure on a physical storage unit. The linked list does not store data in a linear order, but rather, a pointer to the next node is stored in each node. In the embodiment of the application, after the use condition of the lane resources changes, each lane hub in the lane net needs to be correspondingly recorded in the linked list of the public account book, so that the storage space occupied by the linked list is large, the linked list needs to be cut, and the occupation of the storage space and the synchronization difficulty are reduced.
For example, a linked list clipping period is set, and the linked list content is emptied according to the clipping period. If the clipping period is set to be 24 hours, the land hub empties the public ledger stored locally according to the 24-hour period, and the occupation of the storage space is reduced.
For another example, a linked list storage threshold is set, and when the storage threshold is exceeded, the lane hub deletes the linked list. For example, in a certain period of time, the lane resources in the lane net are frequently used, so that the occupation of the public ledger storage space reaches the storage threshold when the clipping period is not reached. Then, the land hub also needs to clear the public ledger stored locally, so as to reduce the occupation of the storage space.
In some implementations, a central node is provided in the communication network for classifying lane resources in the communication network. For example, the lane resources are classified according to the service types, and the lane resources with the lane resource types matched with the service types are allocated to the corresponding application programs for use by the lane resources in the subsequent lane resource allocation process of the electronic equipment. For example, the classification result of the lane resource type includes at least one of a high-bandwidth lane resource, a high-bandwidth low-latency lane resource, a low-latency high-reliability lane resource, and the like. For example, the high-bandwidth lane resource can provide higher bandwidth for transmitting data of high-bandwidth service with higher bandwidth requirement. If the lanehub determines that the requested service type is a high-bandwidth service and lane1 is a high-bandwidth lane resource, the lanehub can allocate lane1 to an application program corresponding to the requested high-bandwidth service for use. Wherein each lane resource comprises one or more lanes. It is understood that the lane resource type may also include other classification results, such as low-latency lane resources, high-reliability lane resources, and the like.
Optionally, the central node is, for example, an electronic device capable of maintaining communication in the communication network, or an electronic device with a strong calculation capability, or a non-battery device (i.e., a device capable of guaranteeing a working period), and the like. And the equipment interaction information in the communication network selects one equipment meeting part or all of the conditions as a central node. For example, the central node is a router. Optionally, if the central node is powered down, the devices in the communication network can re-elect the central node for lane resource classification. The method for selecting a central node of a communication network may refer to the prior art, and embodiments of the present application are not specifically limited.
Illustratively, a central node in the communication network can receive data broadcast or reported by each electronic device in the communication network, determine the number of lanes and the communication mode in the communication network, and initialize lane classification results. For example, the central node directly defines lane1-lane10 as a high-bandwidth lane resource, and lane11-lane20 as a high-bandwidth low-latency lane resource. For another example, the central node divides the lane resources according to the channel capacity corresponding to the communication mode. If the bandwidth of the channel of the Wi-Fi 5G communication mode is high, the center node defines the lane resources in the Wi-Fi 5G communication mode as high-bandwidth lane resources. Since the initialized lane classification result is not necessarily the optimal classification result, the subsequent central node can adjust the classification result according to the communication condition in the communication process of the electronic equipment in the communication network.
Specifically, the central node in the communication network acquires the ledger of each electronic device in the communication network, and can determine the conditions of all lane resources in the communication network. And then, the central node performs quality analysis on the lane resources, and adjusts part or all of the classification results in the initial classification result of the lane resources according to the quality analysis result to obtain a final lane resource classification result. For example, suppose that a central node determines lane1 corresponding to 1 channel in a Wi-Fi 5G communication mode as a high-bandwidth lane resource in an initialization process, and an electronic device a and an electronic device B are respectively located in two adjacent rooms, and need to perform high-bandwidth service communication through a partition wall. In the process of monitoring the use condition of lane resources in the communication network, the central node determines that the quality of high-bandwidth service transmission performed by the electronic device a and the electronic device B through the lane1 is poor, so that the lane1 can be adjusted to a lane of another lane resource type. And then, the central node broadcasts the lane resource classification result, the electronic equipment adds the lane resource classification result to the label of each lane after receiving the lane resource classification result, and the subsequent lane hub distinguishes each lane according to the label identification.
It should be noted that the central node adjusts the classification result of the lane resources according to a preset time. For example, the central node adjusts the lane resource classification result according to the situation of monitoring the lane resources in a time period with less data transmission requirements of the electronic device in the early morning period. For another example, the central node determines that the classification result of one or more lanes needs to be adjusted, and adjusts the classification result of the lane in this part when the lane does not transmit data.
In other embodiments, where there is no central node in the communication network, the block chain technique can be used to determine the electronic devices used to classify lane resources and adjust the lane resource classification.
For example, in the block chain technique, in order to ensure consistency of lane resource classification results, each electronic device uses its computing power to strive for lane resource classification weights, that is, a winner competing according to a predetermined rule obtains a right to determine lane resource classification, and other electronic devices synchronize the determined lane resource classification results. In addition, when the classification of the lane resources needs to be adjusted, the electronic equipment for adjusting the lane resource classification can be determined in a competitive manner through the block chain technology; or the lane resource classification is adjusted directly by the equipment for determining the lane resource classification result.
Thus, the lane resource classification is determined through the block chain technology, so that the lane resources in the lane net have uniform lane resource classification results for all the lane nets, and the consistency of the standards is ensured. And, prevent other electronic equipment from falsifying the classification result of lane resources.
It should be noted that, the algorithm applied in the electronic device for classifying and adjusting lane resources and the competition process by the block chain technology competition may refer to the prior art, and the embodiment of the present application does not specifically limit this.
In some implementations, the lanehub in the electronic device provides a uniform interface to the outside for applications in the electronic device to call. The interfaces comprise a lane resource allocation interface, a lane resource release interface, a lane resource signal quality detection interface and the like. And the Lanehub allocates the lane resources for the application program through the lane resource allocation interface. After the application program finishes data transmission, the lane resources are released through the lane resource release interface, and the lanehub can obtain the release condition of the lane resources so as to adjust the lane resources. And the Lanehub detects the lane resource quality through a lane resource signal quality detection interface.
For example, as shown in fig. 4A, assuming that device a, device B, and device C are devices in a communication network, an application program in device a needs to call an interface to send data to device B using a lane resource. Then, the local account book is acquired by the lanehub in the device a, and local-end lane information of the lane supported by the local end and opposite-end lane information obtained by receiving the broadcast message are recorded in the account book (for example, the local-end lane information includes information of the lane supported by both the device a and the device B in the lane information recorded by the device B, and information of the lane supported by both the device a and the device C in the lane information recorded by the device C). And then determining the corresponding lane resources by the lanehub according to the service type requested by the application program, and allocating the lane resources for the application program through a lane resource allocation interface according to the local-end lane information and the opposite-end lane information recorded in the account book. Or, two accounts are stored in the device a, including a local account and a public account for recording the use condition of the lane resources supported by the device a.
Then, when allocating the lane resources for the data to be sent, the device a may determine the lane resources to be finally allocated directly according to the lane resource conditions recorded in the public ledger. Or, the device A determines the finally allocated lane resources by referring to the latest lane resource condition recorded in the local account book and the lane resource condition recorded in the public account book. If the account book synchronization period of weak synchronization is not reached, and the use condition of part of lane resources is not synchronized to the public account book, the lane resource condition recorded in the local account book may be different from the lane resource condition recorded in the public account book, so that the latest lane resource condition recorded in the local account book needs to be referred to.
Illustratively, as shown in fig. 5A, the lanehub51 in the electronic device includes a monitoring module 511, an assigning module 512, and an adjusting module 513. The monitoring module 511 is configured to monitor the use of lane resources, and analyze the use of lane resources. As shown in table 3 below, the monitoring module 511 can obtain the quality measurement results (such as the measured values of load, RSSI, SNR, and the like of lane resources) of the lane resources by the measurement module 521 in the network driver 52, and record and analyze the quality measurement results. For example, as shown in fig. 4A, the lane resources of device a include 13 lane resources corresponding to Wi-Fi2.4G communication, 30 lane resources corresponding to BR bluetooth communication, 78 lane resources corresponding to BLE communication, and 1 lane resource corresponding to USB communication, and the monitoring module 511 records the quality measurement results of these lane resources.
TABLE 3
Figure BDA0003317489990000251
Further illustratively, the application program in the device a applies for the lane resources through a unified interface, such as the lane resource allocation interface. And in the lane resource application process, the service types applying for using the lane resources and the requested lane number are submitted. Then, as shown in fig. 5A, the allocation module 512 in the lanehub acquires the service type requested by the application program, determines the lane resource type corresponding to the service type, and allocates the lane resource corresponding to the service type to the application program. And if the service type is determined to be the high-bandwidth service, allocating one or more lanes included in the high-bandwidth lane resources according to the requested lane number for the application program to call, and recording the allocation condition of the lane resources. The number of allocated lanes is the same as the number of lanes requested by the application (i.e., the lanehub allocates a corresponding number of lanes according to the number of lanes requested by the application). And the characteristics of the physical paths corresponding to each lane are different. Optionally, in the process that the application program requests the lane resources, only the service types of the lane resources applied for use can be submitted. Then, correspondingly, the lanehub allocates a default amount of lane resources, such as a lane, to the application in the course of allocating the lane resources.
As shown in table 4 below, lane12 is allocated to the application program corresponding to service 1, and the allocation is recorded.
TABLE 4
Lane numbering …… Rating of Preference is given to Distributing traffic
1 …… 10 Non-preferred NA
12 …… 90 Preference is given to Service 1
18 …… 100 Preference is given to Service 2
…… …… …… …… ……
In some embodiments, as shown in fig. 5A, the allocation module 512 in the lanehub may further obtain the lane resource quality measurement result monitored by the local end monitoring module 511, and may rank the lane resources according to the quality measurement result. For example, the allocating module 512 determines the lane resource categories according to the lane tags, and then scores lanes in different lane resource categories according to the lane resource quality measurement results to determine the priority. Such as allocating higher priority to a lane resource with better quality in the same lane resource category. Then, in the course of allocating the lane resources, after the lane resources of the category are matched, the lane resources with higher priority are preferentially allocated, and the lane resources with lower priority are not allocated for the moment.
For example, as shown in table 4 above, assume that lane1, lane12, and lane18 are lanes of the same lane resource category, where the quality measurement result of lane1 is poor. As shown in fig. 5A, the allocation module 512 in lanehub sets lane1 as a lower priority (e.g., rating of 10) in the lane resource category, and determines it as a non-preferred lane resource. Subsequently, when determining that the service type corresponds to the resource request of the lane resource type, the allocating module 512 may not allocate lane1 to the application program requesting the lane resource, thereby avoiding the service execution failure caused by poor quality of the lane resource.
For another example, the electronic device may also obtain an account book broadcasted by other electronic devices in the communication network, where the account book includes quality measurement result scores of the lane resources by the other electronic devices. And the Lanehub integrates the scores of the lane resources monitored by the local terminal according to the scores of the lane resources supported by the Lane resources recorded in the obtained broadcast account book, so as to obtain the integrated score of the lane resources, and the subsequent Lanehub allocates the lane resources according to the integrated score. Or, the electronic device does not separately score the lane resources, but determines the rating score of the lane resources after performing comprehensive evaluation according to the quality measurement result monitored by the local terminal and the obtained quality measurement result in the broadcast book, and then records the rating score in the table 4.
For example, as shown in the interface 101 shown in (a) of fig. 1, after detecting an operation (e.g., an operation of clicking the control 11) of the user to share a picture in the gallery application, the electronic device displays an interface 601 shown in (a) of fig. 6, where the interface is used to determine a photo selected by the user and a manner of sending the photo. Compared with the interface 102 shown in fig. 1 (b), the user may not select a specific communication method from a plurality of communication methods supported by the electronic device, the electronic device determines that the user needs to send the photo to the opposite device after detecting that the user clicks the sharing control 61, and an interface 602 shown in fig. 6 (b) may be displayed for prompting the user to confirm the sent device. If the user's operation of clicking on the device B control 62 is detected, it is determined that the user-selected photograph needs to be sent to device B.
Then, the gallery application in the electronic equipment can send a photo sending request to the lanehub, and carry the service type sent by the request in the photo sending request. The lanehub can determine the lane resources according to the service types, and if the data volume of the photos to be sent is large, the gallery application determines that the corresponding service types are high-bandwidth services, and then the lanehub matches the corresponding high-bandwidth lane resources according to the high-bandwidth services. Then, assuming that the number of lanes requested by the gallery application is 1, the lanehub allocates the highest-scoring lane of the high-bandwidth lane resources according to the number of lanes requested. Assume that the high-bandwidth lane resources include lane1-lane10. For example, the highest scoring lane is lane1, and lane1 may be assigned to the gallery application for transmitting the user-selected photo to device B. For another example, when the lanehub determines that the lane with the highest score at the local end is lane1, but the device B determines that the score of the device B for lane1 is low (e.g., lower than a preset threshold value) according to the information of the lane at the opposite end of the device B, the device B sequentially determines that the lane with the second score at the local end is the second, and if it is determined that the score of the device B for the lane with the second score meets the requirement (e.g., is greater than or equal to the preset threshold value), the lane with the second score may be allocated to the gallery application for transmitting the photo selected by the user to the device B. That is, the lanehub determines the comprehensive scores of the electronic devices at the two ends for the corresponding lane resources according to the local account book and the opposite-end account book, and allocates the optimal lane resources to the application program.
Therefore, the user can realize data transmission through simple operation. In the data transmission process, the electronic equipment can automatically determine the lane resources of the application, the operation difficulty of a user is reduced, the data transmission quality is improved, and the use experience of the user is improved.
In some embodiments, the method provided by the embodiment of the present application may also be applied to a process of establishing a connection by an electronic device. For example, assume that a user wants to establish a communication connection between electronic device a and electronic device B. In the prior art, after a user needs to select a specific application communication mode from a setting menu of an electronic device a, the electronic device a can establish communication connection with an electronic device B according to the communication mode selected by the user, and the user operation is complicated in the process of selecting the communication mode. By the method provided by the embodiment of the application, the user only needs to indicate the electronic equipment A to establish the connection with the electronic equipment B, and the electronic equipment A can automatically select the lane resources for establishing the communication connection with the electronic equipment B according to the user operation (for example, the idle lane resources with better quality are determined according to the use information of the lane resources in the communication network), so that the user operation difficulty is effectively reduced, and the user experience is improved.
For example, it is assumed that the user needs to establish a communication connection between the electronic device a and the electronic device B during the operation of the electronic device a. In the prior art, as shown in an interface 701 in fig. 7 (a), an electronic device a displays a plurality of supported communication modes (e.g., common communication modes such as Wi-Fi, bluetooth, and mobile network, and other communication modes supported by the corresponding electronic device a in more connections), and a user needs to select a required communication mode. The user needs to determine the communication mode supported by the electronic device B by himself and select among multiple communication modes, which makes the operation difficult. On the basis of the communication method provided in the embodiment of the present application, the interface 702 shown in fig. 7 (B) may be displayed on the electronic device a only to display a control (e.g., the connection control 71) for establishing a connection, and after detecting that the user clicks the connection control 71, the interface 602 shown in fig. 6 (B) may be displayed on the electronic device a to prompt the user to select an electronic device that needs to establish a communication connection, and if detecting that the user clicks the control 62, it is determined that a connection needs to be established with the device B (i.e., the electronic device B). Therefore, after the electronic equipment A determines that the user needs to establish communication connection between the electronic equipment A and the electronic equipment B, lane resources for communication can be automatically determined, the user does not need to select a communication mode, and the operation difficulty of the user is effectively reduced.
In other embodiments, the electronic device may further group the communication modes supported by the electronic device, and the user may select different groups of communication modes for communication based on the grouping result. For example, the communication method is assumed to be classified into a wired communication method and a wireless communication method. In the scenario shown in fig. 7, electronic device a may display both wired and wireless options for the user to select. For example, after detecting the operation of selecting the wireless connection option by the user, the electronic device a automatically determines the target lane resource in the lane resources corresponding to the wireless connection, and establishes the communication connection with the electronic device B through the target lane resource.
Therefore, the lane resources are managed in a grouping mode, and the management efficiency is improved. In addition, the user can select the corresponding group according to the requirement, and the use experience of the user is improved.
In some embodiments, the lanehub provides a uniform interface for application program calling, but data transmission interfaces of different communication modes between the devices are different, and after the electronic device determines the lane resources allocated to the application program, the electronic device determines the corresponding transmission mode according to the lane tag, and then determines whether the communication connection corresponding to the communication mode corresponding to the allocated lane resources is established with the opposite device. If not, the data can be sent again after the communication connection is established; if the communication connection is established, the data can be directly transmitted through the established communication connection.
For example, corresponding to the scenario shown in fig. 6, it is assumed that the lane resource allocated by the lanehub to the gallery application is lane1, and the communication method corresponding to lane1 is BLE communication. And after obtaining the allocated Lane resources, the gallery application requests a communication module in the electronic equipment to send the photo selected by the user, and the communication module determines that the communication mode corresponding to Lane1 is BLE communication according to the label of Lane 1. And, according to the operation of the user on the interface 602 shown in fig. 6 (B), it is determined that the peer device is device B. The communication module then determines whether the electronic device establishes a bluetooth connection with device B. If no bluetooth connection is established, a bluetooth connection establishment request may be sent to device B to establish a bluetooth connection. Thereafter, based on the Bluetooth connection, the gallery application sends the user-selected photograph to device B over lane 1. If the communication module determines that the Bluetooth connection between the electronic equipment and the equipment B is established, the gallery application directly sends the picture selected by the user to the equipment B through the lane 1.
In some embodiments, the electronic device may further determine the priority of the communication modes supported by the electronic device according to a user operation. For example, the user sets priority to use bluetooth to transmit data. Then, in the process of selecting the lane resources, the lane resources with the highest rating scores in the lanes of the bluetooth communication mode are preferentially selected to be allocated to the application program for use according to the user setting.
In some embodiments, the lane resources allocated by the lanerhub according to the service type and the requested lane number may be lane resources corresponding to one physical characteristic (for example, only one lane is allocated), or may be lane resources corresponding to multiple physical characteristics (for example, multiple lanes are allocated), where the number of the physical characteristics is equal to the requested lane number. Wherein the plurality of physical characteristics may correspond to the same or different communication means. For example, in a DBDC scenario, two Wi-Fi physical paths may both correspond to Wi-Fi2.4G communication; or one Wi-Fi physical path corresponds to a Wi-Fi2.4G communication mode, and the other Wi-Fi physical path corresponds to a Wi-Fi 5G communication mode.
Illustratively, the number of lanes requested by an application is 2, the traffic type is high bandwidth traffic, and the lanehub can select lanes corresponding to two different physical characteristics from the lane resources of the high bandwidth traffic to allocate to the application. The number of lanes included in the high-bandwidth lane resources in the lane resources may be one or more. If the number of lanes contained in the high-bandwidth lane resources is less than two, the lanehub determines that the number of the current lane resources does not meet the requirements of the application program, the lane resources cannot be allocated, and a lane resource application failure response can be sent to the application program. Optionally, the lane resource application failure response may also carry a failure reason, and the application program determines whether to apply for a smaller number of lane resources or to apply for lane resources of other service types according to the failure reason. If the number of lanes included in the high-bandwidth lane resources is greater than or equal to two, the lanehub determines that the number of the current lane resources meets the requirements of the application program, the lanehub obtains the rating scores of all the high-bandwidth lane resources as shown in the table 4, the high-bandwidth lane resources are ranked from high to low according to the rating scores, two lanes which are ranked in the front and have different physical properties are obtained according to the comprehensive rating scores of the electronic devices at the two ends, and the two lanes are allocated to the application program.
For example, suppose that the service type requested by the application is high bandwidth service, and the number of lanes requested is 2; the high-bandwidth lane resources managed by the Lanehub comprise lane resources of a Wi-Fi2.4G communication mode, lane resources of a Wi-Fi 5G communication mode and lane resources of a BLE communication mode, and each communication mode corresponds to one physical characteristic. Then, the Lanehub selects a lane with the highest rating score from the high-bandwidth lane resources of the Wi-Fi2.4G communication mode according to the comprehensive rating score of the electronic devices at the two ends, selects a lane with the highest rating score from the high-bandwidth lane resources of the Wi-Fi 5G communication mode, and selects a lane with the highest rating score from the high-bandwidth lane resources of the BLE communication mode. And then, sorting the three lanes with the highest rating scores according to the rating scores, selecting two lanes with the highest rating scores, and distributing the two lanes to the application program.
In some embodiments, a lane number determination rule is preconfigured in the application program to determine the number of lanes requested, and in the case that the allocated lane resources include multiple lanes, a usage rule for each lane. For example, the lane number determination rule includes determining the number of lanes required to be requested according to the size of the data volume to be transmitted. And if the data to be transmitted is a large file with the data volume exceeding a preset threshold, the application program determines to request two lanes according to the lane number determination rule. For another example, the distributed usage rules of the multiple lanes include that the data to be transmitted are equally distributed, each lane bears the corresponding data to be transmitted, and the application program transmits the data in parallel through the multiple lanes. And if the application program determines that the allocated lane resources comprise one lane of a Wi-Fi 5G communication mode and one lane of a BLE communication mode. The application program can equally divide the data to be transmitted, and in the process of transmitting half of the data through one lane of the Wi-Fi 5G communication mode, the other half of the data is transmitted through one lane of the BLE communication mode. Or dividing the proportion of the transmitted data to be transmitted according to the communication mode corresponding to the lane. The proportion can be a proportion which is pre-configured in an application program by a developer, or can also be a transmission proportion customized by a user, or can also be a proportion determined according to the communication quality of the lane, or can be a proportion determined by other methods. If the application program determines that the allocated lane resources comprise one lane of the Wi-Fi 5G communication mode and one lane of the BLE communication mode. The application program can divide the data to be transmitted into 3 parts, and in the process of transmitting two thirds of data through one lane of the Wi-Fi 5G communication mode, the other one third of the data is transmitted through one lane of the BLE communication mode.
Correspondingly, assuming that the number of lanes used for transmitting data is multiple, after the peer electronic device receives data through the multiple lanes, the peer electronic device splices the received data to obtain complete transmission data. The data splicing method may refer to the prior art, and this is not specifically limited in the embodiments of the present application.
In other embodiments, if the allocated lane resources include multiple lanes, the transmitted data may be segmented and spliced by a communication module or a management module in the electronic device. For example, application a in electronic device a sends data to application B in electronic device B. Then the application A sends the data to be transmitted to a communication module in the electronic equipment A, and the communication module divides the data according to the number of the lane resources distributed by the lane hub in the electronic equipment A and transmits the data. Correspondingly, after receiving the data, the communication module in the electronic device B splices the data and sends the spliced data to the application B.
In some embodiments, as described above, the lane hub can allocate multiple lanes to the same service in the frequency domain through statistical multiplexing in a counting manner, so as to improve transmission efficiency. In addition, the lane hub can also perform statistical multiplexing according to the bandwidth in a time domain angle, and allocate one lane to bear a plurality of services. For example, a plurality of services use the same lane according to the time sequence. For example, the high priority service with higher time limit requirement uses lane preferentially, and then the low priority service with lower time limit requirement uses lane later. Therefore, the completion of the service is not influenced, the interference problem caused by simultaneously executing a plurality of services is avoided, and the application transmission quality is improved.
In some embodiments, the lanehub maintains an ledger that records lane resources of the electronic device. For example, the lanehub maintains the account book through the monitoring module 511 and the distribution module 512 shown in fig. 5A, and the content recorded in the account book includes the content recorded at the local end as shown in the above tables 3 and 4 and the content corresponding to the target lane recorded by other electronic devices in the communication network received through broadcasting as shown in the above tables 3 and 4. The target lane is a lane corresponding to a communication mode supported by the electronic equipment.
In some embodiments, the lanehub monitors the use condition of the lane resources after allocating the lane resources to the application program, and can adjust the lane resources to meet the data transmission requirement of the application program (for example, the packet loss rate is smaller than a preset threshold) when detecting that the communication quality is poor. Adjusting the lane resources comprises adjusting parameters of the lane resources, switching the lane resources and the like. In the data transmission process, the lane hub can adjust the lane resources once or for many times, and the transmission quality is ensured.
Illustratively, as shown in fig. 5B, the lane hub allocates lane resources to the application at scheduling point 1 according to the request of the application through the allocation module 512 shown in fig. 5A. Thereafter, the lanehub collects information on the data transmission quality measured by the measurement module 521 in the network driver 52 during transmission by the monitoring module 511 shown in fig. 5A. For example, as shown in fig. 5B, it is assumed that the network transmission protocol applied in the data transmission process is Transmission Control Protocol (TCP)/network protocol (IP), and in the TCP/IP protocol, the network transmission process includes 4-layer network protocol transmission as shown in fig. 5B, such as including an application layer, a transport layer, a network layer and a physical link layer. The specific protocol content corresponding to each layer may refer to the prior art, and is not described herein again. The monitoring module 511 can obtain information such as quality of experience (QoE) information, protocol load information, network card load information, and QoE information of a physical channel of an application through information collection. Then, the lanehub analyzes the use of the lane resources based on the collected information by the allocation module 512 shown in fig. 5A, and determines whether the lane resource adjustment is required.
As another example, as shown in fig. 5B, in the lane resource usage analysis process, the allocation module 512 may analyze the usage of the lane resource from a time domain perspective, a quality perspective, a decision and execution perspective.
For example, the lane resources are divided based on the frequency domain angle by using the channel as granularity, and a time-sharing strategy can be adopted to allow different transmission tasks to call the same lane resources in a time-sharing manner according to the time sequence. For example, the allocating module 512 allocates the lane resources by using a time-sharing strategy such as Wi-Fi hierarchical clock technology, BR bluetooth hierarchical clock technology, and the like. Then, the monitoring module 511 needs to monitor the use of the lane resources from the time domain, and the allocating module 512 also needs to determine whether the allocation of the lane resources needs to be adjusted from the time domain.
For another example, the allocating module 512 can obtain the quality measurement results shown in table 3 above, perform quality of service (QoS) analysis on the lane resources, determine whether to adjust the QoS policy (e.g., adjust the QoS standard for evaluating the lane resources, etc.), and analyze the usage of the lane net.
For another example, the allocation scheduling condition of the lane resources is monitored, such as the lane resource scheduling condition of each lane hub in the lane net is monitored, and whether the use of the currently applied lane resources is affected is determined. For example, qoS coordination can be realized, and decision adjustment including service speed limitation, avoidance and the like can be performed on low-priority services, so that long-time services (such as screen projection services and the like) are not affected by short-time services (such as picture sharing services and the like), or services with higher transmission quality requirements are not affected by other services.
Then, as shown in fig. 5B, the lanehub determines whether the lane resources need to be reallocated according to the lane resource usage analysis result through the allocation module 512 shown in fig. 5A. In the course of scheduling the lane resources, there may be multiple scheduling points 2, that is, the allocated lane resources may be adjusted multiple times according to the actual usage of the lane resources, so as to ensure the communication experience of the application. And the Lane resources are dynamically switched, so that the continuity of the service for guaranteeing the available Lane resources can be predicted and replaced in time when part of the Lane resources are unavailable.
It should be noted that, in conjunction with fig. 5A and 5B, after collecting the information of lane resources in lane net, monitoring module 511 will synchronously update the local ledger information, for example, update the contents recorded in table 3 and table 4. The allocation module 512 can not only adjust the lane resources according to the monitored lane resource information, but also allocate the lane resources based on the latest usage of the lane resources in the subsequent lane resource allocation process, thereby effectively improving the communication quality.
Furthermore, the layered monitoring of the TPC/IP protocol illustrated in fig. 5B is merely an exemplary illustration. In an actual application scenario, the lane hub may also perform data transmission through other network protocols, and then the network layering results that need to be monitored may be the same or different, such as a layer 7 network protocol, a layer 5 network protocol, and the like, which is not specifically limited in this application embodiment.
In some embodiments, the lanehub ensures the data transmission quality of the application by adjusting the lane resource parameters.
For example, as shown in fig. 5A, the monitoring module 511 in the lanehub monitors the use condition of the lane resources allocated to the application by the allocation module 512, for example, the monitoring module 511 obtains the quality measurement result of the lane resources by the measurement module 521 in the network driver 52 in real time. Moreover, the monitoring module 511 can also acquire an account book broadcasted by the opposite-end electronic device for communication, and determine the quality measurement result of the lane resource supported by the monitoring module recorded therein. Thereafter, the adjustment module 513 is notified to adjust the use of the lane resources. For example, in the process that the device a and the device B perform data transmission through the lane1, the adjustment module 513 in the device a determines that the parameters of the lane1 need to be adjusted according to the quality measurement result of the lane resources, sends an adjustment instruction to the network driver 52, and after receiving the adjustment instruction, the network driver 52 performs parameter adjustment on the lane1 through the execution module 522.
For example, in the process that the lanehub sends the adjustment instruction through the adjustment module 513, the allocation module 512 further allocates the latest lane resource of the communication scheme with the same physical characteristics as the lane resource applied by the current application program according to the quality measurement result of the lane resource, and then the execution module 522 instructs the application program to use the newly allocated lane resource for data transmission after receiving the adjustment instruction. If the lane segmentation granularity is assumed to be the channel, the application program is instructed to switch the channel in the same communication mode for data transmission.
For example, suppose that the Wi-Fi2.4G communication mode includes a physical path, and the lane allocated by the lanehub to the application is a lane in the Wi-Fi2.4G communication mode. And when the lanehub monitors that the quality of the lane does not meet the data transmission requirement, obtaining the rating scores of other lanes in the Wi-Fi2.4G communication mode. If the lane with the highest rating score meets the data transmission requirement, the lane with the highest rating score can be allocated to the application program, and the application program is instructed to release the lane with poor original quality. Optionally, the application may choose whether to switch lane.
For another example, the adjusting module 513 sends an adjustment indication to the executing module 522, which is used to indicate to adjust the power of the lane resource. For example, assuming that the lane slicing granularity is a channel, the greater the channel power of the lane, the stronger the signal strength, and the better the data transmission quality under the same other conditions. Then the lanehub sends a power adjustment indication to the execution module 522 when determining that lane parameter adjustment is needed, so as to improve signal strength and improve data transmission quality.
It should be noted that power cannot be adjusted by the lane resources in some communication modes, or transmission quality cannot be improved after power adjustment, and the lanehub may determine whether power adjustment is needed or not, or determine which parameters need to be adjusted, according to the type of the communication mode. For example, the USB wired communication method cannot improve the data transmission quality by adjusting the channel power as the Wi-Fi communication method.
Therefore, the use condition of the lane resources is monitored, and when the quality of the lane resources is poor, the parameters of the lane resources can be adjusted to ensure that the application program provides a better network transmission effect in the data transmission process. And further avoid the data transmission failure caused by poor quality of the lane resources.
It should be noted that the channel adjustment and the power adjustment are only exemplary, and when determining that the quality of the lane resources is poor, the lane resources can also meet the data transmission requirements of the application program by adjusting parameters of other lane resources. And e.g. adjusting the communication slice to complete the adjustment of the lane resource parameters.
In other embodiments, the lanehub ensures the data transmission quality of the application program by lane resource switching. For example, after the lanehub adjusts the lane resource parameters, the quality of the lane resources is still poor, and the data transmission requirements of the application program cannot be met, the transmission mode supported by the peer device for data transmission may be determined according to the local-side lane information recorded in the local book and the lane tag in the peer-side lane information obtained by receiving the broadcast message, and the lane resources of other transmission modes supported by both the two electronic devices may be directly switched to perform data transmission, so as to improve the transmission quality. For another example, when determining that the quality of the lane resources is poor, the lane hub determines, according to the lane tag, a transmission mode supported by the peer device for data transmission, and directly switches the lane resources of other transmission modes supported by both the two electronic devices for data transmission, so as to improve the transmission quality.
For example, as shown in fig. 5A, after the adjusting module 513 in the lanehub51 adjusts the lane resource parameters through the executing module 522, it is determined that the lane resource quality measurement result monitored by the monitoring module 511 is still poor, and according to the account book recorded in the lanehub51 and the obtained account book broadcasted by other electronic devices in the communication network, the communication method supported by the peer electronic device of the application corresponding to the lane resource with poor quality is determined according to the communication method recorded in the lane tag, so as to determine the lane resource condition of the communication method the same as the communication method supported by the peer electronic device. Then, the adjusting module 513 determines that the communication quality is improved by adjusting the communication method, and notifies the allocating module 512 to select a lane resource in other communication methods supported by both the two electronic devices, and reallocates the lane resource with better quality. The adjusting module 513 obtains the lane resources of the other communication method with better quality, and instructs the execution module 522 in the network driver 52 to adjust the lane resources for the application program communication.
For example, assuming that the first electronic device and the second electronic device support a Wi-Fi2.4G communication mode and a BR bluetooth communication mode, an application a in the first electronic device sends data to the second electronic device through a lane resource in the Wi-Fi2.4G communication mode, and when data transmission is not completed, other electronic devices join a communication network including the first electronic device and the second electronic device through the Wi-Fi2.4G communication mode, which results in a poor network environment of the Wi-Fi2.4G communication mode and does not meet the requirement of the application a (for example, data transmission needs to be completed within 1 hour). The Lanehub in the first electronic device monitors the use condition of the lane resources, determines that the current quality of the lane resources does not meet the data transmission requirement of the application A, and can determine other communication modes supported by both the first electronic device and the second electronic device, such as a BR Bluetooth communication mode, according to the lane tags recorded in the account book. And then, the lanehub in the first electronic device determines that the lane resources of the BR Bluetooth communication mode meet the data transmission requirement of the application A, and allocates the lane resources of the BR Bluetooth communication mode for the application A, so that the data transmission quality is improved.
For another example, the communication network includes a plurality of electronic devices such as the electronic device 1, the electronic device 2, the electronic device 3, and the electronic device 4. The service 1 is executed between the electronic device 1 and the electronic device 2, the service 2 is executed between the electronic device 1 and the electronic device 3, the service 3 is executed between the electronic device 3 and the electronic device 4, and the service 1, the service 2, and the service 3 are different data transmission services, for example. Suppose that the lane hub in each electronic device allocates lane resources for the respective corresponding services, for example, the lane resource allocated to service 1 is lane1, and the lane resource allocated to service 2 is lane 2. Then, in the course of the lane resources allocated for the service 3, the lane hub3 in the electronic device 3 determines that the selectable lane resources are lane1, but lane1 is being used to carry the service 1. The lane hub3 determines that the priority of the service 1 is lower than that of the service 3, and may negotiate with the lane hub 1 in the electronic device 1 and/or the lane hub 2 in the electronic device 2, or directly seize the lane1, so that the service 1 switches to use other lane resources. If the final determination is made, the lane resource allocated for the service 3 is lane1, and the lane resource allocated for the service 1 is lane4; or the lane resource allocated to the service 1 is lane2, and shares the lane resource with the service 2.
It should be noted that, after determining that the data transmission quality is improved by the method of switching the communication mode, how to select the lane resource in the communication mode after switching is performed by the lanerhub, see the description about selecting the lane resource in the above embodiment, and no further description is given here.
Therefore, the use condition of the lane resources is monitored, and when the quality of the lane resources is poor, the lane resources of the communication modes supported by the electronic equipment at the two ends of data transmission can be switched, so that the application program can provide a good network transmission effect in the data transmission process. And further avoid the data transmission failure caused by poor quality of the lane resources.
Moreover, as described above, no matter in the process that the lanehub meets the data transmission requirement of the application program by adjusting the lane resource parameters or by switching the lane resources of the communication mode supported by the electronic devices at both ends of the data transmission, the user does not need to participate in the adjustment, so that the electronic devices can provide the optimal data transmission experience for the user without the perception of the user. For example, after the user selects the mode of transmitting the photos through the network on the interface 602 shown in fig. 6 (b), the electronic device can automatically select the optimal lane resource to transmit the photos without performing other operations, so as to provide the optimal photo transmission experience for the user.
Furthermore, the electronic equipment performs unified planning on all network resources through the Lanehub, and the same frequency interference is avoided. In addition, under the condition of co-channel interference, the co-channel interference can be reduced through parameter adjustment; or, eliminating co-channel interference through lane resource switching.
In some embodiments, the lanehub monitors the use condition of the lane resources, and when it is determined that the better lane resources exist, the lane resources can be actively switched under the condition that the user does not perceive the lane resources, so that the network transmission quality is further improved.
Illustratively, the electronic devices in the communication network broadcast the ledger according to a preset period (preset periods corresponding to different electronic devices are the same or different), and accordingly, as shown in fig. 5A, the monitoring module 511 in the lanehub51 can acquire ledgers broadcast by other electronic devices, and in the process of monitoring the allocated lane resources, determine that there are other lane resources with better quality, and notify the adjusting module 513 to adjust the lane resources. And the adjusted lane resources and the lane resources before adjustment have the same or different corresponding communication modes.
It should be noted that the division of the modules in the lanehub51 and the network driver 52 shown in fig. 5A is only an exemplary description, and other division of the modules may be used to implement the functions of the lanehub and the network driver. If the lanehub51 and the network driver 52 are not split into modules, the lanehub51 and the network driver 52 directly implement the corresponding functions in the above embodiments.
In some embodiments, the lanehub allocates a corresponding lane resource to the application program after it initially receives a service request of a certain type from the application program. Then, after receiving the service request of the type sent by the application program again, the subsequent lanehub allocates the previously allocated lane resource to the application program according to the history. Thus, the lane resource allocation efficiency of the lanehub can be improved, and the data transmission efficiency is improved.
Further, in the application data transmission process, if the lane resources corresponding to the service type service are adjusted by the lanehub, the use records of the lane resources in the account book can be updated, and the adjusted lane resources are recorded. Then, when the subsequent Lanehub receives the Lane resource request again, the Lane resources are allocated according to the latest record.
Therefore, the electronic equipment carries out unified management and planning on the network resources, divides and schedules the network resources by taking the lane as a unit, and realizes the comprehensive scheduling of wired resources and wireless resources, so that the application program can not be limited by an independent interface of a communication mode. The developer can directly develop the application program according to the service type; the electronic equipment can directly allocate corresponding lane resources according to the service type requested by the application program; the user does not need to select the communication mode as shown in fig. 1, and the operation difficulty of the user is reduced. And moreover, the electronic equipment can distribute lane resources with better quality for the application program according to the network environment, and the network transmission quality is improved.
In addition, in the data transmission process, the electronic equipment can dynamically adjust the lane resources directly by a parameter adjustment method or a communication mode adjustment method under the condition that a user does not sense, so that the data transmission quality is ensured, and the user experience is improved.
Exemplarily, fig. 8 is a flowchart of a communication method provided in an embodiment of the present application. As shown in fig. 8, the method includes S801-S802.
S801, when the first electronic device determines that data needs to be sent to the second electronic device, the first electronic device determines a target lane for data transmission in the first lane, the second lane and the third lane.
In some embodiments, the first lane, the second lane, and the third lane are lanes supported by the first electronic device, the first lane corresponding to a first type of network path, the second lane corresponding to a first channel in a second type of network path, and the third lane corresponding to a second channel in the second type of network path.
For example, when the first electronic device needs to transmit data, it may select a lane resource for the current data transmission from the lane resources corresponding to all communication methods supported by the local terminal. For example, it is assumed that the first electronic device supports two communication modes, namely a BLE communication mode and a Wi-Fi2.4G communication mode, wherein the first type of network path is a network path of the BLE communication mode, and the second type of network path is a network path of the Wi-Fi2.4G communication mode. Then, the first lane corresponds to 78 channels included in the BLE communication scheme, and the second lane and the third lane correspond to 78 channels included in the Wi-Fi2.4G communication scheme.
It should be noted that the first type of network path and the second type of network path are used to represent different types of physical characteristic paths.
In some embodiments, when the first electronic device determines that data needs to be sent to the second electronic device, the first electronic device determines a service type corresponding to the data. And determining the target lane in the first lane, the second lane and the third lane according to the service types.
Illustratively, the traffic types include, for example, high bandwidth traffic, high bandwidth low latency, low bandwidth low latency traffic, low latency traffic high reliability, and the like. The communication network including the first electronic device and the second electronic device may further include a central device (i.e., a central node), where the central device may be the first electronic device, the second electronic device, or another device in the communication network. And the central equipment classifies the lane resources according to the service types, and the subsequent electronic equipment allocates the lane resources with the lane resource types matched with the service types to the corresponding application programs for use in the process of allocating the lane resources. For example, the lane resource classification result includes a high-bandwidth lane resource, a high-bandwidth low-delay lane resource, a low-bandwidth low-delay lane resource, and a low-delay high-reliability lane resource.
In some embodiments, when the first electronic device determines that data needs to be sent to the second electronic device, before determining the target lane for data transmission among the first lane, the second lane, and the third lane, the first electronic device needs to acquire first usage information of the first lane, the second lane, and the third lane, which are locally recorded, and acquire second usage information of the first lane, the second lane, and the third lane, which are broadcast by a plurality of electronic devices in a communication network including the first electronic device. And the first electronic equipment determines the target lane according to the first use information, the second use information and the service type.
Illustratively, an account book for recording lane use conditions is preset in the electronic equipment, wherein the account book comprises the scoring of the electronic equipment on lane resource quality measurement results. When the first electronic device needs to send data, the first electronic device obtains a local account book and account books broadcasted by other electronic devices in the communication network. And the first electronic equipment integrates the scores of the lane resources monitored by the local terminal according to the scores of the lane resources supported by the first electronic equipment recorded in the broadcast account book, so as to obtain the integrated scores of the lane resources, and the subsequent first electronic equipment allocates the lane resources according to the integrated scores. And if the first electronic equipment obtains the target lanes with previous scores and different types according to the scores, wherein the first number is the number of lanes required for data transmission.
In other embodiments, the first electronic device locally stores a first ledger and a second ledger, the first ledger is used to record usage information of the first lane, the second lane and the third lane, and the second ledger is used to record usage information of all lanes in the communication system including the first electronic device. When the first electronic device determines that data needs to be sent to the second electronic device, before the target lane used for data transmission is determined in the first lane, the second lane and the third lane, the first electronic device needs to acquire first use information of the first lane, the second lane and the third lane recorded in the first account book and acquire second use information of the first lane, the second lane and the third lane recorded in the second account book. Then, the first electronic device may determine the target lane according to the first usage information, the second usage information, and the traffic type.
That is, the electronic device stores two accounts, one for recording usage information of the lane resources supported by the electronic device, and the other for recording usage information of all the lane resources included in the communication system (lane net) as a public account. The public accounts stored in each electronic device in the communication system are synchronized. The electronic device may determine the optimal lane resource based on the latest lane usage information recorded locally and the lane usage information recorded in the public ledger. Or the electronic equipment directly determines the optimal lane resource according to the use information of the lane recorded in the public ledger.
In some embodiments, the first usage information or the second usage information includes one or more of: the use times of the lane, the service type corresponding to the historical transmission data of the lane and the quality parameter information of the lane.
In some embodiments, the number of target lanes is one or more; wherein, under the condition that the number of the target lanes is multiple, the multiple target lanes are channels of different types; in the case that the number of the target lanes is one, the target lanes are transmitting first data; or, in the case that the number of the target lanes is one, the target lanes are idle.
For example, the lane hub can realize that multiple lanes are allocated to the same service in a frequency domain through statistical multiplexing of a counting mode, so that the transmission efficiency is improved. Then the number of target lanes may be one or more.
For another example, the lane hub may perform statistical multiplexing according to the bandwidth in a time domain, and allocate one lane to carry multiple services. For example, a plurality of services use the same lane according to the time sequence. For example, the high priority traffic with higher time limit requirement uses lane first, and then the low priority traffic with lower time limit requirement uses lane later. Therefore, the completion of the service is not influenced, the interference problem caused by simultaneously executing a plurality of services is avoided, and the application transmission quality is improved. Then, in the case that the priority of the data to be transmitted is low, the lane hub may allocate a lane which is transmitting first data with a higher priority to the service, and after the transmission of the first data with a higher priority is completed, the first electronic device may transmit the data through the target lane. Or the priority of the data to be transmitted is higher, the target lane which is transmitting the first data can be preempted, the data to be transmitted is transmitted through the target lane, and then the first data is transmitted.
It can be appreciated that if there are free lane resources and the free lane resources meet the requirements for transmitting data to be transmitted, the lane resources can be determined as a target lane. For example, if the first electronic device has a lane resource corresponding to a wired transmission mode (e.g., a USB transmission mode) and is idle, it may be preferentially determined that the lane resource corresponding to the wired transmission mode is the target lane.
S802, the first electronic equipment sends data to the second electronic equipment through the target lane.
In some embodiments, the first electronic device monitors the use condition of the target lane and obtains third use information of the target lane. And updating the locally recorded use information of the target lane into third use information. Third usage information is broadcast.
In this way, the electronic equipment in the communication network realizes the interaction of the lane use information by broadcasting the lane use information, and further, when the electronic equipment needs to send data, the electronic equipment can determine the target lane according to the received lane use information broadcasted by other electronic equipment.
In some embodiments, the broadcasting the third usage information comprises: and broadcasting the third use information under the condition that the use time length of the target lane exceeds the preset time length. Or, according to a preset period, broadcasting the third usage information.
Illustratively, synchronization of the lane hub reconciliation is divided into strong synchronization and weak synchronization. Optionally, the lane hub may determine, according to the service type carried by the lane resource, that the manner of synchronizing the ledger is strong synchronization or weak synchronization.
For example, some services need to maintain communication for a long time, or have a large amount of data, or need to maintain low-interference transmission, etc. Therefore, after the lane hubs allocate the lane resources for the services, the use conditions of the allocated lane resources need to be synchronized to other lane hubs in the lane net, so that the other lane hubs avoid interference with the lane resources in the process of allocating the lane resources. Such lane resources are those that require strong synchronization.
For another example, after the lane resources are temporarily preempted for use, the lane resources are released again by the lane hub within a short time after the lane resources are locally updated by the lane hub, and the lane hub updates the usage of the lane resources to the previous state or directly cancels the previous update, so that if broadcast synchronization is performed for each update, the power consumption is increased. Consequently, can set up and predetermine the cycle, carry out the account book broadcast according to predetermineeing the cycle, when guaranteeing synchronous promptness and credibility of account book, can not increase unnecessary consumption because of the synchronization repeatedly again. Such lane resources are those that require weak synchronization.
Therefore, through strong synchronization or weak synchronization, records of the use conditions of the lane resources by each lane hub in the lane net are ensured to be uniform, and the problem of lane resource allocation conflict caused by non-uniform use conditions of the lane resources is solved.
In some embodiments, after allocating the lane resources (i.e., the target lane) to the application, the lanewab in the first electronic device monitors the use condition of the lane resources, and when it is detected that the communication quality is poor, the lane resources can be adjusted to meet the data transmission requirement of the application (e.g., the packet loss rate is smaller than a preset threshold). Adjusting the lane resources comprises adjusting lane resource parameters, switching the lane resources and the like.
For example, when the quality of part or all of the lans in the target lans does not meet the preset condition, the parameters of the first target lane with the quality not meeting the preset condition are adjusted.
Illustratively, the power of the first target lane with the quality not meeting the preset condition is adjusted. Or determining the type corresponding to the first target lane, determining a second target lane which corresponds to the service type, has the same type as the first target lane and meets the preset conditions in the first lane, the second lane and the third lane according to the service type and the type corresponding to the first target lane, and switching the first target lane to be the second target lane.
For another example, after the parameters are adjusted, the quality of part or all of the first target lane does not meet preset conditions; the method further comprises the following steps: and acquiring fourth use information of the lane broadcasted by the second electronic equipment. And determining the lane of the target type supported by the first electronic equipment and the second electronic equipment according to the fourth use information. And determining a third target lane of which the quality meets the preset conditions in the lanes of the target types, and taking the lane which does not meet the preset conditions after the adjustment parameters in the first target lane are switched as the third target lane.
Therefore, the electronic equipment uniformly manages and plans the network resources, and divides and schedules the network resources by taking lane as a unit, so that the application program can be not limited by an independent interface of a communication mode. The developer can directly develop the application program according to the service type; the electronic equipment can directly allocate corresponding lane resources according to the service type requested by the application program; the user does not need to select the communication mode as shown in fig. 1, and the operation difficulty of the user is reduced. And moreover, the electronic equipment can distribute lane resources with better quality for the application program according to the network environment, and the network transmission quality is improved.
In addition, in the data transmission process, the electronic equipment can dynamically adjust the lane resources directly by a parameter adjustment method or a communication mode adjustment method under the condition that a user does not sense, so that the data transmission quality is ensured, and the user experience is improved.
The communication method provided by the embodiment of the present application is described in detail above with reference to fig. 4A to 8. The communication device provided by the embodiment of the present application is described in detail below with reference to fig. 9.
In a possible design, fig. 9 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. As shown in fig. 9, the electronic device 900 may include: a processing unit 901 and a transceiving unit 902. The electronic device 900 may be used to implement the functionality of the electronic device involved in the method embodiments described above.
Optionally, the processing unit 901 is configured to enable the electronic device 900 to execute S801 in fig. 8.
Optionally, the transceiving unit 902 is configured to support the electronic device 900 to perform S802 in fig. 8.
The transceiver unit may include a receiving unit and a transmitting unit, may be implemented by a transceiver or a transceiver-related circuit component, and may be a transceiver or a transceiver module. For the purpose of implementing the corresponding flow of the communication method described in the foregoing method embodiment, all relevant contents of each step related to the foregoing method embodiment may be referred to as a functional description of the corresponding functional unit, and for brevity, details are not described herein again.
Optionally, the electronic device 900 shown in fig. 9 may further include a storage unit (not shown in fig. 9) in which programs or instructions are stored. When the processing unit 901 and the transceiver unit 902 execute the program or the instructions, the electronic device 900 shown in fig. 9 is enabled to execute the communication method described in the above method embodiment.
Technical effects of the electronic device 900 shown in fig. 9 may refer to technical effects of the communication method described in the foregoing method embodiments, and are not described herein again.
Besides the form of the electronic device 900, the technical solution provided in the present application may also be a functional unit or chip in the electronic device, or a device used in cooperation with the electronic device.
An embodiment of the present application further provides a chip system, including: a processor coupled to a memory, the memory for storing a program or instructions, which when executed by the processor, causes the system-on-chip to implement the method in any of the method embodiments described above.
Optionally, the number of processors in the system on chip may be one or more. The processor may be implemented by hardware or by software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like. When implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
Optionally, the memory in the system-on-chip may also be one or more. The memory may be integrated with the processor or may be disposed separately from the processor, and the embodiments of the present application are not limited thereto. The memory may be a non-transitory processor, such as a read only memory ROM, which may be integrated on the same chip as the processor or may be separately disposed on different chips.
The system-on-chip may be a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), a system on chip (SoC), a Central Processing Unit (CPU), a Network Processor (NP), a digital signal processing circuit (DSP), a Micro Controller Unit (MCU), a Programmable Logic Device (PLD), or other integrated chips.
It will be appreciated that the steps of the above described method embodiments may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in a processor.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program runs on a computer, the computer is caused to execute the relevant steps described above, so as to implement the communication method in the foregoing embodiment.
The embodiments of the present application further provide a computer program product, which when run on a computer, causes the computer to execute the relevant steps described above, so as to implement the communication method in the embodiments described above.
In addition, the embodiment of the application also provides a device. The apparatus may be embodied as a component or a module, which may include one or more processors and memory coupled together. Wherein the memory is for storing a computer program. The computer program, when executed by one or more processors, causes an apparatus to perform the communication method in the above-described method embodiments.
The apparatus, the computer-readable storage medium, the computer program product, or the chip provided in the embodiments of the present application are all configured to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved by the method can refer to the beneficial effects in the corresponding methods provided above, and are not described again here.
The steps of a method or algorithm described in connection with the disclosure of the embodiments of the application may be embodied in hardware or in software instructions executed by a processor. The software instructions may consist of software modules that may be stored in Random Access Memory (RAM), flash memory, read Only Memory (ROM), erasable Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), registers, hard disk, a removable disk, a compact disc read only memory (CD-ROM), or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an Application Specific Integrated Circuit (ASIC).
Through the above description of the embodiments, those skilled in the art may clearly understand that, for convenience and simplicity of description, only the division of the above functional modules is illustrated. In practical application, the functions can be distributed by different functional modules according to requirements; i.e. the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
In the several embodiments provided in the present application, it should be understood that the disclosed method may be implemented in other manners. The above-described apparatus embodiments are merely illustrative. For example, the division of the modules or units is only a logical function division, and there may be another division manner in actual implementation; for example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of modules or units through some interfaces, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The computer readable storage medium includes, but is not limited to, any one of the following: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (21)

1. A communication system, the communication system comprising: a first electronic device and a second electronic device;
the first electronic equipment is used for determining a target lane for transmitting data in the first logic path lane, the second lane and the third lane when the first electronic equipment determines that the data needs to be transmitted to the second electronic equipment; said first lane corresponds to a first type of network path, said second lane corresponds to a first channel in a second type of network path, and said third lane corresponds to a second channel in a second type of network path;
the first electronic equipment is further used for sending the data to the second electronic equipment through the target lane;
and the second electronic equipment is used for receiving the data sent by the first electronic equipment through the target lane.
2. The system of claim 1,
the first electronic equipment is further used for monitoring the use condition of the target lane and obtaining third use information of the target lane;
updating the locally recorded use information of the target lane into the third use information;
broadcasting the third usage information.
3. The system of claim 2,
the first electronic device is specifically configured to broadcast the third usage information when the usage duration of the target lane exceeds a preset duration;
or broadcasting the third use information according to a preset period.
4. The system according to any of claims 1-3, wherein said first electronic device maintains a first ledger and a second ledger, said first ledger is used to record usage information of said first lane, said second lane and said third lane, and said second ledger is used to record usage information of all lanes in said communication system.
5. The system according to claim 3 or 4, wherein the communication system further comprises: a third electronic device;
and the third electronic device is configured to receive the third usage information, and synchronize, according to the third usage information, usage information of the target lane recorded in a second account book stored locally.
6. The system of claim 5,
the first electronic device, the second electronic device, the third electronic device, and a target device for adjusting a lane resource type, where the target device is any one of the first electronic device, the second electronic device, and the third electronic device;
the target device is configured to acquire usage information of a fourth lane broadcasted by the first electronic device, the second electronic device, and the third electronic device, and adjust a lane resource type of a part or all of lanes in the fourth lane according to the usage information of the fourth lane, where the lane resource type includes at least one of a high-bandwidth lane resource, a high-bandwidth low-latency lane resource, a low-bandwidth low-latency lane resource, and a low-latency high-reliability lane resource.
7. The system according to any one of claims 1-5, wherein said communication system further comprises: a central device;
the central device is configured to acquire usage information of a fifth lane broadcasted by the electronic device in the communication network, and adjust a lane resource type of a part or all of the lanes in the fifth lane according to the usage information of the fifth lane, where the lane resource type includes at least one of a high-bandwidth lane resource, a high-bandwidth low-latency lane resource, a low-bandwidth low-latency lane resource, and a low-latency high-reliability lane resource.
8. The system according to any one of claims 1-7, wherein the number of target lanes is one or more; wherein, under the condition that the number of the target lanes is multiple, the multiple target lanes are channels of different types; in the case that the number of the target lanes is one, the target lanes are transmitting first data; or, the target lane is idle when the number of the target lanes is one.
9. A communication method applied to a first electronic device, the method comprising:
when data needs to be sent to second electronic equipment, determining target lane used for transmitting the data in a first logic lane, a second lane and a third lane, wherein the first lane corresponds to a first type of network path, the second lane corresponds to a first channel in a second type of network path, and the third lane corresponds to a second channel in the second type of network path;
and sending the data to the second electronic equipment through the target lane.
10. The method as recited in claim 9, wherein determining, by the first electronic device, a target lane for transmitting data among the first lane, the second lane, and the third lane when determining that the data needs to be sent to the second electronic device comprises:
when data needs to be sent to second electronic equipment is determined, determining a service type corresponding to the data;
and determining the target lane in the first lane, the second lane and the third lane according to the service type.
11. The method as recited in claim 10, wherein, before the first electronic device determines a target lane for transmitting data among the first lane, the second lane, and the third lane when the first electronic device determines that data needs to be sent to a second electronic device, the method further comprises:
obtaining locally recorded first usage information of the first lane, the second lane, and the third lane, and obtaining second usage information of the first lane, the second lane, and the third lane broadcast by a plurality of electronic devices in a communication network including the first electronic device;
determining the target lane in the first lane, the second lane and the third lane according to the service types, including:
and determining the target lane according to the first using information, the second using information and the service type.
12. The method of claim 10, wherein a first ledger and a second ledger are locally maintained by the first electronic device, the first ledger is used for recording usage information of the first lane, the second lane, and the third lane, and the second ledger is used for recording usage information of all lanes in a communication system including the first electronic device;
when the first electronic device determines that data needs to be sent to a second electronic device, before determining a target lane for transmitting the data in the first lane, the second lane, and the third lane, the method further includes:
acquiring first use information of the first lane, the second lane and the third lane recorded in the first account book, and acquiring second use information of the first lane, the second lane and the third lane recorded in the second account book;
determining the target lane in the first lane, the second lane, and the third lane according to the traffic type, including:
and determining the target lane according to the first using information, the second using information and the service type.
13. The method according to claim 11 or 12, wherein the first usage information or the second usage information comprises one or more of the following: the use times of the lane, the service type corresponding to the historical transmission data of the lane and the quality parameter information of the lane.
14. The method according to any one of claims 9-13, wherein said number of target lanes is one or more; wherein, under the condition that the number of the target lanes is multiple, the multiple target lanes are channels of different types; under the condition that the number of the target lanes is one, the target lanes transmit first data; or, the target lane is idle when the number of the target lanes is one.
15. The method according to any one of claims 9-14, further comprising:
monitoring the use condition of the target lane to obtain third use information of the target lane;
updating the locally recorded use information of the target lane into the third use information;
broadcasting the third usage information.
16. The method of claim 15, wherein the broadcasting the third usage information comprises:
broadcasting the third use information under the condition that the use time of the target lane exceeds a preset time;
or broadcasting the third use information according to a preset period.
17. The method according to any one of claims 9-16, further comprising:
and when the quality of part or all of the target lanes does not meet the preset condition, adjusting the parameters of the first target lane of which the quality does not meet the preset condition.
18. The method according to claim 17, wherein adjusting the parameter of the first target lane whose quality does not satisfy the preset condition comprises:
adjusting the power of the first target lane of which the quality does not meet the preset condition;
or determining a type corresponding to the first target lane, determining a second target lane, which corresponds to the service type, is the same as the type corresponding to the first target lane, and has quality meeting the preset condition, in the first lane, the second lane, and the third lane according to the service type and the type corresponding to the first target lane, and switching the first target lane to the second target lane.
19. The method according to claim 17 or 18, wherein after adjusting parameters, the quality of some or all of the first target lane does not meet the preset condition; the method further comprises the following steps:
acquiring fourth use information of the lane broadcasted by the second electronic equipment;
determining, according to the fourth usage information, a lane of a target type supported by both the first electronic device and the second electronic device;
and determining a third target lane of which the quality meets a preset condition in the lanes of the target types, wherein the lanes which do not meet the preset condition after the adjustment parameters in the first target lane are switched are the third target lane.
20. An electronic device, comprising: a processor and a memory coupled to the processor, the memory for storing computer program code, the computer program code comprising computer instructions that, when read from the memory by the processor, cause the electronic device to perform the method of any of claims 9-19.
21. A computer-readable storage medium, comprising a computer program which, when run on an electronic device, causes the electronic device to perform the method of any one of claims 9-19.
CN202111235326.9A 2021-08-27 2021-10-22 Communication method and electronic device Pending CN115734344A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111551238.XA CN114364026B (en) 2021-08-27 2021-10-22 Communication method and electronic equipment
PCT/CN2022/114502 WO2023025191A1 (en) 2021-08-27 2022-08-24 Communication method and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2021109965927 2021-08-27
CN202110996592 2021-08-27

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202111551238.XA Division CN114364026B (en) 2021-08-27 2021-10-22 Communication method and electronic equipment

Publications (1)

Publication Number Publication Date
CN115734344A true CN115734344A (en) 2023-03-03

Family

ID=85292462

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111235326.9A Pending CN115734344A (en) 2021-08-27 2021-10-22 Communication method and electronic device

Country Status (1)

Country Link
CN (1) CN115734344A (en)

Similar Documents

Publication Publication Date Title
WO2020108356A1 (en) Application display method and electronic device
WO2021135815A1 (en) Communication method and related device and communication system
CN113778574B (en) Card sharing method, electronic equipment and communication system
CN112527476B (en) Resource scheduling method and electronic equipment
EP4311314A1 (en) Sleep scheduling method and device
CN113645715B (en) Method and terminal device for monitoring link
WO2021197071A1 (en) Wireless communication system and method
CN113645608B (en) Data transmission method and data transmission device
WO2023025191A1 (en) Communication method and electronic device
CN114816607A (en) Information screen display method, terminal equipment and chip
CN114064160A (en) Application icon layout method and related device
WO2020124447A1 (en) Multi-sim facing network management
CN115734344A (en) Communication method and electronic device
CN114173286B (en) Method and device for determining test path, electronic equipment and readable storage medium
CN116709557B (en) Service processing method, device and storage medium
CN116471707B (en) Method, device and system for connecting router
CN116095219B (en) Notification display method and terminal device
CN116320727B (en) Algorithm scheduling method and electronic equipment
WO2023005783A1 (en) Data processing method and electronic device
CN116709273B (en) Wireless communication system, method and equipment
CN115562772B (en) Scene recognition and preprocessing method and electronic equipment
WO2022206603A1 (en) Communication resource cooperation method and electronic device
CN117715090A (en) Antenna multiplexing method and related device
CN115150753A (en) Bluetooth communication method and system
CN115774753A (en) Data synchronization method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication