WO2023020240A1 - 设备控制方法、装置、芯片、电子设备及存储介质 - Google Patents

设备控制方法、装置、芯片、电子设备及存储介质 Download PDF

Info

Publication number
WO2023020240A1
WO2023020240A1 PCT/CN2022/108597 CN2022108597W WO2023020240A1 WO 2023020240 A1 WO2023020240 A1 WO 2023020240A1 CN 2022108597 W CN2022108597 W CN 2022108597W WO 2023020240 A1 WO2023020240 A1 WO 2023020240A1
Authority
WO
WIPO (PCT)
Prior art keywords
communication mode
electronic device
occupancy
communication
target resource
Prior art date
Application number
PCT/CN2022/108597
Other languages
English (en)
French (fr)
Inventor
吕生义
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2023020240A1 publication Critical patent/WO2023020240A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/02Terminal devices
    • H04W88/06Terminal devices adapted for operation in multiple networks or having at least two operational modes, e.g. multi-mode terminals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present application relates to the technical field of communications, and more specifically, to a device control method, device, chip, electronic device, and storage medium.
  • a bluetooth communication mode and a WiFi communication mode may be integrated in the same electronic device.
  • each mode when multiple modes are running, each mode will occupy resources used for communication in the electronic device, thus causing tasks corresponding to a certain mode to be unable to be performed well.
  • the present application proposes a device control method, device, chip, electronic device and storage medium, so as to improve the above problems.
  • the present application provides a device control method applied to an electronic device, the method comprising: if the first communication mode of the electronic device is in the running state, and the electronic device passes through the electronic device The second communication mode transmits data and determines a target resource; reducing the degree of occupancy of the target resource by the first communication mode, and the target resource is a resource required by the electronic device for communication.
  • the present application provides a device control method applied to a chip, and the chip includes a control module and a communication module; the method includes: if the first communication mode of the chip is in the running state, and the chip When transmitting data through the second communication mode of the electronic device, the control module determines the target resource, and the target resource is the resource required for the chip to communicate; the control module reduces the impact of the first communication mode on the The occupancy level of the target resources.
  • the present application provides a device control device that runs on an electronic device, and the device includes: a state acquisition unit configured to, if the first communication mode of the electronic device is in the running state, and the electronic device is in the Transmission of data through the second communication mode of the electronic device to determine a target resource; a control unit configured to reduce the degree of occupancy of the target resource by the first communication mode, and the target resource is used by the electronic device for communication resources needed.
  • the present application provides a chip, and the chip includes a control module and a communication module;
  • the control module if the first communication mode of the chip is in the running state, and the chip is transmitting data through the second communication mode of the electronic device, determines a target resource, and the target resource is the chip for communication Required resources: reducing the degree of occupancy of the target resource by the first communication mode.
  • the present application provides an electronic device, including one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, The one or more programs are configured to perform the methods described above.
  • the present application provides a computer-readable storage medium, wherein program code is stored in the computer-readable storage medium, wherein the above method is executed when the program code is running.
  • FIG. 1 shows a schematic diagram of an application scenario of a device control method proposed in an embodiment of the present application
  • Fig. 2 shows a schematic diagram of another application scenario of the device control method proposed in the embodiment of the present application
  • Fig. 3 shows a schematic diagram of another application scenario of the device control method proposed in the embodiment of the present application
  • FIG. 4 shows a flow chart of a device control method proposed by an embodiment of the present application
  • FIG. 5 shows a schematic diagram of the occupancy of target resources in the embodiment of the present application
  • FIG. 6 shows a flow chart of a device control method proposed in another embodiment of the present application.
  • FIG. 7 shows a flow chart of a device control method proposed in another embodiment of the present application.
  • FIG. 8 shows a flow chart of a device control method proposed in another embodiment of the present application.
  • FIG. 9 shows a structural block diagram of a device control device proposed in the embodiment of the present application.
  • FIG. 10 shows a structural block diagram of a chip proposed in an embodiment of the present application.
  • Fig. 11 shows a structural block diagram of an electronic device proposed by the present application.
  • Fig. 12 is a storage unit for storing or carrying program codes for realizing the device control method according to the embodiment of the present application according to the embodiment of the present application.
  • Bluetooth communication modules can support BR (Basic Rate)/EDR (Enhanced Data Rate) mode and BLE (Bluetooth Low Energy) mode at the same time, then the electronic device can support WiFi communication mode, BR/EDR mode and BLE mode at the same time .
  • BR Base Rate
  • EDR Enhanced Data Rate
  • BLE Bluetooth Low Energy
  • each communication mode will occupy the resources used for communication in the electronic device , so that the task corresponding to a certain communication mode cannot be performed well.
  • each communication mode requires the transmission and reception of wireless signals, and the transmission and reception of wireless signals are all performed through the antenna in the electronic device, so that when multiple communication modes are in operation, all Antenna resources need to be preempted, which in turn may cause tasks corresponding to a certain communication mode to be unable to perform well.
  • the inventor proposes a device control method, device, chip, electronic device and storage medium provided in this application, which will be in the running state in the first communication mode of the electronic device, and the electronic device will In the case of transmitting data in its own second communication mode, reduce the occupancy of target resources by the first communication mode. Therefore, through the above-mentioned method, when the electronic device is performing data transmission through the second communication mode, it will reduce the occupancy of the first communication mode, which is also in the running state, for communication resources, which in turn is beneficial to improve communication through the second communication mode. The efficiency of data transmission also enables the electronic device to better complete the tasks corresponding to the second communication mode.
  • an application scenario involved in the embodiment of the present application includes an electronic device 100 , an electronic device 200 , and an electronic device 210 .
  • the electronic device 100 supports scanning the electronic device 210 based on the communication mode M1, and also supports data transmission with the electronic device 200 based on the communication mode M2.
  • the communication mode M1 and the communication mode M2 supported by the electronic device 100 may be the communication modes supported by the same communication module in the electronic device.
  • the electronic device 100 includes a communication module 101, and the communication module 101 can support the communication mode M1 and the communication mode M2 at the same time.
  • the communication module 101 in the electronic device 100 can scan the electronic device 210 through the communication mode M1, and the communication module 101 can perform data transmission with the electronic device 200 through the communication mode M2.
  • the electronic device 100 may include a communication module 102 and a communication module 103 .
  • the communication module 102 supports the communication mode M1
  • the communication module 103 supports the communication mode M2.
  • the communication module 102 can scan the electronic device 210 through the communication mode M1
  • the communication module 103 can perform data transmission with the electronic device 200 through the communication mode M2.
  • the same communication module can also support multiple communication modes.
  • the communication module 102 can also support communication mode M3 in addition to the communication mode M1.
  • the communication mode M1 may be a BLE mode
  • the communication mode M2 may be a WiFi communication mode
  • the communication mode M3 may be a BR/EDR mode.
  • the first communication mode may be understood as a communication mode that currently needs to process the occupancy degree of the target resource.
  • the second communication mode may be all communication modes except the first communication mode among the communication modes supported by the electronic device, or any one or more communication modes of all communication modes except the first communication mode.
  • the communication mode M1 is the first communication mode
  • the second communication mode may include the communication mode M2
  • the communication module 102 also supports the communication mode M3
  • the second communication mode may include the communication mode At least one of M2 and communication mode M3.
  • a device control method provided by an embodiment of the present application is applied to electronic devices, and the method includes:
  • each communication mode may have a corresponding state.
  • the states of the communication mode may include a running state, an off state and an idle state.
  • the communication mode when the communication mode is in the running state, it means that the electronic device is performing tasks through the communication mode. For example, tasks to perform data transfers, or tasks to perform device scans.
  • the communication mode When the communication mode is off, it means that the electronic device cannot perform tasks through the communication mode.
  • the communication mode When the communication mode is in the idle state, it means that the communication mode has been started, but the current electronic device does not perform tasks through the communication mode.
  • the corresponding communication mode can be turned off or turned on through the control controls in the specified interface of the electronic device.
  • the specified interface may be a shortcut operation interface, in which there may be control controls corresponding to multiple communication modes, so that the user can activate or deactivate the control controls corresponding to the control controls by operating the control controls in the shortcut operation interface.
  • communication mode may be a setting interface in the operating system of the electronic device, and correspondingly, control controls may be configured in the setting interface to control the corresponding communication mode.
  • the first communication mode may be understood as a communication mode that needs to process the occupancy degree of the target resource.
  • one purpose of processing the occupancy degree of the target resource is to facilitate reducing the impact on the execution of corresponding tasks in the second communication mode, so in the embodiment of the present application, the status of the first communication mode and the status of the second communication mode may be combined state to trigger the acquisition of the target resource.
  • the first communication mode may be set by default when the electronic device leaves the factory. Manual configuration can also be performed by the user of the electronic device, that is, the above first communication mode and the second communication mode can be configured in response to a configuration operation for the communication mode.
  • the communication modes included in the electronic device include WiFi communication mode, BR/EDR mode and BLE mode
  • the user can set any communication mode in the WiFi communication mode, BR/EDR mode and BLE mode according to his needs.
  • the first communication mode may also be dynamically configured by the electronic device according to actual conditions.
  • the electronic device may count the length of time that each communication mode is in the running state, and then use the communication mode that has been in the running state for the shortest time as the first communication mode.
  • the duration of the running state of the WiFi communication mode is t1
  • the duration of the running state of the BR/EDR mode is t2
  • the duration of the running state of the BLE mode is t3.
  • the electronic device will use the BLE mode as the first communication mode in the next statistical period.
  • the length of the statistical cycle can be various, for example, it can be one day, one week, or one month.
  • the length of the statistical period can be configured by the user.
  • the electronic device can obtain the state of the second communication mode after detecting that the first communication mode is in the running state, and the state of detecting the second communication mode indicates that the electronic device is in the second communication mode When transferring data, identify the target resource.
  • the communication modes supported by the electronic device include a BLE mode and a WiFi communication mode, wherein the first communication mode is the BLE mode, and correspondingly, the second communication mode is the WiFi communication mode. Then the electronic device will respond to the fact that the BLE mode is in the running state to obtain the state of the WiFi communication mode and detect the state of the WiFi communication mode. If it is detected that the WiFi communication mode is in the running state, it is determined that the target resource needs to be determined. .
  • the electronic device can first detect the state of the second communication mode to indicate that the electronic device transmits data through the second communication mode, and then obtain the state of the first communication mode, and the state of the first communication mode is running In the case of the state, trigger the determination of the target resource.
  • the communication modes supported by the electronic device include a BLE mode and a WiFi communication mode, wherein the first communication mode is the BLE mode, and the second communication mode is the WiFi communication mode. If the electronic device detects that data is being transmitted in the WiFi communication mode, the electronic device will obtain the current state of the BLE mode, and, when it is detected that the current state of the BLE mode is in the running state, trigger the determination of the target resource.
  • the electronic device can use one or the other, and can use the electronic device at the same time.
  • the target resource is the resource (for example, antenna resource or chip resource) required by the electronic device for communication.
  • the target resource will be used to complete all tasks. corresponding task.
  • determining the target resource may be understood as determining a category of resources that need to be adjusted for occupancy.
  • resources may be included in the electronic device.
  • it may include resources for data processing, data storage, data collection, and communication.
  • the resources for data processing may include the available time provided by the processor
  • the resources for data storage may include the storage space provided by the memory
  • the resources for data collection are sensor resources in electronic equipment
  • the resources for communication It refers to the resources used by electronic devices for communication, such as antennas and the like.
  • S120 Reduce the degree of occupancy of the target resource by the first communication mode.
  • the target resources may include one or more of chip resources and antenna resources.
  • the chip resources represent the resources used to process the data in the executed tasks. For example, if the electronic device currently needs to send data to other devices, it may need to consume chip resources to transfer the required data based on the adopted communication protocol.
  • the sent data is assembled into the specified format. For example, if the electronic device needs to send the number "1" to other devices, then the electronic device will encapsulate the number "1" into a specified format based on the adopted communication protocol.
  • the electronic device receives data sent by other devices, it needs to consume chip resources to analyze the received data, so as to extract useful data.
  • the useful data is data that other devices actually need to transmit to the electronic device.
  • the data sent by the other device received by the electronic device will be the data after encapsulating the number "0", and then the electronic device will use its chip resources to process the data. Decapsulation is performed to extract the useful information, which is the number "0".
  • the degree of occupation of chip resources by a certain communication mode can be characterized by the duration of occupation of chip resources. If the communication mode occupies the chip resources longer, the corresponding communication mode occupies more chip resources.
  • the antenna resource represents a resource for data transmission or reception. It can be understood that after the data that the electronic device needs to transmit to other devices is converted into a corresponding wireless signal by the communication device (Bluetooth module or WiFi module) of the electronic device, the wireless signal needs to be transmitted through the antenna so that other devices After receiving the transmitted wireless signal through its own antenna, other devices can extract the transmitted data from the received wireless signal.
  • the degree of occupation of antenna resources by a certain communication mode can be characterized by the duration of occupation of the antenna. The longer the communication mode occupies the antenna resources, the higher the corresponding communication mode occupies the antenna resources.
  • the multiple communication modes of the electronic device may occupy the target resources in a time-division multiplexing manner.
  • the Bluetooth communication module as an example, if both the BR/EDR mode and the BLE mode of the Bluetooth communication module are running, the BR/EDR mode and the BLE mode will occupy the target resources in a time-division multiplexed manner.
  • the occupancy of resources corresponding to the communication device by the first communication mode may be reduced.
  • reducing the degree of occupancy of resources corresponding to the communication device by the first communication mode may be understood as reducing the time that tasks corresponding to the first communication mode occupy resources corresponding to the communication device.
  • Figure 5 represents the occupancy of a certain resource, where the overall occupancy of the resource can be divided into multiple first time periods, and each first time period can include The first use time and time other than the first use time.
  • the first time is the resource occupation time of the first communication mode
  • the time other than the first usage time is the resource occupation time of the second communication mode.
  • reducing the degree of occupancy of the target resource by the first communication mode includes: suspending tasks corresponding to the first communication mode.
  • reducing the degree of occupancy of the target resource by the first communication mode includes: terminating a task corresponding to the first communication mode.
  • suspending the task corresponding to the first communication mode may be understood as temporarily stopping the task corresponding to the first communication mode. That is to say, the task corresponding to the first communication mode is still in a reserved state, but the electronic device will not perform the corresponding task temporarily. For example, if the first communication mode is the BLE mode of the Bluetooth communication module, the task corresponding to the current BLE mode is to scan other devices.
  • the electronic device will temporarily stop scanning other devices. Then, in the case of ending the task corresponding to the first communication mode, the electronic device will directly end the corresponding scanning task without reserving the scanning task.
  • the occupancy degree of the task corresponding to the first communication mode to the target resource can be reduced by a part, or the task corresponding to the first communication mode can be The occupancy of the target resource is reduced to 0.
  • the occupancy degree of the target resource by the task corresponding to the first communication mode will be directly reduced to 0.
  • the electronic device can measure the impact of the BLE mode on the target resource by the ratio of scan_window (for example, the aforementioned first usage time) to scan_interval (for example, the aforementioned first time period). degree of occupancy.
  • the ratio can be configured as the first ratio, and if the electronic device is in the running state after the BLE mode is in the second communication mode mode for data transmission, the ratio may be configured as a second ratio, wherein the first ratio is greater than the second ratio.
  • the electronic device can control the electronic device to execute the tasks corresponding to each mode through its own system program, and the system programs corresponding to different modes can be different.
  • the electronic device controls the first communication mode of the electronic device by running the first system program, for example, controls the electronic device to scan other devices based on the first communication mode by running the first system program.
  • the electronic device is controlled to perform data transmission based on the established communication connection by running the second system program.
  • the task corresponding to the first communication mode can be suspended by stopping the running of the system program used to control the first communication mode . For example, switch the system program that controls the first communication mode to a dormant state, so that the system program that controls the first communication mode no longer sends control instructions to the electronic device, and then the electronic device will not perform tasks corresponding to the first communication mode, so that The degree of occupation of target resources by the first communication mode is reduced.
  • the running of the system program controlling the first communication mode may be terminated directly.
  • ending the running of the system program can be understood as killing the process of the system program controlling the first communication mode, and reclaiming the memory allocated to the system program controlling the first communication mode.
  • the process of the system program controlling the second communication mode will not be killed, and the process allocated to the first communication mode will not be reclaimed. Memory for system programs in communication mode.
  • system programs corresponding to different modes can be different
  • different threads in the same system program can also be configured to control the electronic devices separately. of different modes.
  • the threads in the system program are in one-to-one correspondence with the modes of the electronic device, so that each mode has a corresponding thread for control. Then in this way,
  • the task corresponding to the first communication mode may be suspended by stopping the running of the thread used to control the first communication mode. For example, the thread that controls the first communication mode is switched to a blocked state, so that the system program that controls the first communication mode does not issue control instructions to the electronic device, and the electronic device will not execute the tasks corresponding to the first communication mode, so as to realize Reduce the occupancy of target resources by the first communication mode.
  • the running of the thread controlling the first communication mode may be terminated directly.
  • terminating the running of the thread can be understood as killing the thread controlling the first communication mode, and reclaiming the memory allocated to the thread controlling the first communication mode.
  • the thread controlling the first communication mode is switched to the blocking state, the thread controlling the first communication mode will not be killed, and the thread allocated to the second communication mode will not be reclaimed of memory.
  • the device control method provided in this embodiment will reduce the impact of the first communication mode on the target resource when the first communication mode of the electronic device is in the running state and the electronic device transmits data through its own second communication mode. degree of occupancy. Therefore, through the above-mentioned method, when the electronic device is performing data transmission through the second communication mode, it will reduce the occupancy of the first communication mode, which is also in the running state, for communication resources, which in turn is beneficial to improve communication through the second communication mode. The efficiency of data transmission also enables the electronic device to better complete the tasks corresponding to the second communication mode.
  • a device control method provided by an embodiment of the present application is applied to an electronic device, and the method includes:
  • the data transmitted through the second communication mode can be obtained first data type. If the data type of the data transmitted through the second communication mode of the electronic device is the target type, triggering determination of the target resource.
  • the target type can be ACL (Asynchronous connection-oriented) type data or SCO (Synchronous Connection-Oriented)/eSCO (Extended Synchronous Connection-Oriented) type data.
  • S220 Based on the data transmitted through the second communication mode, reduce the degree of occupancy of the target resource by the first communication mode, where the target resource is a resource required by the electronic device for communication.
  • the reducing the degree of occupancy of the target resource by the first communication mode based on the data transmitted by the second communication mode includes: acquiring the data type of the data transmitted by the second communication mode; according to the The data type reduces the occupancy of target resources by the first communication mode.
  • the reducing the degree of occupancy of the target resource by the first communication mode according to the data type includes: if the data type is real-time data, reducing the degree of occupancy of the target resource by the first communication mode Reduce to a first occupancy level; if the data type is non-real-time data, reduce the occupancy level of the target resource by the first communication mode to a second occupancy level; wherein, the first occupancy level is smaller than the first occupancy level 2.
  • Degree of occupancy is: if the data type is real-time data, reducing the degree of occupancy of the target resource by the first communication mode Reduce to a first occupancy level; if the data type is non-real-time data, reduce the occupancy level of the target resource by the first communication mode to a second occupancy level; wherein, the first occupancy level is smaller than the first occupancy level 2.
  • Degree of occupancy is: if the data type is real-time data, reducing the degree of occupancy of the target resource by the first communication mode Reduce to a first occupancy level; if the data type is non-real-time data, reduce the occupancy level of the
  • the electronic device can determine the data type of the data transmitted through the second communication mode by judging the type of the application program using the second communication mode.
  • the transmitted content may be different.
  • the transmitted data may be voice data
  • the transmitted data may be image data
  • the voice data has a high demand for real-time performance. on image data. Therefore, in the embodiment of the present application, the application programs using the communication mode can be classified into real-time application programs and non-real-time application programs.
  • the category of the application program currently using the second communication mode will be obtained, so as to use the category of the application program as the category of the data transmitted through the second communication mode .
  • the reducing the occupancy degree of the target resource by the first communication mode based on the data transmitted by the second communication mode includes: obtaining the data priority of the data transmitted by the second communication mode; The data priority reduces the occupancy of target resources by the first communication mode.
  • the respective priorities of the application programs that will use the communication mode are predetermined, that is, each application program that will use the communication mode will have its own priority.
  • the priority of the application program currently using the second communication mode will be obtained as the data priority of the data transmitted through the second communication mode, and then according to The level of data priority determines how much to reduce the occupancy of the target resource by the first communication mode.
  • a corresponding relationship between data priority and reduced occupancy may be stored in the electronic device, then after obtaining the data priority of data transmitted through the second communication mode, according to the data priority and the reduction of occupancy
  • the corresponding degree of reduction is acquired according to the corresponding relationship of the degree, so as to reduce the degree of occupancy of the target resource by the first communication mode according to the degree of reduction.
  • the reduction degree represents the ratio of the reduced occupancy degree to the pre-reduction occupancy degree. For example, as shown in the following table:
  • the data priority G1 is higher than the data priority G2, and the data priority G2 is higher than the data priority G1.
  • the occupancy of the target resource by the first communication mode will be reduced to 60% of the original.
  • the occupancy of the target resource by the first communication mode will be reduced to 40% of the original.
  • the electronic device after reducing the degree of occupancy of the target resource by the first communication mode, it further includes: if the electronic device does not transmit data through the second communication mode, increasing the first communication mode.
  • the degree of occupancy of the target resources is beneficial and also ensures that the tasks executed in the first communication mode can be executed smoothly. For example, if the first communication mode is BLE mode, and the task corresponding to the BLE mode is to scan external devices, then after increasing the occupancy of target resources in the BLE mode, the electronic device can successfully complete the scanning of external devices through the BLE mode .
  • the occupancy level of the target resource by the first communication mode may be increased to the occupancy level before the reduction.
  • the activation of the second communication mode of the electronic device may be because the electronic device needs to complete the specified task through the second communication mode, then after the electronic device finishes data transmission through the second communication mode, in order to make the electronic device If the first communication mode can normally execute the task, then the degree of occupancy of the target resource by the first communication mode can be increased.
  • reducing the occupancy of target resources by the first communication mode is achieved by stopping the running of the system program used to control the first communication mode. Then, in the process of increasing the occupancy degree of the target resource by the first communication mode, the system program controlling the first communication mode may be triggered to continue to run or restart, so as to realize the improvement of the first communication mode to the target resource. Occupancy level of the target resource.
  • reducing the occupancy of target resources by the first communication mode is achieved by changing the state of the thread controlling the first communication mode. Then, in the process of increasing the occupation degree of the target resource by the first communication mode, the increase of the occupation degree of the target resource by the first communication mode may also be realized by changing the state of the thread controlling the first communication mode. For example, if the degree of occupation of target resources by the first communication mode is reduced by switching the thread in the first communication mode to the blocking state, then the thread in the first communication mode can be switched to the running state to realize the improvement occupancy of target resources by the first communication mode. If by killing the thread of the first communication mode to reduce the occupancy of the first communication mode to the target resource, the first communication mode can be improved by starting the thread that controls the first communication mode to the target. resource usage.
  • a pattern signature file can be established in the electronic device.
  • the current state of each mode of the electronic device and the way of switching from the previous state to the current state can be recorded in the mode characteristic file.
  • the electronic device can acquire the way in which the first communication mode of the communication device is triggered to reduce the occupancy of the target resources by querying the mode feature file, so that the corresponding way can be used to realize the improvement of the first communication mode Occupancy of target resources.
  • the first identifier and the second identifier may be stored in the pattern feature file.
  • the first identification can be used to record the current state of each mode of the electronic device, and the second identification is used to record the way each mode is switched from the previous state to the current state.
  • the content included in the target resource may be determined according to the current actual situation.
  • the content of the target resource can still be determined through the timeliness of the transmission task.
  • the target resources may include chip resources and antenna resources. If the communication connection established through the second communication mode is used to perform a transmission task with low timeliness, then the target resources may include antenna resources or chip resources.
  • the timeliness of the transmission task may be determined by the timeliness parameter corresponding to the transmission task.
  • the transmission task corresponding to the aging parameter is a transmission task with high timeliness; if the value of the corresponding aging parameter is not greater than the specified threshold, then determine the transmission task corresponding to the aging parameter It is a transmission task with low timeliness.
  • the device control method provided in this embodiment will reduce the impact of the first communication mode on the target resource when the first communication mode of the electronic device is in the running state and the electronic device transmits data through its own second communication mode. degree of occupancy. Therefore, through the above-mentioned method, when the electronic device is performing data transmission through the second communication mode, it will reduce the occupancy of the first communication mode, which is also in the running state, for communication resources, which in turn is beneficial to improve communication through the second communication mode. The efficiency of data transmission also enables the electronic device to better complete the tasks corresponding to the second communication mode. Moreover, in this embodiment, the occupancy degree of the target resource by the first communication mode is also reduced according to the data transmitted by the second communication mode, thereby improving the reduction of the occupancy degree of the target resource by the first communication mode. Intelligence and flexibility.
  • a device control method provided by an embodiment of the present application is applied to electronic devices, and the method includes:
  • S310 If the first communication mode of the electronic device is in the running state, and the electronic device is transmitting data through the second communication mode of the electronic device, determine the target resource, how many is the second communication mode of the electronic device indivual.
  • S320 Acquire the quantity in the second communication mode used to transmit data.
  • S330 Reduce the occupancy degree of the target resource by the first communication mode according to the amount, where the target resource is a resource required by the electronic device for communication.
  • the device control method provided in this embodiment will reduce the impact of the first communication mode on the target resource when the first communication mode of the electronic device is in the running state and the electronic device transmits data through its own second communication mode. degree of occupancy. Therefore, through the above-mentioned method, when the electronic device is performing data transmission through the second communication mode, it will reduce the occupancy of the first communication mode, which is also in the running state, for communication resources, which in turn is beneficial to improve communication through the second communication mode. The efficiency of data transmission also enables the electronic device to better complete the tasks corresponding to the second communication mode.
  • the occupancy of the target resource by the first communication mode will be reduced according to the number of the second communication modes currently being used for data transmission degree, thereby improving the degree of intelligence and flexibility for reducing the degree of occupancy of target resources by the first communication mode.
  • a device control method provided by the embodiment of the present application is applied to a chip, and the chip includes a control module and a communication module; the method includes:
  • S410 If the first communication mode of the chip is in the running state, and the chip is transmitting data through the second communication mode of the electronic device, the control module determines a target resource, and the target resource is for the chip to perform resources needed for communication;
  • S420 The control module reduces the occupancy of the target resource by the first communication mode.
  • the chip involved in this embodiment may be a chip used for communication.
  • the communication module included in the chip may include at least one of a Bluetooth communication module and a WiFi communication module.
  • the multiple communication modes corresponding to the chip can be understood as the communication modes supported by the communication module included in the chip, and the multiple communication modes corresponding to the chip and the multiple communication modes corresponding to the electronic device in the foregoing embodiments can be identical.
  • the device control method provided in this embodiment will obtain the state of the second communication mode of the chip when the first communication mode of the chip is in the running state, and then the state of the second communication mode indicates that the chip is passing through the first communication mode.
  • the degree of occupancy of the target resource by the first communication mode is reduced. Therefore, through the above method, when the chip is performing data transmission through the second communication mode, it will reduce the occupancy of resources for communication by the first communication mode, which is also in the running state, and thus help to improve the data transmission through the second communication mode.
  • the efficiency of data transmission also enables the chip to better complete the tasks corresponding to the second communication mode.
  • a device control device 500 provided in the embodiment of the present application, which runs on electronic devices, and the device 500 includes:
  • the state acquiring unit 510 is configured to determine a target resource if the first communication mode of the electronic device is in an operating state and the electronic device is transmitting data through the second communication mode of the electronic device.
  • the control unit 520 is configured to reduce the degree of occupancy of the target resource by the first communication mode, and the target resource is a resource required by the electronic device for communication.
  • control unit 520 is specifically configured to reduce the occupancy of target resources by the first communication mode based on the data transmitted by the second communication mode.
  • control unit 520 is specifically configured to acquire a data type of the data transmitted in the second communication mode; and reduce the occupancy of target resources by the first communication mode according to the data type.
  • control unit 520 is specifically configured to reduce the occupancy of target resources by the first communication mode to a first occupancy level if the data type is real-time data; if the data type is non-real-time data, reducing the occupancy level of the target resource by the first communication mode to a second occupancy level; wherein the first occupancy level is smaller than the second occupancy level.
  • control unit 520 is specifically configured to obtain the data priority of the data transmitted in the second communication mode; and reduce the degree of occupancy of the target resource by the first communication mode according to the data priority.
  • the state acquisition unit 510 is further configured to determine that the electronic device is transmitting data in the second communication mode if at least one state of the second communication mode indicates that data transmission is in progress.
  • the control unit 520 is specifically configured to acquire the number of the second communication mode used for data transmission; and reduce the occupancy of the target resource by the first communication mode according to the number.
  • the control unit 520 is further configured to, after reducing the occupancy degree of the target resource by the first communication mode, if the electronic device does not transmit data through the second communication mode, increase the target resource utilization rate of the first communication mode. resource usage.
  • the first communication mode is a BLE mode
  • the second communication mode includes at least one of a BR/EDR mode and a WiFi mode.
  • control unit 520 is specifically configured to suspend the task corresponding to the first communication mode; or end the task corresponding to the first communication mode.
  • the device control device reduces the impact of the first communication mode on the target resource when the first communication mode of the electronic device is in the running state and the electronic device transmits data through its own second communication mode. degree of occupancy. Therefore, through the above-mentioned method, when the electronic device is performing data transmission through the second communication mode, it will reduce the occupancy of the first communication mode, which is also in the running state, for communication resources, which in turn is beneficial to improve communication through the second communication mode. The efficiency of data transmission also enables the electronic device to better complete the tasks corresponding to the second communication mode.
  • the chip 600 includes a control module 610 and a communication module 620;
  • the control module 620 if the first communication mode of the chip is in the running state, and the chip is transmitting data through the second communication mode of the electronic device, determine a target resource, and the target resource is for the chip to perform Resources required for communication; reducing the degree of occupancy of the target resources by the first communication mode.
  • each functional module in each embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules.
  • the embodiment of the present application also provides an electronic device 1000 that can implement the aforementioned device control method.
  • the electronic device 1000 includes one or more (only one is shown in the figure) processors 105 , a memory 104 , a camera 106 and an audio collection device 108 coupled to each other.
  • the memory 104 stores programs capable of executing the contents of the foregoing embodiments, and the processor 105 can execute the programs stored in the memory 104 .
  • the processor 105 may include one or more processing cores.
  • the processor 105 uses various interfaces and circuits to connect various parts of the entire electronic device 1000, and executes or executes instructions, programs, code sets or instruction sets stored in the memory 104, and calls data stored in the memory 104 to execute Various functions of the electronic device 1000 and processing data.
  • the processor 105 may adopt at least one of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). implemented in the form of hardware.
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 105 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a modem, and the like.
  • CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • the CPU mainly handles the operating system, user interface and application programs, etc.
  • the GPU is used to render and draw the displayed content
  • the modem is used to handle wireless communication. It can be understood that the above modem may also not be integrated into the processor 105, but implemented by a communication chip alone.
  • the memory 104 may include random access memory (Random Access Memory, RAM), and may also include read-only memory (Read-Only Memory). Memory 104 may be used to store instructions, programs, codes, sets of codes, or sets of instructions.
  • the memory 104 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.) , instructions for implementing the following method embodiments, and the like.
  • the electronic device 1000 may further include a network module 110 and a sensor module 112 in addition to the aforementioned components.
  • the network module 110 is used to implement information interaction between the electronic device 1000 and other devices, for example, transmitting device control instructions, manipulation request instructions, and status information acquisition instructions. However, when the electronic device 200 is specifically a different device, its corresponding network module 110 may be different.
  • the sensor module 112 may include at least one sensor. Specifically, the sensor module 112 may include, but is not limited to: a light sensor, a motion sensor, a pressure sensor, an infrared heat sensor, a distance sensor, an acceleration sensor, and other sensors.
  • the pressure sensor may be a sensor for detecting pressure generated by pressing on the electronic device 1000 . That is, the pressure sensor detects pressure generated by contact or press between the user and the electronic device, eg, contact or press between the user's ear and the mobile terminal. Therefore, the pressure sensor can be used to determine whether contact or pressure occurs between the user and the electronic device 1000, and the magnitude of the pressure.
  • the acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is still, and can be used to identify the application of electronic equipment 1000 attitude (such as horizontal and vertical screen switching, related games, magnetometer, etc.) Attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.
  • the electronic device 1000 may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, and a thermometer, which will not be repeated here.
  • the audio collection device 110 is configured to collect audio signals.
  • the audio collection device 110 includes multiple audio collection devices, and the audio collection devices may be microphones.
  • the network module of the electronic device 1000 is a radio frequency module, and the radio frequency module is used to receive and send electromagnetic waves, realize mutual conversion between electromagnetic waves and electrical signals, and communicate with a communication network or other devices.
  • the radio frequency module may include various existing circuit elements for performing these functions, such as antenna, radio frequency transceiver, digital signal processor, encryption/decryption chip, Subscriber Identity Module (SIM) card, memory and so on.
  • SIM Subscriber Identity Module
  • the radio frequency module can interact with external devices by sending or receiving electromagnetic waves.
  • a radio frequency module can send instructions to a target device.
  • FIG. 12 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
  • Program codes are stored in the computer-readable medium 800, and the program codes can be invoked by a processor to execute the methods described in the foregoing method embodiments.
  • the computer readable storage medium 800 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium (non-transitory computer-readable storage medium).
  • the computer-readable storage medium 800 has a storage space for program code 810 for executing any method steps in the above-mentioned methods. These program codes can be read from or written into one or more computer program products.
  • Program code 810 may, for example, be compressed in a suitable form.
  • the device control method, device, chip, electronic device, and storage medium provided by this application will be in the running state in the first communication mode of the electronic device, and the electronic device will transmit data through its own second communication mode.
  • the degree of occupancy of the target resource by the first communication mode is reduced. Therefore, through the above method, when the electronic device is performing data transmission through the second communication mode, it will reduce the occupancy of the resources used for communication by the first communication mode, which is also in the running state, and thus help to improve the communication efficiency through the second communication mode.
  • the efficiency of data transmission also enables the electronic device to better complete the tasks corresponding to the second communication mode.

