WO2023025191A1 - 通信方法及电子设备 - Google Patents
通信方法及电子设备 Download PDFInfo
- Publication number
- WO2023025191A1 WO2023025191A1 PCT/CN2022/114502 CN2022114502W WO2023025191A1 WO 2023025191 A1 WO2023025191 A1 WO 2023025191A1 CN 2022114502 W CN2022114502 W CN 2022114502W WO 2023025191 A1 WO2023025191 A1 WO 2023025191A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- lane
- electronic device
- target
- resources
- usage information
- Prior art date
Links
- 230000006854 communication Effects 0.000 title claims abstract description 454
- 238000004891 communication Methods 0.000 title claims abstract description 449
- 238000000034 method Methods 0.000 title claims abstract description 206
- 230000005540 biological transmission Effects 0.000 claims description 128
- 230000015654 memory Effects 0.000 claims description 45
- 238000003860 storage Methods 0.000 claims description 30
- 238000012544 monitoring process Methods 0.000 claims description 23
- 238000004590 computer program Methods 0.000 claims description 16
- 230000008569 process Effects 0.000 description 37
- 230000006870 function Effects 0.000 description 31
- 238000007726 management method Methods 0.000 description 27
- 238000012545 processing Methods 0.000 description 27
- 230000000694 effects Effects 0.000 description 22
- 238000005259 measurement Methods 0.000 description 22
- 238000013468 resource allocation Methods 0.000 description 22
- 238000005516 engineering process Methods 0.000 description 17
- 238000010586 diagram Methods 0.000 description 15
- 235000019580 granularity Nutrition 0.000 description 13
- 238000010295 mobile communication Methods 0.000 description 8
- 230000001360 synchronised effect Effects 0.000 description 8
- 230000008447 perception Effects 0.000 description 7
- 230000003993 interaction Effects 0.000 description 6
- 238000012546 transfer Methods 0.000 description 6
- 230000007774 longterm Effects 0.000 description 5
- 238000004458 analytical method Methods 0.000 description 4
- 229920001621 AMOLED Polymers 0.000 description 3
- 238000013473 artificial intelligence Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 230000002452 interceptive effect Effects 0.000 description 3
- 230000011218 segmentation Effects 0.000 description 3
- 230000005236 sound signal Effects 0.000 description 3
- 238000013528 artificial neural network Methods 0.000 description 2
- 230000003190 augmentative effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 238000009826 distribution Methods 0.000 description 2
- 230000009977 dual effect Effects 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000013439 planning Methods 0.000 description 2
- 238000013138 pruning Methods 0.000 description 2
- 239000002096 quantum dot Substances 0.000 description 2
- 230000005855 radiation Effects 0.000 description 2
- 238000009877 rendering Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000003416 augmentation Effects 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W72/00—Local resource management
- H04W72/02—Selection of wireless resources by user or terminal
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W72/00—Local resource management
- H04W72/50—Allocation or scheduling criteria for wireless resources
- H04W72/53—Allocation or scheduling criteria for wireless resources based on regulatory allocation policies
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W88/00—Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
- H04W88/02—Terminal devices
- H04W88/06—Terminal devices adapted for operation in multiple networks or having at least two operational modes, e.g. multi-mode terminals
Definitions
- the embodiments of the present application relate to the technical field of terminals, and in particular, to a communication method and electronic equipment.
- the developer develops the application program according to the independent interfaces corresponding to different communication modes as required. Then, in the process of using the application program, the user can choose different communication methods in the application program to perform data transmission with other electronic devices.
- the electronic device starts the gallery application and displays photos, and after detecting that the user clicks the share control 11 , displays the interface 102 shown in (b) of FIG. 1 .
- the user can choose Bluetooth, wireless local area network (wireless local area network, WLAN) direct connection, email and other ways to share photos.
- the photo sharing is performed through the bluetooth connection.
- the current application program can support multiple communication methods
- the application program can only communicate based on the communication method after the user selects one of the communication methods.
- the communication mode selected by the user may not be the optimal communication mode in the current network environment, and the application program cannot provide the user with the best communication experience.
- the embodiments of the present application provide a communication method and an electronic device.
- the technical solution provided by the embodiments of the present application divides network resources according to the granularity of lanes, and electronic devices can automatically assign corresponding lanes to data to be transmitted without user perception, thereby reducing user operation difficulty. And in the communication process, the electronic device can provide users with a better data transmission experience by using the allocated lanes.
- a communication method is provided, which is applied to a first electronic device.
- the method includes: when it is determined that data needs to be sent to the second electronic device, determining a target lane for transmitting data in the first logical path lane, the second lane and the third lane, the first lane corresponding to the first type of network
- the second lane corresponds to the first channel in the second type of network access
- the third lane corresponds to the second channel in the second type of network access.
- the first electronic device when it needs to send data, it can select a lane resource for this data transmission from the lane resources corresponding to all communication modes supported by the local end. For example, assume that the first electronic device supports two communication modes: BLE communication mode and Wi-Fi 2.4G communication mode, wherein the first type of network access is the network access of BLE communication mode, and the second type of network access is Wi-Fi 2.4 The network path of G communication mode. Then, the first lane corresponds to the 78 channels included in the BLE communication method, and the second lane and the third lane correspond to the 78 channels included in the Wi-Fi 2.4G communication method. Wherein, the first type of network path and the second type of network path are used to represent different types of physical characteristic paths.
- electronic devices manage and plan network resources in a unified manner, segment and schedule network resources in units of lanes, so that applications are not limited to independent interfaces of communication methods. Developers can develop applications directly according to the type of business; electronic devices can directly allocate corresponding lane resources according to the type of business requested by the application; users no longer need to choose communication methods, which reduces the difficulty of user operations. In addition, the electronic device can allocate better-quality lane resources to the application program according to the network environment, thereby improving network transmission quality.
- determining the target lane for transmitting data in the first lane, the second lane, and the third lane includes: when determining that it needs to send data to the second electronic device
- determine the service type corresponding to the data According to the service type, the target lane is determined in the first lane, the second lane and the third lane.
- the service type includes, for example, high-bandwidth services, high-bandwidth and low-latency services, low-bandwidth and low-latency services, and low-latency services with high reliability.
- the communication network including the first electronic device and the second electronic device may also include a central device (that is, a central node).
- the central device may be the first electronic device or the second electronic device, or may be a other devices.
- the central device classifies the lane resources according to the business type, and in the process of allocating the lane resources, the subsequent electronic device allocates the lane resources matching the lane resource type and the business type to the corresponding application program for use.
- the classification results of lane resources include high-bandwidth lane resources, high-bandwidth and low-latency lane resources, low-bandwidth and low-latency lane resources, and low-latency high-reliability lane resources.
- the electronic device can configure corresponding lane resources according to the requirements of the data to be transmitted, so as to ensure the quality of data transmission.
- the high-bandwidth service type requires the bandwidth of the lane to meet the requirements, and the electronic device can allocate high-bandwidth lane resources for the high-bandwidth service.
- the method further includes: acquiring locally recorded first usage information of the first lane, the second lane, and the third lane, and acquiring the first usage information broadcast by multiple electronic devices in the 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 type includes: determining the target lane according to the first usage information, the second usage information and the service type.
- the first electronic device locally stores the first ledger and the second ledger, and the first ledger is used to record the information of the first lane, the second lane and the third lane
- the second ledger is used to record usage information of all lanes in the communication system including the first electronic device.
- the method further includes: obtaining the record in the first ledger The first usage information of the first lane, the second lane, and the third lane, and the second usage information of the first lane, the second lane, and the third lane recorded in the second ledger.
- Determining the target lane in the first lane, the second lane and the third lane according to the service type includes: determining the target lane according to the first usage information, the second usage information and the service type.
- the first usage information or the second usage information includes one or more of the following items: the number of times the lane is used, the business type corresponding to the historical transmission data of the lane, Lane quality parameter information.
- the ledger for recording lane usage is preset in the electronic device, which includes the score of the electronic device for the measurement result of the lane resource quality.
- the first electronic device needs to send data, it obtains the local ledger and the ledger broadcast by other electronic devices in the communication network.
- the first electronic device obtains a comprehensive score of the lane resources based on the scores of the lane resources supported by itself recorded in the broadcast account book and the scores of the lane resources monitored by the local end, and then the first electronic device allocates the lane resources according to the comprehensive scores . For example, according to the scores, the first electronic device obtains a first number of target lanes with higher scores and different types, where the first number is the number of lanes required for data transmission.
- two ledgers are stored in the electronic device, one ledger is used to record the usage information of the lane resources supported by itself, and the other ledger is a public ledger used to record all lanes included in the communication system (lane net) Resource usage information.
- the public ledger stored in each electronic device in the communication system is synchronized. Then the electronic device can determine the optimal lane resource according to the latest lane usage information recorded locally and the lane usage information recorded in the public ledger. Alternatively, the electronic device directly determines the optimal lane resource according to the usage information of the lane recorded in the public ledger.
- the electronic device determines the lane resources with the best quality that meet the transmission requirements of the electronic devices at both ends of the data transmission through comprehensive scoring.
- the electronic device can select the optimal lane for the user without the user's perception, so as to improve the user experience.
- the number of target lanes is one or more; wherein, when the number of target lanes is multiple, the multiple target lanes are channels of different types ; When the number of the target lane is one, the target lane is transmitting the first data; or, when the number of the target lane is one, the target lane is idle.
- the lane hub can allocate multiple lanes for the same service in the frequency domain through statistical multiplexing in a counting manner, thereby improving transmission efficiency. Then, the number of target lanes may be one or more.
- the lane hub can also perform statistical multiplexing according to the bandwidth from the perspective of the time domain, and allocate one lane to carry multiple services. For example, multiple services use the same lane in chronological order. For example, high-priority services with higher time limits use lanes first, and low-priority services with lower time limits use lanes later. Therefore, the completion of the service will not be affected, and the interference problem caused by executing multiple services at the same time will not occur, and the quality of application transmission will be improved. Then, when the priority of the data to be transmitted is low, the lane hub may allocate the lane that is transmitting other first data with higher priority for this service. After the transmission of the first data with higher priority is completed, The first electronic device can transmit data through the target lane. Alternatively, the data to be transmitted has a higher priority, and the target lane that is transmitting the first data may be preempted, and the data to be transmitted is transmitted through the target lane first, and then the first data is transmitted.
- the lane resource may be determined as the target lane. For example, if the first electronic device has a lane resource corresponding to a wired transmission mode (such as a USB transmission mode) and is idle, then the lane resource corresponding to the wired transmission mode may be preferentially determined as the target lane.
- a wired transmission mode such as a USB transmission mode
- the method further includes: monitoring the usage of the target lane, and obtaining third usage information of the target lane.
- the usage information of the target lane recorded locally is updated to the third usage information.
- the third usage information is broadcast.
- the electronic device broadcasts the lane usage information according to the preset period or according to the preset timing, so as to realize the interaction of the lane usage information of different electronic devices in the communication network, and further satisfy the requirement of the electronic device to select a target lane.
- a central node (such as a central device) is also set in the communication network, and the central device can adjust the lane resource type according to the received lane usage information broadcast by the electronic device, so that the classification result of the lane resource after classification can be suitable for the current communication The optimal classification result of the network.
- the lane resource type corresponds to the service type.
- the lane resource type includes high-bandwidth lane resources, high-bandwidth and low-latency lane resources, low-bandwidth and low-latency lane resources, and low-latency high-reliability lane resources.
- the central device determines that the transmission quality of lane1 is poor according to received broadcast information, and adjusts lane1 to a lane of other resource types.
- broadcasting the third usage information includes: broadcasting the third usage information when the usage duration of the target lane exceeds a preset duration.
- the third usage information is broadcast according to a preset period.
- the synchronization of the ledger by the lane hub is divided into strong synchronization and weak synchronization.
- the lane hub can determine whether the way of synchronizing ledgers is strong synchronization or weak synchronization according to the business type carried by the lane resources.
- lane hub allocates lane resources for such services, it needs to synchronize the usage of the allocated lane resources to other lane hubs in the lane net, so that other lane hubs can avoid interfering with these lane resources during the allocation of lane resources .
- this type of lane resource is a lane resource that requires strong synchronization.
- some lane resources are preempted temporarily.
- the application releases the lane resources in a short period of time, and the lane hub will update the usage of the lane resources to the previous one. state or directly cancel the previous update, if broadcast synchronization is performed for each update, it will lead to an increase in power consumption. Therefore, a preset cycle can be set, and the ledger broadcast is carried out according to the preset cycle, ensuring the timeliness and reliability of ledger synchronization without increasing unnecessary power consumption due to repeated synchronization. Then this type of lane resource is a lane resource that requires weak synchronization.
- each lane hub in the lane net records uniformly the usage of lane resources, and avoids lane resource allocation conflicts caused by inconsistent usage of lane resources.
- the method further includes: when the quality of some or all lanes in the target lane does not meet the preset condition, adjusting the first target that the quality does not meet the preset condition Lane parameters.
- adjusting the parameters of the first target lane whose quality does not meet the preset condition includes: adjusting the power of the first target lane whose quality does not meet the preset condition. Or, determine the type corresponding to the first target lane, and determine the type corresponding to the business type and the first target lane in the first lane, the second lane, and the third lane according to the business type and the type corresponding to the first target lane For the second target lane that is the same and whose quality meets the preset conditions, switch the first target lane to the second target lane.
- the method further includes: acquiring the broadcast of the second electronic device The fourth usage information of the lane. According to the fourth usage information, determine the lane of the target type supported by both the first electronic device and the second electronic device. Determine the third target lane whose quality meets the preset condition among the target type lanes, and switch the lane that still does not meet the preset condition after adjusting the parameters in the first target lane as the third target lane.
- lanehub after lanehub allocates the lane resources to the application, it will monitor the usage of the lane resources, and when it detects that the communication quality is poor, it can adjust the lane resources to meet the data transmission requirements of the application (such as packet loss rate is less than a preset threshold, etc.).
- adjusting the lane resource includes lane resource parameter adjustment, lane resource switching, and the like.
- the lane hub can adjust the lane resources one or more times to ensure the transmission quality.
- lane resources are divided based on the frequency domain and channel as granularity, then a time-sharing strategy can be adopted to allow different transmission tasks to call the same lane resources time-sequentially.
- time-sharing strategies such as Wi-Fi hierarchical clock technology and BR Bluetooth hierarchical clock technology are used to allocate lane resources. Then, the lane hub needs to monitor the usage of lane resources from the perspective of time domain to determine whether it is necessary to adjust the allocation of lane resources.
- the lane hub can obtain the quality measurement results of the lane resources, analyze the service quality of the lane resources, determine whether it is necessary to adjust the QoS policy (such as adjusting the QoS standard for evaluating lane resources, etc.), and analyze the usage of the lane net.
- the QoS policy such as adjusting the QoS standard for evaluating lane resources, etc.
- Another example is to monitor the allocation and scheduling of lane resources, such as monitoring the lane resource scheduling of each lane hub in the lane net, to confirm whether it will affect the use of lane resources of the current application.
- QoS coordination can be realized, and low-priority services can be adjusted including business speed limit and avoidance, so as to ensure that long-term services (such as screen projection services, etc.) will not be affected by short-term services (such as picture sharing services, etc.), Or services with high requirements on transmission quality will not be affected by other services.
- the electronic device can dynamically adjust the lane resources directly through parameter adjustment or communication mode adjustment without the user's perception, so as to ensure the quality of data transmission and improve user experience.
- an electronic device is provided.
- the electronic device is a first electronic device, including: a processor and a memory, the memory is coupled to the processor, and the memory is used to store computer program codes, the computer program codes include computer instructions, when the processor The computer instructions are read from the memory, so that the electronic device performs the following operations: when it is determined that data needs to be sent to the second electronic device, it is determined in the first logical path lane, the second lane, and the third lane According to the target lane for transmitting data, the first lane corresponds to the first type of network access, the second lane corresponds to the first channel in the second type of network access, and the third lane corresponds to the second channel in the second type of network access. Two channels. Send data to the second electronic device through the target lane.
- determining the target lane for transmitting data in the first lane, the second lane, and the third lane includes: when determining that it needs to send data to the second electronic device
- determine the service type corresponding to the data According to the service type, the target lane is determined in the first lane, the second lane and the third lane.
- the processor when the processor reads the computer instruction from the memory, it also causes the electronic device to perform the following operation: obtain the locally recorded first The first usage information of the lane, the second lane, and the third lane, and acquiring the second usage information of the first lane, the second lane, and the third lane broadcast by multiple electronic devices in the communication network including the first electronic device.
- determining the target lane in the first lane, the second lane and the third lane includes: determining the target lane according to the first usage information, the second usage information and the business type.
- the first electronic device locally stores the first ledger and the second ledger, and the first ledger is used to record the information of the first lane, the second lane and the third lane
- the second ledger is used to record usage information of all lanes in the communication system including the first electronic device.
- the processor reads the computer instruction from the memory, it also causes the electronic device to perform the following operations: obtain the first lane, the second lane, and the third lane recorded in the first ledger. use information, and obtain second use information of the first lane, the second lane, and the third lane recorded in the second ledger.
- determining the target lane in the first lane, the second lane and the third lane according to the service type includes: determining the target lane according to the first usage information, the second usage information and the service type.
- the first usage information or the second usage information includes one or more of the following: the number of times the lane is used, the business type corresponding to the historical transmission data of the lane, Lane quality parameter information.
- the number of target lanes is one or more; wherein, when the number of target lanes is multiple, the multiple target lanes are channels of different types ; When the number of the target lane is one, the target lane is transmitting the first data; or, when the number of the target lane is one, the target lane is idle.
- the processor when the processor reads the computer instruction from the memory, it also causes the electronic device to perform the following operation: monitor the usage of the target lane , to obtain the third usage information of the target lane.
- the usage information of the target lane recorded locally is updated to the third usage information.
- the third usage information is broadcast.
- broadcasting the third usage information includes: broadcasting the third usage information when the usage duration of the target lane exceeds a preset duration.
- the third usage information is broadcast according to a preset period.
- the processor when the processor reads the computer instructions from the memory, it also causes the electronic device to perform the following operations: the part in the target lane Or when the quality of all lanes does not meet the preset condition, adjust the parameters of the first target lane whose quality does not meet the preset condition.
- adjusting the parameters of the first target lane whose quality does not meet the preset condition includes: adjusting the power of the first target lane whose quality does not meet the preset condition. Or, determine the type corresponding to the first target lane, and determine the type corresponding to the business type and the first target lane in the first lane, the second lane, and the third lane according to the business type and the type corresponding to the first target lane For the second target lane that is the same and whose quality meets the preset conditions, switch the first target lane to the second target lane.
- the processor when the processor reads the computer instruction from the memory, it also causes the electronic device to perform the following operation: obtain the second electronic device broadcast The fourth usage information of the lane. According to the fourth usage information, determine the lane of the target type supported by both the first electronic device and the second electronic device. Determine the third target lane whose quality meets the preset condition among the target type lanes, and switch the lane that still does not meet the preset condition after adjusting the parameters in the first target lane as the third target lane.
- 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 configured to determine the target lane for transmitting data in the first logical lane, the second lane and the third lane when it is determined that data needs to be sent to the second electronic device, and 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.
- the transceiver module is configured to send data to the second electronic device through the target lane.
- determining the target lane for transmitting data in the first lane, the second lane, and the third lane includes: when determining that it needs to send data to the second electronic device
- determine the service type corresponding to the data According to the service type, the target lane is determined in the first lane, the second lane and the third lane.
- the processing module is specifically configured to acquire the first usage information of the first lane, the second lane, and the third lane recorded locally, and acquire information including the first The second usage information of the first lane, the second lane, and the third lane broadcast by multiple electronic devices in the communication network of the electronic device.
- Determining the target lane in the first lane, the second lane and the third lane according to the service type includes: determining the target lane according to the first usage information, the second usage information and the service type.
- the first electronic device locally stores the first ledger and the second ledger, and the first ledger is used to record the information of the first lane, the second lane, and the third lane
- the second ledger is used to record usage information of all lanes in the communication system including the first electronic device.
- the processing module is also used to obtain the first ledger
- Determining the target lane in the first lane, the second lane and the third lane according to the service type includes: determining the target lane according to the first usage information, the second usage information and the service type.
- the first usage information or the second usage information includes one or more of the following: the number of times the lane is used, the business type corresponding to the historical transmission data of the lane, Lane quality parameter information.
- the number of target lanes is one or more; wherein, when the number of target lanes is multiple, the multiple target lanes are channels of different types ; When the number of the target lane is one, the target lane is transmitting the first data; or, when the number of the target lane is one, the target lane is idle.
- the processing module is further configured to monitor usage of the target lane, and obtain third usage information of the target lane.
- the usage information of the target lane recorded locally is updated to the third usage information.
- the third usage information is broadcast.
- broadcasting the third usage information includes: broadcasting the third usage information when the usage duration of the target lane exceeds a preset duration.
- the third usage information is broadcast according to a preset period.
- the processing module is further configured to adjust the first lane whose quality does not meet the preset condition when the quality of some or all of the lanes in the target lane does not meet the preset condition.
- a target lane parameter is further configured to adjust the first lane whose quality does not meet the preset condition when the quality of some or all of the lanes in the target lane does not meet the preset condition.
- adjusting the parameters of the first target lane whose quality does not meet the preset condition includes: adjusting the power of the first target lane whose quality does not meet the preset condition. Or, determine the type corresponding to the first target lane, and determine the type corresponding to the business type and the first target lane in the first lane, the second lane, and the third lane according to the business type and the type corresponding to the first target lane For the second target lane that is the same and whose quality meets the preset conditions, switch the first target lane to the second target lane.
- the transceiver module is further configured to acquire fourth usage information of the lane broadcast by the second electronic device. Then, the processing module is further configured to determine the lane of the target type supported by both the first electronic device and the second electronic device according to the fourth usage information. Determine the third target lane whose quality meets the preset condition among the target type lanes, and switch the lane that still does not meet the preset condition after adjusting the parameters in the first target lane as the third target lane.
- the transceiving module may include a receiving module and a transmitting module, and may be implemented by a transceiver or transceiver-related circuit components, and may be a transceiver or a transceiver module.
- the operation and/or function of each module in the first electronic device is to realize the communication method described in any one of the above-mentioned first aspect and the first aspect, and any one of the above-mentioned first aspect and the first aspect All relevant content involved in the implementation manner can be referred to the corresponding functional modules.
- the first electronic device may further include a storage module, where programs or instructions are stored.
- the processing module and the transceiver module execute the program or instruction
- the first electronic device can execute the communication method described in any one of the first aspect and the implementation manner of the first aspect.
- an embodiment of the present application provides a communication system, where the communication system includes: a first electronic device and a second electronic device.
- the first electronic device is configured to, when it is determined that data needs to be sent to the second electronic device, determine a target lane for transmitting data in the first logical lane, the second lane, and the third lane, and 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.
- the first electronic device is further configured to send data to the second electronic device through the target lane.
- the second electronic device is configured to receive the data sent by the first electronic device through the target lane.
- the first electronic device is further configured to monitor usage of the target lane, and obtain third usage information of the target lane.
- the usage information of the target lane recorded locally is updated to the third usage information.
- the third usage information is broadcast.
- 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.
- the third usage information is broadcast according to a preset period.
- the first electronic device stores a first ledger and a second ledger
- the first ledger is used to record the use of the first lane, the second lane and the third lane Information
- the second ledger is used to record the usage information of all lanes in the communication system.
- the communication system further includes: a third electronic device; the third electronic device is configured to receive the third usage information, and synchronize the locally stored first usage information according to the third usage information.
- the communication system includes more than two electronic devices, and a lane hub is configured in each electronic device.
- the local lane hub determines that the lane resource usage information has changed, it can broadcast the changed lane resource usage information to other electronic devices in the communication system through strong synchronization or weak synchronization.
- the lane hub of other electronic devices (such as the third electronic device) can receive broadcast information, and synchronize the locally saved lane resource usage information according to the broadcast information, to ensure that the lane resource information recorded by each lane hub is synchronized, and to avoid inconsistent lane resource usage information , leading to lane resource allocation conflicts.
- the second electronic device also receives an update of the usage information of the target lane by the first electronic device. That is to say, each electronic device in the communication system is equipped with a lane hub.
- the lane hub maintains two ledgers, one of which is used to record the usage of local lane resources; the other ledger is used to record the usage of lane resources in the lane net (such as a public ledger). After the lane hub updates the local lane resource usage, it updates the public ledger while updating the local ledger, and then broadcasts the public ledger.
- the local ledger in the lane hub After receiving the broadcast, other lane hubs in the lane net can synchronize the public ledger, and merge and update the relevant content of the local ledger, so as to ensure that each lane hub in the lane net can save the same public ledger, that is, each lane hub can synchronize the lane
- the actual usage of lane resources in net For example, the local ledger in the lane hub records the usage of the lane 1 it manages. After obtaining the public ledger broadcast by other lane hubs, determine whether the local ledger needs to be modified after confirming the records of the usage of lane 1 by other lane hubs. . If it is modified, after the modification, the modified information will be synchronized to the public ledger for synchronization by other lane hubs.
- the first electronic device, the second electronic device, and the third electronic device are further used to determine a target device for adjusting the lane resource type, and the target device is the first Any one of the first electronic device, the second electronic device and the third electronic device.
- the target device is configured to obtain the usage information of the fourth lane broadcast by the first electronic device, the second electronic device, and the third electronic device, and adjust the lane resource types of some or all of the lanes in the fourth lane according to the usage information of the fourth lane , wherein, the lane resource type includes at least one of high-bandwidth lane resources, high-bandwidth and low-latency lane resources, low-bandwidth and low-latency lane resources, and low-latency high-reliability lane resources.
- the communication system further includes: a central device.
- the central device is configured to obtain the usage information of the fifth lane broadcast by the electronic devices included in the communication network, and adjust the lane resource types of some or all of the lanes in the fifth lane according to the usage information of the fifth lane, wherein the lane resource type It includes at least one of high-bandwidth lane resources, high-bandwidth and low-latency lane resources, low-bandwidth and low-latency lane resources, and low-latency and high-reliability lane resources.
- the fifth lane is a lane supported by each electronic device, then the central device can determine the usage information of all lanes in the communication network according to the broadcast information, and then can determine the lane whose resource type needs to be adjusted. In this way, the transmission quality of the communication network can be improved.
- the central node device adjusts the lane resource usage type.
- the devices in the communication system can use blockchain technology to elect devices for adjusting lane resource types. In this way, the requirements for adjusting lane resource types of different types of communication systems are met.
- the number of target lanes is one or more; wherein, when the number of target lanes is multiple, the multiple target lanes are channels of different types ; When the number of the target lane is one, the target lane is transmitting the first data; or, when the number of the target lane is one, the target lane is idle.
- an embodiment of the present application provides an electronic device, where the electronic device has a function of implementing the communication method described in the foregoing first aspect and any possible implementation manner.
- This function can be realized by hardware, and can also be realized by executing corresponding software by hardware.
- the hardware or software includes one or more modules corresponding to the above functions.
- a computer-readable storage medium stores a computer program (also referred to as an instruction or code), and when the computer program is executed by the electronic device, the electronic device executes the method in the first aspect or any one of the implementation manners in the first aspect.
- a computer program also referred to as an instruction or code
- an embodiment of the present application provides a computer program product, which, when the computer program product is run on an electronic device, causes the electronic device to execute the method in the first aspect or any one of the implementation manners in the first aspect.
- the embodiments of the present application provide a circuit system, the circuit system includes a processing circuit configured to execute the method in the first aspect or any one implementation manner in the first aspect.
- the embodiment of the present application provides a chip system, including at least one processor and at least one interface circuit, at least one interface circuit is used to perform the function of sending and receiving, and send instructions to at least one processor, when at least one processor When executing the instructions, at least one processor executes the first aspect or the method in any one implementation manner of the first aspect.
- Figure 1 is a schematic interface diagram 1 provided by the embodiment of the present application.
- FIG. 2 is a schematic diagram of the form of an electronic device provided by an embodiment of the present application.
- FIG. 3A is a schematic diagram of a hardware structure of an electronic device provided in an embodiment of the present application.
- FIG. 3B is a schematic diagram of a software structure block diagram of an electronic device provided in an embodiment of the present application.
- FIG. 4A is a first schematic diagram of a scenario where the communication method provided by the embodiment of the present application is applied;
- FIG. 4B is a second schematic diagram of the application scenario of the communication method provided by the embodiment of the present application.
- FIG. 5A is a schematic diagram of module interaction provided by the embodiment of the present application.
- FIG. 5B is a third schematic diagram of a scenario where the communication method provided by the embodiment of the present application is applied.
- Fig. 6 is the interface schematic diagram 2 provided by the embodiment of the present application.
- Fig. 7 is a schematic diagram of the third interface provided by the embodiment of the present application.
- FIG. 8 is a flowchart of a communication method provided by an embodiment of the present application.
- FIG. 9 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
- references to "one embodiment” or “some embodiments” or the like in this specification 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.
- appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically stated otherwise.
- the terms “including”, “comprising”, “having” and variations thereof mean “including but not limited to”, unless specifically stated otherwise.
- the term “connected” includes both direct and indirect connections, unless otherwise stated. "First” and “second” are used for descriptive purposes only, and should not be understood as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features.
- 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, a vehicle-mounted device, Ultra-mobile personal computer (UMPC), netbook, laptop computer, personal digital assistant (personal digital assistant, PDA), VR equipment, AR equipment, speakers, artificial intelligence (artificial intelligence) equipment, etc. functional terminal equipment.
- the operating system installed on the first electronic device includes but is not limited to or other operating systems.
- the first electronic device may be a fixed device or a portable device.
- the present application does not limit the specific type of the first electronic device and the installed operating system.
- the first electronic device can support multiple communication methods, such as near field communication (near field communication, NFC), bluetooth (bluetooth, BT) (for example, traditional bluetooth, bluetooth low energy bluetooth (bluetooth low energy) , BLE), basic rate (basic rate, BR) Bluetooth, enhanced rate (enhanced data rate, EDR) Bluetooth, etc.), wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (wireless fidelity, Wi-Fi) Network), Zigbee (Zigbee), frequency modulation (frequency modulation, FM), infrared (infrared, IR) and other wireless communication methods, and wired communication methods such as universal serial bus (universal serial bus, USB) connection.
- NFC near field communication
- Bluetooth bluetooth, BT
- BLE basic rate
- BR basic rate
- EDR enhanced rate
- wireless local area networks wireless local area networks
- WLAN such as wireless fidelity (wireless fidelity, Wi-Fi) Network
- Zigbee Zigbee
- the soft bus networking may include a homogeneous network or a heterogeneous network.
- electronic devices in a communication network communicate through the same communication mode, and the communication network is a homogeneous network.
- each electronic device in a homogeneous network communicates through Wi-Fi.
- electronic devices in a communication network communicate through two or more communication modes, and the communication network is a heterogeneous network.
- 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 through Wi-Fi communication
- the first electronic device and the second electronic device If the device establishes a Bluetooth connection, there are two communication modes in the communication network composed of the first electronic device, the second electronic device and the router, forming a heterogeneous network.
- the soft bus network should include 2 or more electronic devices, and different electronic devices can perform their respective services.
- data transmission can be performed on demand among various electronic devices included in the soft bus network.
- the soft bus network includes multiple electronic devices such as electronic device 1 , electronic device 2 , electronic device 3 , and electronic device 4 .
- business 1 is performed between electronic device 1 and electronic device 2
- business 2 is performed between electronic device 1 and electronic device 3
- business 3 is performed between electronic device 3 and electronic device 4
- business 1, business 2 and business 3 are for example For different data transmission services. Then it is necessary to allocate available network resources for each service.
- for the specific network resource allocation manner refer to the specific embodiments below, which will not be repeated here.
- each application program installed in the first electronic device may communicate with the second electronic device through one or more communication modes supported by the first electronic device.
- a gallery application is installed in the first electronic device, and the gallery application can share photos to the second electronic device through various methods such as Bluetooth, Wi-Fi direct connection, and email.
- both the first electronic device and the second electronic device support the proximity discovery function.
- both the first electronic device and the second electronic device can realize the proximity discovery function through NFC sensing.
- the first electronic device and the second electronic device can discover each other, and then establish wireless communication connections such as Wi-Fi peer-to-peer (P2P) connection, Bluetooth connection, etc. .
- P2P Wi-Fi peer-to-peer
- the first electronic device establishes a wireless communication connection with the second electronic device through a local area network.
- both the first electronic device and the second electronic device are connected to the same router.
- the first electronic device and the second electronic device are used as station (station, STA) devices, and the router is used as an access point (access point, AP) device to establish a connection in the STA-AP-STA communication mode.
- station station
- AP access point
- the first electronic device establishes a wireless communication connection with the second electronic device through a cellular network, the Internet, or the like.
- the second electronic device accesses the Internet through a router, and the first electronic device accesses the Internet through a cellular network; furthermore, the first electronic device establishes a wireless communication connection with the second electronic device.
- the first electronic device establishes a wired communication connection with the second electronic device through a USB interface connection.
- the device type of the second electronic device is the same as or different from that of the first electronic device, and the second electronic device includes but is not limited to a smartphone, a tablet computer, a personal computer (personal computer, PC), a wearable device (such as a smart watches, smart bracelets, etc.), laptop computers (Laptop), personal digital assistants (personal digital assistant, PDA), car equipment, virtual reality (virtual reality, VR) equipment, augmented reality (augmented reality, AR) equipment, Speakers, artificial intelligence (AI) equipment, etc.
- the operating system installed on the second electronic device includes but is not limited to or other operating systems.
- the second electronic device 200 may also not be installed with an operating system.
- the second electronic device may be a fixed device or a portable device.
- the embodiment of the present application does not limit the specific type of the second electronic device, whether the operating system is installed, or the type of the operating system if the operating system is installed.
- FIG. 3A is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
- the electronic device may be the above-mentioned 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 (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, Mobile communication module 150, wireless communication module 160, audio module 170, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (subscriber identification module, SIM) card interface 195 etc. .
- a processor 110 an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, Mobile communication module 150, wireless communication module 160, audio module 170, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (subscriber identification module, SIM) card interface 195 etc.
- SIM subscriber identification module
- the structure shown in the embodiment of the present application does not constitute a specific limitation on the electronic device.
- the electronic device may include more or fewer components than shown in the illustrations, or combine certain components, or separate certain components, or arrange different components.
- the illustrated components can be realized in hardware, software or a combination of software and hardware.
- the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
- application processor application processor, AP
- modem processor graphics processing unit
- GPU graphics processing unit
- image signal processor image signal processor
- ISP image signal processor
- controller video codec
- digital signal processor digital signal processor
- baseband processor baseband processor
- neural network processor neural-network processing unit
- the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
- a memory may also be provided in the processor 110 for storing instructions and data.
- the memory in processor 110 is a cache memory.
- the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
- processor 110 may include one or more interfaces.
- the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
- I2C integrated circuit
- I2S integrated circuit built-in audio
- PCM pulse code modulation
- PCM pulse code modulation
- UART universal asynchronous transmitter
- MIPI mobile industry processor interface
- GPIO general-purpose input and output
- subscriber identity module subscriber identity module
- SIM subscriber identity module
- USB universal serial bus
- the USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
- the USB interface 130 can be used to connect a charger to charge the electronic device, and can also be used to transmit data between the electronic device and peripheral devices. It can also be used to connect headphones and play audio through them.
- the interface can also be used to connect other second electronic devices, such as AR devices.
- the electronic device establishes a wired connection with other electronic devices through a USB interface.
- the electronic device establishes a USB connection with other electronic devices, and transfers stored application program files to the other electronic devices through the USB connection.
- the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device.
- the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
- the charging management module 140 is configured to receive a charging input from a charger.
- the charger may be a wireless charger or a wired charger.
- the charging management module 140 can receive charging input from the wired charger through the USB interface 130 .
- the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device. While the charging management module 140 is charging the battery 142 , it can also provide power for the second electronic device through the power management module 141 .
- the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
- the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 .
- the wireless communication function of the electronic device can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
- Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
- Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
- Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
- the antenna may be used in conjunction with a tuning switch.
- the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied to electronic devices.
- the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
- the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
- the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation.
- the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite system, etc. (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
- 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 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
- the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
- the antenna 1 of the electronic device is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology.
- the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR techniques, etc.
- GSM global system for mobile communications
- general packet radio service general packet radio service
- CDMA code division multiple access
- WCDMA broadband Code division multiple access
- time division code division multiple access time-division code division multiple access
- TD-SCDMA time-division code division multiple access
- LTE long term evolution
- BT GNSS
- the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou navigation satellite system (beidou navigation satellite system, BDS), a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
- GPS global positioning system
- GLONASS global navigation satellite system
- Beidou navigation satellite system beidou navigation satellite system
- BDS Beidou navigation satellite system
- QZSS quasi-zenith satellite system
- SBAS satellite based augmentation systems
- the electronic device realizes the display function through the GPU, the display screen 194, and the application processor.
- the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
- Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
- the display screen 194 is used to display images, videos and the like.
- the display screen 194 includes a display panel.
- the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix) Manufacturing of organic light emitting diode (AMOLED), flexible light emitting diode (flex light-emitting diode, FLED), Mini-led, Micro-led, Micro-oled, quantum dot light emitting diode (quantum dot light emitting diodes, QLED), etc.
- the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.
- the sensor module 180 may include a pressure sensor, a gyro 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 sensor also known as "touch device”.
- the touch sensor can be arranged on the display screen 194, and the touch sensor and the display screen 194 form a touch screen, also called “touch screen”.
- the touch sensor is used to detect a touch operation on or near it.
- the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
- Visual output related to the touch operation can be provided through the display screen 194 .
- the touch sensor may also be disposed on the surface of the electronic device, which is different from the position of the display screen 194 .
- the electronic device can realize the shooting function through ISP, camera 193 , video codec, GPU, display screen 194 and application processor.
- Camera 193 is used to capture still images or video.
- the object generates an optical image through the lens and projects it to the photosensitive element.
- the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
- CMOS complementary metal-oxide-semiconductor
- the photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
- the ISP outputs the digital image signal to the DSP for processing.
- DSP converts digital image signals into standard RGB, YUV and other image signals.
- the electronic device may include 1 or N cameras 193, where N is a positive integer greater than 1.
- the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity 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. Such as saving music, video and other files in the external memory card.
- the internal memory 121 may be used to store computer-executable program codes including instructions.
- the internal memory 121 may include an area for storing programs and an area for storing data.
- the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like.
- the storage data area can store data (such as audio data, phone book, etc.) created during the use of the electronic device.
- 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, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
- the processor 110 executes various functional applications and data processing of the electronic device by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
- the electronic device can realize the audio function through the audio module 170 and the application processor. Such as music playback, recording, etc.
- the audio module 170 may include a speaker, a receiver, a microphone, an earphone jack, and the like. It is used to convert digital audio information to analog audio signal output, and also to convert analog audio input to digital audio signal.
- the audio module 170 may also be used to encode and decode audio signals.
- the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
- the keys 190 include a power key, a volume key and the like.
- the key 190 may be a mechanical key. It can also be a touch button.
- the electronic device can receive key input and generate key signal input related to user settings and function control of the electronic device.
- the motor 191 can generate a vibrating reminder.
- the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
- touch operations applied to different applications may correspond to different vibration feedback effects.
- the motor 191 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 194 .
- the indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
- the SIM card interface 195 is used for connecting a SIM card.
- the SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to realize contact and separation with the electronic device.
- the electronic device can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
- the software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture.
- the Android system with layered architecture is taken as an example to illustrate the software structure of the electronic device.
- Fig. 3B is a block diagram of the software structure of the electronic device according to the embodiment of the present application.
- the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces.
- the Android system is divided into four layers, which are respectively the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer from top to bottom.
- the application layer can consist of a series of application packages.
- the application package may include application programs such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
- application programs such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
- different application programs can perform data interaction with other electronic devices through some or all of the communication methods supported by the electronic device.
- the gallery application sends the photos stored in the first electronic device to the second electronic device through bluetooth.
- the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
- the application framework layer includes some predefined functions.
- the application framework layer may include a window manager, a content provider, a view system, a resource manager, a notification manager, a phone manager, and a lane management service.
- a window manager is used to manage window programs.
- the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
- Content providers are used to store and retrieve data and make it accessible to applications.
- Said data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.
- the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on.
- the view system can be used to build applications.
- a display interface can consist of one or more views.
- a display interface including a text 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 electronic devices. For example, the management of call status (including connected, hung up, etc.).
- the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
- the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction.
- the notification manager is used to notify the download completion, message reminder, etc.
- the notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.
- prompting text information in the status bar issuing a prompt sound, vibrating the electronic device, and flashing the indicator light, etc.
- the lane management service is used to plan and manage all lanes (lanes) of communication modes supported by electronic devices.
- lane is the unit granularity for segmenting network resources corresponding to the communication mode after abstraction. For example, all network resources corresponding to the communication modes included in the communication network (such as Wi-Fi resources corresponding to the Wi-Fi communication mode, Bluetooth resources corresponding to the Bluetooth communication mode, etc.) are divided into lane resources in units of lanes.
- the lane management service in the electronic device allocates lane resources for the application program to transmit data according to the service type of the data to be transmitted, and then the application program can communicate through the allocated lane resources, wherein the allocated lane resources may include One or more lanes.
- the application sends data through the allocated Wi-Fi channel.
- the lane management service can be described as a logical lane hub (lanehub).
- Wi-Fi 2.4G communication includes 13 channels, which can be divided into There are 13 lane resources.
- the BLE communication method includes 78 channels, which can be divided into 78 lane resources.
- the lane management service manages these lane resources.
- the lane management service provides a unified external interface, which can be called by application programs at the application layer. For example, the application program uses the allocated lane resources to send data to other electronic devices through a unified interface.
- the physical characteristics are used to represent the characteristics of the physical path that implements the communication mode.
- a bluetooth chip is installed in an electronic device, which can realize bluetooth communication and support communication of 78 channels for bluetooth communication. Then, according to the physical characteristics of the Bluetooth chip, the lane resources are divided into 78 lane resources in the Bluetooth communication mode.
- a Wi-Fi chip is installed in the electronic device, and the Wi-Fi chip supports dual band dual concurrent (DBDC), that is, has two physical paths (such as physical path 1 and physical path 2). Assume that physical channel 1 of the Wi-Fi chip is used to realize Wi-Fi 2.4G communication, and physical channel 2 of the Wi-Fi chip is used to realize Wi-Fi 5G communication.
- DBDC dual band dual concurrent
- the lane resources are divided into lane resources of the Wi-Fi 2.4G communication mode and lane resources of the Wi-Fi 5G communication mode.
- the lane resources are divided into physical channels in the Wi-Fi 2.4G communication mode.
- the Wi-Fi chip can also support more physical paths. For example, a Wi-Fi chip that supports four frequencies and four transmissions can support four physical paths, corresponding to four types of lane resources.
- the lane resources are divided according to the characteristics of the physical path, which will not be described in detail below.
- the names of lanes may be different.
- the above is managed by the lane management service
- the name of the lane used to support the application to communicate between devices may be a virtual path
- the name of the corresponding lane resource may be a virtual path resource.
- lane is used to indicate a corresponding channel in a communication mode
- lane resources are channel resources.
- the Wi-Fi 2.4G communication mode includes 13 channels (corresponding to 13 virtual channels), which can be divided into 13 lanes
- the lane resources corresponding to the Wi-Fi 2.4G communication mode include 13 lanes.
- the name of the lane may be a physical path
- the name of the corresponding lane resource may be a physical path resource.
- the communication mode is the USB wired communication mode
- the USB connection includes 1 physical channel, which can be divided into 1 lane
- the lane resources corresponding to the USB wired communication mode include 1 physical channel resource.
- the communication method provided in the embodiment of the present application is described by taking the name of the lane as a logical path (for example, including a virtual path and a physical path) as an example.
- the Android Runtime includes core library and virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
- the core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
- the application layer and the application framework layer run in virtual machines.
- the virtual machine executes the java files of the application program layer and the application program framework layer as binary files.
- the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
- a system library can include multiple function modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
- the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
- the media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc.
- the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
- the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing, etc.
- the 2D graphics engine is a drawing engine for 2D drawing.
- the kernel layer is the layer between hardware and software.
- the kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
- the electronic device can support at least one communication method, and different electronic devices can support the same or different communication methods.
- the communication methods supported by the electronic device include wired communication methods (such as USB communication methods, Ethernet (ethernet , ETH) communication method, programmable logic controller (programmable logic controller, PLC) communication method, etc.) and/or wireless communication method (such as Wi-Fi communication method, Bluetooth communication method, etc.).
- wired communication methods such as USB communication methods, Ethernet (ethernet , ETH) communication method, programmable logic controller (programmable logic controller, PLC) communication method, etc.
- wireless communication method such as Wi-Fi communication method, Bluetooth communication method, etc.
- the user needs to select the communication method used for transmission.
- the user needs to search multiple times to determine the communication method of the application, which makes the operation difficult for the user. Larger, affecting user experience.
- the interface 102 is limited by the display area, and only part of the communication modes supported by the electronic device can be displayed on the interface 102 .
- the electronic device After the electronic device detects the user's sliding operation (for example, the sliding operation along the direction indicated by the arrow 13), it can display other communication methods. If the electronic device supports many communication methods, the user needs to swipe and search multiple times to complete the selection of the communication method, and the process is relatively cumbersome.
- Wi-Fi P2P technology can support two Wi-Fi devices to directly connect and communicate with each other without the intervention of Wi-Fi hotspots. After the Wi-Fi P2P connection is established, the device has two roles: the client (go client, GC) and the manager (go owner, GO).
- the mobile phone A receives the P2P connection request sent by the mobile phone B for requesting establishment of the P2P connection.
- the mobile phone A may need to be set to various P2P roles.
- mobile phone A may not support the coexistence of multiple P2P roles, and there may be conflicts between the same frequency and the same channel during the communication process, resulting in inability to parallel services, or excessive conflicts that result in unguaranteed service experience and other abnormalities.
- the embodiment of the present application provides a communication method, which performs unified planning for all network resources, and provides a unified external interface for each application program.
- lanehub automatically allocates the corresponding communication resources according to the business type of the requested communication and the current network environment, instead of having to be selected by the user.
- developers no longer need to be limited by interface protocols in the process of developing application programs, and the application programs can also provide users with better communication experience while reducing the difficulty of user operations.
- the electronic device directly determines the available communication resources according to the service type, without communication anomalies caused by multiple P2P roles on one device.
- network resources are divided according to physical characteristics of different communication modes, and the network resources are divided into lane resources. For example, channels are used as the division granularity, and each channel corresponds to a lane resource.
- the communication network includes Wi-Fi 2.4G communication mode, Wi-Fi 5G communication mode, BR Bluetooth communication mode, BLE communication mode and USB communication mode, and the granularity pairs are divided by lanes Network resources are divided.
- the Wi-Fi 2.4G communication mode includes 13 channels, which can be divided into 13 lane resources;
- the Wi-Fi 5G communication mode includes 165 channels, which can be divided into 165 lane resources;
- the BR Bluetooth communication mode includes 30 channels, It can be divided into 30 lane resources;
- the BLE communication mode includes 78 channels, which can be divided into 78 lane resources;
- the USB communication mode can be assumed to correspond to 1 channel, which can be divided into 1 lane resource, etc.
- network resources are divided into lanes according to the granularity of communication.
- the Wi-Fi 2.4G communication mode is divided into 1 lane resource
- the Wi-Fi 5G communication mode is divided into 1 lane resource
- the BR Bluetooth communication mode is divided into 1 lane resource, etc.
- network resources are divided with a preset number of channels as the lane division granularity.
- the Wi-Fi 2.4G communication mode includes 13 adjacent 3 channels are divided into a group of lane resources, channels 1-channel 3 are divided into a group of lane resources, channels 4-channel 6 are divided into a group of lane resources , channel 7-channel 9 is divided into a group of lane resources, channel 10-channel 12 is divided into a group of lane resources, and the extra channel 13 is divided into a group of lane resources, thus completing the network resource division of Wi-Fi 2.4G communication mode .
- channels are divided into lane resources in a preset manner.
- the Wi-Fi 2.4G communication mode includes 13 channels (lane1-lane13) with odd-numbered channels divided into a group of lane resources (such as lane1, lane3, lane5, lane7, lane9, lane11, and lane13), and even-numbered channels Channels are divided into a group of lane resources (for example, including lane2, lane4, lane6, lane8, lane10, and lane12).
- each lane is numbered and marked with a label.
- lanehub distinguishes different lanes according to labels, and allocates corresponding lanes according to application requirements.
- lane1-lane13 are lane resources corresponding to the Wi-Fi 2.4G communication mode.
- the lane tag may also include a communication method corresponding to the lane. For example, mark the number of each lane in the label of lane1-lane13, and the corresponding communication mode is Wi-Fi 2.4G communication mode. Then, after receiving the assigned lane, the subsequent application program can determine the number of the lane and the corresponding communication method according to the lane label.
- the ledger is preset in the electronic device, and the ledger is used to record the usage information of the lanes supported by the local end, such as information including lane usage and monitored lane quality.
- the usage status of the lane includes the usage times of the lane, the service type corresponding to the data transmitted by the lane, and the like.
- Service types include, for example, high-bandwidth services, high-bandwidth and low-latency services, low-bandwidth and low-latency services, and low-latency and high-reliability services.
- the lane usage may also include monitored lane quality information.
- the electronic device determines the quality of the lane by monitoring the signal-to-noise ratio (SNR), load, interference value, received signal strength indication (RSSI) and other parameters during the lane communication process. Further, the electronic device manages the ledger through lanehub.
- SNR signal-to-noise ratio
- RSSI received signal strength indication
- the communication methods supported by device A include Wi-Fi 2.4G communication, BR Bluetooth communication, BLE communication and USB communication.
- the lanehub 1 in device A is used for unified management of the Lane resources of the above-mentioned communication methods, such as managing and recording the ledger of the lane resources.
- the electronic device broadcasts the ledger according to a preset period, so as to realize the interaction of lane information in the communication network.
- the electronic device broadcasts the ledger according to preset rules. If an electronic device needs to occupy certain lane resources for a long time and needs to ensure transmission quality, it can directly broadcast the use of these lane resources to prevent other electronic devices from using the lane resources and affecting communication.
- the ledger managed by lanehub can also record the lane information of the lanes supported by these electronic devices in the ledger broadcast by other electronic devices received. For example, electronic device 1 in the communication network supports five lanes, lane1-lane5, and the local lane information of these five lanes is recorded in the ledger.
- electronic device 1 can receive the account book broadcast by electronic device 2, and electronic device 1 can , to determine the peer lane information of lane1-lane3, then the lane information recorded in the ledger managed by lanehub includes the local lane information of lane1-lane5 supported by electronic device 1, and the peer lane information of lane1-lane3. Subsequently, after lanehub detects that the application program needs to communicate with the electronic device 2, it can determine the allocated lane resources according to the local lane information and peer lane information recorded in the ledger.
- the lanehub in the electronic device 1 determines according to the local lane information that both lane 1 and lane 2 can communicate with the electronic device 2, and the communication quality is relatively good.
- Lanehub determines that the communication quality of lane1 recorded by electronic device 2 is poor according to the obtained peer lane information of electronic device 2, then lanehub may choose to assign lane2 to the application program.
- all lanes supported by electronic devices in the communication network can form a lane network (lane net) 41, and after the electronic devices are connected to the network, they can be synchronized using the lane hub configured therein Lane resource usage.
- device A supports some lane resources in lane net 41, and lane hub 1 in device A is used to manage the lane resources supported by device A; device B supports some lane resources in lane net 41, and lane hub 2 in device B is used to manage devices The lane resources supported by B; the device C supports some of the lane resources in the lane net 41, and the lane hub 3 in the device C is used to manage the lane resources supported by the device C; the lane net 41 is the union of each lane hub in the communication network, and the lane The lane resources managed by each lane hub in the net may overlap. For example, device A and device B transmit data through lane 1 in the lane net. Then lane hub 1 needs to record the usage of lane 1 on device A side, and lane hub 2 needs to record the usage of lane 1 on device B side, that is, the lane resources managed by lane hub 1 and lane hub 2 overlap.
- the lane resources managed by the lane hub of each electronic device include exclusive lane resources (such as the area where the letter M is located in FIG. 4B ) and/or shared lane resources (such as the area where the letter N is located in FIG. 4B ).
- the exclusive lane resource is used to indicate a lane resource not occupied by other services, that is, a lane resource that does not need to be shared with other services is an exclusive lane resource.
- lane hub 1 determines that these lane resources are the exclusive lane resources of device A.
- the lane resource of the wired connection mode of the electronic device is another example.
- lane 1 is only used to carry services between device A and device B, then for lane hub 1 in device A and lane hub 2 in device B, lane 1 exclusively occupies lane resources.
- the shared lane resource is used to indicate a lane resource carrying multiple services.
- lane hub 1 in device A determines to use lane 1 to execute service 1.
- lane 1 is carrying service 2, and service 1 and service 2 are different services.
- lane hub 1 determines that lane 1 is a shared lane resource.
- lane hub 1 is used to manage the 5 lanes corresponding to the communication mode supported by device A, such as lane1-lane5, assuming that the current lane 1-lane 3 are exclusive lane resources, and lane 4 and lane 5 are shared lane resources.
- Lane hub 2 in device B determines to transmit data over lane 1, device C, and broadcasts the use of lane 1. Then, after lane hub 1 obtains the broadcast information, it is determined to change the division of lane 1 to shared lane resources.
- the lane resources available to device A managed by lane hub 1 include exclusive lane resources shown in reference numeral 42, and shared lane resources overlapping with lane resources managed by lane hub 3 shown in reference numeral 43 lane resources.
- the overlapping shared lane resource is used to represent the lane resource occupied by both the service of device A and the service of device C, and does not include the lane resource occupied only by a single service between device A and device C.
- the lane hub when the lane hub needs to allocate 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 ledger. Furthermore, when the lane hub determines that the shared lane resources need to be allocated, it also needs to determine the final allocated lane resources according to the acquired usage of the shared lane resources broadcast by other electronic devices, so as to avoid affecting the communication process of both parties.
- the lane hub first allocates exclusive lane resources, and then allocates shared lane resources.
- the allocation mode of the shared lane resource may be a shared negotiation allocation mode, for example, the lane hub of the relevant electronic equipment may negotiate for lane resource allocation, or the allocation mode may be configured as a first-come-first-served mode.
- the lane hub allocates lane resources according to business needs.
- the reference parameters for lane resource allocation include bandwidth, reliability, interference, and the like. The lane hub prioritizes lane resources with high bandwidth, high reliability, and low interference for services.
- the lane hub determines that the lane resources that can be allocated include the lane resources corresponding to the wired communication mode, it can preferentially allocate the lane resources corresponding to the wired communication mode for the business.
- the lane hub can allocate lane resources for the screen projection service according to the lane resource allocation priorities shown in Table 1 below, and the lane with the priority allocation priority is preferred resources (wherein the order of allocation priority is 1-2-3).
- the lane hub can also refer to the lane resource usage recorded in the received ledger for lane resource allocation.
- the exclusive lane resources include the lane resources corresponding to the USB communication mode, the lane resources corresponding to the ETH communication mode, the lane resources corresponding to the Wi-Fi P2P communication mode, and the lane resources corresponding to the STA-AP-STA communication mode resource.
- the USB communication method and the ETH communication method are wired communication methods, which have lower interference. Therefore, the lane hub determines the allocation priority of the lane resources corresponding to these two communication methods as "1", that is, assigns these two communication methods with the highest priority. lane resources.
- the Wi-Fi P2P communication method is end-to-end communication, while in the STA-AP-STA communication method, the communication between a STA device and another STA device needs to be relayed by the AP device. Then, the transmission path of the STA-AP-STA communication method is long, which may increase the possibility of communication failure. Therefore, the lane hub determines that the allocation priority of lane resources corresponding to the Wi-Fi P2P communication mode is prior to the allocation priority of lane resources corresponding to the STA-AP-STA communication mode, and the allocation priorities of the two communication modes are respectively determined as " 2" and "3".
- the shared lane resources include the lane resources corresponding to the Wi-Fi P2P communication mode and the lane resources corresponding to the STA-AP-STA communication mode. Then, the lane hub can determine the allocation priority of lane resources corresponding to the Wi-Fi P2P communication mode as "1", and determine the allocation priority of lane resources corresponding to the STA-AP-STA communication mode as "2".
- the lane resources with the same priority are allocated in Table 1 above, and the lane hub can randomly allocate the lane resources among them; or, allocate the lane resources used last time according to the historical usage records; or, prompt the user to select the lane resources among them , determine the final lane resource to be used according to the user's choice; or, select multiple lane resources with the same allocation priority to carry services together; or, the user pre-configures the usage plan of the lane resource, and determines the lane resource to be used according to the user's usage plan, For example, the allocation priorities of lane 1 and lane 2 are the same, but the usage sequence of lane 1 in the user's usage plan is prior to the usage sequence of lane 2, then the lane hub can choose lane 1 to carry services; or, users or developers pre-configure Allocation rules, in the case of the same lane resource allocation priority, the lane hub determines the allocated lane resources according to the pre-configured allocation rules; or, the user sets the preferred lane resources (or sets the preferred
- the above table 1 is only used to illustrate the order of possible allocation priorities of exclusive lane resources and shared lane resources, and is not used to limit the types of exclusive lane resources and shared lane resources, and is not used to limit the order of allocation priorities .
- the gallery application requests data transmission, and the transmission service requires flexible bandwidth.
- the transmission of thumbnails requires a small bandwidth
- the transmission of large images requires a large bandwidth.
- the lane resources managed by the lane hub include the lane resources shown in Table 2 below, and the lane hub can allocate lane resources for transmission services according to the lane resource allocation priorities shown in Table 2 below.
- the order of assigning priorities is 1-2-3.
- the lane hub can also allocate lane resources by referring to the lane resource usage recorded in the received ledger.
- the exclusive lane resources include the lane resources corresponding to the USB communication mode, the lane resources corresponding to the ETH communication mode, and the lane resources corresponding to the BR Bluetooth communication mode.
- the USB communication method and the ETH communication method are wired communication methods, which have lower interference, so the lane hub determines the allocation priority of the lane resources corresponding to these two communication methods as "1".
- the bandwidth of the BR Bluetooth communication is also high, so the lane hub also determines the allocation priority of the lane resource corresponding to the BR Bluetooth communication as "1".
- the shared lane resources include the lane resources corresponding to the BR Bluetooth communication mode, the lane resources corresponding to the Wi-Fi P2P communication mode, and the lane resources corresponding to the STA-AP-STA communication mode.
- BR Bluetooth communication and Wi-Fi P2P communication are end-to-end communication. Therefore, the lane hub determines that the allocation priority of the lane resources corresponding to the BR Bluetooth communication mode and the lane resource corresponding to the Wi-Fi P2P communication mode is "1", and assigns the lane resources corresponding to the Wi-Fi P2P communication mode with a longer transmission path The allocation priority is determined to be "2".
- the lane resources with the same priority are allocated in Table 2 above, and the lane hub can randomly allocate the lane resources among them; or, allocate the lane resources used last time according to the historical usage records; or, prompt the user to select the lane resources among them , determine the final lane resource to be used according to the user's choice; or, select multiple lane resources with the same allocation priority to carry services together; or, the user pre-configures the usage plan of the lane resource, and determines the lane resource to be used according to the user's usage plan, For example, the allocation priorities of lane 1 and lane 2 are the same, but the usage sequence of lane 1 in the user's usage plan is prior to the usage sequence of lane 2, then the lane hub can choose lane 1 to carry services; or, users or developers pre-configure Allocation rules, in the case of the same lane resource allocation priority, the lane hub determines the allocated lane resources according to the pre-configured allocation rules; or, the user sets the preferred lane resources (or sets the preferred
- Table 2 is only used to illustrate the order of possible allocation priorities of exclusive lane resources and shared lane resources, and is not used to limit the types of exclusive lane resources and shared lane resources, and is not used to limit the order of allocation priorities .
- the lane hub maintains two ledgers, one of which is used to record the usage of local lane resources; the other ledger is used to record the usage of lane resources in the lane net (such as a public ledger).
- the lane hub updates the local lane resource usage, it updates the public ledger while updating the local ledger, and then broadcasts the public ledger.
- other lane hubs in the lane net can synchronize the public ledger, and merge and update the relevant content of the local ledger, so as to ensure that each lane hub in the lane net can save the same public ledger, that is, each lane hub can synchronize the lane The actual usage of lane resources in net.
- the local ledger in the lane hub records the usage of the lane 1 it manages. After obtaining the public ledger broadcast by other lane hubs, determine whether the local ledger needs to be modified after confirming the records of the usage of lane 1 by other lane hubs. . If it is modified, after the modification, the modified information will be synchronized to the public ledger for synchronization by other lane hubs.
- the lane hub only maintains one ledger, and after the ledger is updated, it directly broadcasts the updated ledger. After other lane hubs obtain the broadcasted ledger, they synchronize the usage of the corresponding lane resources in the local ledger, which can also ensure that the lane net Synchronization of lane resource usage.
- the lane hub maintains an account book and an update record. After the lane hub updates the local account book, it generates and broadcasts the update record accordingly. Other lane hubs synchronize the local account book according to the update record, which can also ensure the synchronization of the lane resource usage in the lane net. .
- the synchronization of the ledger by the lane hub is divided into strong synchronization and weak synchronization.
- the lane hub can determine whether the way of synchronizing ledgers is strong synchronization or weak synchronization according to the business type carried by the lane resources.
- some services need to maintain communication for a long time, or have a large amount of data, or need to maintain low-interference transmission and so on. Therefore, after the lane hub allocates lane resources for such services, it needs to synchronize the usage of the allocated lane resources to other lane hubs in the lane net, so that other lane hubs can avoid interfering with these lane resources during the allocation of lane resources .
- the process of avoiding lane resource allocation conflicts caused by update lags is a strong synchronization process for the hub's local ledger.
- application A requests lane resources to transmit projection data, and the lane hub allocates lane 1 for application A to use.
- After updating the usage of lane 1 recorded in the local ledger it can choose strong synchronization and broadcast the updated ledger to avoid other
- the lane hub preempts lane1, which affects the transmission of application A's projection data. In this way, it is ensured that the screen projection quality of application A will not be affected during the long-term screen projection process.
- some lane resources are preempted temporarily.
- the application releases the lane resources in a short period of time, and the lane hub will update the usage of the lane resources to the previous one. state or directly cancel the previous update, if broadcast synchronization is performed for each update, it will lead to an increase in power consumption. Therefore, a preset cycle can be set, and the ledger broadcast is carried out according to the preset cycle, ensuring the timeliness and reliability of ledger synchronization without increasing unnecessary power consumption due to repeated synchronization.
- the above-mentioned process of synchronizing accounts according to the preset cycle is a weak synchronization process.
- app B needs to transfer photos, and the lane hub determines the size of the data to be transferred. After allocating the lane resources, it is determined that the time required for the transfer process is lower than the preset threshold (for example, less than 3 minutes), so it is not necessary to synchronize the lane resources temporarily. Instead, according to the preset cycle, you can directly synchronize the account book at the time when the account book needs to be synchronized in the future.
- the preset threshold for example, less than 3 minutes
- the lane hub can sign and encrypt the ledger before broadcasting to increase the credibility of the ledger.
- other lane hubs in the lane net confirm the signature, then obtain the corresponding synchronization data, and update the local ledger.
- the ledger can be implemented in the form of blockchain, linked list, etc.
- the blockchain is a chained data structure that combines data blocks in a sequential manner in chronological order, and uses the principles of cryptography to ensure that the data structure cannot be tampered with or forged.
- Distributed ledger In order to ensure the consistency of the blockchain ledger, each lane hub in the lane net will synchronize the lane resource usage of the public ledger by strong synchronization or weak synchronization after the local lane resource usage changes.
- a linked list is a non-sequential and non-sequential storage structure on a physical storage unit. The linked list does not store data in a linear order, but stores a pointer to the next node in each node.
- each lane hub in the lane net needs to be correspondingly recorded in the linked list of the public ledger after the lane resource usage changes, and the linked list occupies a large storage space, so the linked list needs to be cut , reducing storage space occupation and synchronization difficulty.
- the lane hub will clear the locally saved public ledger according to the 24-hour period to reduce the storage space usage.
- the lane hub For another example, set the storage threshold of the linked list.
- the lane hub deletes the linked list. For example, within a certain period of time, the lane resources in the lane net are frequently used, causing the storage space of the public ledger to reach the storage threshold before the pruning cycle is reached. Then, the lane hub also needs to clear the locally saved public ledger to reduce the storage space usage.
- a central node is set in the communication network, and the central node is used to classify lane resources in the communication network. For example, lane resources are classified according to service types, and the lanehub in the subsequent electronic device allocates lane resources matching the lane resource type and service type to corresponding applications during the process of allocating lane resources.
- the classification result of the lane resource type includes at least one of high-bandwidth lane resources, high-bandwidth and low-latency lane resources, low-bandwidth and low-latency lane resources, and low-latency high-reliability lane resources.
- high-bandwidth lane resources can provide higher bandwidth for transmitting data of high-bandwidth services with higher bandwidth requirements.
- each type of lane resource includes one or more lanes. It can be 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.
- the central node is, for example, an electronic device capable of maintaining communication in a communication network, or an electronic device with strong computing capability, or a non-battery device (that is, a device that can guarantee a long working time).
- the devices in the communication network exchange information, and a device that meets some or all of the above conditions is elected as the central node.
- the central node is a router.
- the devices in the communication network can re-elect the central node for lane resource classification.
- the 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 communication modes in the communication network, and initialize the lane classification results.
- the central node directly defines lane1-lane10 as high-bandwidth lane resources, and lane11-lane20 as high-bandwidth and low-latency lane resources.
- the central node divides lane resources according to the channel capability corresponding to the communication mode. For example, the channel bandwidth of the Wi-Fi 5G communication mode is high, and the central node defines the lane resources under 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 situation during the communication process of the electronic devices in the communication network.
- the central node in the communication network obtains the ledger of each electronic device in the communication network, and can determine the status of all lane resources in the communication network. Afterwards, the central node performs quality analysis on the lane resources, and adjusts part or all of the initial classification results of the lane resources according to the quality analysis results to obtain a final lane resource classification result. For example, assuming that the central node determines lane1 corresponding to a channel in the Wi-Fi 5G communication mode as a high-bandwidth lane resource during the initialization process, electronic device A and electronic device B are located in two adjacent rooms respectively, and need to be separated wall for high-bandwidth business communications.
- the central node determines that the quality of high-bandwidth service transmission performed by electronic device A and electronic device B through lane1 is poor, so lane1 can be adjusted to a lane of other lane resource types. Afterwards, the central node broadcasts the lane resource classification result, and after the electronic device receives the lane resource classification result, the lanehub adds the lane resource classification result to the label of each lane, and then the lanehub distinguishes each lane according to the label identification.
- the above-mentioned central node adjusts the classification result of the lane resource according to a preset timing. For example, the central node adjusts the lane resource classification results according to the status of the monitored lane resources in the early hours of the morning, when there is less demand for data transmission of electronic devices. For another example, the central node determines that the classification results of one or more lanes need to be adjusted, and in the case that no data is transmitted by these lanes, the classification results of these lanes are adjusted.
- blockchain technology can be used to determine the electronic equipment used to classify lane resources and adjust lane resource classification.
- each electronic device uses its computing power to fight for the lane resource classification right, that is, the winner of the competition according to the established rules obtains the right to determine the lane resource classification, Other electronic devices synchronize the determined lane resource classification results.
- the blockchain technology can also be used to competitively determine the electronic equipment used to adjust the classification of lane resources; or, the device that directly determines the classification results of lane resources can adjust the classification of lane resources.
- the classification of lane resources is determined through blockchain technology, which ensures that the lane resources in the lane net have a unified lane resource classification result for each lane net, ensuring the consistency of standards.
- other electronic devices are prevented from tampering with the classification results of the lane resources.
- the lanehub in the electronic device provides a unified interface for calling by application programs in the electronic device.
- the interface includes a lane resource allocation interface, a lane resource release interface, a lane resource signal quality detection interface, and the like.
- Lanehub allocates lane resources for applications through the lane resource allocation interface. After the application completes data transmission, it releases the lane resources through the lane resource release interface, and lanehub can obtain the release status of the lane resources for lane resource adjustment. Lanehub detects the quality of lane resources through the lane resource signal quality detection interface.
- device A, device B, and device C are devices in a communication network, such as that an application program in device A needs to call an interface to send data to device B using lane resources.
- the lanehub in device A obtains the local ledger, which records the local lane information of the lanes supported by the local end and the peer lane information obtained by receiving the broadcast message (for example, device A and The lane information supported by both device B, and the lane information supported by both device A and device C in the lane information recorded by device C).
- lanehub determines the corresponding lane resources according to the service type requested by the application, and allocates lane resources for the application through the lane resource allocation interface according to the local lane information and peer lane information recorded in the ledger.
- two ledgers are stored in device A, including a local ledger and a public ledger that record the usage of lane resources supported by itself.
- device A when it allocates lane resources for the data to be sent, it can directly determine the final allocated lane resources according to the lane resource conditions recorded in the public ledger. Alternatively, device A refers to the latest lane resource conditions recorded in the local ledger and the lane resource conditions recorded in the public ledger to determine the final allocated lane resources. If the ledger synchronization cycle of weak synchronization has not arrived, and the usage of some lane resources has not been synchronized to the public ledger, the lane resource conditions recorded in the local ledger may be different from the lane resource conditions recorded in the public ledger, so you need to refer to the latest records recorded in the local ledger Lane resource situation.
- the lanehub 51 in the electronic device includes a monitoring module 511, an allocation module 512 and an adjustment module 513.
- the monitoring module 511 is used to monitor the lane resource usage and analyze the lane resource usage.
- the monitoring module 511 can obtain the quality measurement results of the lane resources (such as the load of the lane resources, RSSI, SNR, etc.) by the measurement module 521 in the network driver 52, and record and analyze the quality measurement results.
- the lane resources of device A include 13 lane resources corresponding to Wi-Fi 2.4G communication, 30 lane resources corresponding to BR Bluetooth communication, 78 lane resources corresponding to BLE communication, and 78 lane resources corresponding to USB communication. 1 lane resource, the monitoring module 511 records the quality measurement results of these lane resources.
- the application program in device A applies for lane resources through a unified interface, such as a lane resource allocation interface. And in the lane resource application process, submit the service type and the requested lane quantity for the lane resource. Then, as shown in FIG. 5A , the allocation module 512 in lanehub obtains the service type requested by the application, determines the lane resource type corresponding to the service type, and then allocates the lane resource corresponding to the service type for the application. If it is determined that the service type is a high-bandwidth service, allocate one or more lanes included in the high-bandwidth lane resource for the application program to call according to the requested number of lanes, and record the allocation of the lane resources.
- a unified interface such as a lane resource allocation interface.
- the number of allocated lanes is the same as the number of lanes requested by the application (that is, lanehub allocates a corresponding number of lanes according to the number of lanes requested by the application).
- the characteristics of the physical paths corresponding to each assigned lane are different.
- lanehub allocates a default number of lane resources to the application, such as allocating a lane.
- the allocation module 512 in the lanehub can also obtain the lane resource quality measurement results monitored by the local monitoring module 511, and can rate the lane resources according to the quality measurement results. For example, the allocation module 512 determines the lane resource category according to the lane label, and then scores the lanes in different lane resource categories according to the lane resource quality measurement results to determine the priority. For example, assign higher priority to lane resources with better quality in the same lane resource category. Then, during the lane resource allocation process, after the lane resources of this category are matched, the lane resources with higher priority will be allocated first, and the lane resources with lower priority will not be allocated temporarily.
- the allocation module 512 in lanehub sets lane1 as a lower priority in the lane resource category (for example, the rating is 10), and determines it as a non-preferred lane resource. Subsequently, when the allocation module 512 determines that the service type corresponds to the lane resource request of the lane resource category, it may not allocate lane1 to the application program requesting the lane resource, so as to avoid service execution failure due to poor quality of the lane resource.
- the electronic device may also obtain ledgers broadcast by other electronic devices in the communication network, including scores of quality measurement results of lane resources by other electronic devices.
- lanehub synthesizes the scores of the lane resources monitored by the local end to obtain a comprehensive score of the lane resources, and then lanehub allocates lane resources according to the comprehensive scores.
- the electronic device does not score the lane resources individually, but determines the rating of the lane resources after a comprehensive assessment based on the quality measurement results monitored by the local end and the quality measurement results obtained in the broadcast ledger, and then records them in Table 4 above.
- the interface shown in (a) in FIG. 6 is displayed 601. It is used to determine the photo selected by the user and the method of sending the photo. Compared with the interface 102 shown in (b) in Figure 1, the user does not need to select a specific communication method among the multiple communication methods supported by the electronic device.
- the electronic device detects that the user clicks the operation of the sharing control 61, it determines the If it is necessary to send the photo to the peer device, an interface 602 as shown in (b) in FIG. 6 may be displayed to prompt the user to confirm the sending device. If it is detected that the user clicks on the control 62 of device B, it is determined that the photo selected by the user needs to be sent to device B.
- the gallery application in the electronic device can send a photo sending request to lanehub, and carry the business type of this request in the photo sending request.
- Lanehub can determine lane resources according to the business type. For example, if the amount of photo data to be sent is large, and the gallery application determines that the corresponding business type is a high-bandwidth business, then lanehub will match the corresponding high-bandwidth lane resources according to the high-bandwidth business.
- lanehub allocates the lane with the highest score among the high-bandwidth lane resources according to the number of requested lanes. Assume that high-bandwidth lane resources include lane1-lane10.
- the lane with the highest score is lane1, and lane1 can be assigned to the gallery application to transmit the photos selected by the user to device B.
- lanehub determines that the lane with the highest local score is lane1, but according to the peer lane information of device B, it determines that device B's score for lane1 is low (for example, lower than the preset threshold), then sequentially determines the lane with the second highest local score.
- the second-scoring lane can be assigned to the gallery application for transferring the photos selected by the user to the device b. That is, lanehub determines the comprehensive score of the electronic devices at both ends for the corresponding lane resources based on the local ledger and the peer ledger, and allocates the optimal lane resources for the application.
- the electronic device can automatically determine the lane resources of the application, reduce the difficulty of user operation, improve the quality of data transmission, and enhance the user experience.
- the method provided in the embodiment of the present application may also be applied in the process of establishing a connection with an electronic device.
- the user wants to establish a communication connection between electronic device A and electronic device B.
- electronic device A can establish a communication connection with electronic device B according to the communication method selected by the user. User operations are more complicated.
- the user only needs to instruct electronic device A to establish a connection with electronic device B, and electronic device A can automatically select the lane resource (for example, according to the usage information of the lane resources in the communication network, the idle lane resources with better quality are determined), which effectively reduces the difficulty of user operation and improves the user experience.
- the electronic device A determines that the user needs the electronic device A to establish a communication connection with the electronic device B, it can automatically determine the lane resources used for communication, and the user does not need to select the communication mode, which effectively reduces the difficulty of the user's operation.
- the electronic device can also group the communication modes supported by the electronic device, and the user can select different groups of communication modes for communication based on the grouping results. For example, assume that communication methods are divided into wired communication methods and wireless communication methods. In the scenario shown in FIG. 7 , electronic device A may display two options of wired connection and wireless connection for the user to choose. For example, after detecting that the user selects the wireless connection option, electronic device A automatically determines a target lane resource among the lane resources corresponding to the wireless connection, and establishes a communication connection with electronic device B through the target lane resource.
- lane resources are managed in groups to improve management efficiency.
- the user can select the corresponding group according to the requirement to improve the user experience.
- lanehub provides a unified interface for application programs to call, but the data transmission interfaces of different communication modes between devices are different.
- the electronic device determines the lane resources allocated to the application program, it determines the corresponding transmission mode according to the lane label , and then determine whether a communication connection corresponding to the communication mode corresponding to the assigned lane resource is established with the peer device. If not established, the data can be sent after the communication connection is established; if the communication connection has been established, the data can be directly sent through the established communication connection.
- the lane resource allocated by lanehub to the gallery application is lane1
- the communication mode corresponding to lane1 is BLE communication.
- the gallery application obtains the allocated lane resources, it requests the communication module in the electronic device to send the photo selected by the user.
- the communication module determines that the communication mode corresponding to lane1 is BLE communication according to the label of lane1.
- the peer device is device B.
- the communication module determines whether the electronic device establishes a Bluetooth connection with the device B.
- a Bluetooth connection establishment request may be sent to the device B to establish the Bluetooth connection. Afterwards, based on the Bluetooth connection, the gallery application sends the photos selected by the user to device B via lane1. If the communication module determines that the electronic device has established a Bluetooth connection with device B, the gallery application directly sends the photo selected by the user to device B through lane1.
- the electronic device may also determine the priority of the communication modes supported by the electronic device according to user operations. For example, the user sets priority to use Bluetooth to send data. Then, in the process of lanehub selecting lane resources, according to user settings, the lane resource with the highest rating among the bluetooth communication lanes is preferentially allocated to the application for use.
- the lane resources allocated by lanehub according to the service type and the requested number of lanes can be lane resources corresponding to one physical characteristic (for example, only one lane is allocated), or lane resources corresponding to multiple physical characteristics (such as Allocate multiple lanes), the number of physical characteristics is equal to the number of requested lanes.
- various physical characteristics may correspond to the same or different communication methods. For example, in the DBDC scenario, both Wi-Fi physical paths can correspond to Wi-Fi 2.4G communication; or, one of the Wi-Fi physical paths corresponds to Wi-Fi 2.4G communication, and the other Wi-Fi The -Fi physical channel corresponds to the Wi-Fi 5G communication method.
- the number of lanes requested by the application is 2, and the service type is a high-bandwidth service.
- Lanehub can select lanes corresponding to two different physical characteristics from the lane resources of the high-bandwidth service, and allocate them 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 included in the high-bandwidth lane resource is less than two, lanehub determines that the current number of lane resources does not meet the requirements of the application, and cannot allocate lane resources, and can send a lane resource application failure response to the application.
- the lane resource application failure response may also carry a failure reason, and the application determines whether to apply for a smaller number of lane resources or apply for other types of lane resources according to the failure reason. If the number of lanes included in the high-bandwidth lane resources is greater than or equal to two, lanehub determines that the current number of lane resources meets the application requirements, and lanehub obtains the rating scores of all high-bandwidth lane resources as shown in Table 4 above, and ranks the high-bandwidth lane resources according to The rating scores are sorted from high to low, and according to the comprehensive rating scores of the electronic devices at both ends, two lanes that are ranked first and have different physical characteristics are obtained, and these two lanes are assigned to the application.
- the service type requested by the application is a high-bandwidth service, and the number of lanes requested is 2;
- the high-bandwidth lane resources managed by lanehub include lane resources of Wi-Fi 2.4G communication mode, lane resources of Wi-Fi 5G communication mode, And the lane resources of the BLE communication method, and each communication method corresponds to a physical characteristic.
- lanehub selects a lane with the highest rating among the high-bandwidth lane resources of the Wi-Fi 2.4G communication mode, and selects a lane with the highest rating among the high-bandwidth lane resources of the Wi-Fi 5G communication mode
- For the lane with the highest score select a lane with the highest score among the high-bandwidth lane resources of the BLE communication method.
- the three lanes with the highest ratings are sorted according to the ratings, and the two lanes with the highest ratings are selected, and these two lanes are assigned to the application.
- the application program is pre-configured with a lane number determination rule for determining the requested number of lanes, and a usage rule for each lane when the allocated lane resources include multiple lanes.
- the rule for determining the number of lanes includes determining the number of lanes to be requested according to the amount of data to be transmitted. If the data to be transferred is a large file whose data volume exceeds the preset threshold, the application determines to request two lanes according to the lane number determination rules.
- the usage rules for the assigned multiple lanes include equally dividing the data to be transmitted, each lane carries the corresponding data to be transmitted, and the application program transmits data in parallel through multiple lanes.
- the allocated lane resources determined by the application include a lane of Wi-Fi 5G communication mode and a lane of BLE communication mode.
- the application program can divide the data to be transmitted equally, and in the process of transmitting half of the data through a lane of the Wi-Fi 5G communication method, transmit the other half of the data through a lane of the BLE communication method. Or, according to the communication mode corresponding to the lane, the proportion of the data to be transmitted is divided.
- the ratio may be a ratio pre-configured in the application program by the developer, or may also be a user-defined transmission ratio, or may also be a ratio determined according to the communication quality of the lane, or a ratio determined by other means.
- the allocated lane resources determined by the application include a lane of Wi-Fi 5G communication mode and a lane of BLE communication mode.
- the application program can divide the data to be transmitted into three parts. In the process of transmitting two-thirds of the data through a lane of the Wi-Fi 5G communication method, the remaining third of the data is transmitted through a lane of the BLE communication method.
- the peer electronic device splices the received data to obtain complete transmission data.
- the method of data splicing reference may be made to the prior art, which is not specifically limited in this embodiment of the present application.
- the communication module or management module in the electronic device can split and splice the transmitted data. For example, application A in electronic device A sends data to application B in electronic device B. Then application A sends the data to be transmitted to the communication module in electronic device A, and the communication module divides the data according to the number of lane resources allocated by the lane hub in electronic device A and transmits it. 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.
- the lane hub can allocate multiple lanes for the same service in the frequency domain through statistical multiplexing in a counting manner, thereby improving transmission efficiency.
- the lane hub can also perform statistical multiplexing according to the bandwidth from the perspective of the time domain, and allocate one lane to carry multiple services. For example, multiple services use the same lane in chronological order. For example, high-priority services with higher time limits use lanes first, and low-priority services with lower time limits use lanes later. Therefore, the completion of the service will not be affected, and the interference problem caused by executing multiple services at the same time will not occur, and the quality of application transmission will be improved.
- lanehub maintains a ledger that records lane resources of electronic devices.
- lanehub maintains the ledger through the monitoring module 511 and the distribution module 512 shown in Figure 5A.
- the contents recorded in the ledger include the contents recorded in the local end as shown in the above table 3 and the above table 4 and received by broadcasting in the communication network.
- the target lanes recorded by other electronic devices correspond to the content shown in Table 3 and Table 4 above.
- the target lane is the lane corresponding to the communication mode supported by the electronic device.
- lanehub after lanehub allocates the lane resources to the application, it will monitor the usage of the lane resources, and when it detects that the communication quality is poor, it can adjust the lane resources to meet the data transmission requirements of the application (such as packet loss rate is less than a preset threshold, etc.).
- adjusting the lane resource includes lane resource parameter adjustment, lane resource switching, and the like.
- the lane hub can adjust the lane resources one or more times to ensure the transmission quality.
- the lane hub allocates lane resources to the application program at scheduling point 1 according to the request of the application program through the allocation module 512 shown in FIG. 5A .
- lanehub collects the information of the data transmission quality measured by the measurement module 521 in the network driver 52 during the transmission process through the monitoring module 511 shown in FIG. 5A .
- the network transmission protocol used in the data transmission process is transmission control protocol (transmission control protocol, TCP)/network protocol (pnternet protocol, IP), in the TCP/IP protocol, in the network transmission process It includes 4-layer network protocol transmission as shown in FIG. 5B , such as including application layer, transport layer, network layer and physical link layer.
- the monitoring module 511 can obtain information such as quality of experience (quality of experience, QoE) information of the application program, protocol load information, network card load information, physical channel QoE information, etc. through information collection. Afterwards, lanehub analyzes the lane resource usage through the allocation module 512 shown in FIG. 5A based on the collected information, and determines whether lane resource adjustment is required.
- quality of experience quality of experience, QoE
- QoE quality of experience
- the allocation module 512 may analyze the lane resource usage from the perspectives of time domain, quality, and decision-making and execution.
- lane resources are divided based on the frequency domain and channel as granularity, then a time-sharing strategy can be adopted to allow different transmission tasks to call the same lane resources time-sequentially.
- the allocation module 512 allocates lane resources through time-sharing strategies such as Wi-Fi hierarchical clock technology and BR Bluetooth hierarchical clock technology. Then, the monitoring module 511 needs to monitor the use of lane resources from the perspective of time domain, and the allocation module 512 also needs to determine whether to adjust the allocation of lane resources from the perspective of time domain.
- the distribution module 512 can obtain the quality measurement results shown in the above table 3, analyze the quality of service (QoS) of the lane resources, and determine whether to adjust the QoS strategy (such as adjusting the QoS standard for evaluating the lane resources, etc.) , and analyze the usage of lane net.
- QoS quality of service
- Another example is to monitor the allocation and scheduling of lane resources, such as monitoring the lane resource scheduling of each lane hub in the lane net, to confirm whether it will affect the use of lane resources of the current application.
- QoS coordination can be realized, and low-priority services can be adjusted including business speed limit and avoidance, so as to ensure that long-term services (such as screen projection services, etc.) will not be affected by short-term services (such as picture sharing services, etc.), Or services with high requirements on transmission quality will not be affected by other services.
- lanehub uses the allocation module 512 shown in FIG. 5A to determine whether to re-allocate lane resources according to the analysis result of lane resource usage.
- 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. Dynamic switching of lane resources can ensure that when some lane resources are unavailable, the available lane resources can be predicted and replaced in time to ensure business continuity.
- the monitoring module 511 collects the information of the lane resources in the lane net, it will synchronously update the local ledger information, such as updating the content recorded in the above-mentioned Table 3 and Table 4.
- the allocation module 512 can not only adjust lane resources according to the monitored lane resource information, but also perform lane resource allocation based on the latest lane resource usage in the subsequent lane resource allocation process, effectively improving communication quality.
- the hierarchical monitoring of the TPC/IP protocol illustrated in FIG. 5B is only an exemplary illustration.
- the lane hub can also transmit data through other network protocols, so the network layering results that need to be monitored may be the same or different, such as 7-layer network protocol, 5-layer network protocol, etc., for this application embodiment Not specifically limited.
- lanehub ensures the data transmission quality of the application program by adjusting the lane resource parameters.
- the monitoring module 511 in the lanehub monitors the usage of the lane resources assigned by the allocation module 512 to the application, for example, the monitoring module 511 acquires the quality of the lane resources by the measurement module 521 in the network driver 52 in real time measurement results.
- the monitoring module 511 can also obtain the ledger broadcast by the peer electronic device in communication, and determine the quality measurement result of the lane resources supported by itself recorded therein. Afterwards, the adjustment module 513 is notified to adjust the usage of the lane resources.
- the adjustment module 513 in device A determines that the parameters of lane1 need to be adjusted according to the quality measurement results of the lane resources, and sends an adjustment instruction to the network driver 52, and the network driver 52 adjusts the parameters of lane1 through the execution module 522 after receiving the adjustment instruction.
- lanehub also uses the allocation module 512 to allocate the latest lane resource of the communication mode 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, Then, after receiving the adjustment instruction, the execution module 522 instructs the application program to use the newly allocated lane resource for data transmission. For example, assuming that the lane segmentation granularity is channel, instruct the application to switch channels in the same communication mode for data transmission.
- the Wi-Fi 2.4G communication mode includes a physical path
- the lane assigned by lanehub to the application is a lane under the Wi-Fi 2.4G communication mode.
- lanehub detects that the quality of the lane does not meet the data transmission requirements, it will obtain the ratings of other lanes in the Wi-Fi 2.4G communication mode. If the lane with the highest rating meets the data transmission requirements, you can assign the lane with the highest rating to the application and instruct the application to release the lane with poorer quality.
- the application can choose whether to switch lanes.
- the adjustment module 513 sends an adjustment instruction to the execution module 522 for instructing to adjust the power of the lane resource.
- the lane segmentation granularity is channel, and other conditions are the same, the greater the channel power of the lane, the stronger the signal strength, and the better the data transmission quality.
- the lanehub determines that lane parameter adjustment is required, it sends a power adjustment instruction to the execution module 522 to improve signal strength and data transmission quality.
- Lanehub can determine whether power adjustment is required or which parameters need to be adjusted according to the type of communication mode. For example, the USB wired communication method cannot improve the data transmission quality by adjusting the channel power like the Wi-Fi communication method.
- the usage of the lane resources is monitored, and when the quality of the lane resources is poor, parameters of the lane resources can be adjusted to ensure that the application program provides a better network transmission effect during the data transmission process. In order to avoid data transmission failure due to poor lane resource quality.
- lanehub determines that the quality of the lane resource is poor, it can also adjust other lane resource parameters so that the lane resource meets the data transmission requirements of the application program. For example, by adjusting communication slices, the adjustment of lane resource parameters is completed.
- the lanehub ensures the data transmission quality of the application program through lane resource switching. For example, after lanehub adjusts the lane resource parameters, the quality of the lane resource is still poor and cannot meet the data transmission requirements of the application, then it can be based on the local lane information recorded in the local ledger and the peer lane information obtained by receiving broadcast messages
- the lane label in determines the transmission mode supported by the peer device for data transmission, and directly switches the lane resources of other transmission modes supported by both electronic devices for data transmission, so as to improve the transmission quality.
- lanehub determines that the quality of lane resources is poor, it determines the transmission mode supported by the peer device for data transmission according to the lane label, and directly switches the lane resources of other transmission modes supported by both electronic devices for data transmission to improve transmission. quality.
- the adjustment module 513 in the lanehub 51 adjusts the lane resource parameters through the execution module 522, it is determined that the measurement result of the lane resource quality monitored by the monitoring module 511 is still poor.
- the recorded ledger and the acquired ledger broadcasted by other electronic devices in the communication network according to the communication method recorded in the lane tag, determine the communication method supported by the peer electronic device of the application program corresponding to the lane resource with poor quality, and then determine the communication method that is compatible with this Lane resources of the communication mode supported by the terminal electronic device in the same communication mode.
- the adjustment module 513 determines to improve the communication quality by adjusting the communication mode, and notifies the allocation module 512 to select lane resources from other communication modes supported by both electronic devices, and re-allocate the lane resources with better quality.
- the adjustment module 513 obtains the allocated lane resources of other communication modes with better quality, and instructs the execution module 522 in the network driver 52 to adjust the lane resources of the application communication.
- the application A in the first electronic device sends a message to the second electronic device through the lane resource in the Wi-Fi 2.4G communication mode.
- the device sends data other electronic devices join the communication network including the first electronic device and the second electronic device through the Wi-Fi 2.4G communication mode before the data transmission is completed, resulting in changes in the network environment of the Wi-Fi 2.4G communication mode. Poor, does not meet the requirements of application A (for example, data transmission needs to be completed within 1 hour).
- the lanehub in the first electronic device monitors the usage of lane resources, and determines that the current quality of lane resources does not meet the data transmission requirements of application A, and can determine other communications supported by both the first electronic device and the second electronic device according to the lane label recorded in the ledger mode, such as BR Bluetooth communication mode. Afterwards, the lanehub in the first electronic device determines that the lane resources of the BR Bluetooth communication mode meet the data transmission requirements of application A, and allocates the lane resources of the BR Bluetooth communication mode for use by application A, thereby improving the quality of data transmission.
- the communication network includes multiple electronic devices such as the electronic device 1 , the electronic device 2 , the electronic device 3 , and the electronic device 4 .
- business 1 is performed between electronic device 1 and electronic device 2
- business 2 is performed between electronic device 1 and electronic device 3
- business 3 is performed between electronic device 3 and electronic device 4
- business 1 is for example
- business 2 and business 3 are for example
- business 1 is performed between electronic device 1 and electronic device 2
- business 2 is performed between electronic device 1 and electronic device 3
- business 3 is performed between electronic device 3 and electronic device 4
- business 1 is performed between electronic device 1 and electronic device 2
- business 3 is performed between electronic device 3 and electronic device 4
- business 1 is performed between electronic device 1 and electronic device 2
- business 3 is performed between electronic device 3 and electronic device 4
- business 1 is performed between electronic device 1 and electronic device 2
- business 3 is performed between electronic device 3 and electronic device 4
- business 1 is performed between electronic device 1 and electronic device 2
- business 3 is performed between electronic device 3 and electronic device 4
- business 1 is performed between
- Lane hub 3 determines that the priority of service 1 is lower than that of service 3, and can negotiate with lane hub 1 in electronic device 1 and/or lane hub 2 in electronic device 2, or directly preempt lane 1, so that service 1 can be switched to use Other lane resources. If it is finally determined, the lane resource allocated to business 3 is lane 1, and the lane resource allocated to business 1 is lane 4; or, the lane resource allocated to business 1 is lane 2, and the lane resource is shared with business 2.
- the usage of lane resources is monitored.
- the lane resources of the communication mode supported by the electronic devices at both ends of the data transmission can be switched to ensure that the application program provides better network transmission during the data transmission process. Effect. In order to avoid data transmission failure due to poor lane resource quality.
- the electronic device can provide the user with the optimal data transmission experience without the user's perception. For example, after the user chooses to transfer photos through the network on the interface 602 shown in (b) in Figure 6, the electronic device can automatically select the optimal lane resource to transfer photos without any other operations, providing the user with the most Excellent photo transfer experience.
- the electronic equipment conducts unified planning for all network resources through the lanehub to avoid co-channel interference.
- the co-channel interference can be reduced through parameter adjustment; or the co-channel interference can be eliminated through lane resource switching.
- the lanehub monitors the lane resource usage, and when it is determined that there is a better lane resource, it can actively switch the lane resource without the user's perception, so as to further improve the network transmission quality.
- the electronic devices in the communication network broadcast the ledger according to the preset cycle (the preset cycle corresponding to different electronic devices is the same or different), then correspondingly as shown in Figure 5A, the monitoring module 511 in the lanehub 51 can obtain other In the ledger broadcast by the electronic device, in the process of monitoring the allocated lane resources, if it is determined that there are other lane resources with better quality, the adjustment module 513 is notified to adjust the lane resources.
- the communication mode corresponding to the lane resource after adjustment is the same as or different from the lane resource before adjustment.
- lanehub 51 and network driver 52 are not segmented into modules, lanehub 51 and network driver 52 directly realize the corresponding functions in the above-mentioned embodiments.
- lanehub allocates corresponding lane resources after receiving a certain type of service request from an application program for the first time. Then, after lanehub receives the type of service request sent by the application, it will directly allocate the previously allocated lane resources according to the historical records. This can improve the lane resource allocation efficiency of lanehub, thereby improving the data transmission efficiency.
- lanehub adjusts the lane resources corresponding to the service type, it can update the lane resource usage records in the ledger and record the adjusted lane resources. Then, when lanehub receives a lane resource request, it allocates lane resources according to the latest record.
- electronic devices manage and plan network resources in a unified manner, segment and schedule network resources in units of lanes, and realize comprehensive scheduling of wired resources and wireless resources, so that applications are not limited to independent interfaces of communication methods.
- Developers can directly develop applications based on service types; electronic devices can directly allocate corresponding lane resources according to the service types requested by applications; users do not need to choose communication methods as shown in Figure 1, reducing user operation difficulty.
- the electronic device can allocate better-quality lane resources to the application program according to the network environment, thereby improving network transmission quality.
- the electronic device can dynamically adjust the lane resources directly through parameter adjustment or communication mode adjustment without the user's perception, so as to ensure the quality of data transmission and improve the user experience.
- 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.
- the first lane, the second lane and the third lane are lanes supported by the first electronic device, the first lane corresponds to the first type of network access, and the second lane corresponds to the second type of network access The first channel of the third lane corresponds to the second channel in the second type of network access.
- the first electronic device when it needs to send data, it can select the lane resource used for this data transmission from the lane resources corresponding to all the communication modes supported by the local end. For example, assume that the first electronic device supports two communication modes: BLE communication mode and Wi-Fi 2.4G communication mode, wherein the first type of network access is the network access of BLE communication mode, and the second type of network access is Wi-Fi 2.4 The network path of G communication mode. Then, the first lane corresponds to the 78 channels included in the BLE communication method, and the second lane and the third lane correspond to the 78 channels included in the Wi-Fi2.4G communication method.
- first type of network path and the second type of network path are used to represent different types of physical characteristic paths.
- the first electronic device determines that the data needs to be sent to the second electronic device, it determines the service type corresponding to the data. According to the service type, the target lane is determined in the first lane, the second lane and the third lane.
- the service type includes, for example, high-bandwidth service, high-bandwidth and low-latency service, low-bandwidth and low-latency service, and low-latency service with high reliability.
- the communication network including the first electronic device and the second electronic device may also include a central device (that is, a central node).
- the central device may be the first electronic device or the second electronic device, or may be a other devices.
- the central device classifies the lane resources according to the business type, and in the process of allocating the lane resources, the subsequent electronic device allocates the lane resources matching the lane resource type and the business type to the corresponding application program for use.
- the classification results of lane resources include high-bandwidth lane resources, high-bandwidth and low-latency lane resources, low-bandwidth and low-latency lane resources, and low-latency and high-reliability lane resources.
- the first electronic device determines that it needs to send data to the second electronic device, before determining the target lane for transmitting data in the first lane, the second lane and the third lane, the first electronic device It is also necessary to acquire the locally recorded first usage information of the first lane, the second lane, and the third lane, and acquire the first lane, the second lane, and the third lane broadcast by multiple electronic devices in the communication network including the first electronic device. Lane's second usage information. Furthermore, the first electronic device determines the target lane according to the first usage information, the second usage information and the service type.
- the ledger for recording lane usage is preset in the electronic device, which includes the score of the electronic device for the measurement result of the lane resource quality.
- the first electronic device When the first electronic device needs to send data, it obtains the local ledger and the ledger broadcast by other electronic devices in the communication network.
- the first electronic device obtains a comprehensive score of the lane resources based on the scores of the lane resources supported by itself recorded in the broadcast account book and the scores of the lane resources monitored by the local end, and then the first electronic device allocates the lane resources according to the comprehensive scores . For example, according to the scores, the first electronic device obtains a first number of target lanes with higher scores and different types, where the first number is the number of lanes required for data transmission.
- the first electronic device locally stores a first ledger and a second ledger
- the first ledger is used to record the usage information of the first lane, the second lane, and the third lane
- the second ledger is used to record information including Usage information of all lanes in the communication system of the first electronic device.
- the first electronic device determines that it needs to send data to the second electronic device, before determining the target lane for transmitting data in the first lane, the second lane, and the third lane
- the first electronic device needs to obtain the Record the first usage information of the first lane, the second lane, and the third lane, and obtain the second usage information of the first lane, the second lane, and the third lane recorded in the second ledger.
- the first electronic device may determine the target lane according to the first usage information, the second usage information and the service type.
- the electronic device there are two ledgers stored in the electronic device, one ledger is used to record the use information of the lane resources supported by itself, and the other ledger is a public ledger used to record the use of all lane resources included in the communication system (lane net) information.
- the public ledger stored in each electronic device in the communication system is synchronized. Then the electronic device can determine the optimal lane resource according to the latest lane usage information recorded locally and the lane usage information recorded in the public ledger. Alternatively, the electronic device directly determines the optimal lane resource according to the usage information of the lane recorded in the public ledger.
- the first usage information or the second usage information includes one or more of the following: usage times of the lane, service type corresponding to the historical transmission data of the lane, and quality parameter information of the lane.
- the number of target lanes is one or more; wherein, when the number of target lanes is multiple, the multiple target lanes are channels of different types; when the number of target lanes is one , the target lane is transmitting the first data; or, when the number of the target lane is one, the target lane is idle.
- the lane hub can allocate multiple lanes for the same service in the frequency domain through counting statistical multiplexing to improve transmission efficiency. Then, the number of target lanes may be one or more.
- the lane hub can also perform statistical multiplexing according to the bandwidth from the perspective of the time domain, and allocate one lane to carry multiple services. For example, multiple services use the same lane in chronological order. For example, high-priority services with higher time limits use lanes first, and low-priority services with lower time limits use lanes later. Therefore, the completion of the service will not be affected, and the interference problem caused by executing multiple services at the same time will not occur, and the quality of application transmission will be improved. Then, when the priority of the data to be transmitted is low, the lane hub may allocate the lane that is transmitting other first data with higher priority for this service. After the transmission of the first data with higher priority is completed, The first electronic device can transmit data through the target lane. Alternatively, the data to be transmitted has a higher priority, and the target lane that is transmitting the first data may be preempted, and the data to be transmitted is transmitted through the target lane first, and then the first data is transmitted.
- the lane resource may be determined as the target lane. For example, if the first electronic device has a lane resource corresponding to a wired transmission mode (such as a USB transmission mode) and is idle, then the lane resource corresponding to the wired transmission mode may be preferentially determined as the target lane.
- a wired transmission mode such as a USB transmission mode
- the first electronic device sends data to the second electronic device through the target lane.
- the first electronic device monitors usage of the target lane, and obtains third usage information of the target lane.
- the usage information of the target lane recorded locally is updated to the third usage information.
- the third usage information is broadcast.
- the electronic devices in the communication network realize the interaction of the lane usage information by broadcasting the lane usage information, and then when the electronic devices need to send data, they can determine the target lane according to the received lane usage information broadcasted by other electronic devices.
- broadcasting the third usage information includes: broadcasting the third usage information when the usage duration of the target lane exceeds a preset duration.
- the third usage information is broadcast according to a preset period.
- the synchronization of the lane hub ledger is divided into strong synchronization and weak synchronization.
- the lane hub can determine whether the way of synchronizing ledgers is strong synchronization or weak synchronization according to the business type carried by the lane resources.
- this type of lane resource is a lane resource that requires strong synchronization.
- some lane resources are preempted temporarily. After the lane hub updates the lane resource usage locally, the application releases the lane resource in a short period of time, and the lane hub will update the lane resource usage to the previous status or Directly cancel the previous update. If broadcast synchronization is performed for each update, it will lead to an increase in power consumption. Therefore, a preset cycle can be set, and the ledger broadcast is carried out according to the preset cycle, ensuring the timeliness and reliability of ledger synchronization without increasing unnecessary power consumption due to repeated synchronization. Then this type of lane resource is a lane resource that requires weak synchronization.
- each lane hub in the lane net records uniformly the usage of lane resources, and avoids lane resource allocation conflicts caused by inconsistent usage of lane resources.
- the lanehub in the first electronic device after the lanehub in the first electronic device allocates the lane resource (ie, the target lane) to the application program, it will monitor the usage of the lane resource, and can adjust the lane resource when it detects that the communication quality is poor , to meet the data transmission requirements of the application (such as the packet loss rate is less than the preset threshold, etc.).
- adjusting the lane resource includes lane resource parameter adjustment, lane resource switching, and the like.
- the power of the first target lane whose quality does not meet the preset condition is adjusted. Or, determine the type corresponding to the first target lane, and determine the type corresponding to the business type and the first target lane in the first lane, the second lane, and the third lane according to the business type and the type corresponding to the first target lane For the second target lane that is the same and whose quality meets the preset conditions, switch the first target lane to the second target lane.
- the method further includes: acquiring fourth usage information of the lane broadcast by the second electronic device. According to the fourth usage information, determine the lane of the target type supported by both the first electronic device and the second electronic device. Determine the third target lane whose quality meets the preset condition among the target type lanes, and switch the lane that still does not meet the preset condition after adjusting the parameters in the first target lane as the third target lane.
- electronic devices manage and plan network resources in a unified manner, segment and schedule network resources in units of lanes, so that applications are not limited to independent interfaces of communication methods. Developers can directly develop applications based on service types; electronic devices can directly allocate corresponding lane resources according to the service types requested by applications; users do not need to choose communication methods as shown in Figure 1, reducing user operation difficulty. In addition, the electronic device can allocate better-quality lane resources to the application program according to the network environment, thereby improving network transmission quality.
- the electronic device can dynamically adjust the lane resources directly through parameter adjustment or communication mode adjustment without the user's perception, so as to ensure the quality of data transmission and improve the user experience.
- the communication method provided by the embodiment of the present application is described in detail above with reference to FIG. 4A-FIG. 8 .
- the communication device provided by the embodiment of the present application will be described in detail below with reference to FIG. 9 .
- FIG. 9 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
- an electronic device 900 may include: a processing unit 901 and a transceiver unit 902 .
- the electronic device 900 may be used to implement the functions of the electronic device involved in the foregoing method embodiments.
- the processing unit 901 is configured to support the electronic device 900 to execute S801 in FIG. 8 .
- the transceiving unit 902 is configured to support the electronic device 900 to execute S802 in FIG. 8 .
- the transceiving 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.
- the operations and/or functions of each unit in the electronic device 900 are to implement the corresponding flow of the communication method described in the above method embodiment, and all relevant content of each step involved in the above method embodiment can be referred to in the corresponding functional unit. For the sake of brevity, the function description will not be repeated here.
- the electronic device 900 shown in FIG. 9 may further include a storage unit (not shown in FIG. 9 ), where programs or instructions are stored.
- a storage unit not shown in FIG. 9
- the processing unit 901 and the transceiver unit 902 execute the program or instruction
- the electronic device 900 shown in FIG. 9 can execute the communication method described in the above method embodiment.
- the technical solution provided by the present application may also be a functional unit or a chip in the electronic device, or a device matched with the electronic device.
- the embodiment of the present application also provides a chip system, including: a processor, the processor is coupled with a memory, and the memory is used to store programs or instructions, and when the programs or instructions are executed by the processor, the The system on chip implements the method in any one of the foregoing method embodiments.
- processors in the chip system there may be one or more processors in the chip system.
- the processor can be realized by hardware or by software.
- the processor may be a logic circuit, an integrated circuit, or the like.
- the processor may be a general-purpose processor implemented by reading software codes stored in a memory.
- the memory may be integrated with the processor, or may be configured separately from the processor, which is not limited in this embodiment of the present application.
- the memory can be a non-transitory processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip, or can be respectively arranged on different chips.
- the arrangement manner of the memory and the processor is not specifically limited.
- the chip system may be a field programmable gate array (field programmable gate array, FPGA), an application specific integrated chip (AP device application specific integrated circuit, ASIC), or a system on chip (system on chip, SoC ), it can also be a central processing unit (central processor unit, CPU), it can also be a network processor (network processor, NP), it can also be a digital signal processing circuit (digital signal processor, DSP), it can also be a microcontroller (micro controller unit, MCU), can also be a programmable controller (programmable logic device, PLD) or other integrated chips.
- FPGA field programmable gate array
- ASIC application specific integrated circuit
- SoC system on chip
- CPU central processing unit
- CPU central processor unit, NP
- DSP digital signal processing circuit
- microcontroller micro controller unit, MCU
- PLD programmable logic device
- each step in the foregoing method embodiments may be implemented by an integrated logic circuit of hardware in a processor or instructions in the form of software.
- the method steps 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 the processor.
- the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is run on the computer, the computer is made to perform the above-mentioned related steps, so as to realize the above-mentioned embodiment. communication method.
- An embodiment of the present application further provides a computer program product, which, when running on a computer, causes the computer to execute the above-mentioned related steps, so as to implement the communication method in the above-mentioned embodiment.
- the embodiment of the present application further provides a device.
- the apparatus may be a component or a module, and the apparatus may include one or more processors and memory coupled thereto.
- the memory is used to store computer programs.
- the device is made to execute the communication method in the above method embodiments.
- the apparatus, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are all used to execute the corresponding method provided above. Therefore, the beneficial effects that it can achieve can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
- the steps of the methods or algorithms described in connection with the disclosure of the embodiments of the present application may be implemented in the form of hardware, or may be implemented in the form of a processor executing software instructions.
- the software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (random access memory, RAM), flash memory, read only memory (read only memory, ROM), erasable programmable read-only memory (erasable programmable ROM, EPROM), electrically erasable programmable read-only memory (electrically EPROM, EEPROM), registers, hard disk, removable hard disk, 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.
- the storage medium may also be a component of the processor.
- the processor and the storage medium may be located in an application specific integrated circuit (AP device application specific integrated circuit, ASIC).
- the disclosed method may be implemented in other ways.
- the device embodiments described above are illustrative only.
- the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored, or not.
- the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of modules or units may be in electrical, mechanical or other forms.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
- Computer-readable storage media include but are not limited to any of the following: U disk, mobile hard disk, read-only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk, etc.
- ROM read-only memory
- RAM random access memory
- magnetic disk or optical disk etc.
- Various media that can store program code include but are not limited to any of the following: U disk, mobile hard disk, read-only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk, etc.
- Various media that can store program code include but are not limited to any of the following: U disk, mobile hard disk, read-only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
- Communication Control (AREA)
Abstract
本申请提供通信方法及电子设备,涉及终端技术领域。本申请能够将网络资源按照lane的粒度进行划分,电子设备能够在用户无感知的情况下,为待传输的数据自动分配对应的lane,从而降低用户操作难度。该方法包括:第一电子设备在确定需要向第二电子设备发送数据时,能够在不同类型的网络通路和相同类型的网络通路的不同信道中选择用于传输数据的目标lane,通过目标lane向第二电子设备发送数据。
Description
本申请要求于2021年08月27日提交国家知识产权局、申请号为202110996592.7、发明名称为“通信方法及电子设备”的中国专利申请的优先权,以及要求于2021年10月22日提交国家知识产权局、申请号为202111235326.9、发明名称为“通信方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请实施例涉及终端技术领域,尤其涉及一种通信方法及电子设备。
随着终端技术的发展,电子设备形态(如手机、平板、智能手表等)以及支持的通信方式(如蓝牙通信、无线保真(wireless fidelity,Wi-Fi)通信、有线连接通信等)越来越丰富。并且一般电子设备能够支持多种通信方式,不同通信方式对应于不同的网络协议提供的独立接口(如Wi-Fi接口与蓝牙接口独立)。
因此,开发者在开发应用程序的过程中,根据需要的不同通信方式对应的独立接口进行应用程序开发。那么,用户在使用应用程序的过程中,可以选择应用程序中不同的通信方式与其他电子设备进行数据传输。示例性的,如图1中(a)所示界面101,电子设备启动图库应用并显示照片,检测到用户点击分享控件11的操作后,显示如图1中(b)所示界面102。在界面102中,用户可以选择蓝牙、无线局域网(wireless local area network,WLAN)直连、电子邮件等多种方式进行照片分享。比如,电子设备检测到用户点击蓝牙分享控件12的操作后,则通过蓝牙连接的方式进行照片分享。
可见,虽然目前应用程序能够支持多种通信方式,但是应用程序需要用户选择其中一种通信方式后,才能够基于该通信方式进行通信。随着通信方式的增多,用户选择难度增大,降低用户使用体验。并且,用户选择的通信方式可能并不是当前网络环境中最优的通信方式,应用程序不能为用户提供最好的通信体验。
发明内容
为了解决上述的技术问题,本申请实施例提供了一种通信方法及电子设备。本申请实施例提供的技术方案,将网络资源按照lane的粒度进行划分,电子设备能够在用户无感知的情况下,为待传输的数据自动分配对应的lane,从而降低用户操作难度。并且在通信过程中,电子设备利用分配到的lane能够为用户提供更好的数据传输体验。
为了实现上述的技术目的,本申请实施例提供了如下技术方案:
第一方面,提供一种通信方法,应用于第一电子设备。该方法包括:在确定需要向第二电子设备发送数据时,在第一逻辑通路lane、第二lane以及第三lane中确定用于传输数据的目标lane,第一lane对应于第一类型的网络通路,第二lane对应于第二类型的网络通路中的第一信道,第三lane对应于第二类型的网络通路中的第二信道。通过目标lane向第二电子设备发送数据。
在一些实施例中,第一电子设备在需要发送数据时,能够在本端支持的所有通信方式对应lane资源中选择用于本次数据传输的lane资源。比如,假设第一电子设备支持BLE通信方式和Wi-Fi 2.4G通信方式两种通信方式,其中第一类型的网络通路为 BLE通信方式的网络通路,第二类型的网络通路为Wi-Fi 2.4G通信方式的网络通路。那么,第一lane对应于BLE通信方式包括的78条信道,第二lane和第三lane对应于Wi-Fi 2.4G通信方式包括的78条信道。其中,第一类型的网络通路和第二类型的网络通路用于表示不同类型的物理特性通路。
如此,电子设备将网络资源进行统一管理和规划,以lane为单位切分和调度网络资源,从而应用程序能够不受限于通信方式的独立接口。开发者可以直接根据业务类型进行应用程序开发;电子设备能够根据应用程序请求的业务类型,直接分配对应的lane资源;用户不必再进行通信方式的选择,降低用户操作难度。并且,电子设备能够根据网络环境为应用程序分配质量更好的lane资源,提升网络传输质量。
根据第一方面,第一电子设备在确定需要向第二电子设备发送数据时,在第一lane、第二lane以及第三lane中确定用于传输数据的目标lane,包括:在确定需要向第二电子设备发送数据时,确定数据对应的业务类型。根据业务类型,在第一lane、第二lane以及第三lane中确定目标lane。
在一些实施例中,业务类型如包括高带宽业务、高带宽低时延、低带宽低时延业务、低时延业务高可靠等。包括第一电子设备和第二电子设备的通信网络中还可以包括中心设备(即中心节点),该中心设备可以为第一电子设备,也可以为第二电子设备,或者可以为通信网络中的其他设备。中心设备按照业务类型对lane资源进行分类,后续电子设备在分配lane资源的过程中,将lane资源类型与业务类型匹配的lane资源分配给对应的应用程序使用。比如,lane资源的分类结果包括高带宽lane资源,高带宽低时延lane资源,低带宽低时延lane资源,低时延高可靠lane资源等。
如此,电子设备能够根据待传输数据的需求,配置对应的lane资源,保证数据传输质量。比如,高带宽业务类型要求lane的带宽满足要求,电子设备可以为高带宽业务分配高带宽lane资源。
根据第一方面,或者以上第一方面的任意一种实现方式,在第一电子设备在确定需要向第二电子设备发送数据时,在第一lane、第二lane以及第三lane中确定用于传输数据的目标lane之前,方法还包括:获取本地记录的第一lane、第二lane以及第三lane的第一使用信息,以及获取包括第一电子设备的通信网络中多个电子设备广播的第一lane、第二lane以及第三lane的第二使用信息。根据业务类型,在第一lane、第二lane以及第三lane中确定目标lane,包括:根据第一使用信息、第二使用信息以及业务类型,确定目标lane。
根据第一方面,或者以上第一方面的任意一种实现方式,第一电子设备本地保存有第一账本和第二账本,第一账本用于记录第一lane、第二lane以及第三lane的使用信息,第二账本用于记录包括第一电子设备的通信系统中的全部lane的使用信息。在第一电子设备在确定需要向第二电子设备发送数据时,在第一lane、第二lane以及第三lane中确定用于传输数据的目标lane之前,方法还包括:获取第一账本中记录的第一lane、第二lane以及第三lane的第一使用信息,以及获取第二账本中记录的第一lane、第二lane以及第三lane的第二使用信息。根据业务类型,在第一lane、第二lane以及第三lane中确定目标lane,包括:根据第一使用信息、第二使用信息以及业务类型,确定目标lane。
根据第一方面,或者以上第一方面的任意一种实现方式,第一使用信息或第二使用信息包括如下一项或几项内容:lane的使用次数、lane的历史传输数据对应的业务类型、lane的质量参数信息。
在一些实施例中,电子设备中预置用于记录lane使用情况的账本,其中包括电子设备对于lane资源质量测量结果的评分。第一电子设备在需要发送数据时,获取本地账本以及通信网络中其他电子设备广播的账本。第一电子设备根据获得的广播账本中记录的自身支持的lane资源的评分,综合本端监测到的lane资源的评分,获得lane资源的综合评分,后续第一电子设备根据综合评分进行lane资源分配。如第一电子设备根据评分,获得评分在前且类型不同的第一数量的目标lane,第一数量为传输数据需要的lane数量。
在另一些实施例中,电子设备中保存有两个账本,一个账本用于记录自身支持的lane资源的使用信息,另一个账本为公有账本用于记录通信系统(lane net)中包括的全部lane资源的使用信息。其中,通信系统中的各个电子设备中保存的公有账本同步。那么电子设备可以根据本地记录的最新的lane的使用信息以及公有账本中记录的lane的使用信息,确定最优的lane资源。或者,电子设备直接根据公有账本中记录的lane的使用信息,确定最优的lane资源。
如此,电子设备通过综合评分,确定满足数据传输两端的电子设备传输需求,并且质量最好的lane资源。电子设备能够在用户无感知的情况下,为用户选择最优的lane,提升用户使用体验。
根据第一方面,或者以上第一方面的任意一种实现方式,目标lane的数量为一个或多个;其中,在目标lane的数量为多个的情况下,多个目标lane为不同类型的信道;在目标lane的数量为一个的情况下,目标lane正在传输第一数据;或者,在目标lane的数量为一个的情况下,目标lane空闲。
在一些实施例中,lane hub可以通过计数方式的统计复用,实现在频域上为同一个业务分配多条lane,提高传输效率。那么,目标lane的数量就可能为一个或多个。
在另一些实施例中,lane hub还可以以时域的角度,根据带宽进行统计复用,分配一条lane承载多个业务。如多个业务按照时间的先后顺序使用同样的一条lane。比如,时限要求较高的高优先业务优先使用lane,之后时限要求较低的低优先业务后使用lane。从而既不会影响业务的完成,也不会出现同时执行多个业务导致的干扰问题,提升应用传输质量。那么,在待传输的数据的优先级较低的情况下,lane hub可能为此业务分配正在传输其他优先级较高的第一数据的lane,在优先级较高的第一数据传输完成后,第一电子设备可通过目标lane传输数据。或者,待传输的数据的优先级较高,可以抢占正在传输第一数据的目标lane,先通过目标lane传输待传输的数据,之后再传输第一数据。
可以理解的是,如果存在空闲的lane资源,并且该空闲lane资源符合传输待传输数据的要求,可以将该lane资源确定为目标lane。比如,第一电子设备具有有线传输方式(如USB传输方式)对应的lane资源,并且空闲,那么可以优先确定有线传输对应的lane资源为目标lane。
根据第一方面,或者以上第一方面的任意一种实现方式,方法还包括:监测目标 lane的使用情况,获得目标lane的第三使用信息。将本地记录的目标lane的使用信息更新为第三使用信息。广播第三使用信息。
如此,电子设备按照预设周期,或者按照预设时机广播lane使用信息,从而实现通信网络中不同电子设备的lane使用信息的交互,进而满足电子设备选择目标lane的需求。
进一步的,通信网络中还设置有中心节点(如中心设备),中心设备能够根据接收到的电子设备广播的lane使用信息,调整lane资源类型,使得分类后lane资源分类结果能够为适用于当前通信网络的最优分类结果。其中,lane资源类型对应于业务类型,如lane资源类型包括高带宽lane资源,高带宽低时延lane资源,低带宽低时延lane资源,低时延高可靠lane资源等。比如,中心设备在设置lane1为高带宽lane资源后,根据接收到广播信息,确定lane1的传输质量较差,将lane1调整为其他资源类型的lane。
根据第一方面,或者以上第一方面的任意一种实现方式,广播第三使用信息包括:在目标lane的使用时长超出预设时长的情况下,广播第三使用信息。或者,按照预设周期,广播第三使用信息。
在一些实施例中,lane hub对账本的同步分为强同步和弱同步。可选的,lane hub可以根据lane资源承载的业务类型,确定同步账本的方式为强同步或弱同步。
示例性的,一些业务需要保持较长时间的通信,或者数据量较大,或者需要保持低干扰的传输等。因此,lane hub在为此类业务分配lane资源后,需要将分配的lane资源的使用情况同步至lane net中的其他lane hub,使得其他lane hub在分配lane资源的过程中,避免干扰这些lane资源。那么这类lane资源为需要强同步的lane资源。
又示例性的,一些临时抢占使用的lane资源,lane hub本地更新lane资源使用情况后,在较短时间内应用又释放该lane资源,lane hub又会将该lane资源的使用情况更新为之前的状态或者直接取消之前的更新,如果每一次更新都进行广播同步,则会导致功耗的增加。因此,可以设置预设周期,按照预设周期进行账本广播,保证账本同步的及时性和可信性的同时,又不会因为反复同步增加不必要的功耗。那么这类lane资源为需要弱同步的lane资源。
如此,通过强同步或者弱同步,保证lane net中各个lane hub对于lane资源的使用情况的记录统一,避免由于lane资源使用情况不统一,导致的lane资源分配冲突问题。
根据第一方面,或者以上第一方面的任意一种实现方式,方法还包括:在目标lane中的部分或全部lane的质量不满足预设条件时,调整质量不满足预设条件的第一目标lane的参数。
根据第一方面,或者以上第一方面的任意一种实现方式,调整质量不满足预设条件的第一目标lane的参数,包括:调整质量不满足预设条件的第一目标lane的功率。或者,确定第一目标lane对应的类型,根据业务类型和第一目标lane对应的类型,在第一lane、第二lane以及第三lane中确定与业务类型对应、与第一目标lane对应的类型相同、且质量满足预设条件的第二目标lane,切换第一目标lane为第二目标lane。
根据第一方面,或者以上第一方面的任意一种实现方式,在调整参数后,第一目标lane中的部分或全部lane的质量不满足预设条件;方法还包括:获取第二电子设备 广播的lane的第四使用信息。根据第四使用信息,确定第一电子设备和第二电子设备均支持的目标类型的lane。在目标类型的lane中确定质量满足预设条件的第三目标lane,切换第一目标lane中调整参数后仍不满足预设条件的lane为第三目标lane。
在一些实施例中,lanehub在将lane资源分配至应用程序后,会对lane资源使用情况进行监控,在检测到通信质量较差时,能够调整lane资源,满足应用程序数据传输需求(如丢包率小于预设阈值等)。其中,调整lane资源包括lane资源参数调整,lane资源切换等。在数据传输过程中,lane hub可对lane资源进行一次或多次调整,保证传输质量。
比如,lane资源是基于频域角度以信道为粒度进行的划分,那么可以采用分时策略,允许不同的传输任务按照时间顺序分时调用相同的lane资源。如通过Wi-Fi分级时钟技术、BR蓝牙分级时钟技术等分时策略分配lane资源。那么,lane hub需要从时域角度监测lane资源的使用情况,确定是否需要对lane资源的分配情况进行调整。
又比如,lane hub能够获得lane资源的质量测量结果,对lane资源进行服务质量分析,确定是否需要调整QoS策略(如调整评价lane资源的QoS标准等),以及对lane net的使用情况进行分析。
再比如,监控lane资源的分配调度情况,如监测lane net中各个lane hub的lane资源调度情况,确认是否会影响当前应用的lane资源的使用。比如可以实现QoS协同,对低优先业务进行包含业务限速、避让等决策调整等,从而保证长时业务(如投屏业务等)不会受到短时业务(如图片分享业务等)的影响,或者传输质量要求较高的业务不会收到其他业务的影响等。
如此,在数据传输过程中,电子设备能够在用户无感知的情况下,直接通过参数调整,或者通信方式调整的方法,动态调整lane资源,保证数据传输质量,提高用户使用体验。
第二方面,提供一种电子设备。该电子设备为第一电子设备,包括:处理器和存储器,所述存储器与所述处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述处理器从所述存储器中读取所述计算机指令,使得所述电子设备执行如下操作:在确定需要向第二电子设备发送数据时,在第一逻辑通路lane、第二lane以及第三lane中确定用于传输数据的目标lane,第一lane对应于第一类型的网络通路,第二lane对应于第二类型的网络通路中的第一信道,第三lane对应于第二类型的网络通路中的第二信道。通过目标lane向第二电子设备发送数据。
根据第二方面,第一电子设备在确定需要向第二电子设备发送数据时,在第一lane、第二lane以及第三lane中确定用于传输数据的目标lane,包括:在确定需要向第二电子设备发送数据时,确定数据对应的业务类型。根据业务类型,在第一lane、第二lane以及第三lane中确定目标lane。
根据第二方面,或者以上第二方面的任意一种实现方式,当所述处理器从所述存储器中读取所述计算机指令,还使得所述电子设备执行如下操作:获取本地记录的第一lane、第二lane以及第三lane的第一使用信息,以及获取包括第一电子设备的通信网络中多个电子设备广播的第一lane、第二lane以及第三lane的第二使用信息。根据业务类型,在第一lane、第二lane以及第三lane中确定目标lane,包括:根据第一使 用信息、第二使用信息以及业务类型,确定目标lane。
根据第二方面,或者以上第二方面的任意一种实现方式,第一电子设备本地保存有第一账本和第二账本,第一账本用于记录第一lane、第二lane以及第三lane的使用信息,第二账本用于记录包括第一电子设备的通信系统中的全部lane的使用信息。那么,当所述处理器从所述存储器中读取所述计算机指令,还使得所述电子设备执行如下操作:获取第一账本中记录的第一lane、第二lane以及第三lane的第一使用信息,以及获取第二账本中记录的第一lane、第二lane以及第三lane的第二使用信息。那么,根据业务类型,在第一lane、第二lane以及第三lane中确定目标lane,包括:根据第一使用信息、第二使用信息以及业务类型,确定目标lane。
根据第二方面,或者以上第二方面的任意一种实现方式,第一使用信息或第二使用信息包括如下一项或几项内容:lane的使用次数、lane的历史传输数据对应的业务类型、lane的质量参数信息。
根据第二方面,或者以上第二方面的任意一种实现方式,目标lane的数量为一个或多个;其中,在目标lane的数量为多个的情况下,多个目标lane为不同类型的信道;在目标lane的数量为一个的情况下,目标lane正在传输第一数据;或者,在目标lane的数量为一个的情况下,目标lane空闲。
根据第二方面,或者以上第二方面的任意一种实现方式,当所述处理器从所述存储器中读取所述计算机指令,还使得所述电子设备执行如下操作:监测目标lane的使用情况,获得目标lane的第三使用信息。将本地记录的目标lane的使用信息更新为第三使用信息。广播第三使用信息。
根据第二方面,或者以上第二方面的任意一种实现方式,广播第三使用信息包括:在目标lane的使用时长超出预设时长的情况下,广播第三使用信息。或者,按照预设周期,广播第三使用信息。
根据第二方面,或者以上第二方面的任意一种实现方式,当所述处理器从所述存储器中读取所述计算机指令,还使得所述电子设备执行如下操作:在目标lane中的部分或全部lane的质量不满足预设条件时,调整质量不满足预设条件的第一目标lane的参数。
根据第二方面,或者以上第二方面的任意一种实现方式,调整质量不满足预设条件的第一目标lane的参数,包括:调整质量不满足预设条件的第一目标lane的功率。或者,确定第一目标lane对应的类型,根据业务类型和第一目标lane对应的类型,在第一lane、第二lane以及第三lane中确定与业务类型对应、与第一目标lane对应的类型相同、且质量满足预设条件的第二目标lane,切换第一目标lane为第二目标lane。
根据第二方面,或者以上第二方面的任意一种实现方式,当所述处理器从所述存储器中读取所述计算机指令,还使得所述电子设备执行如下操作:获取第二电子设备广播的lane的第四使用信息。根据第四使用信息,确定第一电子设备和第二电子设备均支持的目标类型的lane。在目标类型的lane中确定质量满足预设条件的第三目标lane,切换第一目标lane中调整参数后仍不满足预设条件的lane为第三目标lane。
第二方面以及第二方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第三方面,提供一种电子设备。该电子设备为第一电子设备,包括:处理模块和收发模块。其中,处理模块,用于在确定需要向第二电子设备发送数据时,在第一逻辑通路lane、第二lane以及第三lane中确定用于传输数据的目标lane,第一lane对应于第一类型的网络通路,第二lane对应于第二类型的网络通路中的第一信道,第三lane对应于第二类型的网络通路中的第二信道。收发模块,用于通过目标lane向第二电子设备发送数据。
根据第三方面,第一电子设备在确定需要向第二电子设备发送数据时,在第一lane、第二lane以及第三lane中确定用于传输数据的目标lane,包括:在确定需要向第二电子设备发送数据时,确定数据对应的业务类型。根据业务类型,在第一lane、第二lane以及第三lane中确定目标lane。
根据第三方面,或者以上第三方面的任意一种实现方式,该处理模块,具体用于获取本地记录的第一lane、第二lane以及第三lane的第一使用信息,以及获取包括第一电子设备的通信网络中多个电子设备广播的第一lane、第二lane以及第三lane的第二使用信息。根据业务类型,在第一lane、第二lane以及第三lane中确定目标lane,包括:根据第一使用信息、第二使用信息以及业务类型,确定目标lane。
根据第三方面,或者以上第三方面的任意一种实现方式,第一电子设备本地保存有第一账本和第二账本,第一账本用于记录第一lane、第二lane以及第三lane的使用信息,第二账本用于记录包括第一电子设备的通信系统中的全部lane的使用信息。在第一电子设备在确定需要向第二电子设备发送数据时,在第一lane、第二lane以及第三lane中确定用于传输数据的目标lane之前,处理模块,还用于获取第一账本中记录的第一lane、第二lane以及第三lane的第一使用信息,以及获取第二账本中记录的第一lane、第二lane以及第三lane的第二使用信息。根据业务类型,在第一lane、第二lane以及第三lane中确定目标lane,包括:根据第一使用信息、第二使用信息以及业务类型,确定目标lane。
根据第三方面,或者以上第三方面的任意一种实现方式,第一使用信息或第二使用信息包括如下一项或几项内容:lane的使用次数、lane的历史传输数据对应的业务类型、lane的质量参数信息。
根据第三方面,或者以上第三方面的任意一种实现方式,目标lane的数量为一个或多个;其中,在目标lane的数量为多个的情况下,多个目标lane为不同类型的信道;在目标lane的数量为一个的情况下,目标lane正在传输第一数据;或者,在目标lane的数量为一个的情况下,目标lane空闲。
根据第三方面,或者以上第三方面的任意一种实现方式,处理模块,还用于监测目标lane的使用情况,获得目标lane的第三使用信息。将本地记录的目标lane的使用信息更新为第三使用信息。广播第三使用信息。
根据第三方面,或者以上第三方面的任意一种实现方式,广播第三使用信息包括:在目标lane的使用时长超出预设时长的情况下,广播第三使用信息。或者,按照预设周期,广播第三使用信息。
根据第三方面,或者以上第三方面的任意一种实现方式,处理模块,还用于在目标lane中的部分或全部lane的质量不满足预设条件时,调整质量不满足预设条件的第 一目标lane的参数。
根据第三方面,或者以上第三方面的任意一种实现方式,调整质量不满足预设条件的第一目标lane的参数,包括:调整质量不满足预设条件的第一目标lane的功率。或者,确定第一目标lane对应的类型,根据业务类型和第一目标lane对应的类型,在第一lane、第二lane以及第三lane中确定与业务类型对应、与第一目标lane对应的类型相同、且质量满足预设条件的第二目标lane,切换第一目标lane为第二目标lane。
根据第三方面,或者以上第三方面的任意一种实现方式,收发模块,还用于获取第二电子设备广播的lane的第四使用信息。那么,处理模块,还用于根据第四使用信息,确定第一电子设备和第二电子设备均支持的目标类型的lane。在目标类型的lane中确定质量满足预设条件的第三目标lane,切换第一目标lane中调整参数后仍不满足预设条件的lane为第三目标lane。
可选的,收发模块可以包括接收模块和发送模块,可以由收发器或收发器相关电路组件实现,可以为收发器或收发模块。第一电子设备中的各个模块的操作和/或功能分别为了实现上述第一方面及第一方面中任意一种实现方式中所述的通信方法,上述第一方面及第一方面中任意一种实现方式涉及的所有相关内容均可以援引到对应功能模块。
可选的,第一电子设备还可以包括存储模块,该存储模块中存储有程序或指令。当处理模块以及收发模块执行该程序或指令时,使得第一电子设备可以执行上述第一方面及第一方面中任意一种实现方式所述的通信方法。
第三方面以及第三方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第四方面,本申请实施例提供一种通信系统,通信系统包括:第一电子设备和第二电子设备。第一电子设备,用于在确定需要向第二电子设备发送数据时,在第一逻辑通路lane、第二lane以及第三lane中确定用于传输数据的目标lane,第一lane对应于第一类型的网络通路,第二lane对应于第二类型的网络通路中的第一信道,第三lane对应于第二类型的网络通路中的第二信道。第一电子设备,还用于通过目标lane向第二电子设备发送数据。第二电子设备,用于通过目标lane接收第一电子设备发送的数据。
根据第四方面,第一电子设备,还用于监测目标lane的使用情况,获得目标lane的第三使用信息。将本地记录的目标lane的使用信息更新为第三使用信息。广播第三使用信息。
根据第四方面,或者以上第二方面的任意一种实现方式,第一电子设备,具体用于在目标lane的使用时长超出预设时长的情况下,广播第三使用信息。或者,按照预设周期,广播第三使用信息。
根据第四方面,或者以上第二方面的任意一种实现方式,第一电子设备保存有第一账本和第二账本,第一账本用于记录第一lane、第二lane以及第三lane的使用信息,第二账本用于记录通信系统中全部lane的使用信息。
根据第四方面,或者以上第二方面的任意一种实现方式,通信系统还包括:第三电子设备;第三电子设备,用于接收第三使用信息,根据第三使用信息同步本地保存 的第二账本中记录的目标lane的使用信息。
在一些实施例中,通信系统中包括两个以上的电子设备,每一电子设备中均配置lane hub。在本端lane hub确定lane资源使用信息发生变化后,可以通过强同步或弱同步的方式向通信系统中的其他电子设备广播变化的lane资源使用信息。其他电子设备(如第三电子设备)的lane hub可接收广播信息,根据广播信息,同步本地保存的lane资源使用信息,保证各个lane hub记录的lane资源信息同步,避免由于lane资源使用信息不统一,导致的lane资源分配冲突问题。
在一些实施例中,第二电子设备也会接收第一电子设备对于目标lane的使用信息的更新。也就是说,通信系统中的各个电子设备中均配置有lane hub。lane hub维护两个账本,其中一个账本用于记录本地lane资源的使用情况;另一个账本用于记录lane net中的lane资源使用情况(如公有账本)。lane hub在本地lane资源使用情况更新后,在更新本地账本的同时更新公有账本,之后广播公有账本。lane net中其他lane hub在接收到广播后,能够同步公有账本,并对本地账本相关内容进行合并更新,进而保证lane net中各个lane hub能够保存有相同的公有账本,即各个lane hub能够同步lane net中的lane资源的实际使用情况。比如,lane hub中本地账本中记录有其管理的lane 1的使用情况,获得其他lane hub广播的公有账本后,确定其中其他lane hub对于lane 1的使用情况的记录后,确定是否需要修改本地账本。如修改,在修改后,将修改信息同步到公有账本,供其他lane hub同步。
根据第四方面,或者以上第二方面的任意一种实现方式,第一电子设备、第二电子设备、第三电子设备,还用于确定用于调整lane资源类型的目标设备,目标设备为第一电子设备、第二电子设备和第三电子设备中的任一设备。目标设备,用于获取第一电子设备、第二电子设备、第三电子设备广播的第四lane的使用信息,根据第四lane的使用信息,调整第四lane中部分或全部lane的lane资源类型,其中,lane资源类型包括高带宽lane资源,高带宽低时延lane资源,低带宽低时延lane资源,低时延高可靠lane资源中的至少一种。
根据第四方面,或者以上第二方面的任意一种实现方式,通信系统还包括:中心设备。中心设备,用于获取通信网络中包括的电子设备广播的第五lane的使用信息,根据第五lane的使用信息,调整第五lane中的部分或全部lane的lane资源类型,其中,lane资源类型包括高带宽lane资源,高带宽低时延lane资源,低带宽低时延lane资源,低时延高可靠lane资源中的至少一种。
在一些实施例中,第五lane为各个电子设备支持的lane,那么中心设备能够根据广播信息,确定通信网络中全部lane的使用信息,进而能够确定需要调整lane资源类型的lane。如此,能够提升通信网络的传输质量。
此外,在通信系统中包括中心节点设备的情况下,由中心节点设备调整lane资源使用类型。在通信系统中不包括中心节点的情况下,通信系统中的设备可以采用如区块链技术,选举出用于调整lane资源类型的设备。如此,满足不同类型的通信系统调整lane资源类型的需求。
根据第四方面,或者以上第二方面的任意一种实现方式,目标lane的数量为一个或多个;其中,在目标lane的数量为多个的情况下,多个目标lane为不同类型的信道; 在目标lane的数量为一个的情况下,目标lane正在传输第一数据;或者,在目标lane的数量为一个的情况下,目标lane空闲。
第四方面以及第四方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第五方面,本申请实施例提供一种电子设备,该电子设备具有实现如上述第一方面及其中任一种可能的实现方式中所述的通信方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应地软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
第五方面以及第五方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第六方面,提供一种计算机可读存储介质。计算机可读存储介质存储有计算机程序(也可称为指令或代码),当该计算机程序被电子设备执行时,使得电子设备执行第一方面或第一方面中任意一种实施方式的方法。
第六方面以及第六方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第七方面,本申请实施例提供一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行第一方面或第一方面中任意一种实施方式的方法。
第七方面以及第七方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第八方面,本申请实施例提供一种电路系统,电路系统包括处理电路,处理电路被配置为执行第一方面或第一方面中任意一种实施方式的方法。
第八方面以及第八方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第九方面,本申请实施例提供一种芯片系统,包括至少一个处理器和至少一个接口电路,至少一个接口电路用于执行收发功能,并将指令发送给至少一个处理器,当至少一个处理器执行指令时,至少一个处理器执行第一方面或第一方面中任意一种实施方式的方法。
第九方面以及第九方面中任意一种实现方式所对应的技术效果,可参见上述第一方面及第一方面中任意一种实现方式所对应的技术效果,此处不再赘述。
图1为本申请实施例提供的界面示意图一;
图2为本申请实施例提供的电子设备的形态的示意图;
图3A为本申请实施例提供的电子设备的硬件结构示意图;
图3B为本申请实施例提供的电子设备的软件结构框图示意图;
图4A为本申请实施例提供的通信方法应用的场景的示意图一;
图4B为本申请实施例提供的通信方法应用的场景的示意图二;
图5A为本申请实施例提供的模块交互的示意图;
图5B为本申请实施例提供的通信方法应用的场景的示意图三;
图6为本申请实施例提供的界面示意图二;
图7为本申请实施例提供的界面示意图三;
图8为本申请实施例提供的通信方法流程图;
图9为本申请实施例提供的电子设备的结构示意图。
下面结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请以下各实施例中,“至少一个”、“一个或多个”是指一个或两个以上(包含两个)。
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。术语“连接”包括直接连接和间接连接,除非另外说明。“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。
在本申请实施例中,“示例性地”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性地”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性地”或者“例如”等词旨在以具体方式呈现相关概念。
本申请实施例提供的通信方法,可以应用于第一电子设备。例如,如图2所示,第一电子设备具体可以是手机21、笔记本电脑22、平板电脑23、大屏显示设备24、可穿戴设备(如智能手表,智能手环等)25、车载设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、膝上型计算机、个人数字助理(personal digital assistant,PDA)、VR设备、AR设备、音箱、人工智能(artificial intelligence)设备等具有传输功能的终端设备。第一电子设备安装的操作系统包括但不限于
或者其它操作系统。在一些实施例中,第一电子设备可以为固定式设备,也可以为便携式设备。本申请对第一电子设备的具体类型、所安装的操作系统均不作限制。
在一些实施例中,第一电子设备可以支持多种通信方式,如近距离无线通信(near field communication,NFC),蓝牙(bluetooth,BT)(例如,传统蓝牙、低功耗蓝牙(bluetooth low energy,BLE)、基础速率(basic rate,BR)蓝牙、增强速率(enhanced data rate,EDR)蓝牙等),无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),紫蜂(Zigbee),调频(frequency modulation,FM),红外(infrared,IR)等无线通信方式,以及如通用串行总线(universal serial bus,USB)连接等有线通信方式。
在一些实施例中,第一电子设备通过自身支持的通信方式与一个或多个其他电子 设备(如第二电子设备)建立通信连接后,成为软总线组网中的电子设备。其中,软总线组网可以包括同构网络或异构网络。比如,通信网络中的电子设备通过相同的通信方式进行通信,该通信网络为同构网络。如同构网络中的各个电子设备通过Wi-Fi通信。又比如,通信网络中的电子设备通过两种或两种以上的通信方式进行通信,该通信网络为异构网络。如第一电子设备和第二电子设备支持蓝牙通信和Wi-Fi通信,第一电子设备和第二电子设备通过Wi-Fi通信的方式接入同一个路由器,并且第一电子设备与第二电子设备建立蓝牙连接,那么第一电子设备、第二电子设备和路由器组成的通信网络中存在两种通信方式,构成异构网络。
可以理解的是,软总线组网中应包含2个或2个以上的电子设备,不同电子设备之间可以执行各自的业务。比如,软总线组网中包括的各个电子设备之间可以按需进行数据传输。如软总线组网中包括电子设备1、电子设备2、电子设备3和电子设备4等多个电子设备。其中,电子设备1和电子设备2之间执行业务1,电子设备1和电子设备3之间执行业务2,电子设备3和电子设备4之间执行业务3,业务1、业务2和业务3例如为不同的数据传输业务。那么就需要为各个业务分配可用的网络资源。其中,具体网络资源的分配方式见下文具体实施例,在此不再赘述。
可选的,第一电子设备中安装的各个应用程序可以通过第一电子设备支持的通信方式中的一种或多种通信方式,与第二电子设备进行通信。示例性的,如图1所示,第一电子设备中安装有图库应用,图库应用可以通过蓝牙、Wi-Fi直连、电子邮件等多种方式将照片分享至第二电子设备。
比如,第一电子设备与第二电子设备都支持靠近发现功能。示例性的,第一电子设备与第二电子设备都能够通过NFC感应,来实现靠近发现功能。第一电子设备靠近第二电子设备后,第一电子设备和第二电子设备能够互相发现对方,之后,建立诸如Wi-Fi端到端(peer to peer,P2P)连接、蓝牙连接等无线通信连接。
又比如,第一电子设备与第二电子设备通过局域网,建立无线通信连接。比如,第一电子设备与第二电子设备都连接至同一路由器。其中,第一电子设备和第二电子设备作为站点(station,STA)设备,路由器作为接入点(access point,AP)设备,建立STA-AP-STA通信方式的连接。
又比如,第一电子设备与第二电子设备通过蜂窝网络、因特网等,建立无线通信连接。比如,第二电子设备通过路由器接入因特网,第一电子设备通过蜂窝网络接入因特网;进而,第一电子设备与第二电子设备建立无线通信连接。
再比如,第一电子设备通过USB接口连线与第二电子设备建立有线通信连接。
示例性地,第二电子设备与第一电子设备的设备类型相同或者不相同,第二电子设备包括但不限于智能手机、平板电脑、个人计算机(personal computer,PC)、可穿戴设备(如智能手表、智能手环等)、膝上型计算机(Laptop)、个人数字助理(personal digital assistant,PDA)、车载设备、虚拟现实(virtual reality,VR)设备、增强现实(augmented reality,AR)设备、音箱、人工智能(artificial intelligence,AI)设备等。第二电子设备安装的操作系统包括但不限于
或者其它操作系统。第二电子设备200也可以不安装有操作系统。在一些实施例中,第二电子设备可以为固定式设备,也可以为便携式设备。本申请实施例对第二 电子设备的具体类型、有无安装操作系统、在有安装操作系统下操作系统的类型均不作限制。
图3A本申请实施例提供的一种电子设备结构示意图。该电子设备可以为上述第一电子设备或第二电子设备。
电子设备可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备的具体限定。在本申请另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备充电,也可以用于电子设备与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他第二电子设备,例如AR设备等。
在一些实施例中,电子设备通过USB接口与其他电子设备建立有线连接。比如,电子设备在与其他电子设备建立USB连接,将存储的应用程序文件通过USB连接传输至其他电子设备。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备的结构限定。在本申请另一些实施例中,电子设备也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为第二电子设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。
电子设备的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。
无线通信模块160可以提供应用在电子设备上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导 航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),利用采用有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Mini-led,Micro-led,Micro-oled,量子点发光二极管(quantum dot light emitting diodes,QLED)等生产制造。在一些实施例中,电子设备可以包括1个或N个显示屏194,N为大于1的正整数。
传感器模块180可以包括压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器,骨传导传感器等。
触摸传感器,也称“触控器件”。触摸传感器可以设置于显示屏194,由触摸传感器与显示屏194组成触摸屏,也称“触控屏”。触摸传感器用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器也可以设置于电子设备的表面,与显示屏194所处的位置不同。
电子设备可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备可以包括1个或N个摄像头193,N为大于1的正整数。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器, 例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备的各种功能应用以及数据处理。
电子设备可以通过音频模块170,以及应用处理器等实现音频功能。例如音乐播放,录音等。音频模块170可以包括扬声器,受话器,麦克风,耳机接口等。用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备可以接收按键输入,产生与电子设备的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备的接触和分离。电子设备可以支持1个或N个SIM卡接口,N为大于1的正整数。
电子设备的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备的软件结构。
图3B是本申请实施例的电子设备的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图3B所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。
在一些实施例中,不同的应用程序可以通过电子设备支持的通信方式中的部分或全部通信方式与其他电子设备进行数据交互。如图库应用将第一电子设备存储的照片通过蓝牙发送至第二电子设备。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图3B所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,资源管理器,通知管理器,电话管理器,车道(lane)管理服务等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
lane管理服务,用于对电子设备支持的通信方式的全部lane(车道)进行规划和管理。其中,lane是对通信方式对应的网络资源抽象后进行切分的单位粒度。比如,将通信网络中包括的通信方式对应的全部网络资源(如Wi-Fi通信方式对应的Wi-Fi资源、蓝牙通信方式对应的蓝牙资源等)切分为以lane为单位的lane资源。之后,电子设备中的lane管理服务根据待发送数据的业务类型,为待发送数据的应用程序分配lane资源,那么应用程序就可以通过分配到的lane资源进行通信,其中分配的lane资源中可以包括一条或多条lane。如分配到的lane资源为Wi-Fi通信方式下以信道为lane切分粒度切分Wi-Fi资源后确定的一条信道,则应用程序通过分配的该条Wi-Fi信道发送数据。一些实施例中,lane管理服务可以描述为逻辑通路中心(lanehub)。
示例性的,假设电子设备支持Wi-Fi 2.4G通信和BLE通信,根据Wi-Fi通信和蓝牙通信的物理特性,划分lane资源,如Wi-Fi 2.4G通信方式包括13个信道,可划分为13条lane资源,BLE通信方式包括78个信道,可划分为78条lane资源,lane管理服务对这些lane资源进行管理。并且,lane管理服务提供对外统一的接口,供应用层的应用程序调用,如应用程序利用分配到的lane资源通过统一的接口向其他电子设备发送数据。
需要说明的是,物理特性用于表示实现通信方式的物理通路的特性。比如,电子设备中安装有蓝牙芯片,能够实现蓝牙通信,支持用于蓝牙通信的78个信道的通信。那么根据蓝牙芯片的物理特性,将lane资源划分为蓝牙通信方式的78条lane资源。又比如,电子设备中安装有Wi-Fi芯片,该Wi-Fi芯片支持双频双发(dual band dual concurrent,DBDC),即具有两种的物理通路(如物理通路1和物理通路2)。假设Wi-Fi芯片的物理通路1用于实现Wi-Fi 2.4G通信,Wi-Fi芯片的物理通路2用于实现Wi-Fi 5G通信。那么根据Wi-Fi芯片的物理特性,将lane资源划分为Wi-Fi 2.4G通信方式的lane资源和Wi-Fi 5G通信方式的lane资源。或者,假设Wi-Fi芯片的物理通路1和物理通路2均用于实现Wi-Fi 2.4G通信,那么根据Wi-Fi芯片的物理特性,将lane资源划分为Wi-Fi 2.4G通信方式中物理通路1对应的lane资源和Wi-Fi 2.4G通信 方式中物理通路2对应的lane资源。可以理解的是,Wi-Fi芯片还可以支持更多的物理通路,如支持四频四发的Wi-Fi芯片能够支持4条物理通路,可对应于4种类型的lane资源。本申请实施例提供的通信方法中,以物理通路的特性划分lane资源,对此下文不再赘述。
需要注意的是,在不同的系统或者架构中,lane的名称可能不同。例如,在一些系统或者架构中,上述由lane管理服务进行管理,用于支持应用程序实现设备间通信的lane的名称可能是虚拟通路,对应的lane资源的名称可以是虚拟通路资源。如lane用于表示通信方式下对应的信道,lane资源为信道资源。如Wi-Fi 2.4G通信方式包括13个信道(对应于13条虚拟通路),可划分为13条lane,Wi-Fi 2.4G通信方式对应的lane资源包括13条lane。或者,lane的名称可能是物理通路,对应的lane资源的名称可以是物理通路资源。如通信方式为USB有线通信方式,USB连接包括1条物理通路,可划分为1条lane,USB有线通信方式对应的lane资源包括1条物理通路资源。但是,无论lane的名称是什么,只要是具备类似功能的用于实现通信的网络资源,符合本申请实施例提供的方法的技术思路,都应涵盖在本申请的保护范围之内。在本申请实施例中,以lane的名称为逻辑通路(如包括虚拟通路和物理通路)为例,对本申请实施例提供的通信方法进行说明。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),二维图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
二维图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
在一些实施例中,电子设备可以支持至少一种通信方式,不同的电子设备可以支持相同或不相同的通信方式,电子设备支持的通信方式包括有线通信方式(如USB通信方式、以太网(ethernet,ETH)通信方式、可编程逻辑控制器(programmable logic controller,PLC)通信方式等)和/或无线通信方式(如Wi-Fi通信方式、蓝牙通信方式等)。电子设备与其他电子设备建立连接后,组成通信网络,该通信网络允许其他 电子设备接入,通信网络中的电子设备共享网络资源。比如,手机接入路由器,PC也接入该路由器,那么手机和PC共享路由器提供的Wi-Fi网络。进一步的,手机还可以与PAD建立蓝牙连接,手机、PC、PAD和路由器的通信组成通信网络。
由于针对不同通信方式的网络协议提供不同的独立接口,开发者需要根据不同的独立接口完成应用程序的开发,使得应用程序能够支持一种或多种通信方式。受限于独立接口,应用程序只能根据用户操作或默认方式选择一种通信方式与其他电子设备进行通信,而不能根据网络资源情况自主选择最优的通信方式。或者,应用程序在选择一种通信方式通信后,如当前通信未完成,一般不会切换通信方式。然而不同通信方式的信号质量与具体的网络环境相关,因此由于不同通信方式独立接口的限制,应用程序很难为用户提供最优的网络体验。
并且,在网络选择过程中,需要由用户选择用于传输的通信方式,在电子设备支持的通信方式较多的情况下,用户需要多次查找,才能够确定应用的通信方式,导致用户操作难度较大,影响用户使用体验。如图1中(b)所示界面102,受限于显示面积,界面102上只能显示电子设备支持的部分通信方式。电子设备检测到用户的滑动操作(如沿箭头13所示方向的滑动操作)后,才能够显示其他通信方式。若电子设备支持的通信方式较多,那么用户需要多次滑动查找,才能够完成通信方式的选择,过程较为繁琐。
此外,在包含多个电子设备的分布式场景中,可能存在多个端到端关系的复合使用,但一个电子设备可能无法兼顾多个Wi-Fi P2P连接,导致业务无法并行。具体的,Wi-Fi P2P技术可以支持两个Wi-Fi设备在没有Wi-Fi热点介入的情况下,直接与对方进行连接和通信。Wi-Fi P2P连接建立后,设备就存在客户端(go client,GC)和管理者(go owner,GO)两种角色的区分,同时Wi-Fi P2P技术的协议规范里对Wi-Fi P2P连接的方式进行了说明和限制,主要存在以下三点:(1)GO仅能与GC相连接,无法与GO建立连接;(2)GC仅能与GO相连接,无法与其他GO或GC建立连接;(3)GO连接GC的数量存在上限。并且,除了协议规范本身的限制之外,不同芯片厂商、不同电子设备操作系统还存在一些其他对Wi-Fi P2P连接的限制。比如,海思、MTK等芯片平台不支持同一个设备上存在多种P2P角色(GO/GO、GO/GC、GC/GC)。又比如,Android开放源代码项目(android open-source project,AOSP)也不支持同一个设备多种P2P角色共存。
那么,假设在手机A通过P2P连接向PC进行投屏的过程中,手机A接收到手机B发送的P2P连接请求,用于请求建立P2P连接。手机A在与PC建立的P2P连接和与手机B可能建立的P2P连接中,可能需要设置为多种P2P角色。但是,手机A可能不支持多个P2P角色共存,可能出现通信过程中的同频同信道冲突,导致业务无法并行,或者冲突过大导致业务体验无法保障等异常。
基于此,本申请实施例提供一种通信方法,对全部网络资源进行统一规划,为各个应用程序提供统一的对外接口。应用程序在请求通信时,lanehub根据请求通信的业务类型以及当前网络环境自动分配对应的通信资源,而不必再由用户进行选择。如此,开发者在开发应用程序的过程中,不必再受限于接口协议,在降低用户操作难度的情况下,应用程序还能够为用户提供更好的通信体验。并且,在分布式场景中,电子设 备直接根据业务类型确定可使用的通信资源,而不会出现由于一个设备上存在多种P2P角色导致的通信异常。
在一些实施例中,根据不同通信方式的物理特性划分网络资源,将网络资源划分为lane资源。比如,以信道为划分粒度,每一信道对应一条lane资源。
示例性的,如图4A所示,假设通信网络中包括Wi-Fi 2.4G通信方式、Wi-Fi 5G通信方式、BR蓝牙通信方式、BLE通信方式和USB通信方式,以信道为lane划分粒度对网络资源进行划分。其中,Wi-Fi 2.4G通信方式包括13个信道,可划分为13条lane资源;Wi-Fi 5G通信方式包括165个信道,可划分为165条lane资源;BR蓝牙通信方式包括30个信道,可划分为30条lane资源;BLE通信方式包括78个信道,可划分为78条lane资源;USB通信方式可假设对应于1个信道,可划分为1条lane资源等。
可以理解的是,上述以信道为划分粒度划分网络资源的方式仅为示例性说明,还可以以其他划分粒度划分网络资源。比如,以通信方式为lane划分粒度划分网络资源。如将Wi-Fi 2.4G通信方式划分为1条lane资源,将Wi-Fi 5G通信方式划分为1条lane资源,将BR蓝牙通信方式划分为1条lane资源等。又比如,以预设数量的信道为lane划分粒度划分网络资源。如将Wi-Fi 2.4G通信方式包括13个信道中相邻的3条信道划分为一组lane资源,信道1-信道3划分为一组lane资源,信道4-信道6划分为一组lane资源,信道7-信道9划分为一组lane资源,信道10-信道12划分为一组lane资源,多出的信道13划分为一组lane资源,如此完成Wi-Fi 2.4G通信方式的网络资源划分。又比如,以预设方式将信道划分为lane资源。如将Wi-Fi 2.4G通信方式包括13个信道(lane1-lane13)中奇数编号的信道划分为一组lane资源(如包括lane1、lane3、lane5、lane7、lane9、lane11、lane13),偶数编号的信道划分为一组lane资源(如包括lane2、lane4、lane6、lane8、lane10、lane12)。
在一些实施例中,划分lane资源后,对每一条lane进行编号,并做标签标记。那么后续,lanehub根据标签区分不同的lane,根据应用程序需求分配对应的lane。比如,如图4A所示,lane1-lane13为Wi-Fi 2.4G通信方式对应的lane资源。进一步的,lane标签中还可以包含lane对应的通信方式。比如,在lane1-lane13的标签中标记各条lane的编号,以及对应的通信方式为Wi-Fi 2.4G通信方式。那么后续应用程序在接收到分配的lane后,能够根据lane标签,确定该条lane的编号以及对应的通信方式。
在一些实施例中,电子设备中预设账本,该账本用于记录本端支持的lane的使用信息,如包括lane的使用情况、监控到的lane质量等信息。其中,lane的使用情况包括lane的使用次数、lane传输过的数据对应的业务类型等。业务类型如包括高带宽业务、高带宽低时延、低带宽低时延业务、低时延高可靠业务等。可选的,lane的使用情况还可以包括监控到的lane质量信息。电子设备通过监控lane通信过程中的信噪比(signal-to-noise ratio,SNR)、负载、干扰值、接收信号强度指示(received signal strength indication,RSSI)等参数确定lane质量。进一步的,电子设备通过lanehub进行账本管理。
示例性的,如图4A所示,设备A支持的通信方式包括Wi-Fi 2.4G通信、BR蓝牙通信、BLE通信和USB通信。设备A中的lanehub 1用于对上述通信方式的Lane资 源进行统一管理,如管理记录lane资源的账本等。
在一些实施例中,电子设备按照预设周期广播账本,实现通信网络中的lane信息的交互。或者,电子设备按预设规则广播账本。如电子设备需要较长时间的占用某些lane资源且需保证传输质量,可直接将这些lane资源的使用情况进行广播,避免其他电子设备使用其中的lane资源,影响通信。lanehub管理的账本中还可以记录接收到的其他电子设备广播的账本中这些电子设备支持的lane的lane信息。比如,通信网络中的电子设备1支持lane1-lane5这5条lane,账本中记录了这5条lane的本端lane信息。假设与电子设备1在同一通信网络中的电子设备2支持的lane包括lane1-lane3以及lane7-lane10,那么电子设备1能够接收到电子设备2的广播的账本,电子设备1根据接收到的广播账本,从中确定lane1-lane3的对端lane信息,那么lanehub管理的账本中记录的lane信息包括电子设备1支持的lane1-lane5的本端lane信息,和lane1-lane3的对端lane信息。后续,lanehub在检测到应用程序需要与电子设备2进行通信的请求后,能够根据账本记录的本端lane信息和对端lane信息,确定分配的lane资源。如电子设备1中的lanehub根据本端lane信息确定lane1和lane2均能够实现与电子设备2通信,且通信质量较优。lanehub根据获得的电子设备2的对端lane信息,确定电子设备2记录的lane1通信质量较差,那么lanehub可选择将lane2分配给应用程序使用。
示例性的,对应于图4A,如图4B所示,通信网络中电子设备支持的全部的lane可组成车道网络(lane net)41,电子设备接入网络后,可利用其中配置的lane hub同步lane资源使用情况。如设备A支持lane net 41中部分lane资源,设备A中的lane hub1用于管理设备A支持的lane资源;设备B支持lane net 41中部分lane资源,设备B中的lane hub 2用于管理设备B支持的lane资源;设备C支持lane net 41中部分lane资源,设备C中的lane hub 3用于管理设备C支持的lane资源;lane net 41为通信网络中的各个lane hub的并集,lane net中的各个lane hub管理的lane资源可能存在重叠。比如,设备A和设备B通过lane net中的lane 1进行数据传输。那么lane hub 1需要记录lane 1在设备A侧的使用情况,lane hub 2需要记录lane 1在设备B侧的使用情况,即lane hub 1和lane hub 2管理的lane资源存在重叠。
此外,如图4B所示,各个电子设备的lane hub管理的lane资源中包括独占lane资源(如图4B中字母M所在区域)和/或共享lane资源(如图4B中字母N所在区域)。
其中,独占lane资源用于表示未被其他业务占用的lane资源,即不必与其他业务共享的lane资源为独占lane资源。比如,设备A支持的通信方式对应的lane资源中未被使用的lane资源,lane hub 1确定这部分lane资源为设备A的独占lane资源。又比如,电子设备的有线连接方式的lane资源。再比如,lane 1只用于承载设备A和设备B之间的业务,那么对于设备A中的lane hub 1以及设备B中的lane hub 2而言,lane 1均为独占lane资源。
其中,共享lane资源用于表示承载多个业务的lane资源。比如,设备A中的lane hub 1确定使用lane 1执行业务1,此时lane 1正在承载业务2,业务1和业务2为不同的业务,那么lane hub 1确定lane 1为共享lane资源。
进一步的,lane hub管理的独占lane资源和共享lane资源划分不固定。比如,lane hub 1用于管理设备A支持的通信方式对应的5条lane,如lane1-lane5,假设当前lane 1-lane 3为独占lane资源,lane 4和lane 5为共享lane资源。设备B中的lane hub 2确定通过lane 1设备C传输数据,并广播lane 1的使用。那么,lane hub 1获取到广播信息后,确定将lane 1划分变更为共享lane资源。
那么,如图4B所示,lane hub 1管理的设备A可用的lane资源包括附图标记42所示的独占lane资源,以及附图标记43所示的与lane hub 3管理的lane资源重叠的共享lane资源。其中,重叠的共享lane资源用于表示被设备A的业务和设备C的业务都占用的lane资源,且不包括只被设备A和设备C之间的单一业务占用的lane资源。
基于此,lane hub在需要分配lane资源时,就需要根据获取到的账本确定哪些lane资源为独占lane资源,哪些lane资源为共享lane资源。进一步的,lane hub在确定需要分配共享lane资源时,还需要根据获取到的其他电子设备广播的共享lane资源使用情况,确定最终分配的lane资源,以避免影响双方的通信过程。
可选的,lane hub在分配lane资源的过程中,优先分配独占lane资源,后分配共享lane资源。其中,共享lane资源的分配方式可以为共享协商分配模式,如相关的电子设备的lane hub可以协商进行lane资源分配,或者分配模式配置为先到先得模式。或者,lane hub根据业务需求,分配lane资源。可选的,lane资源分配的参考参数包括带宽、可靠性、干扰等。lane hub优先为业务分配带宽高、可靠性高、干扰小的lane资源。如有线通信方式的干扰低,可靠性高,那么lane hub在确定可分配的lane资源包括有线通信方式对应的lane资源时,可以优先为业务分配有线通信方式对应的lane资源。
比如,应用程序请求传输投屏数据,投屏业务的需求为大带宽,独占lane资源的带宽较高,那么优先分配独占lane资源,在独占lane资源被占用的情况下再分配共享lane资源。其中,假设lane hub管理的lane资源包括如下表1所示的lane资源,lane hub可按照下表1所示的lane资源分配优先级为投屏业务分配lane资源,优选分配优先级在先的lane资源(其中,分配优先级的顺序为1-2-3)。可选的,在lane资源分配的过程中,lane hub还可以参考接收到账本记录的lane资源使用情况进行lane资源分配。
其中,如下表1所示,假设独占lane资源包括USB通信方式对应的lane资源、ETH通信方式对应的lane资源、Wi-Fi P2P通信方式对应的lane资源以及STA-AP-STA通信方式对应的lane资源。其中,USB通信方式和ETH通信方式为有线通信方式,具有更低的干扰,因此lane hub将这两种通信方式对应的lane资源的分配优先级确定为“1”,即最优先分配这两种lane资源。此外,Wi-Fi P2P通信方式为端到端通信,而STA-AP-STA通信方式中,STA设备与另一个STA设备通信需要经过AP设备的中转。那么,STA-AP-STA通信方式的传输路径长较长,可能导致通信失败的可能性增加。因此,lane hub确定Wi-Fi P2P通信方式对应的lane资源的分配优先级先于STA-AP-STA通信方式对应的lane资源的分配优先级,这两种通信方式的分配优先级分别确定为“2”和“3”。
假设共享lane资源包括Wi-Fi P2P通信方式对应的lane资源和STA-AP-STA通信方式对应的lane资源。那么,lane hub可将Wi-Fi P2P通信方式对应的lane资源的分配优先级确定为“1”,将STA-AP-STA通信方式对应的lane资源的分配优先级确定为“2”。
表1
需要说明的是,上表1中分配优先级相同的lane资源,lane hub可随机分配其中的lane资源;或者,按照历史使用记录分配前次使用的lane资源;或者,提示用户选择其中的lane资源,根据用户选择确定最终使用的lane资源;或者,同时选择多个分配优先级相同的lane资源共同承载业务;或者,用户预先配置lane资源的使用方案,按照用户的使用方案确定使用的lane资源,比如lane 1和lane 2的分配优先级相同,但用户的使用方案中的lane 1的使用顺序先于lane 2的使用顺序,那么lane hub可选择lane 1承载业务;或者,用户或开发者预配置分配规则,在lane资源的分配优先级相同的情况下,lane hub根据预配置的分配规则,确定分配的lane资源;或者,用户设置优选的lane资源(或设置优选的通信方式,lane hub可确定对应的lane资源),那么lane hub在确定存在多个分配优先级相同lane资源时,可以将其中用户设置的优选lane资源分配给业务使用。
此外,上表1仅用于示例性的说明独占lane资源和共享lane资源可能存在的分配优先级的顺序,不用于限制独占lane资源和共享lane资源的种类,以及不用于限制分配优先级的顺序。
又比如,图库应用请求传输数据,该传输业务的需求为带宽灵活,如传输缩略图的需求为小带宽,传输大图的需求为大带宽。其中,假设lane hub管理的lane资源包括如下表2所示的lane资源,lane hub可按照下表2所示的lane资源分配优先级为传输业务分配lane资源。其中,分配优先级的顺序为1-2-3。可选的,在分配的过程中,lane hub还可以参考接收到账本记录的lane资源使用情况进行lane资源分配。
其中,如下表2所示,假设独占lane资源包括USB通信方式对应的lane资源、ETH通信方式对应的lane资源、以及BR蓝牙通信方式对应的lane资源。其中,USB通信方式和ETH通信方式为有线通信方式,具有更低的干扰,因此lane hub将这两种通信方式对应的lane资源的分配优先级确定为“1”。而BR蓝牙通信的带宽同样较高, 因此lane hub同样将BR蓝牙通信对应的lane资源的分配优先级确定为“1”。
假设共享lane资源包括BR蓝牙通信方式对应的lane资源、Wi-Fi P2P通信方式对应的lane资源以及STA-AP-STA通信方式对应的lane资源。其中,BR蓝牙通信和Wi-Fi P2P通信方式均为端到端通信。因此,lane hub确定BR蓝牙通信方式对应的lane资源和Wi-Fi P2P通信方式对应的lane资源的分配优先级为“1”,将传输路径较长的Wi-Fi P2P通信方式对应的lane资源的分配优先级确定为“2”。
表2
需要说明的是,上表2中分配优先级相同的lane资源,lane hub可随机分配其中的lane资源;或者,按照历史使用记录分配前次使用的lane资源;或者,提示用户选择其中的lane资源,根据用户选择确定最终使用的lane资源;或者,同时选择多个分配优先级相同的lane资源共同承载业务;或者,用户预先配置lane资源的使用方案,按照用户的使用方案确定使用的lane资源,比如lane 1和lane 2的分配优先级相同,但用户的使用方案中的lane 1的使用顺序先于lane 2的使用顺序,那么lane hub可选择lane 1承载业务;或者,用户或开发者预配置分配规则,在lane资源的分配优先级相同的情况下,lane hub根据预配置的分配规则,确定分配的lane资源;或者,用户设置优选的lane资源(或设置优选的通信方式,lane hub可确定对应的lane资源),那么lane hub在确定存在多个分配优先级相同lane资源时,可以将其中用户设置的优选lane资源分配给业务使用。
此外,上表2仅用于示例性的说明独占lane资源和共享lane资源可能存在的分配优先级的顺序,不用于限制独占lane资源和共享lane资源的种类,以及不用于限制分配优先级的顺序。
在一些实施例中,lane hub维护两个账本,其中一个账本用于记录本地lane资源的使用情况;另一个账本用于记录lane net中的lane资源使用情况(如公有账本)。lane hub在本地lane资源使用情况更新后,在更新本地账本的同时更新公有账本,之后广播公有账本。lane net中其他lane hub在接收到广播后,能够同步公有账本,并对本地账本相关内容进行合并更新,进而保证lane net中各个lane hub能够保存有相同的公有账本,即各个lane hub能够同步lane net中的lane资源的实际使用情况。比如,lane hub中本地账本中记录有其管理的lane 1的使用情况,获得其他lane hub广播的公有 账本后,确定其中其他lane hub对于lane 1的使用情况的记录后,确定是否需要修改本地账本。如修改,在修改后,将修改信息同步到公有账本,供其他lane hub同步。
或者,lane hub只维护一个账本,在账本更新后,直接广播该更新后的账本,其他lane hub在获取到广播账本后,同步本地账本中相应的lane资源使用情况,同样能够保证lane net中的lane资源使用情况的同步。或者,lane hub维护一个账本和一个更新记录,lane hub在更新本地账本后,对应生成并广播更新记录,其他lane hub根据更新记录同步本地账本,也能够保证lane net中的lane资源使用情况的同步。
在一些实施例中,lane hub对账本的同步分为强同步和弱同步。可选的,lane hub可以根据lane资源承载的业务类型,确定同步账本的方式为强同步或弱同步。
示例性的,一些业务需要保持较长时间的通信,或者数据量较大,或者需要保持低干扰的传输等。因此,lane hub在为此类业务分配lane资源后,需要将分配的lane资源的使用情况同步至lane net中的其他lane hub,使得其他lane hub在分配lane资源的过程中,避免干扰这些lane资源。那么,lane hub在分配lane资源后,在账本中更新该lane资源的使用情况,并广播更新后的账本,使得lane net中的其他lane hub能够确定更新后的lane资源使用情况实现同步更新各个lane hub的本地账本,避免由于更新的滞后导致的lane资源分配冲突问题的过程为强同步过程。比如,应用A请求lane资源用于传输投屏数据,lane hub分配lane 1供应用A使用,在更新本地账本记录的lane 1的使用情况后,可选择强同步,广播更新后的账本,避免其他lane hub抢占lane1,影响应用A投屏数据的传输。从而保证应用A在较长时间的投屏过程中,不会被影响投屏质量。
又示例性的,一些临时抢占使用的lane资源,lane hub本地更新lane资源使用情况后,在较短时间内应用又释放该lane资源,lane hub又会将该lane资源的使用情况更新为之前的状态或者直接取消之前的更新,如果每一次更新都进行广播同步,则会导致功耗的增加。因此,可以设置预设周期,按照预设周期进行账本广播,保证账本同步的及时性和可信性的同时,又不会因为反复同步增加不必要的功耗。上述按照预设周期同步账本的过程为弱同步的过程。比如,应用B需要传输照片,lane hub确定待传输数据的大小,分配lane资源后,确定该传输过程所需时长低于预设阈值(比如低于3分钟),那么可暂时不必同步该lane资源的使用情况,而是按照预设周期直接在后续需要同步账本的时刻同步账本即可。
在一些实施例,lane hub可对账本进行签名加密后,再进行广播,以增加账本的可信性。相应的,lane net中的其他lane hub在接收到广播账本后,对签名进行确认后,再获取对应的同步数据,更新本地账本。
可选的,账本可以以区块链、链表等方式实现。其中,区块链,是一种按照时间顺序将数据区块以顺序相连的方式组合而成的一种链式数据结构,并通过密码学的原理保证该数据结构不可被篡改、不可被伪造的分布式账本。为了保证区块链账本的一致性,lane net中的各个lane hub在本地lane资源使用情况变化后,按照强同步或弱同步的方式将公有账本进行lane资源使用情况的同步。链表,是一种物理存储单元上的非连续、非顺序的存储结构。链表不会按照线性的顺序进行数据的存储,而是在每一个节点里存到下一个节点的指针。在本申请的实施例中,lane net中的各个lane hub在 lane资源使用情况发生变化后,都需要对应记录在公有账本的链表中,那么链表占用的存储空间较大,因此需要对链表进行裁剪,降低存储空间的占用以及同步的难度。
比如,设置链表裁剪周期,按照裁剪周期清空链表内容。如设置裁剪周期为24小时,那么lane hub按照24小时的周期清空本地保存的公有账本,降低存储空间的占用。
又比如,设置链表存储阈值,在超出存储阈值时,lane hub删除链表。如在某段时间内,lane net中的lane资源频繁使用,导致在没有到达裁剪周期时,公有账本存储空间的占用达到存储阈值。那么,lane hub也需要清空本地保存的公有账本,降低存储空间的占用。
在一些实施中,通信网络中设置有中心节点,中心节点用于对通信网络中的lane资源进行分类。比如,按照业务类型对lane资源进行分类,后续电子设备中的lanehub在分配lane资源的过程中,将lane资源类型与业务类型匹配的lane资源分配给对应的应用程序使用。比如,lane资源类型的分类结果包括高带宽lane资源,高带宽低时延lane资源,低带宽低时延lane资源,低时延高可靠lane资源等中的至少一种。如高带宽lane资源能够提供更高的带宽,用于传输对于带宽需求较高的高带宽业务的数据。如lanehub确定请求的业务类型为高带宽业务,lane1为高带宽lane资源,那么lanehub可以将lane1分配至该请求的高带宽业务对应的应用程序使用。其中,每一类lane资源包含一条或多条lane。可以理解的是,lane资源类型还可以包括其他分类结果,如低时延lane资源,高可靠lane资源等。
可选的,中心节点例如为通信网络中能够保持通信的电子设备、或者为运算能力较强的电子设备、或者为非电池设备(即能保证工作时长的设备)等。通信网络中的设备交互信息,选举出满足上述条件中的部分或全部条件的一个设备作为中心节点。比如,中心节点为路由器。可选的,若中心节点下电,通信网络中的设备能够再次选举出用于lane资源分类的中心节点。其中,通信网络中心节点的选举方法可以参考现有技术,本申请实施例不做具体限定。
示例性的,通信网络中的中心节点能够接收到通信网络中的各个电子设备广播或上报的数据,确定通信网络中的lane数量和通信方式,初始化lane分类结果。比如,中心节点直接定义lane1-lane10为高带宽lane资源,lane11-lane20为高带宽低时延lane资源等。又比如,中心节点根据通信方式对应的信道能力,划分lane资源。如Wi-Fi 5G通信方式的信道的带宽高,中心节点将Wi-Fi 5G通信方式下的lane资源定义为高带宽lane资源。由于,初始化的lane分类结果不一定是最优的分类结果,后续中心节点在通信网络中的电子设备通信过程中,能够根据通信情况调整分类结果。
具体的,通信网络中的中心节点获取通信网络中的各个电子设备的账本,可确定通信网络中全部lane资源的情况。之后,中心节点对lane资源进行质量分析,根据质量分析结果,对lane资源的初始分类结果中的部分或全部分类结果进行调整,获得最终的lane资源分类结果。比如,假设中心节点将Wi-Fi 5G通信方式下的1条信道对应的lane1在初始化过程中确定为高带宽lane资源,电子设备A和电子设备B分别位于相邻的两个房间中,需要隔墙进行高带宽业务通信。中心节点在监测通信网络中lane资源的使用情况的过程中,确定电子设备A和电子设备B通过lane1进行高带宽业务 传输的质量较差,因此可以将lane1调整为其他lane资源类型的lane。之后,中心节点广播lane资源分类结果,电子设备接收到lane资源分类结果后,lanehub将lane资源分类结果添加到各个lane的标签中,后续lanehub根据标签标识区分各条lane。
需要说明的是,上述中心节点按照预设时机调整lane资源的分类结果。比如,中心节点在凌晨时段,电子设备数据传输需求较少的时间段内,根据监测lane资源的情况对lane资源分类结果进行调整。又比如,中心节点确定一条或多条lane的分类结果需要调整,在这部分lane未传输数据的情况下,对这部分lane的分类结果进行调整。
在另一些实施例中,通信网络中没有中心节点,那么可以采用区块链技术,确定用于对lane资源进行分类以及调整lane资源分类的电子设备。
比如,在区块链技术中,为了保证lane资源分类结果的一致性,各个电子设备以其计算能力来争取lane资源分类权,即按既定规则进行竞争的胜出者获得确定lane资源分类的权利,而其他电子设备对确定的lane资源分类结果进行同步。此外,在需要调整lane资源的分类时,同样可以通过区块链技术,竞争确定用于调整lane资源分类的电子设备;或者,由直接由确定lane资源分类结果的设备进行lane资源分类的调整。
如此,通过区块链技术确定lane资源分类,在保证lane net中的lane资源对于各个lane net而言具有统一的lane资源分类结果,保证标准的一致性。并且,防止其他电子设备对lane资源的分类结果进行篡改。
需要说明的是,通过区块链技术竞争用于对lane资源进行分类以及调整lane资源分类的电子设备中应用的算法,以及竞争过程,可以参考现有技术,本申请实施例对此不作具体限制。
在一些实施中,电子设备中的lanehub对外提供统一的接口,供电子设备中的应用程序调用。其中,接口包括lane资源分配接口、lane资源释放接口、lane资源信号质量检测接口等。lanehub通过lane资源分配接口为应用程序分配lane资源。应用程序在完成数据传输后,通过lane资源释放接口释放lane资源,lanehub能够获得lane资源的释放情况,以进行lane资源调整。lanehub通过lane资源信号质量检测接口对lane资源质量进行检测。
示例性的,如图4A所示,假设设备A、设备B和设备C为通信网络中的设备,如设备A中的应用程序需要调用接口使用lane资源向设备B发送数据。那么,设备A中的lanehub获取本地账本,账本中记录有本端支持的lane的本端lane信息和通过接收广播消息获得的对端lane信息(如获得包括设备B记录的lane信息中设备A和设备B均支持的lane的信息,以及设备C记录的lane信息中设备A和设备C均支持的lane的信息)。之后,lanehub根据应用程序请求的业务类型,确定对应的lane资源,根据账本中记录的本端lane信息和对端lane信息通过lane资源分配接口为应用程序分配lane资源。或者,设备A中保存有两个账本,包括记录自身支持的lane资源的使用情况的本地账本和公有账本。
那么,设备A在为待发送的数据分配lane资源时,可以直接根据公有账本中记录的lane资源情况,确定最终分配的lane资源。或者,设备A参考本地账本中记录的最新的lane资源情况,以及公有账本中记录的lane资源情况,确定最终分配的lane资源。如未到弱同步的账本同步周期,部分lane资源使用情况还未同步到公有账本时,本地 账本记录的lane资源情况可能与公有账本记录的lane资源情况不同,因此需要参考本地账本中记录的最新的lane资源情况。
示例性的,如图5A所示,电子设备中的lanehub 51中包括监测模块511,分配模块512和调整模块513。其中,监测模块511用于监测lane资源使用情况,并对lane资源使用情况进行分析。如下表3所示,监测模块511能够获取网络驱动52中测量模块521对于lane资源的质量测量结果(如lane资源的负载、RSSI、SNR等测量值),并记录分析该质量测量结果。比如,如图4A所示,设备A的lane资源包括Wi-Fi 2.4G通信对应的13条lane资源、BR蓝牙通信对应的30条lane资源、BLE通信对应的78条lane资源以及USB通信对应的1条lane资源,监测模块511记录这些lane资源的质量测量结果。
表3
又示例性的,设备A中的应用程序通过统一的接口,如lane资源分配接口,申请lane资源。并在lane资源申请过程中,提交申请使用lane资源的业务类型和请求的lane数量。那么,如图5A所示,lanehub中的分配模块512获取应用程序请求的业务类型,确定业务类型对应的lane资源类型,进而为该应用程序分配对应业务类型的lane资源。如确定业务类型为高带宽业务,则根据请求的lane数量分配高带宽lane资源包括的一条或多条lane供应用程序调用,并记录lane资源的分配情况。其中,分配的lane的数量与应用程序请求的lane数量相同(即lanehub根据应用程序请求的lane数量分配对应数量的lane)。并且,分配的每一条lane对应的物理通路的特性不同。可选的,在应用程序请求lane资源的过程中,可以仅提交申请使用的lane资源的业务类型。那么相应的,lanehub在分配lane资源的过程中,向应用程序分配默认数量的lane资源,如分配一条lane。
如下表4所示,将lane12分配至业务1对应的应用程序,并记录分配情况。
表4
lane编号 | …… | 评级 | 优选 | 分配业务 |
1 | …… | 10 | 非优选 | NA |
12 | …… | 90 | 优选 | 业务1 |
18 | …… | 100 | 优选 | 业务2 |
…… | …… | …… | …… | …… |
一些实施例中,如图5A所示,lanehub中的分配模块512还可以获取到本端监测 模块511监测到的lane资源质量测量结果,可根据质量测量结果对lane资源进行评级。比如,分配模块512根据lane标签确定lane资源类别,之后对不同lane资源类别中的lane根据lane资源质量测量结果进行评分,确定优先级。如将同一lane资源类别中质量较好的lane资源配置较高的优先级。那么之后在lane资源分配过程中,匹配到该类别的lane资源后,优先分配优先级较高的lane资源,优先级较低的lane资源暂不分配。
比如,如上表4所示,假设lane1、lane12和lane18为同一lane资源类别的lane,其中lane1的质量测量结果较差。如图5A所示,lanehub中的分配模块512将lane1设置为该lane资源类别中较低的优先级(如评级为10),确定为非优选lane资源。后续,分配模块512在确定到业务类型对应于该lane资源类别的lane的资源请求时,可以不将lane1分配至请求lane资源的应用程序,避免由于lane资源质量较差导致的业务执行失败。
又比如,电子设备还可以获得通信网络中其他电子设备广播的账本,其中包括其他电子设备对于lane资源的质量测量结果评分。lanehub根据获得的广播账本中记录的自身支持的lane资源的评分,综合本端监测到的lane资源的评分,获得lane资源的综合评分,后续lanehub根据综合评分进行lane资源分配。或者,电子设备不单独对lane资源进行评分,而是根据本端监测到的质量测量结果和获取到的广播账本中的质量测量结果,进行综合评定后,确定lane资源的评级评分,再记录到上表4中。
示例性的,如图1中(a)所示界面101,电子设备检测到用户分享图库应用中的图片的操作(如点击控件11的操作)后,显示如图6中(a)所示界面601,用于确定用户选择的照片以及发送照片的方式。相对于如图1中(b)所示界面102,用户可以不用在电子设备支持的多个通信方式中再选择具体的通信方式,电子设备在检测到用户点击分享控件61的操作后,确定用户需要将照片发送至对端设备,可显示如图6中(b)所示界面602,用于提示用户确认发送的设备。如检测到用户点击设备B控件62的操作,确定需要将用户选择的照片发送至设备B。
之后,电子设备中的图库应用可向lanehub发送照片发送请求,并在照片发送请求中携带此次请求发送的业务类型。lanehub可根据业务类型确定lane资源,如待发送的照片数据量较大,图库应用确定对应的业务类型为高带宽业务,那么lanehub根据高带宽业务匹配对应的高带宽lane资源。之后,假设图库应用请求的lane数量为1,lanehub根据请求的lane数量分配高带宽lane资源中评分最高的lane。假设高带宽lane资源包括lane1-lane10。比如,评分最高的lane为lane1,可将lane1分配给图库应用用于传输用户选中的照片至设备B。又比如,lanehub确定本端评分最高的lane为lane1,但是根据设备B的对端lane信息确定设备B对于lane1的评分较低(如低于预设阈值),则顺序确定本端评分第二的lane的情况,如确定设备B对于该评分第二的lane的评分满足要求(如大于或等于预设阈值),可将该评分第二的lane分配给图库应用用于传输用户选中的照片至设备B。即lanehub根据本端账本和对端账本,确定两端电子设备对于对应的lane资源的综合评分,为应用程序分配最优的lane资源。
如此,用户通过简单的操作,即可实现数据的传输。在数据传输过程中,电子设备能够自动确定应用的lane资源,降低用户操作难度,提高数据传输质量,提升用户使用体验。
在一些实施例中,本申请实施例提供的方法还可以应用于电子设备建立连接的过程中。比如,假设用户想要建立电子设备A与电子设备B之间的通信连接。在现有技术中,用户需要在电子设备A的设置菜单中选择具体应用的通信方式后,电子设备A才能够根据用户选择的通信方式与电子设备B建立通信连接,在通信方式选择的过程中用户操作较为复杂。而通过本申请实施例提供的方法,用户只需在电子设备A中指示与电子设备B建立连接,电子设备A就可以根据用户操作,自动选择用于与电子设备B建立通信连接的lane资源(如根据通信网络中lane资源的使用信息,确定空闲且质量较优的lane资源),有效降低用户操作难度,提升用户使用体验。
示例性的,假设用户在操作电子设备A的过程中,需要将电子设备A与电子设备B建立通信连接。在现有技术中,如图7中(a)所示界面701,电子设备A显示支持的多种通信方式(如Wi-Fi、蓝牙、移动网络等常用的通信方式,以及更多连接中对应的电子设备A支持的其他通信方式),用户需要在其中选择需要的通信方式。用户需要自行确定电子设备B支持的通信方式,并且选在多种通信方式中进行选择,操作难度较大。而如图7中(b)所示界面702,基于本申请实施例提供的通信方法,电子设备A可只显示用于建立连接的控件(如连接控件71),电子设备A在检测到用户点击连接控件71的操作后,可显示如图6中(b)所示界面602,用于提示用户选择需要建立通信连接的电子设备,如检测到用户点击控件62的操作,确定需要与设备B(即电子设备B)建立连接。这样电子设备A在确定用户需要电子设备A与电子设备B建立通信连接后,可以自动确定用于通信的lane资源,不必再由用户选择通信方式,有效降低用户操作难度。
在另一些实施例中,电子设备还可以对电子设备支持的通信方式进行分组,用户可以在基于分组结果,选择不同组别的通信方式进行通信。比如,假设将通信方式分为有线通信方式和无线通信方式。在如图7所示场景中,电子设备A可以显示有线连接和无线连接两个选项供用户选择。如电子设备A在检测到用户选择无线连接选项的操作后,在无线连接对应的lane资源中自动确定目标lane资源,通过目标lane资源与电子设备B建立通信连接。
如此,对lane资源进行分组管理,提高管理效率。并且,用户能够根据需求选择对应的组别,提升用户使用体验。
在一些实施例中,lanehub提供统一的接口供应用程序调用,但是设备间不同通信方式的数据传输接口不同,电子设备在确定分配给应用程序的lane资源后,根据lane标签确定对应的传输方式后,再确定是否与对端设备建立了分配的lane资源对应通信方式对应的通信连接。若未建立,可在建立通信连接后,再发送数据;若已建立通信连接,可直接通过已建立的通信连接发送数据。
示例性的,对应于上述图6所示场景,假设lanehub分配给图库应用的lane资源为lane1,lane1对应的通信方式为BLE通信。图库应用在获得分配的lane资源后,向电子设备中的通信模块请求发送用户选择的照片,通信模块根据lane1的标签,确定lane1对应的通信方式为BLE通信。并且,根据如图6中(b)所示界面602上用户的操作,确定对端设备为设备B。之后,通信模块确定电子设备是否与设备B建立蓝牙连接。若未建立蓝牙连接,可向设备B发送蓝牙连接建立请求,以建立蓝牙连接。之 后,基于蓝牙连接,图库应用通过lane1向设备B发送用户选择的照片。若通信模块确定电子设备与设备B已建立蓝牙连接,图库应用直接通过lane1向设备B发送用户选择的照片。
在一些实施例中,电子设备还可以根据用户操作,确定电子设备支持的通信方式的优先级。比如,用户设置优先使用蓝牙发送数据。那么,lanehub在选择lane资源的过程中,根据用户设置,优先选择蓝牙通信方式的lane中评级评分最高的lane资源分配给应用程序使用。
在一些实施例中,lanehub根据业务类型和请求的lane数量分配的lane资源可以为一种物理特性对应的lane资源(如仅分配一条lane),也可以为多种物理特性对应的lane资源(如分配多条lane),物理特性的数量等于请求的lane数量。其中,多种物理特性可以对应于相同或不相同的通信方式。比如,在DBDC场景中,两种Wi-Fi物理通路均可以对应于Wi-Fi 2.4G通信方式;或者,其中一种Wi-Fi物理通路对应于Wi-Fi 2.4G通信方式,另一种Wi-Fi物理通路对应于Wi-Fi 5G通信方式。
示例性的,应用程序请求的lane数量为2,业务类型为高带宽业务,lanehub可在高带宽业务的lane资源中选择对应于两种不同物理特性的lane,分配至应用程序。其中,lane资源中高带宽lane资源包括的lane数量可以为一个或多个。若高带宽lane资源包括的lane数量小于两个,则lanehub确定当前lane资源数量不满足应用程序需求,无法调配lane资源,可向应用程序发送lane资源申请失败响应。可选的,lane资源申请失败响应还可以携带失败原因,由应用程序根据失败原因确定是否申请较少数量的lane资源或申请其他业务类型的lane资源。若高带宽lane资源包括的lane数量大于或等于两个,则lanehub确定当前lane资源数量满足应用程序需求,lanehub获得全部高带宽lane资源的如上表4所示的评级分数,将高带宽lane资源按照评级分数由高到低排序,根据两端电子设备的综合评级评分,获取排序在前且物理特性不同的两条lane,将这两条lane分配至应用程序。
比如,假设应用程序请求的业务类型为高带宽业务,请求的lane数量为2;lanehub管理的高带宽lane资源包括Wi-Fi 2.4G通信方式的lane资源、Wi-Fi 5G通信方式的lane资源、以及BLE通信方式的lane资源,并且每种通信方式均对应于一种物理特性。那么,lanehub根据两端电子设备的综合评级评分,在Wi-Fi 2.4G通信方式的高带宽lane资源中选择一条评级评分最高的lane,在Wi-Fi 5G通信方式的高带宽lane资源选择一条评级评分最高的lane,在BLE通信方式的高带宽lane资源中选择一条评级评分最高的lane。之后,将评级评分最高的这三条lane再根据评级评分排序,选择其中评级评分最高的两条lane,将这两条lane分配至应用程序。
在一些实施例中,应用程序中预配置确定请求的lane数量的lane数量确定规则,以及在分配的lane资源包括多条lane的情况下,每条lane的使用规则。比如,lane数量确定规则包括根据待传输的数据量大小确定需要请求的lane数量。如待传输数据为数据量超过预设阈值的大文件,应用程序根据lane数量确定规则确定请求两条lane。又比如,分配的多条lane的使用规则包括将待传输数据均分,每一条lane承载对应的待传输数据,应用程序通过多条lane并行传输数据。如应用程序确定分配的lane资源包括Wi-Fi 5G通信方式的一条lane和BLE通信方式的一条lane。应用程序可将待传 输数据均分,在通过Wi-Fi 5G通信方式的一条lane传输一半数据的过程中,通过BLE通信方式的一条lane传输另一半数据。或者,根据lane对应的通信方式,划分传输的待传输数据的比例。该比例可以为开发者预先配置在应用程序中的比例,或者还可以为用户自定义的传输比例,或者还可以为根据lane的通信质量确定的比例,或者为通过其他方式确定的比例。如应用程序确定分配的lane资源包括Wi-Fi 5G通信方式的一条lane和BLE通信方式的一条lane。应用程序可将待传输数据划分为3份,在通过Wi-Fi 5G通信方式的一条lane传输三分之二数据的过程中,通过BLE通信方式的一条lane传输其余的三分之一数据。
相应的,假设用于传输数据的lane的数量为多条,对端电子设备在通过多条lane接收到数据后,将接收到的数据进行拼接,获得完整的传输数据。其中,数据拼接的方法可以参考现有技术,本申请实施例对此不做具体限定。
在另一些实施例中,如分配的lane资源包含多条lane,可以由电子设备中的通信模块或者管理模块对传输的数据进行切分和拼接。比如,电子设备A中的应用A向电子设备B中的应用B发送数据。那么应用A将待传输的数据发送到电子设备A中的通信模块,由通信模块根据电子设备A中的lane hub分配的lane资源数量切分数据并进行传输。相应的,电子设备B中的通信模块在接收到数据后,对数据进行拼接,将拼接后的数据发送至应用B。
在一些实施例中,如上所述,lane hub可以通过计数方式的统计复用,实现在频域上为同一个业务分配多条lane,提高传输效率。此外,lane hub还可以以时域的角度,根据带宽进行统计复用,分配一条lane承载多个业务。如多个业务按照时间的先后顺序使用同样的一条lane。比如,时限要求较高的高优先业务优先使用lane,之后时限要求较低的低优先业务后使用lane。从而既不会影响业务的完成,也不会出现同时执行多个业务导致的干扰问题,提升应用传输质量。
在一些实施例中,lanehub对记录电子设备的lane资源的账本进行维护。比如,lanehub通过图5A中所示的监测模块511和分配模块512维护账本,账本中记录的内容包括本端记录的如上表3和上表4所示的内容和通过广播接收到的通信网络中其他电子设备记录的目标lane对应的如上表3和上表4所示的内容。目标lane为电子设备支持的通信方式对应的lane。
在一些实施例中,lanehub在将lane资源分配至应用程序后,会对lane资源使用情况进行监控,在检测到通信质量较差时,能够调整lane资源,满足应用程序数据传输需求(如丢包率小于预设阈值等)。其中,调整lane资源包括lane资源参数调整,lane资源切换等。在数据传输过程中,lane hub可对lane资源进行一次或多次调整,保证传输质量。
示例性的,如图5B所示,lane hub通过图5A中所示的分配模块512在调度点1根据应用程序的请求为应用程序分配lane资源。之后,lanehub通过图5A中所示的监测模块511对传输过程中网络驱动52中的测量模块521测量到的数据传输质量的信息进行收集。比如,如图5B所示,假设数据传输过程中应用的网络传输协议为传输控制协议(transmission control protocol,TCP)/网络协议(pnternet protocol,IP),在TCP/IP协议中,网络传输过程中包括如图5B所示的4层网络协议传输,如包括应用 层、传输层、网络层和物理链路层。其中,各层对应的具体协议内容可参考现有技术,在此不再赘述。监测模块511能够通过信息收集获得应用程序的体验质量(quality of experience,QoE)信息、协议负载信息、网卡负载信息、物理信道QoE信息等信息。之后,lanehub通过图5A中所示的分配模块512基于收集到的信息,对lane资源使用情况进行分析,确定是否需要进行lane资源调整。
又示例性的,如图5B所示,在lane资源使用情况分析过程中,分配模块512可以从时域角度、质量角度、决策与执行角度对lane资源的使用情况进行分析。
比如,lane资源是基于频域角度以信道为粒度进行的划分,那么可以采用分时策略,允许不同的传输任务按照时间顺序分时调用相同的lane资源。如分配模块512通过Wi-Fi分级时钟技术、BR蓝牙分级时钟技术等分时策略分配lane资源。那么,监测模块511需要从时域角度监测lane资源的使用情况,分配模块512也需要从时域角度确定是否需要对lane资源的分配情况进行调整。
又比如,分配模块512能够获得如上表3所示的质量测量结果,对lane资源进行服务质量(quality of service,QoS)分析,确定是否需要调整QoS策略(如调整评价lane资源的QoS标准等),以及对lane net的使用情况进行分析。
再比如,监控lane资源的分配调度情况,如监测lane net中各个lane hub的lane资源调度情况,确认是否会影响当前应用的lane资源的使用。比如可以实现QoS协同,对低优先业务进行包含业务限速、避让等决策调整等,从而保证长时业务(如投屏业务等)不会受到短时业务(如图片分享业务等)的影响,或者传输质量要求较高的业务不会收到其他业务的影响等。
之后,如图5B所示,lanehub通过图5A中所示的分配模块512,根据lane资源使用情况分析结果,确定是否需要重新分配lane资源。其中,在lane资源调度过程中,可以存在多个调度点2,即可根据lane资源的实际使用情况,对分配的lane资源进行多次调整,从而保证应用的通信体验。动态切换lane资源,能够保证在部分lane资源不可用时,及时预测并替换可用的lane资源保障业务的持续。
需要说明的是,结合图5A和图5B,监测模块511在收集的lane net中的lane资源的信息后,会同步更新本地账本信息,如更新上述表3和表4中记录的内容。分配模块512不仅能够根据监测到的lane资源信息调整lane资源,还可以在之后lane资源分配的过程中,基于最新的lane资源使用情况进行lane资源分配,有效提升通信质量。
此外,图5B中示例的TPC/IP协议的分层监控仅为一种示例性说明。在实际应用场景中,lane hub还可以通过其他网络协议进行数据传输,那么需要监控的网络分层结果可能相同或不相同,比如7层网络协议、5层网络协议等,对此本申请实施例不做具体限定。
一些实施例中,lanehub通过调整lane资源参数,保证应用程序的数据传输质量。
示例性的,如图5A所示,lanehub中的监测模块511监测分配模块512分配给应用程序的lane资源的使用情况,如监测模块511实时获取网络驱动52中的测量模块521对于lane资源的质量测量结果。并且,监测模块511还能够获取到通信的对端电子设备广播的账本,确定其中记录的自身支持的lane资源的质量测量结果。之后,通知调整模块513,对lane资源的使用进行调整。比如,设备A和设备B在通过lane1 进行数据传输过程中,设备A中的调整模块513根据lane资源的质量测量结果,确定需要对lane1的参数进行调整,向网络驱动52发送调整指示,网络驱动52在接收到调整指示后,通过执行模块522对lane1进行参数调整。
比如,lanehub在通过调整模块513发送调整指示的过程中,还通过分配模块512根据lane资源的质量测量结果,分配与当前应用程序应用的lane资源相同的物理特性的通信方式的最新的lane资源,那么执行模块522在接收到调整指示后,指示应用程序使用新分配的lane资源进行数据传输。如假设lane切分粒度为信道,指示应用程序切换相同通信方式下的信道进行数据传输。
示例性的,假设Wi-Fi 2.4G通信方式下包括一种物理通路,lanehub为应用程序分配的lane为Wi-Fi 2.4G通信方式下的一条lane。在lanehub监测到该条lane的质量不满足数据传输需求时,获得Wi-Fi 2.4G通信方式下其他lane的评级评分。如评级评分最高的lane满足数据传输需求,可将评级评分最高的lane分配给应用程序,并指示应用程序释放原质量较差的lane。可选的,应用程序可以选择是否切换lane。
又比如,调整模块513向执行模块522发送调整指示,用于指示调整lane资源的功率。示例性的,假设lane切分粒度为信道,其他条件相同的情况下,lane的信道功率越大,信号强度越强,数据传输质量越好。那么lanehub在确定需要进行lane参数调整时,向执行模块522发送功率调整指示,以提高信号强度,改善数据传输质量。
需要说明的是,部分通信方式下的lane资源无法调整功率,或者调整功率后并不能改善传输质量,lanehub可以根据通信方式的类型,确定是否需要进行功率调整,或者确定需要调整哪些参数。比如,USB有线通信方式,无法如Wi-Fi通信方式通过调整信道功率,改善数据传输质量。
如此,监控lane资源的使用情况,在lane资源质量较差时,能够通过调整lane资源参数,保证应用程序在数据传输过程中,提供较好的网络传输效果。进而避免出现由于lane资源质量较差导致的数据传输失败。
需要说明的是,上述信道调整、功率调整仅为示例性说明,lanehub在确定lane资源质量较差时,还可以通过调整其他lane资源参数,使得lane资源满足应用程序数据传输需求。如通过调整通信切片的方式,完成lane资源参数调整。
另一些实施例中,lanehub通过lane资源切换,保证应用程序的数据传输质量。比如,lanehub在调整lane资源参数后,lane资源的质量仍较差,不能满足应用程序的数据传输需求,则可以根据本地账本中记录的本端lane信息和通过接收广播消息获得的对端lane信息中的lane标签,确定数据传输的对端设备支持的传输方式,直接切换两个电子设备均支持的其他传输方式的lane资源进行数据传输,以提升传输质量。又比如,lanehub在确定lane资源质量较差时,根据lane标签确定数据传输的对端设备支持的传输方式,直接切换两个电子设备均支持的其他传输方式的lane资源进行数据传输,以提升传输质量。
示例性的,如图5A所示,lanehub 51中的调整模块513在通过执行模块522进行lane资源参数调整后,确定监测模块511监测到的lane资源质量测量结果仍较差,可根据lanehub 51中记录的账本以及获取到的通信网络中其他电子设备广播的账本,根据lane标签中记录的通信方式,确定质量较差lane资源对应的应用程序的对端电子设 备支持的通信方式,进而确定与本端电子设备支持的通信方式相同的通信方式的lane资源情况。之后,调整模块513确定通过调整通信方式的方法提高通信质量,通知分配模块512在两个电子设备均支持的其他通信方式中选择lane资源,重新分配质量较好lane资源。调整模块513获取到分配到的质量较好的其他通信方式的lane资源,指示网络驱动52中的执行模块522调整应用程序通信的lane资源。
比如,假设第一电子设备和第二电子设备支持Wi-Fi 2.4G通信方式和BR蓝牙通信方式,第一电子设备中的应用A通过Wi-Fi 2.4G通信方式中的lane资源向第二电子设备发送数据,在数据传输还未完成时,其他电子设备通过Wi-Fi 2.4G通信方式加入包括第一电子设备和第二电子设备的通信网络,导致Wi-Fi 2.4G通信方式的网络环境变差,不满足应用A的需求(比如需要在1小时内完成数据传输)。第一电子设备中的lanehub监控lane资源使用情况,确定当前lane资源质量不满足应用A的数据传输需求,可根据账本中记录的lane标签确定第一电子设备和第二电子设备均支持的其他通信方式,如BR蓝牙通信方式。之后,第一电子设备中的lanehub确定BR蓝牙通信方式的lane资源满足应用A的数据传输需求,则分配BR蓝牙通信方式的lane资源供应用A使用,从而提升数据传输质量。
又比如,通信网络中包括电子设备1、电子设备2、电子设备3和电子设备4等多个电子设备。其中,电子设备1和电子设备2之间执行业务1,电子设备1和电子设备3之间执行业务2,电子设备3和电子设备4之间执行业务3,业务1、业务2和业务3例如为不同的数据传输业务。假设各个电子设备中的lane hub为各自对应的业务分配lane资源,如业务1分配的lane资源为lane 1,为业务2分配的lane资源为lane2。之后,在电子设备3中的lane hub 3在为业务3分配的lane资源的过程中,确定可选择的lane资源为lane 1,但lane 1正在用于承载业务1。lane hub 3确定业务1的优先级低于业务3的优先级,可与电子设备1中的lane hub 1和/或电子设备2中的lane hub2协商,或者直接抢占lane 1,使得业务1切换使用其他lane资源。如最终确定,为业务3分配的lane资源为lane 1,为业务1分配的lane资源为lane 4;或者,为业务1分配的lane资源为lane 2,与业务2共享lane资源。
需要说明的是,lanehub确定通过切换通信方式的方法改善数据传输质量后,如何选择切换后的通信方式中的lane资源,参见上文实施例中选择lane资源的相关描述,在此不再赘述。
如此,监控lane资源的使用情况,在lane资源质量较差时,能够通过切换数据传输两端电子设备均支持的通信方式的lane资源,保证应用程序在数据传输过程中,提供较好的网络传输效果。进而避免出现由于lane资源质量较差导致的数据传输失败。
并且,如上所述,不论lanehub通过调整lane资源参数的方式,还是通过切换数据传输两端电子设备均支持的通信方式的lane资源的方式,满足应用程序的数据传输需求的过程中,均不需要用户参与调整,那么电子设备能够在用户无感知的情况下,为用户提供最优的数据传输体验。比如,用户在如图6中(b)所示界面602上选择通过网络传输的方式传输照片后,不必再进行其他操作,电子设备即可自动选择最优的lane资源传输照片,为用户提供最优的照片传输体验。
进一步的,电子设备通过lanehub对全部网络资源进行统一规划,避免出现同频 干扰。并且,在出现同频干扰的情况下,能够通过参数调整,降低同频干扰;或者,通过lane资源切换,消除同频干扰。
在一些实施例中,lanehub监测lane资源使用情况,在确定存在较优的lane资源时,可以主动在用户无感知的情况下,切换lane资源,进一步提升网络传输质量。
示例性的,通信网络中的电子设备按照预设周期(不同电子设备对应的预设周期相同或者不相同)广播账本,那么相应的如图5A所示,lanehub 51中的监测模块511能够获取其他电子设备广播的账本,在监测已分配的lane资源的过程中,确定存在其他质量更优的lane资源,则通知调整模块513进行lane资源调整。其中,调整后的lane资源与调整前的lane资源对应的通信方式相同或不相同。
需要说明的是,图5A中所示的lanehub 51和网络驱动52中的模块划分方式仅为一种示例性说明,还可以存在其他模块划分方式用于实现上述lanehub和网络驱动的功能。如不对lanehub 51和网络驱动52进行模块切分,直接由lanehub 51和网络驱动52实现上述实施例中对应的功能。
在一些实施例中,lanehub初次接收到应用程序的某种类型的业务请求后,为其分配对应的lane资源。那么,后续lanehub再接收到该应用程序发送的该种类型的业务请求后,直接为根据历史记录,为其分配前次分配过的lane资源。这样能够提升lanehub的lane资源分配效率,从而提升数据传输效率。
进一步的,在应用程序数据传输过程中,如lanehub调整了该业务类型业务对应的lane资源,可更新账本中的lane资源使用记录,记录调整后的lane资源。那么,后续lanehub再接收到lane资源请求时,根据最新的记录分配lane资源。
如此,电子设备将网络资源进行统一管理和规划,以lane为单位切分和调度网络资源,实现有线资源和无线资源的综合调度,从而应用程序能够不受限于通信方式的独立接口。开发者可以直接根据业务类型进行应用程序开发;电子设备能够根据应用程序请求的业务类型,直接分配对应的lane资源;用户不必在如图1所示的选择通信方式,降低用户操作难度。并且,电子设备能够根据网络环境为应用程序分配质量更好的lane资源,提升网络传输质量。
此外,在数据传输过程中,电子设备能够在用户无感知的情况下,直接通过参数调整,或者通信方式调整的方法,动态调整lane资源,保证数据传输质量,提高用户使用体验。
示例性的,图8为本申请实施例提供的通信方法流程图。如图8所示,该方法包括S801-S802。
S801、第一电子设备在确定需要向第二电子设备发送数据时,在第一lane、第二lane以及第三lane中确定用于传输数据的目标lane。
在一些实施例中,第一lane、第二lane以及第三lane为第一电子设备支持的lane,第一lane对应于第一类型的网络通路,第二lane对应于第二类型的网络通路中的第一信道,第三lane对应于第二类型的网络通路中的第二信道。
示例性的,第一电子设备在需要发送数据时,能够在本端支持的所有通信方式对应的lane资源中选择用于本次数据传输的lane资源。比如,假设第一电子设备支持BLE通信方式和Wi-Fi 2.4G通信方式两种通信方式,其中第一类型的网络通路为BLE 通信方式的网络通路,第二类型的网络通路为Wi-Fi 2.4G通信方式的网络通路。那么,第一lane对应于BLE通信方式包括的78条信道,第二lane和第三lane对应于Wi-Fi2.4G通信方式包括的78条信道。
需要说明的是,第一类型的网络通路和第二类型的网络通路用于表示不同类型的物理特性通路。
在一些实施例中,第一电子设备在确定需要向第二电子设备发送数据时,确定数据对应的业务类型。根据业务类型,在第一lane、第二lane以及第三lane中确定目标lane。
示例性的,业务类型如包括高带宽业务、高带宽低时延、低带宽低时延业务、低时延业务高可靠等。包括第一电子设备和第二电子设备的通信网络中还可以包括中心设备(即中心节点),该中心设备可以为第一电子设备,也可以为第二电子设备,或者可以为通信网络中的其他设备。中心设备按照业务类型对lane资源进行分类,后续电子设备在分配lane资源的过程中,将lane资源类型与业务类型匹配的lane资源分配给对应的应用程序使用。比如,lane资源的分类结果包括高带宽lane资源,高带宽低时延lane资源,低带宽低时延lane资源,低时延高可靠lane资源。
在一些实施例中,在第一电子设备在确定需要向第二电子设备发送数据时,在第一lane、第二lane以及第三lane中确定用于传输数据的目标lane之前,第一电子设备还需要获取本地记录的第一lane、第二lane以及第三lane的第一使用信息,以及获取包括第一电子设备的通信网络中多个电子设备广播的第一lane、第二lane以及第三lane的第二使用信息。进而第一电子设备根据第一使用信息、第二使用信息以及业务类型,确定目标lane。
示例性的,电子设备中预置用于记录lane使用情况的账本,其中包括电子设备对于lane资源质量测量结果的评分。第一电子设备在需要发送数据时,获取本地账本以及通信网络中其他电子设备广播的账本。第一电子设备根据获得的广播账本中记录的自身支持的lane资源的评分,综合本端监测到的lane资源的评分,获得lane资源的综合评分,后续第一电子设备根据综合评分进行lane资源分配。如第一电子设备根据评分,获得评分在前且类型不同的第一数量的目标lane,第一数量为传输数据需要的lane数量。
在另一些实施例中,第一电子设备本地保存有第一账本和第二账本,第一账本用于记录第一lane、第二lane以及第三lane的使用信息,第二账本用于记录包括第一电子设备的通信系统中的全部lane的使用信息。在第一电子设备在确定需要向第二电子设备发送数据时,在第一lane、第二lane以及第三lane中确定用于传输数据的目标lane之前,第一电子设备需要获取第一账本中记录的第一lane、第二lane以及第三lane的第一使用信息,以及获取第二账本中记录的第一lane、第二lane以及第三lane的第二使用信息。那么,第一电子设备可以根据第一使用信息、第二使用信息以及业务类型,确定目标lane。
也就是说,电子设备中保存有两个账本,一个账本用于记录自身支持的lane资源的使用信息,另一个账本为公有账本用于记录通信系统(lane net)中包括的全部lane资源的使用信息。其中,通信系统中的各个电子设备中保存的公有账本同步。那么电 子设备可以根据本地记录的最新的lane的使用信息以及公有账本中记录的lane的使用信息,确定最优的lane资源。或者,电子设备直接根据公有账本中记录的lane的使用信息,确定最优的lane资源。
在一些实施例中,第一使用信息或第二使用信息包括如下一项或几项内容:lane的使用次数、lane的历史传输数据对应的业务类型、lane的质量参数信息。
在一些实施例中,目标lane的数量为一个或多个;其中,在目标lane的数量为多个的情况下,多个目标lane为不同类型的信道;在目标lane的数量为一个的情况下,目标lane正在传输第一数据;或者,在目标lane的数量为一个的情况下,目标lane空闲。
比如,lane hub可以通过计数方式的统计复用,实现在频域上为同一个业务分配多条lane,提高传输效率。那么,目标lane的数量就可能为一个或多个。
又比如,lane hub还可以以时域的角度,根据带宽进行统计复用,分配一条lane承载多个业务。如多个业务按照时间的先后顺序使用同样的一条lane。比如,时限要求较高的高优先业务优先使用lane,之后时限要求较低的低优先业务后使用lane。从而既不会影响业务的完成,也不会出现同时执行多个业务导致的干扰问题,提升应用传输质量。那么,在待传输的数据的优先级较低的情况下,lane hub可能为此业务分配正在传输其他优先级较高的第一数据的lane,在优先级较高的第一数据传输完成后,第一电子设备可通过目标lane传输数据。或者,待传输的数据的优先级较高,可以抢占正在传输第一数据的目标lane,先通过目标lane传输待传输的数据,之后再传输第一数据。
可以理解的是,如果存在空闲的lane资源,并且该空闲lane资源符合传输待传输数据的要求,可以将该lane资源确定为目标lane。比如,第一电子设备具有有线传输方式(如USB传输方式)对应的lane资源,并且空闲,那么可以优先确定有线传输对应的lane资源为目标lane。
S802、第一电子设备通过目标lane向第二电子设备发送数据。
在一些实施例中,第一电子设备监测目标lane的使用情况,获得目标lane的第三使用信息。将本地记录的目标lane的使用信息更新为第三使用信息。广播第三使用信息。
如此,通信网络中的电子设备通过广播lane使用信息,实现lane使用信息的交互,进而电子设备在需要发送数据时,能够根据接收到的其他电子设备广播的lane使用信息,确定目标lane。
一些实施例中农,广播第三使用信息包括:在目标lane的使用时长超出预设时长的情况下,广播第三使用信息。或者,按照预设周期,广播第三使用信息。
示例性的,lane hub对账本的同步分为强同步和弱同步。可选的,lane hub可以根据lane资源承载的业务类型,确定同步账本的方式为强同步或弱同步。
比如,一些业务需要保持较长时间的通信,或者数据量较大,或者需要保持低干扰的传输等。因此,lane hub在为此类业务分配lane资源后,需要将分配的lane资源的使用情况同步至lane net中的其他lane hub,使得其他lane hub在分配lane资源的过程中,避免干扰这些lane资源。那么这类lane资源为需要强同步的lane资源。
又比如,一些临时抢占使用的lane资源,lane hub本地更新lane资源使用情况后,在较短时间内应用又释放该lane资源,lane hub又会将该lane资源的使用情况更新为之前的状态或者直接取消之前的更新,如果每一次更新都进行广播同步,则会导致功耗的增加。因此,可以设置预设周期,按照预设周期进行账本广播,保证账本同步的及时性和可信性的同时,又不会因为反复同步增加不必要的功耗。那么这类lane资源为需要弱同步的lane资源。
如此,通过强同步或者弱同步,保证lane net中各个lane hub对于lane资源的使用情况的记录统一,避免由于lane资源使用情况不统一,导致的lane资源分配冲突问题。
在一些实施例中,第一电子设备中的lanehub在将lane资源(即目标lane)分配至应用程序后,会对lane资源使用情况进行监控,在检测到通信质量较差时,能够调整lane资源,满足应用程序数据传输需求(如丢包率小于预设阈值等)。其中,调整lane资源包括lane资源参数调整,lane资源切换等。
比如,在目标lane中的部分或全部lane的质量不满足预设条件时,调整质量不满足预设条件的第一目标lane的参数。
示例性的,调整质量不满足预设条件的第一目标lane的功率。或者,确定第一目标lane对应的类型,根据业务类型和第一目标lane对应的类型,在第一lane、第二lane以及第三lane中确定与业务类型对应、与第一目标lane对应的类型相同、且质量满足预设条件的第二目标lane,切换第一目标lane为第二目标lane。
又比如,在调整参数后,第一目标lane中的部分或全部lane的质量不满足预设条件;方法还包括:获取第二电子设备广播的lane的第四使用信息。根据第四使用信息,确定第一电子设备和第二电子设备均支持的目标类型的lane。在目标类型的lane中确定质量满足预设条件的第三目标lane,切换第一目标lane中调整参数后仍不满足预设条件的lane为第三目标lane。
如此,电子设备将网络资源进行统一管理和规划,以lane为单位切分和调度网络资源,从而应用程序能够不受限于通信方式的独立接口。开发者可以直接根据业务类型进行应用程序开发;电子设备能够根据应用程序请求的业务类型,直接分配对应的lane资源;用户不必在如图1所示的选择通信方式,降低用户操作难度。并且,电子设备能够根据网络环境为应用程序分配质量更好的lane资源,提升网络传输质量。
此外,在数据传输过程中,电子设备能够在用户无感知的情况下,直接通过参数调整,或者通信方式调整的方法,动态调整lane资源,保证数据传输质量,提高用户使用体验。
以上结合图4A-图8详细说明了本申请实施例提供的通信方法。以下结合图9详细说明本申请实施例提供的通信装置。
在一种可能的设计中,图9为本申请实施例提供的电子设备的结构示意图。如图9所示,电子设备900可以包括:处理单元901和收发单元902。电子设备900可用于实现上述方法实施例中涉及的电子设备的功能。
可选地,处理单元901,用于支持电子设备900执行图8中的S801。
可选地,收发单元902,用于支持电子设备900执行图8中的S802。
其中,收发单元可以包括接收单元和发送单元,可以由收发器或收发器相关电路组件实现,可以为收发器或收发模块。电子设备900中的各个单元的操作和/或功能分别为了实现上述方法实施例中所述的通信方法的相应流程,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能单元的功能描述,为了简洁,在此不再赘述。
可选地,图9所示的电子设备900还可以包括存储单元(图9中未示出),该存储单元中存储有程序或指令。当处理单元901以及收发单元902执行该程序或指令时,使得图9所示的电子设备900可以执行上述方法实施例中所述的通信方法。
图9所示的电子设备900的技术效果可以参考上述方法实施例中所述的通信方法的技术效果,此处不再赘述。
除了以电子设备900的形式以外,本申请提供的技术方案也可以为电子设备中的功能单元或者芯片,或者与电子设备匹配使用的装置。
本申请实施例还提供一种芯片系统,包括:处理器,所述处理器与存储器耦合,所述存储器用于存储程序或指令,当所述程序或指令被所述处理器执行时,使得该芯片系统实现上述任一方法实施例中的方法。
可选地,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。
可选地,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请实施例并不限定。示例性地,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请实施例对存储器的类型,以及存储器与处理器的设置方式不作具体限定。
示例性地,该芯片系统可以是现场可编程门阵列(field programmable gate array,FPGA),可以是专用集成芯片(AP设备plication specific integrated circuit,ASIC),还可以是系统芯片(system on chip,SoC),还可以是中央处理器(central processor unit,CPU),还可以是网络处理器(network processor,NP),还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。
应理解,上述方法实施例中的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当该计算机程序在计算机上上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的通信方法。
本申请实施例还提供一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的通信方法。
另外,本申请实施例还提供一种装置。该装置具体可以是组件或模块,该装置可 包括相连的一个或多个处理器和存储器。其中,存储器用于存储计算机程序。当该计算机程序被一个或多个处理器执行时,使得装置执行上述各方法实施例中的通信方法。
其中,本申请实施例提供的装置、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法。因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
结合本申请实施例公开内容所描述的方法或者算法的步骤可以硬件的方式来实现,也可以是由处理器执行软件指令的方式来实现。软件指令可以由相应地软件模块组成,软件模块可以被存放于随机存取存储器(random access memory,RAM)、闪存、只读存储器(read only memory,ROM)、可擦除可编程只读存储器(erasable programmable ROM,EPROM)、电可擦可编程只读存储器(electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、只读光盘(CD-ROM)或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于专用集成电路(AP设备plication specific integrated circuit,ASIC)中。
通过以上的实施方式的描述,本领域技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明。实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成;即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的。例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式;例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,模块或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
计算机可读存储介质包括但不限于以下的任意一种:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
Claims (21)
- 一种通信系统,其特征在于,所述通信系统包括:第一电子设备和第二电子设备;所述第一电子设备,用于在确定需要向所述第二电子设备发送数据时,在第一逻辑通路lane、第二lane以及第三lane中确定用于传输所述数据的目标lane;所述第一lane对应于第一类型的网络通路,所述第二lane对应于第二类型的网络通路中的第一信道,所述第三lane对应于第二类型的网络通路中的第二信道;所述第一电子设备,还用于通过所述目标lane向所述第二电子设备发送所述数据;所述第二电子设备,用于通过所述目标lane接收所述第一电子设备发送的所述数据。
- 根据权利要求1所述的系统,其特征在于,所述第一电子设备,还用于监测所述目标lane的使用情况,获得所述目标lane的第三使用信息;将本地记录的所述目标lane的使用信息更新为所述第三使用信息;广播所述第三使用信息。
- 根据权利要求2所述的系统,其特征在于,所述第一电子设备,具体用于在所述目标lane的使用时长超出预设时长的情况下,广播所述第三使用信息;或者,按照预设周期,广播所述第三使用信息。
- 根据权利要求1-3任一项所述的系统,其特征在于,所述第一电子设备保存有第一账本和第二账本,所述第一账本用于记录所述第一lane、所述第二lane以及所述第三lane的使用信息,所述第二账本用于记录所述通信系统中全部lane的使用信息。
- 根据权利要求3或4所述的系统,其特征在于,所述通信系统还包括:第三电子设备;所述第三电子设备,用于接收所述第三使用信息,根据所述第三使用信息同步本地保存的第二账本中记录的所述目标lane的使用信息。
- 根据权利要求5所述的系统,其特征在于,所述第一电子设备、所述第二电子设备、所述第三电子设备,还用于确定用于调整lane资源类型的目标设备,所述目标设备为所述第一电子设备、所述第二电子设备和所述第三电子设备中的任一设备;所述目标设备,用于获取所述第一电子设备、所述第二电子设备、所述第三电子设备广播的第四lane的使用信息,根据所述第四lane的使用信息,调整所述第四lane中部分或全部lane的lane资源类型,其中,所述lane资源类型包括高带宽lane资源,高带宽低时延lane资源,低带宽低时延lane资源,低时延高可靠lane资源中的至少一种。
- 根据权利要求1-5任一项所述的系统,其特征在于,所述通信系统还包括:中心设备;所述中心设备,用于获取所述通信网络中包括的电子设备广播的第五lane的使用信息,根据所述第五lane的使用信息,调整所述第五lane中部分或全部lane的lane 资源类型,其中,所述lane资源类型包括高带宽lane资源,高带宽低时延lane资源,低带宽低时延lane资源,低时延高可靠lane资源中的至少一种。
- 根据权利要求1-7任一项所述的系统,其特征在于,所述目标lane的数量为一个或多个;其中,在所述目标lane的数量为多个的情况下,多个目标lane为不同类型的信道;在所述目标lane的数量为一个的情况下,所述目标lane正在传输第一数据;或者,在所述目标lane的数量为一个的情况下,所述目标lane空闲。
- 一种通信方法,其特征在于,应用于第一电子设备,所述方法包括:在确定需要向第二电子设备发送数据时,在第一逻辑通路lane、第二lane以及第三lane中确定用于传输所述数据的目标lane,所述第一lane对应于第一类型的网络通路,所述第二lane对应于第二类型的网络通路中的第一信道,所述第三lane对应于第二类型的网络通路中的第二信道;通过所述目标lane向所述第二电子设备发送所述数据。
- 根据权利要求9所述的方法,其特征在于,所述第一电子设备在确定需要向第二电子设备发送数据时,在第一lane、第二lane以及第三lane中确定用于传输所述数据的目标lane,包括:在确定需要向第二电子设备发送数据时,确定所述数据对应的业务类型;根据所述业务类型,在所述第一lane、所述第二lane以及所述第三lane中确定所述目标lane。
- 根据权利要求10所述的方法,其特征在于,在所述第一电子设备在确定需要向第二电子设备发送数据时,在所述第一lane、所述第二lane以及所述第三lane中确定用于传输所述数据的目标lane之前,所述方法还包括:获取本地记录的所述第一lane、所述第二lane以及所述第三lane的第一使用信息,以及获取包括所述第一电子设备的通信网络中多个电子设备广播的所述第一lane、所述第二lane以及所述第三lane的第二使用信息;根据所述业务类型,在所述第一lane、所述第二lane以及所述第三lane中确定所述目标lane,包括:根据所述第一使用信息、所述第二使用信息以及所述业务类型,确定所述目标lane。
- 根据权利要求10所述的方法,其特征在于,所述第一电子设备本地保存有第一账本和第二账本,所述第一账本用于记录所述第一lane、所述第二lane以及所述第三lane的使用信息,所述第二账本用于记录包括所述第一电子设备的通信系统中的全部lane的使用信息;在所述第一电子设备在确定需要向第二电子设备发送数据时,在所述第一lane、所述第二lane以及所述第三lane中确定用于传输所述数据的目标lane之前,所述方法还包括:获取所述第一账本中记录的所述第一lane、所述第二lane以及所述第三lane的第一使用信息,以及获取所述第二账本中记录的所述第一lane、所述第二lane以及所述第三lane的第二使用信息;根据所述业务类型,在所述第一lane、所述第二lane以及所述第三lane中确定所述目标lane,包括:根据所述第一使用信息、所述第二使用信息以及所述业务类型,确定所述目标lane。
- 根据权利要求11或12所述的方法,其特征在于,所述第一使用信息或所述第二使用信息包括如下一项或几项内容:lane的使用次数、lane的历史传输数据对应的业务类型、lane的质量参数信息。
- 根据权利要求9-13任一项所述的方法,其特征在于,所述目标lane的数量为一个或多个;其中,在所述目标lane的数量为多个的情况下,多个目标lane为不同类型的信道;在所述目标lane的数量为一个的情况下,所述目标lane正在传输第一数据;或者,在所述目标lane的数量为一个的情况下,所述目标lane空闲。
- 根据权利要求9-14任一项所述的方法,其特征在于,所述方法还包括:监测所述目标lane的使用情况,获得所述目标lane的第三使用信息;将本地记录的所述目标lane的使用信息更新为所述第三使用信息;广播所述第三使用信息。
- 根据权利要求15所述的方法,其特征在于,所述广播所述第三使用信息包括:在所述目标lane的使用时长超出预设时长的情况下,广播所述第三使用信息;或者,按照预设周期,广播所述第三使用信息。
- 根据权利要求9-16任一项所述的方法,其特征在于,所述方法还包括:在所述目标lane中的部分或全部lane的质量不满足预设条件时,调整质量不满足预设条件的第一目标lane的参数。
- 根据权利要求17所述的方法,其特征在于,所述调整质量不满足预设条件的第一目标lane的参数,包括:调整所述质量不满足所述预设条件的第一目标lane的功率;或者,确定所述第一目标lane对应的类型,根据所述业务类型和所述第一目标lane对应的类型,在所述第一lane、所述第二lane以及所述第三lane中确定与所述业务类型对应、与所述第一目标lane对应的类型相同、且质量满足所述预设条件的第二目标lane,切换所述第一目标lane为所述第二目标lane。
- 根据权利要求17或18所述的方法,其特征在于,在调整参数后,所述第一目标lane中的部分或全部lane的质量不满足所述预设条件;所述方法还包括:获取所述第二电子设备广播的lane的第四使用信息;根据所述第四使用信息,确定所述第一电子设备和所述第二电子设备均支持的目标类型的lane;在所述目标类型的lane中确定质量满足预设条件的第三目标lane,切换所述第一目标lane中调整参数后仍不满足所述预设条件的lane为所述第三目标lane。
- 一种电子设备,其特征在于,包括:处理器和存储器,所述存储器与所述处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述处理器从所述存储器中读取所述计算机指令,使得所述电子设备执行如权利要求9-19中任意一项所述的方法。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括计算机程序,当所述计算机程序在电子设备上运行时,使得所述电子设备执行如权利要求9-19中任意一项所述的方法。
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110996592.7 | 2021-08-27 | ||
CN202110996592 | 2021-08-27 | ||
CN202111235326.9A CN115734344A (zh) | 2021-08-27 | 2021-10-22 | 通信方法及电子设备 |
CN202111235326.9 | 2021-10-22 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023025191A1 true WO2023025191A1 (zh) | 2023-03-02 |
Family
ID=81125431
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/114502 WO2023025191A1 (zh) | 2021-08-27 | 2022-08-24 | 通信方法及电子设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN114364026B (zh) |
WO (1) | WO2023025191A1 (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114364026B (zh) * | 2021-08-27 | 2023-05-12 | 华为技术有限公司 | 通信方法及电子设备 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109587667A (zh) * | 2018-11-23 | 2019-04-05 | Oppo广东移动通信有限公司 | 一种连接建立方法及装置、设备、存储介质 |
CN110505712A (zh) * | 2018-05-17 | 2019-11-26 | 华为技术有限公司 | 一种传输文件的方法及终端 |
WO2022042770A1 (zh) * | 2020-08-25 | 2022-03-03 | 荣耀终端有限公司 | 控制通信服务状态的方法、终端设备和可读存储介质 |
CN114364026A (zh) * | 2021-08-27 | 2022-04-15 | 华为技术有限公司 | 通信方法及电子设备 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106714279A (zh) * | 2016-11-14 | 2017-05-24 | 广东欧珀移动通信有限公司 | 一种热点网络切换方法及终端设备 |
CN107087292B (zh) * | 2017-03-10 | 2021-01-01 | 北方工业大学 | 一种移动终端适应性传输数据的方法 |
CN111867148B (zh) * | 2019-04-30 | 2024-08-06 | 青岛海信移动通信技术有限公司 | 一种建立设备连接和数据传输的方法和设备 |
-
2021
- 2021-10-22 CN CN202111551238.XA patent/CN114364026B/zh active Active
-
2022
- 2022-08-24 WO PCT/CN2022/114502 patent/WO2023025191A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110505712A (zh) * | 2018-05-17 | 2019-11-26 | 华为技术有限公司 | 一种传输文件的方法及终端 |
CN109587667A (zh) * | 2018-11-23 | 2019-04-05 | Oppo广东移动通信有限公司 | 一种连接建立方法及装置、设备、存储介质 |
WO2022042770A1 (zh) * | 2020-08-25 | 2022-03-03 | 荣耀终端有限公司 | 控制通信服务状态的方法、终端设备和可读存储介质 |
CN114364026A (zh) * | 2021-08-27 | 2022-04-15 | 华为技术有限公司 | 通信方法及电子设备 |
Also Published As
Publication number | Publication date |
---|---|
CN114364026B (zh) | 2023-05-12 |
CN114364026A (zh) | 2022-04-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP4311314A1 (en) | Sleep scheduling method and device | |
WO2023061093A1 (zh) | WiFi P2P连接方法、电子设备、程序产品和介质 | |
WO2021175300A1 (zh) | 数据传输方法、装置、电子设备和可读存储介质 | |
CN112527476B (zh) | 资源调度方法及电子设备 | |
WO2022127661A1 (zh) | 应用共享方法、电子设备和存储介质 | |
CN114845035B (zh) | 一种分布式拍摄方法,电子设备及介质 | |
US20240073978A1 (en) | Method for monitoring link and terminal device | |
WO2022052731A1 (zh) | 传输数据的方法和电子设备 | |
US20240264882A1 (en) | Application running method and related device | |
WO2020019533A1 (zh) | 一种数据传输方法及电子设备 | |
WO2023025191A1 (zh) | 通信方法及电子设备 | |
CN113645608B (zh) | 数据传输方法和数据传输装置 | |
WO2020124447A1 (zh) | 面向多卡的网络管理 | |
CN115734344A (zh) | 通信方法及电子设备 | |
WO2022206603A1 (zh) | 通信资源协作方法及电子设备 | |
WO2024007998A1 (zh) | 一种数据传输的方法、电子设备和通信系统 | |
WO2024217062A1 (zh) | 文件存储方法及电子设备 | |
WO2023005783A1 (zh) | 数据处理方法及电子设备 | |
WO2024046173A1 (zh) | 天线复用方法及相关装置 | |
WO2024125287A1 (zh) | 数据同步方法及电子设备 | |
WO2024169332A1 (zh) | 处理器频率的调整方法、电子设备及芯片系统 | |
CN116679998B (zh) | 多设备协同冲突处理的方法及电子设备 | |
WO2022228248A1 (zh) | 蓝牙通信方法、系统及电子设备 | |
CN116471707B (zh) | 一种路由器的连接方法、装置及系统 | |
WO2023280160A1 (zh) | 一种通道切换方法及装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22860537 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 22860537 Country of ref document: EP Kind code of ref document: A1 |