Landscapes

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

Abstract

本申请实施例公开了一种设备控制方法、装置、芯片、电子设备及存储介质。所述方法包括:若所述电子设备的第一通信模式处于运行状态,且所述电子设备在通过所述电子设备的第二通信模式传输数据,确定目标资源,所述目标资源为所述电子设备进行通信所需的资源;降低所述第一通信模式对所述目标资源的占用程度。从而通过上述方式使得当电子设备在通过第二通信模式进行数据传输时,会降低处于运行状态的第一通信模式对于用于通信的资源的占用程度,进而有利于提升通过第二通信模式进行数据传输的效率,也使得电子设备能够更好的完成第二通信模式所对应的任务。

Description

设备控制方法、装置、芯片、电子设备及存储介质
相关申请的交叉引用
本申请要求于2021年8月17日提交的申请号为202110944966.0的中国申请的优先权,其在此出于所有目的通过引用将其全部内容并入本文。
技术领域
本申请涉及通信技术领域,更具体地,涉及一种设备控制方法、装置、芯片、电子设备及存储介质。
背景技术
近年来,随着电子设备的通信功能的升级,同一个电子设备中可以集成多种通信模式。例如,同一个电子设备中可以集成有蓝牙通信模式以及WiFi通信模式。其中,在多种模式均处于运行的状态下,每种模式都会对电子设备中用于进行通信的资源进行占用,从而会造成某一种模式对应的任务无法较好的执行。
发明内容
鉴于上述问题,本申请提出了一种设备控制方法、装置、芯片、电子设备及存储介质,以实现改善上述问题。
第一方面,本申请提供了一种设备控制方法,应用于电子设备,所述方法包括:若所述电子设备的第一通信模式处于运行状态,且所述电子设备在通过所述电子设备的第二通信模式传输数据,确定目标资源;降低所述第一通信模式对所述目标资源的占用程度,所述目标资源为所述电子设备进行通信所需的资源。
第二方面,本申请提供了一种设备控制方法,应用于芯片,所述芯片包括控制模块和通信模块;所述方法包括:若所述芯片的第一通信模式处于运行状态,且所述芯片在通过所述电子设备的第二通信模式传输数据,所述控制模块确定目标资源,所述目标资源为所述芯片进行通信所需的资源;所述控制模块降低所述第一通信模式对所述目标资源的占用程度。
第三方面,本申请提供了一种设备控制装置,运行于电子设备,所述装置包括:状态获取单元,用于若所述电子设备的第一通信模式处于运行状态,且所述电子设备在通过所述电子设备的第二通信模式传输数据,确定目标资源;控制单元,用于降低所述第一通信模式对所述目标资源的占用程度,所述目标资源为所述电子设备进行通信所需的资源。
第四方面,本申请提供了一种芯片,所述芯片包括控制模块和通信模块;
所述控制模块,若所述芯片的第一通信模式处于运行状态,且所述芯片在通过所述电子设备的第二通信模式传输数据,确定目标资源,所述目标资源为所述芯片进行通信所需的资源;降低所述第一通信模式对所述目标资源的占用程度。
第五方面,本申请提供了一种电子设备,包括一个或多个处理器以及存储器;一个或多个程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行上述的方法。
第六方面,本申请提供的一种计算机可读存储介质,所述计算机可读存储介质中存储有程序代码,其中,在所述程序代码运行时执行上述的方法。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示出了本申请实施例提出的设备控制方法的一种应用场景的示意图;
图2示出了本申请实施例提出的设备控制方法的了另一种应用场景的示意图;
图3示出了本申请实施例提出的设备控制方法的再一种应用场景的示意图;
图4示出了本申请实施例提出的一种设备控制方法的流程图;
图5示出了本申请实施例中对目标资源占用情况的示意图;
图6示出了本申请另一实施例提出的一种设备控制方法的流程图;
图7示出了本申请再一实施例提出的一种设备控制方法的流程图;
图8示出了本申请又一实施例提出的一种设备控制方法的流程图;
图9示出了本申请实施例提出的一种设备控制装置的结构框图;
图10示出了本申请实施例提出的一种芯片的结构框图;
图11示出了本申请提出的一种电子设备的结构框图;
图12是本申请实施例的用于保存或者携带实现根据本申请实施例的设备控制方法的程序代码的存储单元。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
随着电子设备的通信功能的升级,同一个电子设备中可以集成多种通信模式。例 如,在一些电子设备中可以设置有蓝牙通信模块以及WiFi通信模块,那么该电子设备则会支持有蓝牙通信模式以及WiFi通信模式。再者,对于一些蓝牙通信模块可以同时支持BR(Basic Rate)/EDR(Enhanced Data Rate)模式以及BLE(Bluetooth Low Energy)模式,那么电子设备可以同时支持WiFi通信模式、BR/EDR模式以及BLE模式。
但是,发明人在对相关的支持多种通信模式的电子设备进行研究后发现,在多种通信模式均处于运行的状态下,每种通信模式都会对电子设备中用于进行通信的资源进行占用,从而会造成某一种通信模式对应的任务无法较好的执行。例如,每种通信模式都需要进行无线信号的发射和接收,而对于无线信号的发射和接收都是通过电子设备中的天线进行的,从而使得在多种通信模式都处于运行的状态下,都需要抢占天线资源,进而就会造成某一种通信模式对应的任务可能无法较好的执行。
因此,为了改善该问题,发明人提出了本申请所提供的一种设备控制方法、装置、芯片、电子设备及存储介质,会在电子设备的第一通信模式处于运行状态,且电子设备在通过自己的第二通信模式传输数据的情况下,降低第一通信模式对目标资源的占用程度。从而通过上述方式使得当电子设备在通过第二通信模式进行数据传输时,会降低同样也处于运行状态的第一通信模式对于用于通信的资源的占用程度,进而有利于提升通过第二通信模式进行数据传输的效率,也使得电子设备能够更好的完成第二通信模式所对应的任务。
下面先对本申请实施例所涉及的一种应用场景进行介绍。
如图1所示,本申请实施例所涉及的一种应用场景中包括有电子设备100、电子设备200以及电子设备210。其中,示例性,电子设备100支持基于通信模式M1对电子设备210进行扫描,还同时支持基于通信模式M2与电子设备200之间进行数据传输。
其中,在本申请实施例中,电子设备100所支持的通信模式M1和通信模式M2可以为电子设备中同一个通信模块所支持的通信模式。示例性的,如图2所示,电子设备100中包括有通信模块101,该通信模块101可以同时支持通信模式M1和通信模式M2。电子设备100中的通信模块101可以通过通信模式M1对电子设备210进行扫描,通信模块101可以通过通信模式M2与电子设备200进行数据传输。
再者,在电子设备100中,不同的通信模式可以通过不同的通信模块来实现。示例性的,如图3所示,电子设备100中可以包括有通信模块102以及通信模块103。其中,通信模块102支持通信模式M1,通信模块103支持通信模式M2。那么通信模块102可以通过通信模式M1对电子设备210进行扫描,通信模块103可以通过通信模式M2与电子设备200进行数据传输。再者,在图3所示的场景中,同一个通信模块也可以支持多种通信模式,例如,其中的通信模块102除了可以支持通信模式M1外,还可以支持通信模式M3。
示例性的,其中的通信模式M1可以为BLE模式,通信模式M2可以为WiFi通信模式,通信模式M3可以为BR/EDR模式。
需要说明的是,上述电子设备100、电子设备200以及电子设备210在图1-图3中所示的类型都是示例性的,在本申请实施例中并不对电子设备100、电子设备200以及电子设备210的具体类型进行限定。再者,在本申请实施例中,第一通信模式可以理解为当前需要进行对目标资源的占用程度进行处理的通信模式。第二通信模式则可以为电子设备所支持的通信模式中,除第一通信模式以外的所有通信模式,或者除第一通信模式以外的所有通信模式任一一个或者多个通信模式。例如,在通信模式M1为第一通信模式的情况下,则第二通信模式可以包括通信模式M2,并且,在通信模块102还支持通信模式M3的情况下,则第二通信模式可以包括通信模式M2和通信模式M3中的至少一个。
下面将结合附图具体描述本申请的各实施例。
请参阅图4,本申请实施例提供的一种设备控制方法,应用于电子设备,所述方法包括:
S110:若所述电子设备的第一通信模式处于运行状态,且所述电子设备在通过所述电子设备的第二通信模式传输数据,确定目标资源,所述目标资源为所述电子设备进行通信所需的资源。
在本申请实施例中,每一种通信模式都可以有所对应的状态。可选的,通信模式的状态可以包括有运行状态、关闭状态以及空闲状态。其中,当通信模式处于运行状态时,则表征电子设备在通过该通信模式执行任务。例如,执行数据传输的任务,或者执行设备扫描的任务。当通信模式处于关闭状态,则表征电子设备无法通过该通信模式执行任务。当通信模式处于空闲状态,则表征该通信模式已经启动,只是当前电子设备并未通过该通信模式执行任务。
其中,在本申请实施例中,可以通过电子设备的指定界面中的控制控件来对对应的通信模式的进行关闭或者启动。例如,该指定界面可以为快捷操作界面,在该快捷操作界面中可以有多个通信模式各自对应的控制控件,从而用户可以通过操作快捷操作界面中的控制控件来实现启动或者关闭控制控件对应的通信模式。再例如,指定界面可以为电子设备的操作系统中的设置界面,对应的,在设置界面中可以配置有控制控件以实现对所对应的通信模式进行控制。
在本申请实施例中,第一通信模式可以理解为需要进行目标资源的占用程度处理的通信模式。并且,其中对目标资源的占用程度进行处理的一个目的是为了便于降低对第二通信模式执行对应任务的影响,所以在本申请实施例中可以结合第一通信模式的状态和第二通信模式的状态来触发对于目标资源的获取。
其中,第一通信模式可以在电子设备出厂时进行默认设置。也可以由电子设备的用户进行手动配置,即可以响应于针对通信模式的配置操作,配置以上第一通信模式以及第二通信模式。例如,在电子设备所包括的通信模式包括WiFi通信模式、BR/EDR模式以及BLE模式的情况下,用户可以根据自己的需要将WiFi通信模式、BR/EDR模 式以及BLE模式中的任一通信模式设置为第一通信模式。另外,第一通信模式还可以由电子设备根据实际情况进行动态的配置。例如,电子设备可以统计每种通信模式处于运行状态的时间的长度,然后将处于运行状态的时间最短的通信模式作为第一通信模式。示例性的,若电子设备获取到在一个统计周期内WiFi通信模式处于运行状态的时长为t1,BR/EDR模式处于运行状态的时长为t2,BLE模式处于运行状态的时长为t3。且其中,t3最小,那么则电子设备则会在下一统计周期内将BLE模式作为第一通信模式。其中,统计周期的长度可以为多种,例如,可以为一天,可以为一周,也可以为一个月等。并且,统计周期的长度可以由用户进行配置。
再者,在本申请实施例中触发确定目标资源的方式也可以有多种。
作为一种方式,电子设备可以先在检测到的第一通信模式处于运行状态后,再获取第二通信模式的状态,并且在检测到第二通信模式的状态表征电子设备在通过第二通信模式传输数据时,确定目标资源。示例性的,若电子设备所支持的通信模式包括BLE模式和WiFi通信模式,其中,第一通信模式为BLE模式,对应的,第二通信模式为WiFi通信模式。那么电子设备则会响应于BLE模式处于运行状态这一情况,而去获取WiFi通信模式的状态,并对WiFi通信模式的状态进行检测,若检测到WiFi通信模式处于运行状态则确定需要确定目标资源。
作为另外一种方式,电子设备可以在先检测到第二通信模式的状态表征电子设备在通过第二通信模式传输数据后,再获取第一通信模式的状态,且第一通信模式的状态为运行状态的情况下,则触发确定目标资源。示例性的,若电子设备所支持的通信模式包括BLE模式和WiFi通信模式,其中,第一通信模式为BLE模式,第二通信模式为WiFi通信模式。若电子设备检测到在通过WiFi通信模式进行数据传输,则电子设备会获取BLE模式当前的状态,并且,在检测到BLE模式当前的状态为运行状态的情况下,触发确定目标资源。
需要说明的是,对于前述两种触发确定目标资源,电子设备可以择一进行使用,可以同时在电子设备中进行使用。
另外,在本申请实施例中目标资源为电子设备进行通信所需的资源(例如,天线资源或者芯片资源),电子设备的多种通信模式在运行状态下,都会需要借助该目标资源来完成所对应的任务。其中,确定目标资源可以理解为确定需要进行占用程度调整的资源的类别。
需要说明的是,在电子设备中可以包括有多种资源。例如,可以包括有进行数据处理的资源、进行数据存储的资源、进行数据采集的资源以及包括进行通信的资源。其中,进行数据处理的资源可以包括处理器提供的可使用时间,进行数据存储的资源可以包括存储器所能提供的存储空间,进行数据采集的资源为电子设备中的传感器资源,而进行通信的资源则为电子设备进行通信时所需使用的资源,例如,天线等。
S120:降低所述第一通信模式对所述目标资源的占用程度。
需要说明的是,在电子设备的多通信种模式均处于启动的情况下,则多种模式可能都会对目标资源进行占用。其中,目标资源可以包括有芯片资源以及天线资源中的一种或者多种。
其中,芯片资源表征用于对所执行的任务中的数据进行处理的资源,例如,若电子设备当前需要向其他设备发送数据,那么则就可能需要消耗芯片资源来基于所采用的通信协议将所要发送的数据组装为指定的格式。比如,电子设备需要向其他设备发送数字“1”,那么则电子设备则会将数字“1”基于所采用的通信协议封装为指定的格式。再例如,若电子设备接收到了其他设备发送的数据,则需要消耗芯片资源来对接收到的数据进行解析,从而提取出有用的数据。其中,该有用的数据为其他设备实际需要传输给电子设备的数据。比如,其他设备需要向电子设备发送数字“0”,那么电子设备所接收到的其他设备发送的数据则会是对数字“0”进行封装后的数据,进而电子设备会利用其芯片资源对数据进行解封装,从而提取出有用的信息,即数字“0”。
那么某种通信模式对芯片资源的占用程度则可以通过对于占用芯片资源的时长来进行表征。若通信模式对芯片资源的占用时长越长,则对应的该通信模式对芯片资源的占用程度越高。
其中,天线资源则表征进行数据发送或者接收的资源。可以理解的是,电子设备需要传输给其他设备的数据在被电子设备的通信器件(蓝牙模块或者WiFi模块)转换为对应的无线信号后,该无线信号是需要通过天线进行发射的,以便其他设备在通过自己的天线接收到该发射的无线信号,进而使得其他设备从接收到的无线信号中提取出所传输的数据。某种通信模式对天线资源的占用程度则可以通过对于占用天线的时长来进行表征。若通信模式对天线资源的占用时长越长,则对应的该通信模式对天线资源的占用程度越高。
作为一种方式,在电子设备的多种通信模式均处于运行状态的情况下,多种通信模式可以以时分复用的方式对目标资源进行占用。以蓝牙通信模块为例,若蓝牙通信模块的BR/EDR模式以及BLE模式均处于运行状态的状态下,则BR/EDR模式和BLE模式会以时分复用的方式对目标资源进行占用。那么在本申请实施例中,为了使得电子设备可以更好的完成第二通信模式对应的任务,则可以降低第一通信模式对通信器件对应的资源的占用程度。其中,降低第一通信模式对通信器件对应的资源的占用程度可以理解为降低第一通信模式对应的任务占用通信器件对应的资源的时间。
例如,若第二通信模式对应的任务为与其他设备之间进行业务数据的传递,第一通信模式对应的任务为进行设备扫描。那么降低第一通信模式对目标资源的占用程度,则可以理解为降低进行设备扫描这个任务占用通信器件对应的资源的时间。如图5所示,图5表征的是对于某个资源的占用情况,其中,对于该资源的整体占用情况可以划分为多个第一时间周期,而在每个第一时间周期中可以包括有第一使用时间以及第一使用时间以外的时间。可选的,其中的第一时间为第一通信模式对资源的占用时间, 而第一使用时间以外的时间则为第二通信模式对资源的占用时间。那么在需要降低第一通信模式对资源的占用时间的情况下,则会缩短第一使用时间的时间长度,而使得第一时间周期中的第一使用时间以外的时间更长。
在本申请实施例中,对于降低所述第一通信模式对目标资源的占用程度的方式可以有多种。
作为一种方式,降低所述第一通信模式对目标资源的占用程度,包括:暂停所述第一通信模式对应的任务。作为另外一种方式,降低所述第一通信模式对目标资源的占用程度,包括:结束所述第一通信模式对应的任务。其中,暂停第一通信模式对应的任务可以理解为暂时停止第一通信模式对应的任务。也就是说,第一通信模式对应的任务依然是处于保留状态的,只是电子设备暂时不会去执行对应的任务。例如,若第一通信模式为蓝牙通信模块的BLE模式,当前BLE模式对应的任务为进行其他设备的扫描。那么在暂停BLE模式对应的任务的情况下,则电子设备则会暂时停止进行其他设备的扫描。那么在结束所述第一通信模式对应的任务的这种情况下,电子设备会直接结束对应的扫描任务,而不会对扫描任务进行保留。
需要说明的是,在暂停所述第一通信模式对应的任务的这种情况下,可以将第一通信模式对应的任务对目标资源的占用程度降低一部分,也可以将第一通信模式对应的任务对目标资源的占用程度降为0。而在结束所述第二通信模式对应的任务的这种情况下,则会直接将第一通信模式对应的任务对目标资源的占用程度降为0。以第一通信模式为BLE模式为例,电子设备可以通过scan_window(例如,为前述的第一使用时间)与scan_interval(例如,为前述的第一时间周期)的比值来衡量BLE模式对目标资源的占用程度。若在BLE模式处于运行状态后,电子设备并未通过第二通信模式进行数据传输,则可以将该比值配置为第一比值,若在BLE模式处于运行状态后,电子设备并在通过第二通信模式进行数据传输,则可以将该比值配置为第二比值,其中,第一比值大于第二比值。
需要说明的是,电子设备可以通过本身的系统程序来控制电子设备执行每个模式各自对应的任务,并且对于不同的模式所对应的进行控制的系统程序可以是不同的。作为一种方式,电子设备通过运行第一系统程序来控制电子设备的第一通信模式,例如,通过运行第一系统程序来控制电子设备基于第一通信模式进行其他设备的扫描。再例如,通过运行第二系统程序来控制电子设备基于所建立的通信连接进行数据传输。
那么在这种方式下,在需要暂停所述第一通信模式对应的任务的情况下,可以通过停止用于控制第一通信模式的系统程序的运行来实现暂停所述第一通信模式对应的任务。例如,将控制第一通信模式的系统程序切换为休眠状态,从而使得控制第一通信模式的系统程序不在对电子设备发出控制指令,进而电子设备则不会执行第一通信模式对应的任务,以实现降低第一通信模式对目标资源的占用程度。在需要结束所述第一通信模式对应的任务的情况下,则可以直接结束控制第一通信模式的系统程序的 运行。其中,结束系统程序的运行可以理解为将控制第一通信模式的系统程序的进程进行杀死,以及回收分配给控制第一通信模式的系统程序的内存。那么对应的,在将控制第一通信模式的系统程序切换为休眠状态的情况下,则不会将控制第二通信模式的系统程序的进程进行杀死,以及也不会回收分配给控制第一通信模式的系统程序的内存。
再者,除了前述的对于不同的模式所对应的进行控制的系统程序可以是不同的这种方式外,作为另外一种方式,还可以配置由同一个系统程序中的不同线程来分别控制电子设备的不同模式。在这种方式下,系统程序中的线程与电子设备的模式一一对应,从而使得每种模式都有对应的线程进行控制。那么在这种方式下,
在需要暂停所述第一通信模式对应的任务的情况下,可以通过停止用于控制第一通信模式的线程的运行来实现暂停所述第一通信模式对应的任务。例如,将控制第一通信模式的线程切换为阻塞状态,从而使得控制第一通信模式的系统程序不在对电子设备发出控制指令,进而电子设备则不会执行第一通信模式对应的任务,以实现降低第一通信模式对目标资源的占用程度。在需要结束所述第一通信模式对应的任务的情况下,则可以直接结束控制第一通信模式的线程的运行。其中,结束线程的运行可以理解为将控制第一通信模式的线程进行杀死,以及回收分配给控制第一通信模式的线程的内存。那么对应的,在将控制第一通信模式的线程切换为阻塞状态的情况下,则不会将控制第一通信模式的线程进行杀死,以及也不会回收分配给控制第二通信模式的线程的内存。
本实施例提供的一种设备控制方法,会在电子设备的第一通信模式处于运行状态,且电子设备在通过自己的第二通信模式传输数据的情况下,降低第一通信模式对目标资源的占用程度。从而通过上述方式使得当电子设备在通过第二通信模式进行数据传输时,会降低同样也处于运行状态的第一通信模式对于用于通信的资源的占用程度,进而有利于提升通过第二通信模式进行数据传输的效率,也使得电子设备能够更好的完成第二通信模式所对应的任务。
请参阅图6,本申请实施例提供的一种设备控制方法,应用于电子设备,所述方法包括:
S210:若所述电子设备的第一通信模式处于运行状态,且所述电子设备在通过所述电子设备的第二通信模式传输数据,确定目标资源。
作为一种方式,在电子设备的第一通信模式处于运行状态,且所述电子设备在通过所述电子设备的第二通信模式传输数据的情况下,可以先获取通过第二通信模式所传输数据的数据类型。若通过电子设备的第二通信模式传输数据的数据类型为目标类型,则触发确定目标资源。其中,目标类型可以为ACL(Asynchronous connection-oriented)类型的数据或SCO(Synchronous Connection-Oriented)/eSCO(Extended Synchronous Connection-Oriented)类型的数据。
S220:基于通过第二通信模式所传输的数据,降低所述第一通信模式对目标资源的占用程度,所述目标资源为所述电子设备进行通信所需的资源。
作为一种方式,所述基于通过第二通信模式所传输的数据,降低所述第一通信模式对目标资源的占用程度,包括:获取通过第二通信模式所传输数据的数据类型;根据所述数据类型降低所述第一通信模式对目标资源的占用程度。
可选的,所述根据所述数据类型降低所述第一通信模式对目标资源的占用程度,包括:若所述数据类型为实时类数据,将所述第一通信模式对目标资源的占用程度降低到第一占用程度;若所述数据类型为非实时类数据,将所述第一通信模式对目标资源的占用程度降低到第二占用程度;其中,所述第一占用程度小于所述第二占用程度。
其中,电子设备可以通过判断在使用第二通信模式的应用程序的类别来确定通过第二通信模式所传输数据的数据类型。需要说明的是,对于不同类别的应用程序在通过电子设备的通信模式与外部设备进行通信时,所传输内容可能是不同的。例如,对于即时通信类的应用程序,那么所传输的数据可能是语音数据,而对于图片类的应用程序,所传输的数据可能是图片数据,而其中的语音数据对实时性的需求则会高于图片数据。所以,在本申请实施例中,可以将会使用到通信模式的应用程序进行分类,即分为实时类的应用程序和非实时类的应用程序。在检测到电子设备在通过第二通信模式传输数据时,则会获取到当前正在使用第二通信模式的应用程序的类别,以将该应用程序的类别作为通过第二通信模式所传输数据的类别。
作为另外一种方式,所述基于通过第二通信模式所传输的数据,降低所述第一通信模式对目标资源的占用程度,包括:获取通过第二通信模式所传输数据的数据优先级;根据所述数据优先级降低所述第一通信模式对目标资源的占用程度。可选的,在本申请实施例中,预先确定将使用到通信模式的应用程序各自的优先级,即每个会使用通信模式的应用程序都会对应有自己的优先级。在检测到电子设备在通过第二通信模式传输数据时,则会获取到当前正在使用第二通信模式的应用程序的优先级,以作为通过第二通信模式所传输数据的数据优先级,然后根据数据优先级的高低来确定具体将第一通信模式对目标资源的占用程度降低多少。其中,若对应的数据优先级越高,那么则降低对目标资源的占用程度的幅度越小。反之,若对应的数据优先级越低,那么则降低对目标资源的占用程度的幅度越大。可选的,在电子设备中可以存储有数据优先级与降低占用程度的对应关系,那么在获取到通过第二通信模式所传输数据的数据优先级后,根据该数据优先级与占用程度的降低程度的对应关系来获取到对应的降低程度,以根据该降低程度来降低第一通信模式对目标资源的占用程度。其中,降低程度表征的降低后的占用程度和降低前的占用程度的比值。例如,如下表所示:
ID 数据优先级 降低程度
1 G1 80%
2 G2 60%
3 G3 40%
其中,数据优先级G1高于数据优先级G2,数据优先级G2高于数据优先级G1。例如,若确定通过第二通信模式所传输数据的数据优先级为数据优先级G2,则会将第一通信模式对目标资源的占用程度降低到原来的60%。例如,若确定通过第二通信模式所传输数据的数据优先级为数据优先级G3,则会将第一通信模式对目标资源的占用程度降低到原来的40%。
作为一种方式,所述降低所述第一通信模式对所述目标资源的占用程度之后还包括:若所述电子设备未通过所述第二通信模式传输数据,则提升所述第一通信模式对目标资源的占用程度,从而有利于同样也保证第一通信模式所执行的任务可以顺利执行。例如,若第一通信模式为BLE模式,BLE模式所对应的任务为扫描外部设备,那么在提升BLE模式对目标资源的占用程度后,可以使得电子设备可以通过BLE模式顺利的完成外部设备的扫描。
可选的,在提升第一通信模式对目标资源的占用程度时,可以将第一通信模式对目标资源的占用程度提升到降低之前的占用程度。
需要说明的是,电子设备的第二通信模式的启动可能是因为电子设备需要通过该第二通信模式完成指定的任务,那么电子设备结束通过第二通信模式进行数据传输后,为了使得电子设备的第一通信模式可以正常的进行任务的执行,则可以则提升所述第一通信模式对目标资源的占用程度。
其中,基于前述介绍内容可知,在本申请实施例中,对于降低第一通信模式对目标资源的占用程度的方式可以有多种。对应的,对于提升第一通信模式对目标资源的占用程度方式也可以有多种,并且,提升第一通信模式对目标资源的占用程度方式与降低第一通信模式对目标资源的占用程度方式是相对应的。
可选的,若是通过停止用于控制第一通信模式的系统程序的运行来实现降低所述第一通信模式对目标资源的占用程度。则在提升所述第一通信模式对目标资源的占用程度的过程中,可以是通过触发控制第一通信模式的系统程序继续运行或者重新开始运行的方式,来实现提升所述第一通信模式对目标资源的占用程度。
可选的,若是通过改变控制第一通信模式的线程的状态来实现降低所述第一通信模式对目标资源的占用程度。则在提升所述第一通信模式对目标资源的占用程度的过程中,同样可以是通过改变控制第一通信模式的线程的状态来实现提升所述第一通信模式对目标资源的占用程度。例如,若是通过将第一通信模式的线程切换为阻塞状态来实现降低所述第一通信模式对目标资源的占用程度,则可以通过将将第一通信模式的线程切换为运行状态来实现提升所述第一通信模式对目标资源的占用程度。若是通过将第一通信模式的线程进行杀死来实现降低所述第一通信模式对目标资源的占用程度,则可以通过启动控制第一通信模式的线程来实现提升所述第一通信模式对目标资源的占用程度。
作为一种方式,在电子设备中可以建立有一个模式特征文件。在该模式特征文件中可以记录有电子设备的每种模式的当前状态,以及由前一状态切换成为当前状态的方式。从而使得电子设备可以通过查询该模式特征文件的方式,来获取得到通信器件的第一通信模式被触发降低对目标资源资的占用程度的方式,从而可以采用对应的方式来实现提升第一通信模式对目标资源的占用程度。
例如,在该模式特征文件中可以存储有第一标识以及第二标识。其中,第一标识可以用于记录电子设备的每种模式当前所处的状态,第二标识用于记录每种模式由前一状态切换为当前所处的状态的方式。
作为一种方式,在本申请实施例中,可以根据当前的实际情况来确定目标资源所包括的内容。可选的,依然可以通过传输任务的时效性来确定目标资源的内容。例如,若通过第二通信模式所建立的通信连接用于执行时效性较高的传输任务,那么则目标资源可以包括芯片资源和天线资源。若通过第二通信模式所建立的通信连接用于执行时效性较低的传输任务,那么则目标资源可以包括天线资源或者芯片资源。其中,在本申请实施例中对于传输任务的时效性的高低可以通过传输任务所对应的时效参数来确定。若对应的时效参数的值大于指定阈值,则确定该时效参数对应的传输任务为时效性较高的传输任务,若对应的时效参数的值不大于指定阈值,则确定该时效参数对应的传输任务为时效性较低的传输任务。
本实施例提供的一种设备控制方法,会在电子设备的第一通信模式处于运行状态,且电子设备在通过自己的第二通信模式传输数据的情况下,降低第一通信模式对目标资源的占用程度。从而通过上述方式使得当电子设备在通过第二通信模式进行数据传输时,会降低同样也处于运行状态的第一通信模式对于用于通信的资源的占用程度,进而有利于提升通过第二通信模式进行数据传输的效率,也使得电子设备能够更好的完成第二通信模式所对应的任务。并且,在本实施例中,还会根据通过第二通信模式所传输的数据降低所述第一通信模式对目标资源的占用程度,从而提升了对于第一通信模式对目标资源的占用程度降低的智能化程度和灵活性。
请参阅图7,本申请实施例提供的一种设备控制方法,应用于电子设备,所述方法包括:
S310:若所述电子设备的第一通信模式处于运行状态,且所述电子设备在通过所述电子设备的第二通信模式传输数据,确定目标资源,所述电子设备的第二通信模式有多个。
S320:获取在用于传输数据的第二通信模式的数量。
S330:根据所述数量降低所述第一通信模式对目标资源的占用程度,所述目标资源为所述电子设备进行通信所需的资源。
本实施例提供的一种设备控制方法,会在电子设备的第一通信模式处于运行状态,且电子设备在通过自己的第二通信模式传输数据的情况下,降低第一通信模式对目标 资源的占用程度。从而通过上述方式使得当电子设备在通过第二通信模式进行数据传输时,会降低同样也处于运行状态的第一通信模式对于用于通信的资源的占用程度,进而有利于提升通过第二通信模式进行数据传输的效率,也使得电子设备能够更好的完成第二通信模式所对应的任务。并且,在本实施例中,在第二通信模式有多个的情况下,会根据当前正在用于进行数据传输的第二通信模式的数量,来低所述第一通信模式对目标资源的占用程度,从而提升了对于第一通信模式对目标资源的占用程度降低的智能化程度和灵活性。
请参阅图8,本申请实施例提供的一种设备控制方法,应用于芯片,所述芯片包括控制模块和通信模块;所述方法包括:
S410:若所述芯片的第一通信模式处于运行状态,且所述芯片在通过所述电子设备的第二通信模式传输数据,所述控制模块确定目标资源,所述目标资源为所述芯片进行通信所需的资源;
S420:所述控制模块降低所述第一通信模式对所述目标资源的占用程度。
其中,本实施例中所涉及的芯片可以为用于进行通信的芯片。其中,芯片所包括的通信模块可以包括蓝牙通信模块和WiFi通信模块中的至少一个。其中,芯片所对应的多种通信模式可以理解为芯片所包括的通信模块所支持的通信模式,并且芯片所对应的多种通信模式和前述实施例中电子设备所对应的多种通信模式可以是相同的。
本实施例提供的一种设备控制方法,会在芯片的第一通信模式处于运行状态的情况下,去获取芯片的第二通信模式的状态,进而在第二通信模式的状态表征芯片在通过第二通信模式传输数据的情况下,降低第一通信模式对目标资源的占用程度。从而通过上述方式使得当芯片在通过第二通信模式进行数据传输时,会降低同样也处于运行状态的第一通信模式对于用于通信的资源的占用程度,进而有利于提升通过第二通信模式进行数据传输的效率,也使得芯片能够更好的完成第二通信模式所对应的任务。
请参阅图9,本申请实施例提供的一种设备控制装置500,运行于电子设备,所述装置500包括:
状态获取单元510,用于若所述电子设备的第一通信模式处于运行状态,且所述电子设备在通过所述电子设备的第二通信模式传输数据,确定目标资源。
控制单元520,用于降低所述第一通信模式对所述目标资源的占用程度,所述目标资源为所述电子设备进行通信所需的资源。
作为一种方式,控制单元520,具体用于基于通过第二通信模式所传输的数据,降低所述第一通信模式对目标资源的占用程度。可选的,控制单元520,具体用于获取通过第二通信模式所传输数据的数据类型;根据所述数据类型降低所述第一通信模式对目标资源的占用程度。可选的,控制单元520,具体用于若所述数据类型为实时类数据,将所述第一通信模式对目标资源的占用程度降低到第一占用程度;若所述数据类型为非实时类数据,将所述第一通信模式对目标资源的占用程度降低到第二占用程度;其 中,所述第一占用程度小于所述第二占用程度。
作为另外一种方式,控制单元520,具体用于获取通过第二通信模式所传输数据的数据优先级;根据所述数据优先级降低所述第一通信模式对目标资源的占用程度。
作为一种方式,所述电子设备的第二通信模式有多个。状态获取单元510,还用于若至少一个第二通信模式的状态表征在进行数据传输,则确定所述电子设备在通过第二通信模式传输数据。在这种方式中,控制单元520,具体用于获取在用于传输数据的第二通信模式的数量;根据所述数量降低所述第一通信模式对目标资源的占用程度。
控制单元520,还用于降低所述第一通信模式对所述目标资源的占用程度之后,若所述电子设备未通过所述第二通信模式传输数据,则提升所述第一通信模式对目标资源的占用程度。
作为一种方式,所述第一通信模式为BLE模式,所述第二通信模式包括BR/EDR模式和WiFi模式中的至少一个。
作为一种方式,控制单元520,具体用于暂停所述第一通信模式对应的任务;或者结束所述第一通信模式对应的任务。
本实施例提供的一种设备控制装置,会在电子设备的第一通信模式处于运行状态,且电子设备在通过自己的第二通信模式传输数据的情况下,降低第一通信模式对目标资源的占用程度。从而通过上述方式使得当电子设备在通过第二通信模式进行数据传输时,会降低同样也处于运行状态的第一通信模式对于用于通信的资源的占用程度,进而有利于提升通过第二通信模式进行数据传输的效率,也使得电子设备能够更好的完成第二通信模式所对应的任务。
请参阅图10,本申请实施例提供的一种芯片600,所述芯片600包括控制模块610和通信模块620;
所述控制模块620,若所述芯片的第一通信模式处于运行状态,且所述芯片在通过所述电子设备的第二通信模式传输数据,确定目标资源,所述目标资源为所述芯片进行通信所需的资源;降低所述第一通信模式对所述目标资源的占用程度。
需要说明的是,本实施例中控制模块620所执行步骤所对应的更为具体的内容可以参见前述实施例中的相关说明,在本实施例中则不再赘述。
需要说明的是,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性。另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
下面将结合图11对本申请提供的一种电子设备进行说明。
请参阅图11,基于上述的设备控制方法、装置,本申请实施例还提供的一种可以 执行前述设备控制方法的电子设备1000。电子设备1000包括相互耦合的一个或多个(图中仅示出一个)处理器105、存储器104、摄像头106以及音频采集装置108。其中,该存储器104中存储有可以执行前述实施例中内容的程序,而处理器105可以执行该存储器104中存储的程序。
其中,处理器105可以包括一个或者多个处理核。处理器105利用各种接口和线路连接整个电子设备1000内的各个部分,通过运行或执行存储在存储器104内的指令、程序、代码集或指令集,以及调用存储在存储器104内的数据,执行电子设备1000的各种功能和处理数据。可选地,处理器105可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器105可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器105中,单独通过一块通信芯片进行实现。
存储器104可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器104可用于存储指令、程序、代码、代码集或指令集。存储器104可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。
再者,电子设备1000除了前述所示的器件外,还可以包括网络模块110以及传感器模块112。
所述网络模块110用于实现电子设备1000与其他设备之间的信息交互,例如,传输设备控制指令、操纵请求指令以及状态信息获取指令等。而当电子设备200具体为不同的设备时,其对应的网络模块110可能会有不同。
传感器模块112可以包括至少一种传感器。具体地,传感器模块112可包括但并不限于:光传感器、运动传感器、压力传感器、红外热传感器、距离传感器、加速度传感器、以及其他传感器。
其中,压力传感器可以检测由按压在电子设备1000产生的压力的传感器。即,压力传感器检测由用户和电子设备之间的接触或按压产生的压力,例如由用户的耳朵与移动终端之间的接触或按压产生的压力。因此,压力传感器可以用来确定在用户与电子设备1000之间是否发生了接触或者按压,以及压力的大小。
其中,加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别电子设备1000姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等。另外, 电子设备1000还可配置陀螺仪、气压计、湿度计、温度计等其他传感器,在此不再赘述。
音频采集装置110,用于进行音频信号采集。可选的,音频采集装置110包括有多个音频采集器件,该音频采集器件可以为麦克风。
作为一种方式,电子设备1000的网络模块为射频模块,该射频模块用于接收以及发送电磁波,实现电磁波与电信号的相互转换,从而与通讯网络或者其他设备进行通讯。所述射频模块可包括各种现有的用于执行这些功能的电路元件,例如,天线、射频收发器、数字信号处理器、加密/解密芯片、用户身份模块(SIM)卡、存储器等等。例如,该射频模块可以通过发送或者接收的电磁波与外部设备进行交互。例如,射频模块可以向目标设备发送指令。
请参考图12,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质800中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。
计算机可读存储介质800可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质800包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质800具有执行上述方法中的任何方法步骤的程序代码810的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码810可以例如以适当形式进行压缩。
综上所述,本申请提供的一种设备控制方法、装置、芯片、电子设备及存储介质,会在电子设备的第一通信模式处于运行状态,且电子设备在通过自己的第二通信模式传输数据的情况下,降低第一通信模式对目标资源的占用程度。从而通过上述方式使得当电子设备在通过第二通信模式进行数据传输时,会降低同样也处于运行状态的第一通信模式对于用于通信的资源的占用程度,进而有利于提升通过第二通信模式进行数据传输的效率,也使得电子设备能够更好的完成第二通信模式所对应的任务。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (20)

  1. 一种设备控制方法,其特征在于,应用于电子设备,所述方法包括:
    若所述电子设备的第一通信模式处于运行状态,且所述电子设备在通过所述电子设备的第二通信模式传输数据,确定目标资源,所述目标资源为所述电子设备进行通信所需的资源;
    降低所述第一通信模式对所述目标资源的占用程度。
  2. 根据权利要求1所述的方法,其特征在于,所述降低所述第一通信模式对所述目标资源的占用程度,包括:
    基于通过第二通信模式所传输的数据,降低所述第一通信模式对目标资源的占用程度。
  3. 根据权利要求2所述的方法,其特征在于,所述基于通过第二通信模式所传输的数据,降低所述第一通信模式对目标资源的占用程度,包括:
    获取通过第二通信模式所传输数据的数据类型;
    根据所述数据类型降低所述第一通信模式对目标资源的占用程度。
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述数据类型降低所述第一通信模式对目标资源的占用程度,包括:
    若所述数据类型为实时类数据,将所述第一通信模式对目标资源的占用程度降低到第一占用程度;
    若所述数据类型为非实时类数据,将所述第一通信模式对目标资源的占用程度降低到第二占用程度;
    其中,所述第一占用程度小于所述第二占用程度。
  5. 根据权利要求2所述的方法,其特征在于,所述基于通过第二通信模式所传输的数据,降低所述第一通信模式对目标资源的占用程度,包括:
    获取通过第二通信模式所传输数据的数据优先级;
    根据所述数据优先级降低所述第一通信模式对目标资源的占用程度。
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述数据优先级降低所述第一通信模式对目标资源的占用程度,包括:
    根据所述数据优先级,以及存储的数据优先级与占用程度的降低程度的对应关系,确定对应的降低程度,所述降低程度表征的降低后的占用程度和降低前的占用程度的比值;
    根据所述降低程度,降低所述第一通信模式对目标资源的占用程度。
  7. 根据权利要求1所述的方法,其特征在于,所述电子设备的第二通信模式有多个;所述方法还包括:若至少一个第二通信模式的状态表征在进行数据传输,则确定所述电子设备在通过第二通信模式传输数据;
    所述降低所述第一通信模式对所述目标资源的占用程度,包括:
    获取在用于传输数据的第二通信模式的数量;
    根据所述数量降低所述第一通信模式对目标资源的占用程度。
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述若所述电子设备的第一通信模式处于运行状态,且所述电子设备在通过所述电子设备的第二通信模式传输数据,确定目标资源,包括:
    若所述电子设备的第一通信模式处于运行状态,且所述电子设备在通过所述电子设备的第二通信模式传输数据,获取通过所述第二通信模式所传输数据的数据类型;
    若所述数据类型为目标类型,则触发确定目标资源。
  9. 根据权利要求1-8任一所述的方法,其特征在于,所述降低所述第一通信模式对所述目标资源的占用程度之后还包括:
    若所述电子设备未通过所述第二通信模式传输数据,则提升所述第一通信模式对目标资源的占用程度。
  10. 根据权利要求1-9任一所述的方法,其特征在于,所述第一通信模式为BLE模式,所述第二通信模式包括BR/EDR模式和WiFi模式中的至少一个。
  11. 根据权利要求1-10任一项所述的方法,其特征在于,所述降低所述第一通信模式对所述目标资源的占用程度,包括:
    降低所述第一通信模式对应的任务对所述目标资源的占用时长。
  12. 根据权利要求9所述的方法,其特征在于,所述降低所述第一通信模式对应的任务对所述目标资源的占用时长,包括:
    暂停所述第一通信模式对应的任务;
    或者结束所述第一通信模式对应的任务。
  13. 根据权利要求1-12任一项所述的方法,其特征在于,所述方法还包括:
    响应于配置操作,配置所述第一通信模式以及所述第二通信模式。
  14. 根据权利要求1-12任一项所述的方法,其特征在于,所述方法还包括:
    获取每种通信模式处于运行状态的时间的长度;
    将处于运行状态的时间最短的通信模式作为所述第一通信模式。
  15. 根据权利要求1-14任一项所述的方法,其特征在于,所述目标资源包括芯片资源以及天线资源中的一种或者多种。
  16. 一种设备控制方法,其特征在于,应用于芯片,所述芯片包括控制模块和通信模块;所述方法包括:
    若所述芯片的第一通信模式处于运行状态,且所述芯片在通过所述电子设备的第二通信模式传输数据,所述控制模块确定目标资源,所述目标资源为所述芯片进行通信所需的资源;
    所述控制模块降低所述第一通信模式对所述目标资源的占用程度。
  17. 一种设备控制装置,其特征在于,运行于电子设备,所述装置包括:
    状态获取单元,用于若所述电子设备的第一通信模式处于运行状态,且所述电子设备在通过所述电子设备的第二通信模式传输数据,确定目标资源;
    控制单元,用于降低所述第一通信模式对所述目标资源的占用程度,所述目标资源为所述电子设备进行通信所需的资源。
  18. 一种芯片,其特征在于,所述芯片包括控制模块和通信模块;
    所述控制模块,用于若所述芯片的第一通信模式处于运行状态,且所述芯片在通过所述电子设备的第二通信模式传输数据,确定目标资源,所述目标资源为所述芯片进行通信所需的资源;降低所述第一通信模式对所述目标资源的占用程度。
  19. 一种电子设备,其特征在于,包括一个或多个处理器以及存储器;
    一个或多个程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行权利要求1-15任一所述的方法。
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有程序代码,其中,在所述程序代码被处理器运行时执行权利要求1-15任一所述的方法。
PCT/CN2022/108597 2021-08-17 2022-07-28 设备控制方法、装置、芯片、电子设备及存储介质 WO2023020240A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110944966.0 2021-08-17
CN202110944966.0A CN113691668B (zh) 2021-08-17 2021-08-17 设备控制方法、装置、芯片、电子设备及存储介质

Publications (1)

Publication Number Publication Date
WO2023020240A1 true WO2023020240A1 (zh) 2023-02-23

Family

ID=78580371

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/108597 WO2023020240A1 (zh) 2021-08-17 2022-07-28 设备控制方法、装置、芯片、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN113691668B (zh)
WO (1) WO2023020240A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113691668B (zh) * 2021-08-17 2023-06-13 Oppo广东移动通信有限公司 设备控制方法、装置、芯片、电子设备及存储介质
WO2023124454A1 (zh) * 2021-12-31 2023-07-06 Oppo广东移动通信有限公司 通信方法、装置、电子设备、计算机设备和可读存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090137206A1 (en) * 2007-11-23 2009-05-28 Texas Instruments Incorporated Apparatus for and method of bluetooth and wireless local area network coexistence using a single antenna in a collocated device
CN109152057A (zh) * 2018-08-14 2019-01-04 Oppo广东移动通信有限公司 时间片分配方法、装置及电子设备
CN109151861A (zh) * 2018-08-14 2019-01-04 Oppo广东移动通信有限公司 编码率调整方法、装置及电子设备
CN110290278A (zh) * 2019-08-02 2019-09-27 惠州Tcl移动通信有限公司 基于蓝牙的数据传输方法、装置、存储介质及终端
CN112020079A (zh) * 2019-05-31 2020-12-01 百度在线网络技术(北京)有限公司 电子设备的无线通信装置、方法、电子设备及存储介质
US20210064434A1 (en) * 2019-08-30 2021-03-04 Samsung Electronics Co., Ltd. Electronic device and operating method thereof
CN113691668A (zh) * 2021-08-17 2021-11-23 Oppo广东移动通信有限公司 设备控制方法、装置、芯片、电子设备及存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102404878A (zh) * 2010-09-13 2012-04-04 北京中传视讯科技有限公司 采用无线通信多媒体芯片的商家消费信息采集终端装置
CN109673044A (zh) * 2018-12-28 2019-04-23 江苏惠通集团有限责任公司 芯片的通信控制方法、芯片、网关装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090137206A1 (en) * 2007-11-23 2009-05-28 Texas Instruments Incorporated Apparatus for and method of bluetooth and wireless local area network coexistence using a single antenna in a collocated device
CN109152057A (zh) * 2018-08-14 2019-01-04 Oppo广东移动通信有限公司 时间片分配方法、装置及电子设备
CN109151861A (zh) * 2018-08-14 2019-01-04 Oppo广东移动通信有限公司 编码率调整方法、装置及电子设备
CN112020079A (zh) * 2019-05-31 2020-12-01 百度在线网络技术(北京)有限公司 电子设备的无线通信装置、方法、电子设备及存储介质
CN110290278A (zh) * 2019-08-02 2019-09-27 惠州Tcl移动通信有限公司 基于蓝牙的数据传输方法、装置、存储介质及终端
US20210064434A1 (en) * 2019-08-30 2021-03-04 Samsung Electronics Co., Ltd. Electronic device and operating method thereof
CN113691668A (zh) * 2021-08-17 2021-11-23 Oppo广东移动通信有限公司 设备控制方法、装置、芯片、电子设备及存储介质

Also Published As

Publication number Publication date
CN113691668A (zh) 2021-11-23
CN113691668B (zh) 2023-06-13

Similar Documents

Publication Publication Date Title
CN110972102B (zh) 资源选择方法及终端
WO2023020240A1 (zh) 设备控制方法、装置、芯片、电子设备及存储介质
CN109699084B (zh) 非授权频段下的信息传输方法、终端及网络设备
CN107391259B (zh) 资源处理方法和装置、计算机可读存储介质、移动终端
CN110324859B (zh) 副链路的传输资源选择方法、配置方法、终端和网络设备
CN108965306B (zh) 一种通话处理方法及移动终端
EP3471450B1 (en) Network bandwidth management method, terminal and computer storage medium
CN111263450B (zh) Pdcch监测方法、装置、终端、基站和存储介质
CN111050422B (zh) 一种非连续接收的控制方法及终端
CN111278125B (zh) 传输方法、终端设备及网络侧设备
WO2023011186A1 (zh) 设备控制方法、装置、电子设备及存储介质
CN111615197A (zh) 资源调整方法及设备
CN112654078B (zh) 一种上行传输控制方法及终端
CN109275161B (zh) 一种网络分配方法、终端设备
CN110636533B (zh) 一种调度传输方法及终端
CN110461041B (zh) 一种操作控制方法、移动通信终端及网络侧设备
CN110839296B (zh) 网络资源调度方法、装置、存储介质及移动终端
CN111182654B (zh) 副链路rrc连接触发方法和终端
CN110635879B (zh) 一种bwp去激活定时器的控制方法及终端设备
CN112654097A (zh) 资源共享方法、终端及网络设备
CN113225778A (zh) 消息通知方法、终端和网络设备
CN112654098B (zh) 随机接入、信息发送方法、终端及网络设备
CN112367706B (zh) 资源分配方法、装置及存储介质
CN112788769B (zh) 一种信息处理方法、设备及系统
CN111432481B (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: 22857553

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE