WO2023071558A9 - 蜂窝通信功能的使用方法和装置 - Google Patents
蜂窝通信功能的使用方法和装置 Download PDFInfo
- Publication number
- WO2023071558A9 WO2023071558A9 PCT/CN2022/118322 CN2022118322W WO2023071558A9 WO 2023071558 A9 WO2023071558 A9 WO 2023071558A9 CN 2022118322 W CN2022118322 W CN 2022118322W WO 2023071558 A9 WO2023071558 A9 WO 2023071558A9
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- cellular communication
- interface
- communication service
- service data
- distributed
- Prior art date
Links
- 230000010267 cellular communication Effects 0.000 title claims abstract description 1063
- 238000000034 method Methods 0.000 title claims abstract description 111
- 230000006870 function Effects 0.000 claims description 412
- 230000004044 response Effects 0.000 claims description 110
- 238000012545 processing Methods 0.000 claims description 89
- 238000004891 communication Methods 0.000 claims description 86
- 230000015654 memory Effects 0.000 claims description 45
- 238000003860 storage Methods 0.000 claims description 32
- 238000004590 computer program Methods 0.000 claims description 15
- 230000001413 cellular effect Effects 0.000 claims description 8
- 230000002708 enhancing effect Effects 0.000 abstract description 4
- 230000008569 process Effects 0.000 description 34
- 238000010586 diagram Methods 0.000 description 33
- 238000007726 management method Methods 0.000 description 22
- 238000013473 artificial intelligence Methods 0.000 description 20
- 230000001960 triggered effect Effects 0.000 description 13
- 238000005516 engineering process Methods 0.000 description 9
- 238000010295 mobile communication Methods 0.000 description 9
- 238000012546 transfer Methods 0.000 description 9
- 230000005540 biological transmission Effects 0.000 description 7
- 238000013461 design Methods 0.000 description 6
- 238000009826 distribution Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 6
- 230000003068 static effect Effects 0.000 description 4
- 230000009977 dual effect Effects 0.000 description 3
- 239000004984 smart glass Substances 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 230000003190 augmentative effect Effects 0.000 description 2
- 210000005252 bulbus oculi Anatomy 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000004927 fusion Effects 0.000 description 2
- 230000001939 inductive effect Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 238000009877 rendering Methods 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 230000003416 augmentation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 230000003915 cell function Effects 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 238000005265 energy consumption Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 210000001508 eye Anatomy 0.000 description 1
- 210000000887 face Anatomy 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012806 monitoring device Methods 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
- 230000000284 resting effect Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
- 230000005236 sound signal Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W16/00—Network planning, e.g. coverage or traffic planning tools; Network deployment, e.g. resource partitioning or cells structures
- H04W16/18—Network planning tools
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/16—Discovering, processing access restriction or access information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/02—Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
- H04W84/10—Small scale networks; Flat hierarchical networks
-
- 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/04—Terminal devices adapted for relaying to or from another terminal or user
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Definitions
- the present application relates to the technical field of terminals, and in particular to a method and device for using a cellular communication function.
- Cellular communication adopts a cellular wireless networking method, and connects terminals and network devices through wireless channels, so that users can communicate with each other during activities. Its main feature is the mobility of terminals, and it has handover and cross-local Network automatic roaming function.
- devices with cellular communication capabilities such as mobile phones, can share their cellular communication capabilities with other devices that do not have cellular communication capabilities, such as tablets (WIFI version), smart watches, smart screens, and laptops, so that users can
- the cellular communication function is normally used in the device without the cellular communication capability.
- the tablet can implement multiple functions such as making calls, sending and receiving text messages, and one-key application login based on the shared cellular communication function of the mobile phone.
- Embodiments of the present application provide a method and device for using cellular communication functions, which can subdivide and share various cellular communication capabilities independently, and at the same time match appropriate cellular communication capabilities according to different usage scenarios of users to enhance cellular communication functions Intelligent, reduce unnecessary standby power consumption, and then improve the user's experience of using the cellular communication function.
- the embodiment of the present application provides a method for using the cellular communication function, the method includes: the first device establishes a connection with the second device; the first device identifies the target scene where the first device is located; One of the multiple defined scenarios, any scenario corresponds to the cellular communication function that is allowed to be enabled when the cellular communication is shared; the first device determines the target cellular communication function that is allowed to be enabled according to the target scenario; the first device corresponds to the target cellular communication function
- the interface is added to the preset interface list; when the first device receives the cellular communication service data, the first device determines whether the interface corresponding to the cellular communication service data meets the preset interface list; the first device according to the preset interface list Determine whether to forward cellular communication service data.
- the first device can subdivide various cellular communication capabilities and share them independently. At the same time, it can match appropriate cellular communication capabilities according to different usage scenarios of users, enhance the intelligence of cellular communication functions, and reduce unnecessary standby functions. Consumption, thereby improving the user's experience in using the cellular communication function.
- first device determines the target cellular communication function corresponding to the target scene from the first correspondence; the first device determines the target cellular communication function that is allowed to be enabled. In this way, the first device can quickly match the cellular communication function corresponding to the target scene according to the preset first correspondence relationship, thereby improving the user experience of using the cellular communication function.
- the first correspondence is set in the distributed cellular communication module of the first device, and the first correspondence is also set in the distributed cellular communication module of the second device; the distribution of the first device
- the distributed cellular communication module is set in the application framework layer or system library of the first device
- the distributed cellular communication module of the second device is set in the application framework layer or system library of the second device.
- multiple sets of second correspondences are set in the first device, and any set of second correspondences is used to indicate the correspondence between cellular communication functions and interfaces, and the first device sets the target cell
- the interface corresponding to the communication function is added to the preset interface list, including: the first device determines the interface corresponding to the target cellular communication function according to the second correspondence; the first device adds the interface corresponding to the target cellular communication function to the preset interface list .
- the first device can quickly match the interface corresponding to the target cellular communication function, and by setting the preset interface list, the independent management and control of the cellular communication function can be realized, and the intelligence of the cellular communication function can be enhanced.
- the second correspondence is set in the distributed cellular communication module of the first device, and the second correspondence is set in the distributed cellular communication module of the second device; the distributed cellular communication module of the first device
- the cellular communication module is set in the application framework layer or system library of the first device
- the distributed cellular communication module of the second device is set in the application framework layer or system library of the second device.
- the first device determines whether to forward the cellular communication service data according to the preset interface list, including: when the interface corresponding to the cellular communication service data satisfies the first type of interface, and the interface corresponding to the cellular communication service data When the preset interface list is satisfied, the first device forwards the cellular communication service data to the second device; or, when the interface corresponding to the cellular communication service data meets the first type of interface, and the interface corresponding to the cellular communication service data does not meet the preset
- the first device sends a first message to the application corresponding to the cellular communication service data; the first message is used to indicate that the first device does not support the processing of the cellular communication service data. In this way, the first device can flexibly process the cellular communication service data according to the interface type corresponding to the cellular communication service data.
- the first type of interface may be the request type interface in the embodiment of the present application
- the second type of interface may be the reporting type interface in the embodiment of the present application.
- the first device determines whether to forward the cellular communication service data according to the preset interface list, including: when the interface corresponding to the cellular communication service data satisfies the second type of interface, and the interface corresponding to the cellular communication service data When the preset interface list is satisfied, the first device forwards the cellular communication service data to the application corresponding to the cellular communication service data; or, when the interface type corresponding to the cellular communication service data meets the second type of interface, and the cellular communication service data corresponds to the application When the interface type does not meet the preset interface list, the first device discards the cellular communication service data. In this way, the first device can flexibly process the cellular communication service data according to the interface type corresponding to the cellular communication service data.
- the method further includes: the first device receives a first operation for the first application; the first operation is used to set a scene applicable to cellular communication sharing; in response to the first operation, the first device displays the first An interface; the first interface includes the target scene; the first device receives the second operation for the target scene; in response to the second operation, the first device displays the second interface; the second interface includes the cellular communication that is allowed to be turned on when the cellular communication is shared Communication function; the first device receives a third operation on the cellular communication function in the second interface; in response to the third operation, the first device sets a target cellular communication function that is allowed to be turned on in the target scene.
- the first device can support the user to flexibly set the scene and the cellular communication function, so that the target cellular communication function enabled based on the user setting can be more in line with the user experience.
- the method further includes: when the first device determines that there is no target cellular communication function that is allowed to be turned on in the target scene, the first device sends a prompt message to the second device; the prompt message is used to indicate that the first device does not Support cellular communication function. In this way, the first device can send a prompt message to the second device, so that the second device can sense the use of the cellular communication function in a timely manner, and handle special situations in a timely manner.
- the embodiment of the present application provides a device for using the cellular communication function, the communication unit is used to establish a connection with the second device; the processing unit is used to identify the target scene where the first device is located; wherein the target scene is One of the multiple predefined scenarios, any scenario corresponds to the cellular communication function that is allowed to be turned on when the cellular communication is shared; the processing unit is also used to determine the target cellular communication function that is allowed to be turned on according to the target scene; the processing unit is also used to The interface corresponding to the target cellular communication function is added to the preset interface list; when the first device receives the cellular communication service data, the processing unit is also used to determine whether the interface corresponding to the cellular communication service data satisfies the preset interface list ; The processing unit is also used to determine whether to forward the cellular communication service data according to the preset interface list.
- first device multiple sets of first correspondences are set in the first device, and any set of first correspondences is used to indicate a scene and a correspondence with a cellular communication function, and the processing unit is specifically used to From the first correspondence, determine the target cellular communication function corresponding to the target scene; the processing unit is also specifically configured to determine the target cellular communication function that is allowed to be turned on.
- the first correspondence is set in the distributed cellular communication module of the first device, and the first correspondence is also set in the distributed cellular communication module of the second device; the distribution of the first device
- the distributed cellular communication module is set in the application framework layer or system library of the first device
- the distributed cellular communication module of the second device is set in the application framework layer or system library of the second device.
- any set of second correspondences is used to indicate the correspondence between the cellular communication function and the interface
- the processing unit is specifically used to Determine the interface corresponding to the target cellular communication function according to the second correspondence; the processing unit is also specifically configured to add the interface corresponding to the target cellular communication function to a preset interface list.
- the second correspondence is set in the distributed cellular communication module of the first device, and the second correspondence is set in the distributed cellular communication module of the second device; the distributed cellular communication module of the first device
- the cellular communication module is set in the application framework layer or system library of the first device
- the distributed cellular communication module of the second device is set in the application framework layer or system library of the second device.
- the communication unit when the interface corresponding to the cellular communication service data satisfies the first type of interface, and the interface corresponding to the cellular communication service data satisfies the preset interface list, the communication unit is specifically used to transfer the cellular communication service data to Forwarding to the second device; or, when the interface corresponding to the cellular communication service data satisfies the first type of interface, and the interface corresponding to the cellular communication service data does not meet the preset interface list, the communication unit is also specifically used to send the cellular communication service The application corresponding to the data sends a first message; the first message is used to indicate that the first device does not support processing of cellular communication service data.
- the communication unit when the interface corresponding to the cellular communication service data satisfies the second type of interface, and the interface corresponding to the cellular communication service data satisfies the preset interface list, the communication unit is specifically used to transfer the cellular communication service data to Forwarding to the application corresponding to the cellular communication service data; or, when the interface type corresponding to the cellular communication service data meets the second type of interface, and the interface type corresponding to the cellular communication service data does not meet the preset interface list, the processing unit specifically uses for discarding cellular communication service data.
- the processing unit is further configured to receive a first operation for the first application; the first operation is used to set a scenario applicable to cellular communication sharing; in response to the first operation, the display unit is configured to Displaying the first interface; the first interface includes a target scene; the processing unit is also used to receive a second operation for the target scene; in response to the second operation, the display unit is also used to display the second interface; the second interface includes The cellular communication function that is allowed to be turned on when the cellular communication is shared; the processing unit is also used to receive the third operation for the cellular communication function in the second interface; in response to the third operation, the processing unit is also used to set the permission to be turned on in the target scene target cellular communication capabilities.
- the communication unit when the first device determines that there is no target cellular communication function that is allowed to be turned on in the target scene, the communication unit is further configured to send a prompt message to the second device; the prompt message is used to indicate that the first device does not Support cellular communication function.
- an embodiment of the present application provides a device for using a cellular communication function, the device includes a processor and a memory, the memory is used to store code instructions, and the processor is used to run the code instructions to execute the first aspect or the first aspect The methods described in any one of the possible implementations.
- an embodiment of the present application provides a computer-readable storage medium, in which a computer program or instruction is stored, and when the computer program or instruction is run on a computer, the computer executes the first aspect or the first aspect.
- a computer program or instruction is stored, and when the computer program or instruction is run on a computer, the computer executes the first aspect or the first aspect.
- the embodiment of the present application provides a computer program product including a computer program.
- the computer program runs on the computer, the computer executes the method described in the first aspect or any possible implementation of the first aspect. .
- the present application provides a chip or a chip system, the chip or chip system includes at least one processor and a communication interface, the communication interface and the at least one processor are interconnected through lines, and the at least one processor is used to run computer programs or instructions, To perform the method described in the first aspect or any possible implementation manner of the first aspect; wherein, the communication interface in the chip may be an input/output interface, a pin, or a circuit.
- the chip or chip system described above in the present application further includes at least one memory, and instructions are stored in the at least one memory.
- the memory may be a storage unit inside the chip, such as a register, a cache, etc., or a storage unit of the chip (eg, a read-only memory, a random access memory, etc.).
- FIG. 1 is a schematic diagram of a scene provided by an embodiment of the present application.
- FIG. 2 is a schematic diagram of another scenario provided by the embodiment of the present application.
- FIG. 3 is a schematic diagram of a hardware structure of an electronic device provided in an embodiment of the present application.
- FIG. 4 is a schematic diagram of a hardware structure of another electronic device provided by an embodiment of the present application.
- FIG. 5 is a schematic diagram of a system architecture of a system for using a cellular communication function provided by an embodiment of the present application
- FIG. 6 is a schematic diagram of a path of a cellular communication service request at the application framework layer provided by an embodiment of the present application
- FIG. 7 is a schematic diagram of a system architecture of another system for using a cellular communication function provided by an embodiment of the present application.
- FIG. 8 is a schematic diagram of a system architecture of another system for using a cellular communication function provided by an embodiment of the present application.
- FIG. 9 is a schematic flowchart of a method for using a cellular communication function provided by an embodiment of the present application.
- FIG. 10 is a schematic diagram of another scenario provided by the embodiment of the present application.
- FIG. 11 is a schematic diagram of an interface for setting cellular communication capabilities provided by an embodiment of the present application.
- FIG. 12 is a schematic diagram of another interface for setting cellular communication capabilities provided by the embodiment of the present application.
- FIG. 13 is a schematic flowchart of another method for using a cellular communication function provided by an embodiment of the present application.
- FIG. 14 is a schematic structural diagram of a device for using a cellular communication function provided by an embodiment of the present application.
- FIG. 15 is a schematic diagram of a hardware structure of a control device provided in an embodiment of the present application.
- FIG. 16 is a schematic structural diagram of a chip provided by an embodiment of the present application.
- words such as “first” and “second” are used to distinguish the same or similar items with basically the same function and effect.
- the first value and the second value are only used to distinguish different values, and their sequence is not limited.
- words such as “first” and “second” do not limit the quantity and execution order, and words such as “first” and “second” do not necessarily limit the difference.
- At least one means one or more, and “multiple” means two or more.
- “And/or” describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B, which can mean: A exists alone, A and B exist at the same time, and B exists alone, where A, B can be singular or plural.
- the character “/” generally indicates that the contextual objects are an “or” relationship.
- “At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items.
- At least one item (piece) of a, b, or c can represent: a, b, c, a and b, a and c, b and c, or a, b and c, wherein a, b, c can be single or multiple.
- the cellular communication capability is provided by the modem processor (Modem).
- the Modem runs on the baseband chip and the coprocessor. Through the Modem, the device can support the functions of sending and receiving short messages, 5G related functions, making calls, answering calls, and accessing the Internet for data services.
- a series of cellular communication functions (or called cellular communication capabilities), such as the ability to read subscriber identification modules (SIM), and the ability to log in with one key.
- SIM subscriber identification modules
- a user when using a device with cellular communication capability, a user can trigger a local application to realize a series of cellular communication functions; or, when a device with cellular communication capability shares the cellular communication capability with a device without cellular communication capability
- the device without cellular communication capability can also use the Modem in the device with cellular communication capability to implement the above series of cellular communication functions.
- the device without cellular communication capability when a device with cellular communication capability has shared its own cellular communication capability with a device without cellular communication capability (that is, sharing the Modem of the device with cellular communication capability), the device without cellular communication capability Based on the Modem in the device with cellular communication capability, the device can use all cellular communication capabilities of the device with cellular communication capability, that is, be able to use all cellular communication functions.
- the cellular communication capabilities required by users may be different.
- a device with cellular communication capability such as a mobile phone
- a device without cellular communication capability such as a tablet
- it may not be necessary Affected by external factors, for example, the function of receiving text messages and incoming calls provided by the mobile phone may not be required; or, when the user is resting at night, the data service Internet access function provided by the mobile phone may not be required.
- the device without the cellular communication capability cannot implement unified management and control of all cellular communication capabilities in different service scenarios, the flexibility of using the cellular communication function is poor. Therefore, on the basis of having the ability to use all cellular communication, the device also needs to support independent management of various cellular communication functions, so that each cellular communication function can be dynamically and independently enabled and disabled for sharing.
- the embodiment of the present application provides a method for using the cellular communication function, which can subdivide various cellular communication capabilities and share them independently.
- the intelligence of communication sharing reduces unnecessary standby power consumption.
- the proxy scene is a design pattern used to provide additional access to the target object by creating a proxy object of the target object.
- the target object is an interface, such as a hardware abstraction layer interface definition language (HAL interface definition language, HIDL) interface. Accessing the target object through the proxy object can provide additional functional operations through the proxy object without modifying the original target object, and expand the functions of the original target object.
- the proxy mode is to set a proxy object as an intermediate proxy to control access to the original target object, so as to achieve the purpose of enhancing the function of the original target object and simplifying the access process.
- an application in the application layer of an electronic device with cellular communication capability triggers a request for a cellular communication service, and the request for the cellular communication service is sent from the local
- the application layer is sent to the local application framework layer, and then the local application framework layer calls the HIDL interface on the local system library, and then sends the cellular communication service request to the local Modem (Modem) through the local HIDL interface
- Modem Modem
- the local Modem also actively reports the cellular communication service to the application framework layer through the local HIDL interface, and then the application framework layer continues to report the cellular communication service to the application corresponding to the cellular communication service.
- cellular communication services such as calls, short messages, SIM card changes, call transfers, etc.
- cellular communication services may be referred to as cellular communication services.
- the HIDL interface mentioned in the scheme of using the local cellular communication function by the electronic device with cellular communication capability can be divided into three categories according to the call direction: the call direction of the first category is the application program layer and the application program framework layer
- the request of the cellular communication service on the application side is actively sent to the invocation direction of the Modem side.
- the second type of invocation direction is the direction in which the Modem side reports the response data corresponding to the request for the cellular communication service initiated by the application side to the application side.
- the call direction of the three types is the direction in which the modem side actively reports the notification of the cellular communication service to the application side.
- FIG. 1 is a schematic diagram of a scenario provided in the embodiment of the present application, and the method for using the cellular communication function provided in the embodiment of the present application may be applicable to the scenario shown in FIG. 1 .
- a device capable of cellular communication may be the mobile phone 11 in FIG. 1 .
- the device without cellular communication capability (or referred to as the first device) can be smart devices such as tablet 12, smart glasses 13, smart watch 14, smart speaker 15, smart screen 16, or notebook computer 17 in FIG. 1 .
- the mobile phone 11 can respectively establish connections with the tablet 12, smart glasses 13, smart watch 14, smart speaker 15, smart screen 16, and notebook computer 17, and communicate with the tablet 12, smart glasses 13, smart watch 14, smart The speaker 15, the smart screen 16, and the notebook computer 17 provide the cellular communication capability of the mobile phone 11.
- the mobile phone 11 can also provide a media player (such as MP3, MP4, etc.), an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a personal digital assistant (personal digital assistant, PDA), a wireless headset , smart bracelet, wireless car, augmented reality (augmented reality, AR)/virtual reality (virtual reality, VR) equipment or TV and other equipment provide the cellular communication capability of the mobile phone 11.
- a media player such as MP3, MP4, etc.
- an ultra-mobile personal computer ultra-mobile personal computer
- UMPC ultra-mobile personal computer
- PDA personal digital assistant
- wireless headset augmented reality
- smart bracelet wireless car
- wireless car augmented reality (augmented reality, AR)/virtual reality (virtual reality, VR) equipment or TV and other equipment
- augmented reality augmented reality, AR
- VR virtual reality
- the mobile phone 11 can establish a connection with other smart devices in FIG. Smart screen 16
- notebook computer 17 and other smart devices without cellular communication capability can use the cellular communication capability of mobile phone 11 to realize all cellular communication functions.
- the tablet 12 can obtain the status of the cellular communication network in the mobile phone 11, and then the tablet 12 can automatically choose to use the wireless network or the cellular communication network to surf the Internet according to the status of the cellular communication network.
- the smart screen 16 can use the SIM card in the mobile phone 11 to make and receive calls.
- FIG. 2 is a schematic diagram of another scenario provided by the embodiment of the present application.
- the method for using the cellular communication function provided in the embodiment of the present application may also be applicable to the scenario shown in FIG. 2 .
- the first device may be a mobile phone 21
- the second device may be a mobile phone 22 and a mobile phone 23
- the mobile phone 21 establishes connections with multiple mobile phones such as the mobile phone 22 and the mobile phone 23 respectively.
- the mobile phone 21 can use any SIM card in the mobile phone 22 and the mobile phone 23 to make and receive calls, and can also arbitrarily choose to use the cellular communication network of the mobile phone 22 and the mobile phone 23 to surf the Internet.
- the first device may also be a mobile phone, a tablet computer, a desktop, a laptop, a notebook computer, an Ultra-mobile Personal Computer (UMPC), a handheld computer, a netbook, a personal digital assistant ( Personal Digital Assistant, PDA), wearable electronic devices, smart watches and other electronic devices
- the second device is mobile phones, smart watch watches and other electronic devices with cellular communication capabilities.
- This application does not make special restrictions on the specific forms of the above-mentioned electronic devices.
- the first device in the embodiments of the present application refers to the user of the cellular communication capability of the second device, and the second device refers to the provider of the cellular communication capability.
- FIG. 3 is a schematic diagram of a hardware structure of an electronic device provided in an embodiment of the present application.
- the second device is generally referred to as an electronic device in FIG. Serial bus (universal serial bus, USB) interface 330, antenna 1, antenna 2, mobile communication module 350, wireless communication module 360, audio module 370, sensor module 380, camera 393, display screen 394, and subscriber identification module (subscriber identification module, SIM) card interface 395, etc.
- Serial bus universal serial bus, USB
- the structure shown in this embodiment does not constitute a specific limitation on the electronic device.
- the electronic device may include more or fewer components than shown, 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 310 may include one or more processing units, for example: the processor 310 may include an application processor (application processor, AP), a Modem, 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.
- the processor 310 may execute any method for using the cellular communication function in the embodiment of the present application.
- a memory may also be provided in the processor 310 for storing instructions and data.
- processor 310 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 I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL).
- the I2S interface can be used for audio communication.
- the PCM interface can also be used for audio communication, sampling, quantizing and encoding the analog signal.
- the UART interface is a universal serial data bus used for asynchronous communication.
- the MIPI interface can be used to connect the processor 310 with peripheral devices such as the display screen 394 and the camera 393 .
- the GPIO interface can be configured by software.
- the GPIO interface can be configured as a control signal or as a data signal.
- the USB interface 330 is an interface conforming to the USB standard specification, specifically, it may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
- the interface connection relationship among the modules shown in this embodiment 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 wireless communication function of the electronic device can be realized by the antenna 1, the antenna 2, the mobile communication module 350, the wireless communication module 360, the Modem 310A, and the baseband processor.
- Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
- the mobile communication module 350 can provide wireless communication solutions including 2G/3G/4G/5G applied to electronic devices.
- the mobile communication module 350 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
- at least part of the functional modules of the mobile communication module 350 may be set in the processor 310 .
- at least part of the functional modules of the mobile communication module 350 and at least part of the modules of the processor 310 may be set in the same device.
- Modem 310A may include a modulator and a demodulator.
- the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal.
- the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing.
- the low-frequency baseband signal is passed to the application processor after being processed by the baseband processor.
- the application processor outputs sound signals through audio equipment (not limited to speakers, receivers, etc.), or displays images or videos through the display screen 394 .
- Modem 310A may be a stand-alone device.
- the Modem 310A can be independent of the processor 310 and be set in the same device as the mobile communication module 350 or other functional modules.
- the electronic device when the electronic device is the first device shown in FIG. 1, it may not have Modem 310A, but when the electronic device is the second device shown in FIG. 1, Modem 310A is required, so that Cellular communication capabilities are provided to the first device.
- Modem 310A when the electronic device is the second device shown in Figure 1, Modem 310A can be the second device in any method for using the cellular communication function mentioned in the following embodiments of the present application Modem.
- the wireless communication module 360 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.
- WLAN wireless local area networks
- Wi-Fi wireless fidelity
- BT Bluetooth
- global navigation satellite system global navigation satellite system, GNSS
- frequency modulation frequency modulation, FM
- NFC near field communication technology
- infrared technology infrared, IR
- the antenna 1 of the electronic device is coupled to the mobile communication module 350, and the antenna 2 is coupled to the wireless communication module 360, so that the electronic device can communicate with the network and other devices through wireless communication technology.
- Wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband code division Multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM , and/or IR technology, etc.
- GNSS can include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou satellite navigation system (beidou navigation satellite system, BDS), 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 satellite navigation system beidou navigation satellite system, BDS
- quasi-zenith satellite system quasi-zenith satellite system
- QZSS quasi-zenith satellite system
- SBAS satellite based augmentation systems
- the display screen 394 is used to display images, videos and the like.
- Display 394 includes a display panel.
- a series of graphical user interface (graphical user interface, GUI) can be displayed on the display screen 394 of the electronic device, and these GUIs are the main screen of the electronic device.
- the electronic device can realize the shooting function through ISP, camera 393 , video codec, GPU, display screen 394 and application processor.
- Camera 393 is used to capture still images or video.
- the electronic device may include 1 or N cameras 393, where N is a positive integer greater than 1.
- the external memory interface 320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device.
- an external memory card such as a Micro SD card
- the internal memory 331 may be used to store computer-executable program codes including instructions.
- the electronic device may include an audio module 370, and the audio module 370 may include: a speaker, a receiver, a microphone, an earphone interface, and an application processor to implement audio functions. Such as music playback, recording, etc.
- the electronic device may include a sensor module 380, and the sensor module 380 may include: a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor , bone conduction sensors, etc.
- the acceleration sensor and the gyroscope sensor can be used to detect the motion state of the electronic device; the touch sensor is used to receive the user's touch operation on the touch screen.
- the SIM card interface 395 is used for connecting a SIM card.
- the SIM card can be inserted into the SIM card interface 395 or pulled out from the SIM card interface 395 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.
- SIM card interface 395 can support Nano SIM card, Micro SIM card, SIM card etc. Multiple cards can be inserted into the same SIM card interface 395 at the same time. The types of multiple cards may be the same or different.
- the SIM card interface 395 is also compatible with different types of SIM cards.
- the SIM card interface 395 is also compatible with external memory cards.
- the electronic device interacts with the network through the SIM card to realize functions such as calling and data communication.
- the electronic device adopts an eSIM, that is, an embedded SIM card.
- the eSIM card can be embedded in the electronic device and cannot be separated from the electronic device.
- an operating system runs on top of the above components.
- Hongmeng operating system iOS operating system, Android operating system, or Windows operating system.
- Applications can be installed and run on this operating system.
- FIG. 4 is a schematic diagram of a hardware structure of another electronic device provided in an embodiment of the present application.
- the structure of the first device may be as shown in FIG. 4 , and the first device is generally referred to as an electronic device for introduction in FIG. 4 .
- the first device may be a tablet without Modem capability.
- an electronic device may include multiple subsystems that cooperate to perform, coordinate or monitor one or more operations or functions of the electronic device.
- the electronic device includes a processor 410 , an input surface 420 , a coordination engine 430 , a power subsystem 440 , a power connector 450 , a wireless interface 460 and a display 470 .
- the coordination engine 430 can be used to communicate with other subsystems of the electronic device and/or process data.
- the coordination engine 430 of the electronic device includes or is otherwise communicatively coupled to a sensor layer underlying or integrated with the input surface 420 .
- input surface 420 may be referred to as a touch screen.
- the end signal and/or the ring signal may also include specific information and/or data for enabling the electronic device to identify a specific user. Such information is generally referred to herein as "user-identifying" information.
- Coordination engine 430 may forward user identity information (if detected and/or recoverable) to processor 410 . If the user identity information cannot be recovered from the tip signal and/or the ring signal, the coordination engine 430 may optionally indicate to the processor 410 that the user identity information is not available. Processor 410 can utilize user identity information (or the absence of such information) in any suitable manner, including but not limited to: accepting or denying input from a specific user, allowing or denying access to specific functions of the electronic device, and the like. Processor 410 may use user identity information to receive input from more than one user at a time.
- the processor 410 may be configured to perform, coordinate and/or manage functions of the electronic device. Such functions may include, but are not limited to: communicating and/or transacting data with other subsystems of the electronic device, communicating data and/or transacting data over a wireless interface, communicating data and/or transacting data over a wired interface, facilitating communication over a wireless (eg, inductive, resonant, etc.) or wired interface for power exchange, etc.
- a wireless eg, inductive, resonant, etc.
- Processor 410 may be implemented as any electronic device capable of processing, receiving or sending data or instructions.
- a processor may be a microprocessor, central processing unit, application specific integrated circuit, field programmable gate array, digital signal processor, analog circuit, digital circuit, or a combination of these devices.
- Processors can be single-threaded or multi-threaded.
- Processors can be single-core or multi-core processors.
- processor 410 may be configured to access memory storing instructions.
- the instructions may be configured to cause the processor to perform, coordinate or monitor one or more operations or functions of the electronic device.
- the instructions stored in the memory may be configured to control or coordinate the operation of other components of the electronic device such as, but not limited to: another processor, analog or digital circuitry, volatile or non-volatile memory modules, display , speakers, microphones, rotary input devices, buttons or other physical input devices, biometric authentication sensors and/or systems, force or touch input/output components, communication modules (such as wireless interfaces and/or power connectors), and/or haptic or haptic feedback devices.
- the electronic device also includes a power subsystem 440 .
- Power subsystem 440 may include a battery or other power source.
- the electronic device also includes a wireless interface 460 .
- the communication interface facilitates electronic communication between the electronic device and an external communication network, device or platform.
- Wireless interface 460 may be implemented as one or more of a wireless interface, a Bluetooth interface, a near field communication interface, a magnetic interface, a universal serial bus interface, an inductive interface, a resonant interface, a capacitive coupling interface, a Wi-Fi interface, a TCP/IP interface , network communication interface, optical interface, acoustic interface or any traditional communication interface.
- the electronic device also includes a display 470 .
- Display 470 may be located behind input surface 420, or may be integrated therewith.
- Display 470 may be communicatively coupled to processor 410 .
- Processor 410 may present information to a user using display 470 .
- FIG. 5 is a schematic diagram of a system architecture of a system for using a cellular communication function provided in an embodiment of the present application.
- the layered architecture of the first device 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 etc. from top to bottom.
- the Android system may further include a hardware layer (not shown in FIG. 5 ).
- the application program layer may include a series of application program packages.
- the application package may include application programs such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, game, video, and short message.
- 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. As shown in Figure 1, the application framework layer may include a window manager, a content provider, a view system, a distributed cellular communication module 5011, a telephony manager (telephony) 5012, a distributed bus 5013, a resource manager, and a notification manager wait.
- 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.
- Data can include videos, 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 5012 is used to provide the cellular communication function of the first device. For example, the management of the call state (including connecting, hanging up, etc.).
- the distributed cellular communication module 5011 is used to forward the cellular communication service request of the phone manager 5012 to the distributed cellular communication module 5022 of the second device.
- the distributed cellular communication module 5011 may store a configuration file, and the configuration file includes the correspondence between scene information, cellular communication functions, and HIDL interfaces.
- any scenario may correspond to one or more cellular communication functions
- any cellular communication function may correspond to one or more HIDL interfaces.
- the HIDL interface may be a request type interface and/or a report type interface.
- the distributed bus 5013 is used to establish a connection channel between the distributed cellular communication module 5011 of the first device and the distributed cellular communication module 5022 of the second device, and connect the distributed cellular communication module 5011 of the first device with the distributed cellular communication module 5011 of the second device. cellular communication module 5022 .
- the distributed bus 5013 may be responsible for device discovery, self-connection, authentication management, etc. under the same account in the short distance, local area network, or far field. It can also be responsible for scheduling management of different channels, service quality experience evaluation, etc., transparent to the application layer. It can also be responsible for the maintenance of the channel and provide a low-power standby mechanism.
- control plane signaling such as the request of the cellular communication service mentioned in the embodiment of the present application, and the response data corresponding to the request of the cellular communication service
- encryption encapsulation and the like.
- 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 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), HAL, and RIL modules on HAL, etc.
- surface manager surface manager
- media library media libraries
- 3D graphics processing library eg: OpenGL ES
- 2D graphics engine eg: SGL
- HAL head-to-headset
- RIL modules on HAL etc.
- a HIDL interface is also provided on the RIL module.
- 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, H.265, H.266, VP9, 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.
- 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 layered architecture of the second device also 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, from top to bottom are application program layer, application program framework layer, Android runtime (Android runtime) and system library, kernel layer, and Modem5021.
- the application program layer may include a series of application program packages.
- the application package may include application programs such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, game, video, and short message.
- 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. As shown in Figure 1, the application framework layer may include window manager, content provider, view system, distributed cellular communication module 5022, phone manager 5023, distributed bus 5024, resource manager, notification manager, etc.
- 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.
- Data can include videos, 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.
- the telephony manager 5023 can be used to provide the cellular communication functionality of the second device. For example, the management of call status (including connected, hung up, etc.).
- the local cellular communication service request received by the phone manager 5023 can be sent to the distributed cellular communication module 5022 of the second device, and the distributed cellular communication module 5022 will continue to send the local cellular communication service request to the Modem 5021 for further processing. deal with.
- the distributed cellular communication module 5022 is configured to send the request of the cellular communication service sent by the first device to the Modem 5021 for processing, and send the response data corresponding to the request of the cellular communication service to the first device.
- the functions of the distributed cellular communication module 5022 of the second device in this embodiment of the application may refer to the following description of the distributed cellular communication module 5022 of the second device in the system for using the cellular communication function.
- the principle and execution process of the distributed bus 5024 of the second device are consistent with the distributed bus 5013 of the first device, which can be referred to, and will not be repeated here.
- 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 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.
- 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 Modem 5021 is configured to process the received request of the cellular communication service, obtain the response data corresponding to the request of the cellular communication service, and then send the response data corresponding to the request of the cellular communication service to the distributed cellular communication module 5022 .
- an embodiment of the present application proposes a system for using a cellular communication function.
- the system for using the cellular communication function includes: a first device and a second device, a distributed cellular communication module 5011 and a phone manager 5012 are set in the application framework layer of the first device, and a distributed cellular communication module 5011 and a phone manager 5012 are also set in the application framework layer of the second device There is a distributed cellular communication module 5022 and a phone manager 5023, and the second device also has a Modem 5021.
- a connection is established between the distributed cellular communication module 5011 of the first device and the distributed cellular communication module 5022 of the second device through the distributed bus 5013 of the first device and the distributed bus 5024 of the second device.
- the processing process of the request for the cellular communication service in the system of FIG. 5 may be : the first device triggers the request of the cellular communication service, and executes step S5012, the first device sends the request of the cellular communication service to the local phone manager, and in step S5013, the phone manager of the first device sends the cellular communication service The service request is sent to the local distributed cellular communication module.
- the distributed cellular communication module of the first device forwards the request for the cellular communication service to the distributed cellular communication module of the second device.
- the second device executes step S5015, the distributed cellular communication module of the second device sends the request of the cellular communication service to the local Modem of the second device for processing, and the Modem of the second device obtains the response data corresponding to the request of the cellular communication service.
- the transmission process of the request of the cellular communication service in the system may be shown as the path of the solid line shown in FIG. 5: the short message application in the application layer of the first device triggers the request of the cellular communication service, and the The request for cellular communication service may be a request to send a short message.
- the first device executes step S5012, sending the request for the cellular communication service triggered by the application layer to the local phone manager 5012.
- step S5013 the phone manager 5012 of the first device sends the cellular communication request to the distributed cellular communication module 5011 of the first device, and in step S5014, the distributed cellular communication module 5011 of the first device sends the cellular communication request to the phone
- the cellular communication service request received by the manager 5012 is forwarded to the distributed cellular communication module 5022 of the second device.
- step S5015 the distributed cellular communication module 5022 of the second device sends the request for the cellular communication service to the local Modem 5021 for processing.
- the distributed cellular communication module 5022 of the second device calls the hardware abstraction layer interface definition through the radio interface layer (radio layer interface, RIL) module on the hardware abstraction layer (hardware abstraction layer, HAL) of the system library
- RIL radio interface layer
- HAL hardware abstraction layer
- the language (HAL interface definition language, HIDL) interface transmits the request of the cellular communication service to the local Modem 5021 for processing. After the Modem 5021 processes the request of the cellular communication service, it will obtain the response data corresponding to the request of the cellular communication service.
- the request for the cellular communication service of the first device may not be sent to the distributed cellular communication module 5011 through the phone manager 5012, for example, the IP multimedia subsystem (IP multimedia subsystem, IMS) may be in the application
- IP multimedia subsystem IP multimedia subsystem, IMS
- the layer directly invokes the distributed cellular communication module 5011, that is, the request for the cellular communication service is directly sent from the application layer to the distributed cellular communication module 5011.
- upper-layer applications that is, the application program layer and the application program framework layer
- the processing process of the response data corresponding to the request of the cellular communication service in the system of FIG. 5 may be: in step S5021, the Modem of the second device sends the response data corresponding to the request of the cellular communication service to the local For the distributed cellular communication module, in step S5022, the distributed cellular communication module of the second device sends the response data corresponding to the cellular communication service request to the distributed cellular communication module of the first device.
- step S5023 the distributed cellular communication module of the first device sends the response data corresponding to the request for the cellular communication service to the local phone manager, and in step S5024, the phone manager of the first device sends the response data corresponding to the request for the cellular communication service Response data is sent to the requesting application that triggered the cellular communication service.
- the transmission path of the response data corresponding to the request of the cellular communication service may be shown as the dotted path in FIG. 5: in step S5021, the Modem 5021 of the second device transmits the response data corresponding to the request of the cellular communication service to the Type cellular communication module 5022.
- the Modem 5021 of the second device calls the HIDL interface through the RIL module in the system library to transmit the response data corresponding to the request of the cellular communication service to the distribution network.
- the distributed cellular communication module 5022 in step S5022, the distributed cellular communication module 5022 transmits the response data corresponding to the request of the cellular communication service to the distributed cellular communication module 5011 of the first device, in step S5023, the distributed cellular communication module of the first device
- the cellular communication module 5011 sends the response data corresponding to the request of the cellular communication service to the phone manager 5012.
- the phone manager 5012 transmits the response data corresponding to the request of the cellular communication service to the short message application.
- the communication connection can be established in a wired form, and the communication connection can also be established in a wireless form .
- the first device is a tablet 12 and the second device is a mobile phone 11
- the mobile phone 11 and the tablet 12 can establish a wireless connection through Bluetooth, and can also establish a communication connection by connecting to the same wireless Wi-Fi.
- the difference in the way of establishing the communication connection between the first device and the second device does not affect the implementation of the embodiment of the present application.
- the request of the cellular communication service of the first device can be forwarded to the Modem 5021 of the second device for processing through the distributed cellular communication module 5011 of the first device, and the distributed cellular communication module 5022 of the second device can pass the cellular communication service request
- the method of sending the response data corresponding to the request to the distributed cellular communication module 5011 of the first device realizes the transmission of the response data corresponding to the request of the cellular communication service to the first device, so that the first device can use the All cellular communication capabilities, that is, the ability to use all cellular communication functions.
- the telephone manager 5012 may also include: an interface of the development kit, a service (telephony service) interface of the telephone manager, and an access interface of the radio interface (Radio Interface), etc. .
- FIG. 6 is a schematic diagram of a path of a request for a cellular communication service at an application framework layer according to an embodiment of the present application.
- the sending process of the request of the first device's cellular communication service in the application framework layer is: the request of the first device's cellular communication service calls the Android open source code project in the phone manager through the request of the cellular communication service (android open source project, AOSP) development kit (software development kit, SDK) application programming interface (application programming interface, API), and then AOSP SDK API calls the service interface of the phone manager again, and then the service of the phone manager
- the access interface of the radio interface is called again, and then sent to the distributed cellular communication module of the first device by the access interface of the radio interface, and the distributed cellular communication module of the first device implements the request of receiving the cellular communication service of the local phone manager.
- the distributed cellular communication module of the first device pre-creates the proxy object of the request interface, it can proxy the access interface of the radio interface
- the distributed cellular communication module 5011 of the first device may also be set in the RIL module of the system library; suitably, the distributed cellular communication module 5022 of the second device may be Set in the Vendor Radio Interface Layer (Vendor-RIL) of the system library.
- Vendor-RIL Vendor Radio Interface Layer
- FIG. 7 is a schematic diagram of a system architecture of another system for using a cellular communication function provided by an embodiment of the present application.
- the distributed cellular communication module 701 of the first device can also be set in the RIL module in the system library, and the distributed cellular communication module 702 of the second device can be set in the provider wireless interface layer of the system library (Vendor-RIL).
- the distributed cellular communication module 701 of the first device can establish a connection with the distributed cellular communication module 702 of the second device.
- the distributed cellular communication module 701 of the first device and the distributed cellular communication module of the second device may be established through the distributed bus 703 in the first device and the distributed bus 704 in the second device 702 connections between. Moreover, during the process of the first device sending a cellular communication capability sharing request to the second device, the first device may not need to create a proxy object for the relevant interface, and the second device may not need to create a proxy object for the relevant interface.
- the distributed cellular communication module 701 of the device is pre-configured, so that the distributed cellular communication module 701 of the first device forwards the request for the cellular communication service received through the HIDL on the RIL module to the distributed cellular communication module of the second device. In the cellular communication module 702 .
- the distributed cellular communication module 702 of the second device can forward the response data corresponding to the request of the cellular communication service to the distributed cellular communication of the first device
- Module 701 further forwards the cellular communication service reported by the local Modem to the distributed cellular communication module of the first device.
- the distributed cellular communication module 701 of the first device is set in the RIL of the system library of the first device, and the distributed cellular communication module 702 of the second device is set in the system library of the second device, therefore
- the request of the cellular communication service of the first device (such as a request for sending a short message) is sent from the application layer of the first device to the phone in the application framework layer Manager, then from the phone manager in the application framework layer to the distributed cellular communication module 701 in the system library, and then through the distributed bus 703 of the first device and the distributed bus 704 of the second device, send to
- the distributed cellular communication module 702 in the second device system library the distributed cellular communication module 702 sends the request of the cellular communication service to the local Modem, as shown in the dotted line path in Figure 7: the Modem sends the cellular communication service
- the response data corresponding to the request is sent to the distributed cellular communication module 702, and the distributed
- the distributed cellular communication module 5011 of the first device may also be set in the Vendor-RIL of the system library; suitably, the distributed cellular communication module 5022 of the second device is Can be set in the Vendor-RIL of the system library.
- FIG. 8 is a schematic diagram of a system architecture of another system for using a cellular communication function provided by an embodiment of the present application.
- the distributed cellular communication module 701 of the first device can also be set in the Vendor-RIL in the system library, and the distributed cellular communication module 702 of the second device can be set in the Vendor-RIL in the system library .
- the request (for example, short message sending request) of the cellular communication service of the first equipment is sent from the application program layer of the first equipment to the phone manager in the application program framework layer, then from the application
- the phone manager in the program framework layer goes to the RIL module in the system library, then from the RIL module to the distributed cellular module 501, and then through the distributed bus 703 of the first device and the distributed bus 704 of the second device to send
- the distributed cellular communication module 702 sends the request of the cellular communication service to the local Modem, as shown in the dotted line path in Figure 8: the Modem sends the cellular communication service
- the response data corresponding to the service request is sent to the distributed cellular communication module 702, and the distributed cellular communication module 702 transmits the response data corresponding to the request of the cellular communication service through the distributed bus 704 of the second device and the distributed bus 703 of the first device.
- the data is sent to the distributed cellular communication module 701 of the first device, and then the distributed cellular communication module 701 of the first device sends the response data corresponding to the request of the cellular communication service to the RIL module, and the RIL module continues to send it to the phone manager, Then the phone management sends it to the corresponding application of the first device.
- the transmission path of the cellular communication service is consistent with the dotted line path shown in FIG. 8 , and will not be repeated here.
- FIG. 9 is a schematic flowchart of a method for using a cellular communication function provided in an embodiment of the present application.
- the first device and the second device as electronic devices with an Android operating system as an example, the first device is the demander (or user) of the cellular communication capability, and the second device is the provider of the cellular communication capability.
- both the distributed cellular communication module 5011 of the first device and the distributed cellular communication module 5022 of the second device can be preset with a configuration file, and the configuration file can be preset There are correspondences between scene information, cellular communication functions, and interfaces.
- the scene information may include one or more of the following: work scene, game scene, power saving scene, sleep scene, or boarding scene, etc.;
- the cellular communication function corresponding to any scene may include the following one or Various: basic public functions, caller call function, called call function, short message sending and receiving function, SIM card reading function, or data service Internet access function, etc.;
- the interface corresponding to any cellular communication function may include the following one or Various types: request interface (such as the interface corresponding to the request of the cellular communication service), or the reporting interface (such as the interface corresponding to the notification of the cellular communication service, or the interface corresponding to the response message of the cellular communication service), etc.
- the customization of the scene information and the cellular communication function can be supported, and the update of the scene information and the cellular communication function can also be supported.
- the cellular communication provided in the embodiment of the present application
- the method of using the function is not limited to the above scenarios and the cellular communication function.
- the update of the configuration file in the distributed cellular communication module of the device can realize the update of the scene information and the cellular communication function, so that the first device and the second device can realize Different cellular communication capabilities.
- the method for using the cellular communication function may specifically include the following steps:
- the second device enables a cellular communication capability sharing function.
- the cellular communication capability sharing function refers to the function of sharing the local Modem with other devices. Since the Modem can provide cellular communication capabilities, sharing the local Modem with other devices means sharing the cellular communication capabilities with other devices.
- the second device in this embodiment of the present application refers to an electronic device capable of cellular communication.
- the second device in response to the user's operation, enables the sharing function of the cellular communication capability.
- the second device may enable the sharing function of the cellular communication capability through the distributed cellular communication module of the second device.
- the distributed cellular communication module of the second device may be set at the application framework layer of the second device as shown in the distributed cellular communication module 5022 shown in FIG. 5 .
- step S901 may be executed cooperatively by one or more modules in the second device, and the modules executing step S901 may be located in different framework layers in the second device.
- the second device when the distributed cellular communication module of the second device enables the sharing function of the cellular communication capability, the second device is in a state that can be discovered by other devices, and other devices can know the current status of the second device when they discover the second device.
- the cellular communication capability sharing function is enabled and can be shared by other devices.
- the power-on operation of the second device may trigger the distributed cellular communication module of the second device to enable the cellular communication capability sharing function, or the cellular communication capability sharing function may be enabled by default after the second device is turned on, or The user clicks the on/off button for enabling the cellular communication capability on the interface of the second device, which is not limited in this embodiment of the present application.
- the interface shown in a in FIG. 11 there is a switch button with cellular communication capability on the cellular communication sharing setting interface.
- the switch button 1101 as the interface shown in a in FIG. 11, the cellular The communication capability sharing function is enabled.
- the operation instruction of the user to enable the switch button of the cellular communication capability is transmitted to the distributed cellular communication module of the second device in the application framework layer through the application program layer, so as to trigger the distributed cellular communication module of the second device to enable the sharing function of the cellular communication capability .
- step S901 may not be performed, and the second device enables the cellular communication capability sharing function by default, or automatically enables the cellular communication capability sharing function when a specific condition is detected.
- a specific condition could be the detection of a device of the same brand nearby, or server notifications being turned on, etc.
- the first device searches for devices in the network that enable the cellular communication capability sharing function.
- the first device has a device discovery function, and devices in the network with the cellular communication capability sharing function enabled can be discovered by the first device.
- the first device finds out the devices in the network with the cellular communication capability sharing function enabled, it may also be displayed on the interface of the first device for the user to select.
- the device discovery interface shows available cellular communication devices (that is, devices with the cellular communication capability sharing function enabled in the network), such as device 1 and device 2, which enable cellular communication capability sharing in the network
- Functional devices as shown by the key switch 1102 represent that the user does not use the cellular communication capability of the device 1, and as shown by the switch button 1103, represent that the user chooses the cellular communication capability of the device 2.
- the user can choose to connect the device 1 and the device 2 at the same time, at this time, the user can use the cellular communication capabilities of at least two devices at the same time. For example, if device 1 is equipped with a telecom card and device 2 is equipped with a mobile card, then the user can use the cellular communication capabilities of device 1 and device 2 on the device at the same time, that is, use the telecom and mobile cards at the same time.
- the first device may execute step S902 through a distributed cellular communication module of the first device.
- the distributed cellular communication module of the first device may be set at the application framework layer of the first device as shown in FIG. 5 .
- the distributed cellular communication module of the first device can use the Bluetooth discovery function of the first device to inquire about devices that have enabled Bluetooth and have enabled the sharing of cellular communication capabilities.
- the device with the cellular communication capability sharing function may also inquire about a device in the near-field network where the first device is located and that has enabled the cellular communication capability sharing function, or may inquire about other devices under the login account of the first device.
- the distributed cellular communication module of the first device can discover devices that enable the cellular communication capability sharing function in the near-field network, local area network, or far-field network through the distributed bus in the first device, thereby realizing Query the devices in the network that enable the cellular communication capability sharing function.
- the distributed cellular communication module of the first device may discover, through the distributed bus, devices under the same account in the far field network that have enabled the cellular communication capability sharing function.
- the first device and the second device may establish a communication connection through a wired method; or, the first device and the second device may also establish a communication connection through a wireless method, for example, the first device and the second device may establish a communication connection through Bluetooth, WIFI, or connecting to the same cloud account to establish a communication connection.
- the method of establishing a communication connection between the first device and the second device there is no limitation on the method of establishing a communication connection between the first device and the second device.
- the first device and the second device may implement the foregoing communication connection in various manners through a distributed bus.
- the foregoing communication connection manner may be implemented through a distributed bus 5013 of the first device and a distributed bus 5024 of the second device.
- step S902 may be triggered by the user. Specifically, the user executes the operation of querying the devices in the network that enable the cellular communication capability sharing function through the display interface of the first device, and the distributed cellular communication module of the first device responds to The user's operation to execute step S902 may also be that the first device automatically triggers the execution of step S902 when it is turned on. There are many ways to trigger the execution of step S902, including but not limited to the content proposed in the embodiment of this application.
- the second device executes step S901 in the embodiment of the present application, when the first device executes step S902, it can query the second device that has enabled the cellular communication capability sharing function, knowing that the cellular communication capability of the second device can Shared use, that is, the Modem of the second device is allowed to be shared with the first device.
- the first device selects a second device from all queried devices that enable the cellular communication capability sharing function.
- the second device in the embodiment of the present application refers to the device that the first device needs to use the cellular communication capability, that is, the first device chooses to use the cellular communication capability of the second device.
- the first device will inquire about one or more devices that have enabled the sharing function of the cellular communication capability.
- the first device may select the device that it wants to use the cellular communication capability from among all the inquired devices that enable the sharing function of the cellular communication capability, as the second device.
- one device may be selected from all queried devices with the cellular communication capability sharing function enabled as the second device, that is, the first device only chooses to use the cellular communication function of one device.
- multiple devices can be selected from all the devices that enable the sharing function of the cellular communication capability of the query, and all of them are used as the second device, that is, the first device can choose to use the cellular communication function of each of the multiple devices. .
- step S903 may be performed by a distributed cellular communication module of the first device, or may be performed by cooperation of multiple modules in the first device.
- the second device may be automatically selected by the distributed cellular communication module of the first device according to preconfigured selection rules.
- the selection rule can be randomly selected, it can be to select the device with the closest distance first, or it can be to select the device with the strongest signal first, and so on. There are many ways to set the selection rules, including but not limited to the content proposed in the embodiment of this application.
- the first device may select the second device from all inquired devices that enable the cellular communication capability sharing function in response to a user's selection operation. For example, after step S902 is executed, the distributed cellular communication module of the first device sends all the found devices with the cellular communication capability sharing function back to the application layer and displays them on the display interface of the first device. From all the devices displayed on the interface, select the second device by clicking. For example, in the interface shown by a in FIG. 11 , the user selects device 2 from the list of available cellular communication devices as the second device.
- step S903 in response to the user's selection operation, that is, selects the second device designated by the user's selection operation from all inquired devices with the cellular communication capability sharing function enabled.
- the first device selects the second device, including but not limited to the content proposed in the embodiment of this application.
- steps S901 to S903 are optional steps.
- the second device is preset in advance. When the first device finds the second device, it can directly establish a connection, that is, directly execute step S904. For example, when both the second device and the first device are in the power-on state, step S904 is directly executed by default, and steps S901 to S903 may not be executed.
- the first device sends a socket (socket) connection request to the second device.
- the distributed cellular communication module of the first device may use the socket of the first device to send a socket connection request to the distributed cellular communication module of the second device.
- the socket connection request describes the socket of the second device to be connected, and indicates the address and port number of the socket of the second device, and the socket connection request also describes the socket of the first device itself.
- the protocol used can be specified, such as Transmission Control Protocol (Transmission Control Protocol, TCP), User Datagram Protocol (User Datagram Protocol, UDP) and the like.
- TCP Transmission Control Protocol
- UDP User Datagram Protocol
- the second device establishes a connection with the first device in response to the socket connection request.
- the second device After the second device establishes a connection with the first device in response to the socket connection request, communication between the first device and the second device can be realized.
- the distributed cellular communication module of the second device after receiving the socket connection request sent by the first device, responds to the socket connection request, and then performs some authentication operations on the connection request.
- a distributed cellular communication module of a device establishes a connection.
- the distributed cellular communication module of the second device may establish a connection with the distributed cellular communication module of the first device through a distributed bus.
- the distributed communication bus can keep the connection channel unbroken.
- the distributed bus can also be in a low-power standby mechanism when the first device and the second device are in the connection state.
- the distributed cellular communication module of the first device and the distributed cellular communication module of the second device may establish a connection through a distributed bus 5013 and a distributed bus 5024 as shown in FIG. 5 .
- steps S904 to S905 can be understood as the process of establishing a connection between the distributed cellular communication module of the first device and the distributed cellular communication module of the second device. , it can also be established by means of hardware connection, wireless network connection, or other network connection protocols, that is, the establishment of a connection between the distributed cellular communication module of the first device and the distributed cellular communication module of the second device.
- hardware connection wireless network connection, or other network connection protocols, that is, the establishment of a connection between the distributed cellular communication module of the first device and the distributed cellular communication module of the second device
- the first device sends a cellular communication capability sharing request to the second device.
- the first device After the first device establishes a connection with the second device, it is automatically triggered to send a cellular communication capability sharing request to the second device.
- the cellular communication capability sharing request is used to request the second device to share the cellular communication capability of the second device itself, and can also be understood as a request for the first device to use the modem of the second device.
- the generation of the cellular communication capability sharing request may be triggered by the distributed cellular communication module of the first device, and sent to the distributed cellular communication module of the second device. In some other embodiments, the cellular communication capability sharing request may also be sent to the second device with the cooperation of one or more modules in the first device.
- the cellular communication capability sharing request may carry the unique identifier of the first device (such as the address and port number of the first device) and the unique identifier of the second device (such as the address and port number of the second device) .
- the distributed cellular communication module of the first device and the distributed cellular communication module of the second device are connected through a distributed bus in step S905, then when the first device executes step S906, it also sends Communication capability sharing request.
- the distributed bus may encrypt and encapsulate the sent data (for example, the cellular communication capability sharing request) to ensure data security during the sending process.
- the first device creates a proxy object of the request interface.
- the proxy object of the request interface is used to forward the request of the cellular communication service locally received in the first device to the distributed cellular communication module of the second device.
- the cellular communication service request is a request for executing an application-related cellular communication service function, such as a short message sending request triggered by a short message application, a call dialing request triggered by a phone application, and a call answering request.
- the response data corresponding to the request of the cellular communication service is the processing result data after the Modem has processed the request of the cellular communication service. Whether the SMS is sent successfully, the specific reasons for the failure of sending the SMS, etc.
- it may be a proxy object of the request interface created by the distributed cellular communication module of the first device.
- the request interface may be created inside the distributed cellular communication module of the first device.
- the process of executing step S907 may be: based on the design pattern of the proxy pattern, creating a proxy object of the request interface.
- the proxy object for creating the request interface may be a proxy object for creating the first type of HIDL interface in the above-mentioned solution for the electronic device with cellular communication capability to use the local cellular communication function.
- the proxy object of the created request interface has the functions of the first type of HIDL interface mentioned above, and has expanded other functions. By extending additional functional operations in the proxy object of the request interface, the proxy of the request interface can be realized
- the object can forward the request for the cellular communication service received by the local telephony manager of the first device to the distributed cellular communication module of the second device.
- the first device may create a request interface proxy object facing the Radio Interface, and switch the Radio Interface to the remote access mode.
- the Radio Interface can be switched to the remote access mode to realize that the cellular communication request is not processed by the local Modem, but the cellular communication request is sent to the remote
- the modem of the device that is, the second device
- the proxy object of the request interface created by the first device can implement asynchronous call processing.
- step S907 in addition to performing step S907, it is also necessary to modify the phone manager in the application framework layer of the first device, so that the phone manager does not call the original HIDL interface after receiving the request of the cellular communication service , but call the proxy object of the request interface created in step S907.
- step S907 may be triggered by step S905 or step S906, that is, after the connection between the first device and the second device is established, the execution of step S907 is triggered, or the distributed cellular communication module of the first device sends Step S907 is automatically triggered after the cellular communication capability sharing request.
- the execution may also be triggered by step S909, that is, step S907 is triggered after receiving the cellular communication capability sharing success information to ensure that the second device successfully responds to the cellular communication capability sharing request.
- the same specific application configured by the first device and the second device needs to be used to forward the request of the first device to the device with cellular communication capability (that is, the second device), and then the second device utilizes the cellular communication capability to process the application-level request using the local Modem, and completes the transfer of the cellular communication function supported by the specific application. Therefore, each device must install the same specific application to complete the transfer of cellular communication functions, and a specific application only supports the transfer of one cellular communication function, and some basic cellular communication functions cannot even be transferred by configuring specific applications.
- the distributed cellular communication module of the first device since a new distributed cellular communication module is added to the first device, the distributed cellular communication module of the first device implements the management of the phone of the first device by creating a proxy object of the request interface.
- the request of the cellular communication service received by the device is no longer sent to the Modem through the HIDL interface, but the proxy object of the request interface requests the proxy object of the interface to forward the request of the cellular communication service to the distributed cellular communication module of the second device,
- the distributed cellular communication module of the second device can send the request of the cellular communication service to the local Modem for processing, helping the first device to use the cellular communication capability.
- the Modem may be the modem processor 5021 in FIG. 5 .
- the distributed cellular communication module of the first device establishes the connection between the first device and the second device at the application framework layer by creating a proxy object of the request interface, and then can realize the implementation of Figure 5.
- the request for the cellular communication service is forwarded to the second device.
- the second device may execute step S5015 to send the request for the cellular communication service to the modem processor 5021.
- the Modem may also be the Modem in the mobile phone 11 in FIG. 1 .
- the smart screen 16 forwards the request for the cellular communication service to the mobile phone 11 by creating a proxy object of the request interface to request the proxy object of the interface.
- the mobile phone 11 can send the request of the cellular communication service to the Modem of the mobile phone 11 for processing, helping the smart screen 16 to use the cellular communication capability of the mobile phone 11 .
- the request for the cellular communication service of the first device does not need to go through the application level of the second device, so it does not depend on the required installation of the second device and the first device.
- the request for the cellular communication service of the first device can be forwarded to the Modem of the second device for processing through the distributed cellular communication module of the first device, so the first device A device can use all the cellular communication capabilities of the second device, instead of only using the transferred cellular communication functions supported by the applications installed on each device as in the prior art.
- step S907 the type and specific method of the interface created by the first device are not limited.
- the first device can also create proxy objects of other types of interfaces.
- the second device responds to the cellular communication capability sharing request, and creates a proxy object of the response interface and a proxy object of the notification interface.
- the proxy object of the response interface is used to forward the response data corresponding to the request of the cellular communication service to the distributed cellular communication module of the first device.
- the proxy object of the notification interface is used to forward the notification of the cellular communication service reported by the local Modem to the distributed cellular communication module of the first device.
- the Modem detects that there is a cellular communication service, such as detecting that there is a short message notification
- the distributed cellular communication module of the second device will be notified through the proxy object of the notification interface, and the proxy object of the notification interface will A notification of cellular communication traffic is sent to a distributed cellular communication module of the first device.
- the format, quantity and content of the notification of the cellular communication service may specifically refer to regulations of operating systems such as Android or IOS, which are not limited in this embodiment of the present application.
- the specific manner of reporting the notification of the cellular communication service by the Modem may also refer to regulations of operating systems such as Android or IOS, which are not limited in this embodiment of the present application.
- the response data corresponding to the request of the cellular communication service is data for responding to the request of the cellular communication service, and corresponds to the request of the cellular communication service.
- the notification of the cellular communication service may be, for example, a short message received by the SIM card of the second device, a call to the SIM card of the second device, and the like.
- Both the response data corresponding to the request of the cellular communication service and the cellular communication service may originate from the Modem, and be reported and sent by the Modem.
- the proxy object of the response interface and the proxy object of the notification interface may be created by the distributed cellular communication module of the second device.
- the proxy object of the response interface and the proxy object of the notification interface may be created inside the distributed cellular communication module of the second device.
- the process of executing step S908 may be, based on the design pattern of the proxy pattern, creating a proxy object of the response interface and a proxy object of the notification interface.
- the proxy object of the response interface is the proxy object of the second type of HIDL interface in the above-mentioned solution that the electronic device with cellular communication capability uses the local cellular communication function.
- the proxy object of the created response interface has the function of the second type of HIDL interface mentioned above, and has expanded other functions. By extending the additional function operation in the proxy object of the response interface, the proxy of the response interface can be realized
- the object can forward the response data corresponding to the request of the cellular communication service to the distributed cellular communication module of the first device.
- the proxy object of the notification interface is the proxy object of the third type of HIDL interface in the above-mentioned scheme that the electronic device with cellular communication capability uses the local cellular communication function, and the proxy object of the created notification interface has the above-mentioned first
- the functions of the three types of HIDL interfaces, and other functions have been extended. By extending additional functional operations in the proxy object of the notification interface, it can be realized that the proxy object of the notification interface can notify the cellular communication service reported by the local Modem. , forwarded to the distributed cellular communication module of the first device.
- the response data corresponding to the request of the cellular communication service was originally sent from the Modem to the phone manager of the local application framework layer through the second type of HIDL interface mentioned above, but after the proxy object of the response interface is created, the Modem needs to send The response data corresponding to the request of the cellular communication service will be sent to the proxy object of the response interface, and will not be directly returned to the local phone manager.
- the notification of the cellular communication service also needs to be actively reported from the Modem to the phone manager of the local application framework layer through the third type HIDL interface, but after the proxy object of the notification interface is created, the notification of the cellular communication service that the Modem needs to report will be Sent to the proxy object of the notification interface, not to the local telephony manager.
- the response data corresponding to the request of the cellular communication service notified by the Modem and the notification of the cellular communication service can all be sent to the distributed cellular communication module of the second device, followed by The distributed cellular communication module of the second device distributes.
- the response data corresponding to the request of the cellular communication service and the cellular communication service are provided by the local Modem sends to the phone manager in the local application framework layer, and then the phone manager directly sends to the application corresponding to the local cellular communication service request, that is, the response data corresponding to the cellular communication service request and the cellular communication service can only Sent locally on devices with cellular communication capabilities.
- the distributed cellular communication module of the second device creates the proxy object of the response interface and the proxy object of the notification interface, so that the modem of the second device processes the response data corresponding to the request of the cellular communication service obtained and
- the notification of the cellular communication service is no longer sent from the Modem to the phone manager, but is sent by the Modem to the distributed cellular communication module of the second device, and the distributed cellular communication module of the second device will pass the created response interface.
- the proxy object receives the response data corresponding to the request of the cellular communication service, receives the cellular communication service through the proxy object of the notification interface, and then sends the received notification of the cellular communication service and the response data corresponding to the request of the cellular communication service to the first device Distributed cellular communication module.
- the distributed cellular communication module of the second device can realize the response corresponding to the request for the first device to receive the cellular communication service through the created proxy object of the response interface.
- the response data enables the first device to successfully use the cellular communication capability of the second device.
- the second device can actively report the notification of the cellular communication service to the first device through the proxy object of the notification interface.
- the proxy object of the response interface and the proxy object of the notification interface may be created only for the first device, that is, the proxy object of the notification interface and the proxy object of the notification interface are only used for forwarding to the distribution of the first device A cellular communication module instead of a distributed cellular communication module for forwarding to other devices. If other devices send cellular communication capability sharing requests, it is necessary to create other device-specific notification interface proxy objects and notification interface proxy objects for other devices to process.
- the created proxy object of the response interface and the proxy object of the notification interface may be created for all devices that want to use the cellular communication capability shared by the second device, that is, the proxy object of the notification interface and the notification interface
- the proxy object can be forwarded to the distributed cellular communication modules of all the devices that have sent the cellular communication capability sharing request, not only for the first device.
- the distributed cellular communication module of the second device may directly create a proxy object of the response interface and a proxy object of the notification interface for the first device after receiving the cellular communication capability sharing request and responding to the cellular communication capability sharing request , or after a series of authentication operations are performed on the cellular communication capability sharing request, the proxy object of the response interface and the proxy object of the notification interface are created after the authentication is passed. If the authentication fails, it will not be created.
- the cross-device use of a certain cellular communication capability can only be realized by separately developing an application, and other applications cannot use the cellular communication capability.
- the first device creates the proxy object of the request interface
- the second device creates the proxy object of the response interface and the proxy object of the notification interface, so that the first device can call the cellular function of the second device
- the first device is equivalent to The purpose is to simulate a cellular module locally, so that the first device can have complete cellular communication capabilities.
- step S907 and step S908 in addition to step S907 and step S908 to enable the first device to have the ability to use all the cellular communication capabilities of the second device, other methods can also be used to enable the first device to have the ability to use all the cellular communication capabilities of the second device.
- the condition of the communication capability, step S907 and step S908 is only an implementation manner for the condition that the first device use all the cellular communication capabilities of the second device between the first device and the second device.
- the type and method of the interface created by the second device in step S908 are not limited in this embodiment of the present application, and the second device may also create proxy objects of other types of interfaces. In some embodiments, if the second device only has a response interface but does not have a notification interface, only a proxy object of the response interface may be created when performing step S908.
- the second device sends cellular communication capability sharing success information to the first device.
- the cellular communication capability sharing success information is used to indicate that the second device has accepted the cellular communication capability sharing request sent by the first device in step S906, and is willing to share the cellular communication capability of the second device with the first device, and then the first The device has access to all shareable cellular communication capabilities of the second device.
- the cellular communication capability sharing information may include information about all shared and used cellular communication capabilities of the second device, and when the first device receives the cellular communication capability sharing success information, it may acquire the information of the second device's All cellular communication capabilities available for shared use.
- the first device completes the configuration work of using the Modem of the second device
- the second device completes the configuration work of providing the Modem of the second device for the first device, that is, completes the configuration through steps S901 to S909 Preparations for the first device to use the cellular communication capabilities of the second device.
- the distributed cellular communication module of the second device may send the cellular communication capability sharing success information to the distributed cellular communication module of the first device.
- steps S901 to S909 are only an implementation manner for realizing the preparatory work of the first device before using the cellular communication capability of the second device.
- the first Preparing a device to use the cellular communication capabilities of a second device.
- the first device performs scene recognition, and determines whether the cellular communication capability can be enabled according to the scene.
- the first device may store a correspondence between scenarios and cellular communication functions.
- the correspondence between the scene and the cellular communication function may be preset in the first device, or the correspondence between the scene and the cellular communication function may be established by the first device based on the historical data of the user using the first device obtained by self-learning.
- the scene may be that the first device is based on the application currently used by the user, the content displayed by the first device, and/or the user (or the first device) detected by the first device based on an artificial intelligence (AI) identification module
- AI artificial intelligence
- the first device performs scene recognition, and may determine whether the cellular communication function can be enabled in the scene based on the correspondence between the scene and the cellular communication function. For example, when the first device recognizes the current scene and finds the cellular communication function corresponding to the scene from the correspondence between the scene and the cellular communication function, it can determine the cellular communication function that can be turned on; or, when the first device When a device does not recognize the current scene, or recognizes the current scene and does not find the corresponding cellular communication function of the current scene from the correspondence between the scene and the cellular communication function, it can be determined that there is no cellular communication function that needs to be activated.
- the scene may include one or more of the following, for example: a work scene, a game scene, a power saving scene, a sleep scene, or a boarding scene. It can be understood that, when the first device is in different scenarios, different cellular communication functions may be adapted. Exemplarily, Table 1 is a schematic diagram of a corresponding relationship between a scenario and a cellular communication function provided in the embodiment of the present application.
- Table 1 is a schematic diagram of the corresponding relationship between a scenario and a cellular communication function provided by the embodiment of the present application
- FIG. 10 is a schematic diagram of another scenario provided by the embodiment of the present application.
- the scene may include a mobile phone 1001 and a tablet 1002 .
- the tablet 1002 can be understood as the first device described in the embodiment of the present application
- the mobile phone 1001 can be understood as the second device described in the embodiment of the present application.
- the mobile phone 1001 when the mobile phone 1001 has shared the cellular communication capability with the tablet 1002 based on the steps shown in S901-S909, the user can use the tablet 1002 to implement the functions of playing games, sending and receiving short messages, and being called. Call function and other functions.
- the tablet 1002 when the user starts the game application in the tablet 1002, the tablet 1002 can display the game interface based on the data service Internet access function; or, when the tablet 1002 receives a call based on the called call function, the interface of the tablet 1002
- prompt information 1003 can also be displayed, and the prompt information 1003 is used to prompt the user to receive an incoming call.
- the prompt information 1003 can include the user's name, phone number, answer control 1004, and hang up control 1005, etc. of the incoming call. Further, when the user decides to answer the call while playing the game, he can answer the call by triggering the answer control 1004;
- users may have different requirements for cellular communication functions. For example, when a user plays games during the free time of work during the day, he needs to keep an eye on calls and text messages even during the game. content, to avoid missing important information at work; or, when users play games after work, they do not need to pay attention to or even need to block phone calls and text messages to avoid the impact of phone calls and text messages on game operations.
- the correspondence between the scene and the cellular communication function can be set in the configuration file of the distributed cellular communication module 5011; the AI recognition module can be set in the application framework layer. It can be understood that the corresponding relationship between the scene and the cellular communication function and the AI identification module can be set in other positions according to the actual scene, which is not limited in this embodiment of the present application.
- the first device may determine the cellular communication capabilities that can be enabled in different scenarios based on the following two methods. Among them, method 1, the first device can automatically identify the scene, and determine the cellular communication that can be turned on in this scene based on the preset corresponding relationship or the preset relationship obtained by self-learning based on the historical data of the user using the first device. Function; method two, the first device can determine the cellular communication function that can be enabled in different scenarios based on the manual settings of the user.
- the first device can automatically identify the scene, and determine the cellular communication function that can be enabled in this scene based on the preset corresponding relationship or the preset relationship obtained from self-learning based on the historical data of the user using the first device.
- the first device may acquire historical data of the user using the cellular communication function in different scenarios for a period of time, for example, within 7 days, and further study the historical data to obtain the corresponding relationship between scenarios and cellular communication functions.
- the first device records that the user often answers calls and checks text messages during the time period from 9:00 am to 6:00 pm when playing games, and records that the user plays games from 8:00 pm to 11:30 pm
- the first device can set up a work scene (such as Game application) and the corresponding relationship between SMS sending and receiving functions, called calling functions, and data service Internet access functions, and establish game scenarios (such as game applications) during the time period from 8:00 p.m.
- the first device may store a correspondence between scenarios and cellular communication functions.
- the first device may store the corresponding relationship between the game scene and the data service Internet access function and other functions.
- the first device may determine that the data service Internet access function can be enabled in the game scene based on the scene to which the game application belongs.
- the distributed cellular communication module 5011 of the first device may store the correspondence between scenarios and cellular communication functions, and the distributed cellular communication module 5011 may be configured with monitoring device.
- the listener is used to listen to a target object (such as a target application or a target event), and when the target object triggers a specified event, the listener in the distributed cellular communication module 5011 can receive a notification.
- the distributed cellular communication module 5011 of the first device may detect that the game application is triggered based on the listener, and identify that the game application satisfies the application to which the game scene belongs; furthermore, the distributed cellular The communication module 5011 may determine, based on the corresponding relationship, that the data service Internet access function and the like can be enabled in the game scene.
- the first device may store the corresponding relationship between the scene and the cellular communication function, and the first device is also provided with an AI identification module.
- the first device when the second device has shared the cellular communication capability with the first device, when the first device determines based on the received ticket purchase information that the user has ordered a ticket, and is close to the Takeoff time, and when it is determined that the user is located at the airport based on GPS positioning, the first device can identify based on the AI recognition module that the current user may be boarding or waiting to take off, satisfying the boarding scenario; furthermore, the first device can determine the boarding scenario. All cellular communication features can be turned off.
- the distributed cellular communication module 5011 of the first device may store the correspondence between scenarios and cellular communication functions; the application framework layer of the first device may be provided with an AI Identification module.
- the AI recognition module is set in the application framework layer as an example for illustration.
- the GPS in the first device can send the user's location information to the AI recognition module in the application framework layer in real time; the AI recognition module can be based on the short message content indicated in the short message application of the first device, such as ticket information , and the user's location message sent by GPS identifies the current scene, and determines that the boarding scene is satisfied in the current scene; the information including the boarding scene is sent to the distributed cellular communication module 5011; furthermore, the distributed The cellular communication module 5011 may determine, based on the corresponding relationship, that there is no cellular communication function that needs to be enabled in the boarding scenario.
- the first device may store the correspondence between scenarios and cellular communication functions, and the first device may also be provided with an AI identification module.
- the AI recognition module not only realizes scene recognition, but also can intelligently determine the cellular communication function that can be turned on in this scene based on the scene.
- the tablet when the second device, such as a mobile phone, has shared the cellular communication capability with multiple first devices, such as smart watches and tablets, when the tablet detects that the user is currently looking at the tablet based on the camera , the tablet can determine that the current user is using the device based on the AI recognition module, and intelligently determine that all cellular communication functions can be turned on in this scene, and when the smart watch detects that the user is not looking at the smart watch based on the camera, the smart watch can use the AI The identification module determines that the current user is not using the device, and intelligently determines that all cellular communication functions can be turned off in this scenario.
- the AI recognition module is set in the application framework layer as an example for illustration.
- the camera in the hardware layer of the first device can send the captured image to the AI recognition module in the application framework layer via the kernel layer and the system library; the AI recognition module can perform image recognition on the image.
- the AI recognition module in the tablet determines that the user is using the tablet based on the image and the preset face information (or human shape information, or eyeball information, etc.), it can determine that all cellular communication functions of the tablet are turned on, and the A message including enabling all cellular communication functions is sent to the distributed cellular communication module 5011, and the distributed cellular communication module 5011 enables all cellular communication functions; or, when the AI recognition module in the smart watch is based on images and preset faces Information (or human figure information, or eyeball information, etc.), when it is determined that the user is not using the smart watch, it can be determined to turn off all cellular communication functions of the smart watch, and send a message including turning off all cellular communication functions to the distributed cellular communication module In 5011, the distributed cellular communication module 5011 closes all cellular communication functions.
- the AI recognition module can combine the sensor of the device to intelligently recognize the status of the device or the user, to obtain more accurate scene information, or to obtain more accurate cellular communication that can be turned on or off. Function.
- the first device may also perform scene recognition in combination with other intelligent recognition modules set in the device, which is not limited in this embodiment of the present application.
- the second device when the second device is a dual-card device, for example including a SIM card 1 and a SIM card 2, its dual cards may also provide cellular communication functions for different devices.
- a second device with dual cards such as a mobile phone
- the tablet can send and receive text messages based on the SIM card 1 in the mobile phone.
- the smart watch can implement functions such as making and receiving calls based on the SIM card 2 of the mobile phone.
- the first device may be a dual-card device, including a SIM card 1 and a SIM card 2, for example.
- the SIM card 1 of the first device can realize the cellular communication function based on the local modem
- the SIM card 2 of the first device can The cellular communication function is implemented based on the modem of the second device.
- the number of SIM cards included in the first device and the number of SIM cards included in the second device are not specifically limited in this embodiment of the present application.
- the first device may also determine the cellular communication functions that can be enabled in different scenarios based on the manual settings of the user.
- the first device may determine the cellular communication functions that can be enabled in different scenarios based on the user's setting of the cellular communication function in different scenarios in the setting application, or the setting of the cellular communication function that can be enabled in the application in any application.
- Cellular communication capability may be determined based on the user's setting of the cellular communication function in different scenarios in the setting application, or the setting of the cellular communication function that can be enabled in the application in any application.
- the first device may enable the user to set the cellular communication function in different scenarios in the setting application.
- FIG. 11 is a schematic diagram of an interface for setting a cellular communication capability provided in an embodiment of the present application.
- the first device is a mobile phone as an example for illustration, and this example does not constitute a limitation to the embodiment of the present application.
- the mobile phone When the mobile phone receives the user's operation of enabling the cellular communication sharing setting function in the settings application, the mobile phone may display an interface as shown in a in FIG. Available cellular communication devices searched in the case of cellular communication function sharing, such as device 1 and device 2, and advanced setting controls for other settings of cellular communication sharing settings, etc.
- the mobile phone may display the interface shown in b in FIG. 11 .
- the interface may include various scenes, such as work scene, game scene, power saving scene, sleep scene, and boarding scene. Among them, in the power saving scene, when the power of the device is lower than 30%, the device can automatically enter the power saving scene.
- the mobile phone may display the interface shown in c in FIG. 11 .
- the interface may include a control for starting the working scene, and various cellular communication functions that may be set when the working scene is started.
- the applicable time of the working scene can be within the time period from 9:00 am to 6:00 pm, and the working scene can correspond to the enabled state of the basic public function, the enabled state of the calling function, and the called function.
- the user can flexibly set the cellular communication functions in the game scene, power saving scene, sleep scene, and boarding scene based on the embodiment corresponding to FIG. 11 .
- the game scene can correspond to the enabled state of the basic public function and the enabled state of the data service online function, etc.
- the power saving scene can correspond to the enabled state of the basic public function, the enabled state of the calling function, and the enabled state of the called function. status and the enabled status of SMS sending and receiving functions, etc.
- the sleeping scene may correspond to the enabled status of basic public functions
- the boarding scene may correspond to the disabled status of all cellular communication functions, etc.
- the first device may also support sharing of different cellular communication functions in multiple scenarios such as a video scene or a sports scene.
- a video scene can be understood as a scene where a user watches a video, such as a user watching a movie, or viewing a short video, etc.
- the video scene can correspond to the enabled state of basic public functions, the enabled state of the data service Internet access function, and the calling The enabled status of the function, the enabled status of the called call function, the enabled status of the SMS sending and receiving function, etc.
- the motion scene can be understood as the scene when the user is exercising, and the motion scene can correspond to the enabled state of the basic public function, the enabled state of the data service Internet function, the enabled state of the calling function, and the enabled state of the called function. wait.
- the first device may support automatically enabling the corresponding cellular communication function, or the first device may also support automatically enabling the cellular communication function corresponding to the above scenario within a specific time period.
- the first device can support the user to set the automatic opening time of the scene in any of the above-mentioned scenes.
- the user can set the opening time of the sleep scene from 11:30 pm to -7:00 am, which can be understood as 11:00 pm During the period from :30 to -7:00 am, the first device will automatically enter the sleep mode, automatically enable the basic public functions corresponding to the sleep mode, and disable other cellular communication functions not related to the sleep mode.
- the first device may support functions of adding and deleting the foregoing modes, and automatic recommendation of modes.
- the first device may support the user to delete infrequently used modes and add a cellular communication function that is more relevant to the user's usage habits.
- the first device may also automatically identify the scene where the user uses the cellular communication function and related cellular communication functions, and in the cellular communication sharing setting interface (for example, the interface shown in b in FIG. 11 ), the learned scene and In this scenario, the cellular communication functions frequently used by the user are recommended to the user.
- any first device may also support the scenario in the cellular communication sharing setting and device sharing of the cellular communication capability.
- the multiple first devices include devices such as a tablet and a smart watch
- the tablet can share the scenes and cellular communication functions set in the device to the smart watch through device sharing.
- the first device can also add a control for opening the cellular communication sharing setting interface in the negative screen or the pull-down notification interface, and then the user can trigger this in the negative screen or pull-down notification interface.
- the control for opening the cellular communication sharing setting interface and conveniently enter the cellular communication sharing setting interface (for example, the interface shown in a in FIG. 11 , or the interface shown in b in FIG. 11 ).
- an icon may also be set on the negative screen or the pull-down notification interface of the first device, and the icon is used to identify a currently applicable scene. Further, the user can change the current scene by triggering the icon, and then change the cellular communication function corresponding to the current scene; Quick switching of the mode (and the corresponding cellular communication function of the mode) is realized in the pull-down notification interface.
- the first device may enable the user to set the cellular capabilities under different applications in the application.
- FIG. 12 is a schematic diagram of another interface for setting a cellular communication capability provided in an embodiment of the present application.
- the first device is a mobile phone as an example for illustration, and this example does not constitute a limitation to the embodiment of the present application.
- setting the cellular communication capability in the call application of the first device is taken as an example for illustration.
- the mobile phone receives the user's operation of opening the setting function in the call application, the mobile phone can display an interface as shown in a in Figure 12, which can display functions such as unfamiliar number identification and call record merging corresponding to commonly used functions.
- the interface may also include advanced setting controls.
- the mobile phone may display the interface shown in b in FIG. 12 .
- the interface may display content such as a control for enabling the function of pressing the power button to end a call, and a control for setting up cellular communication sharing.
- the mobile phone may display the interface shown in c in FIG. 12 .
- various cellular communication functions that can be set in the call application can be displayed in the interface.
- the call application it can correspond to the enabled state of the basic public function, the enabled state of the calling function, the enabled state of the called function, the enabled state of the short message sending and receiving function, the enabled state of the data service Internet function, and the read SIM Card function open status, etc.
- the user can also set the cellular communication functions applicable to different applications in the setting application; or, the user can also set the cellular communication functions corresponding to the scenarios to which different applications belong in other applications.
- This application implements This is not specifically limited in the example.
- the first device may perform scene recognition periodically, or the first device may perform scene recognition after establishing a connection with the second device in the step shown in S905, or the first device may also perform scene recognition in the step shown in S902. Perform scene recognition after device discovery in the steps shown. It can be understood that the step shown in S810 may be executed in any step between S902-S909, which is not limited in this embodiment of the present application.
- the first device may send a prompt message to the second device, where the prompt message is used to remind the first device Turning on the cellular communication function is currently not supported.
- the first device acquires an interface corresponding to the cellular communication capability, and adds the interface corresponding to the cellular communication capability to a white list.
- both the distributed cellular communication module 5011 of the first device and the distributed cellular communication module 5022 of the second device may store configuration files, and the configuration files are preset with scene Correspondence between information, cellular communication functions, and interfaces.
- the first device may identify the cellular communication function that can be activated based on the scene identification in the step shown in step S910, and based on the scene information preset in the configuration file of the distributed cellular communication module, the cellular communication function, and The corresponding relationship between interfaces determines the interface corresponding to the enabled cellular communication function, and adds the interface corresponding to the enabled cellular communication function to the white list.
- Table 2 below is a schematic diagram of a corresponding relationship between a cellular communication function and an interface provided in the embodiment of the present application.
- Table 2 Schematic diagram of the corresponding relationship between cellular communication functions and interfaces
- the number of cellular communication functions and the number of interfaces corresponding to the cellular communication functions are not specifically limited in the embodiment of the present application.
- the distributed cellular communication module 5011 of the first device may also update the whitelist to the distributed cellular communication module 5022 of the second device.
- the distributed cellular communication module 5011 of the first device may send a message containing the interfaces in the whitelist to the distributed cellular communication module 5022 of the second device; the distributed cellular communication module 5022 of the second device receives the message containing the whitelist interface in the list, and return a response message to the distributed cellular communication module 5011 of the first device.
- the first device and the second device can implement capability negotiation, so that the second device can obtain the information determined by the first device based on the scene. whitelist.
- the cellular communication service data may be a cellular communication service request (the cellular communication service request may correspond to a request interface), or the cellular communication service data may also be a cellular communication service notification or a cellular communication service request.
- the response message of the communication service (both the notification of the cellular communication service and the response message of the cellular communication service may correspond to an active reporting interface).
- the request interface may be the first type HIDL interface described in the above embodiments; the active reporting interface may be the second type HIDL interface or the third type HIDL interface.
- the short message application in the application program layer of the first device triggers a request for the cellular communication service
- the short message application may pass the request for the cellular communication service through the phone manager 5012 in the application program framework layer.
- the distributed cellular communication module 5011 of the first device executes the step shown in S912 to determine whether the interface corresponding to the cellular communication service request satisfies the whitelist.
- the cellular communication service data is a notification of a cellular communication service (or a response message of a cellular communication service) as an example.
- the distributed cellular communication module 5011 of the first device receives
- the distributed cellular communication module 5022 of the second device sends a notification of the cellular communication service (or a response message of the cellular communication service)
- the distributed cellular communication module 5011 of the first device executes the step shown in S912 to determine the cellular communication service Whether the interface corresponding to the notification (or the response message of the cellular communication service) satisfies the whitelist.
- the distributed cellular communication module 5011 of the first device updates the whitelist to the distributed cellular communication module 5022 of the second device based on the step shown in S912
- the Modem 5021 of the second device transmits the notification of the cellular communication service (or the response message of the cellular communication service) to the distributed cellular communication service via the RIL module in the system library.
- the distributed cellular communication module 5022 of the second device may determine whether the interface corresponding to the notification of the cellular communication service (or the response message of the cellular communication service) satisfies the whitelist.
- the first device determines whether to forward the cellular communication service data according to the white list.
- the cellular communication service data is an example of a cellular communication service request.
- the request for the cellular communication service may be forwarded to the distributed cellular communication module 5011 of the second device.
- the distributed cellular communication module 5011 of the first device may send a message containing not support Through the phone manager 5012 in the application framework layer, it is sent to the short message application in the application program layer. At this time, a prompt message can be displayed in the interface of the short message application, and the prompt message is used to indicate that the first device currently does not support Use the cellular communication function corresponding to the request for the cellular communication service.
- the cellular communication service data is a notification of the cellular communication service (or a response message of the cellular communication service) as an example for illustration.
- the distributed cellular communication module 5011 of the first device determines that the interface corresponding to the notification of the cellular communication service (or the response message of the cellular communication service) sent by the distributed cellular communication module 5022 of the second device satisfies
- the notification of the cellular communication service can be sent to the short message application in the application program layer via the phone manager 5012 in the application program framework layer; or, when the first When the distributed cellular communication module 5011 of a device determines that the interface corresponding to the notification of the cellular communication service (or the response message of the cellular communication service) sent by the distributed cellular communication module 5022 of the second device does not meet the white list, it can discard the The notification of the cellular communication service (or the response message of the cellular communication service).
- the distributed cellular communication module 5011 of the first device updates the whitelist to the distributed cellular communication module 5022 of the second device based on the step shown in S912
- the Modem 5021 of the second device transmits the notification of the cellular communication service (or the response message of the cellular communication service) to the distributed cellular communication service via the RIL module in the system library.
- the distributed cellular communication module 5022 can use the cellular communication service
- the notification of the cellular communication service (or the response message of the cellular communication service) is sent to the distributed cellular communication module 5011 of the first device; or, when the distributed cellular communication module 5022 of the second device determines that the notification of the cellular communication service (or the response message of the cellular communication service When the interface corresponding to the response message) does not meet the whitelist, the distributed cellular communication module 5022 of the second device may discard the notification of the cellular communication service (or the response message of the cellular communication service).
- the first device can implement flexible management and control of cellular communication functions based on business scenarios, such as matching appropriate cellular communication capabilities in different scenarios, enhancing the intelligence of cellular communication functions, and further improving users' experience in using cellular communication functions .
- the first device may first identify the service scenario, determine the applicable cellular communication function in this scenario, and then obtain the applicable cellular communication function in this scenario from the second device.
- the first device before S906, can identify the scene based on the steps shown in S910, and determine whether the cellular communication capability can be enabled according to the scene, and then execute the steps shown in S906, and the first device sends the second The device sends a cellular communication capability sharing request corresponding to the enabled cellular communication capability.
- the distributed cellular communication module 5011 of the first device may determine the cellular communication capability that can be activated in this scenario based on the scene identification, and pass the information including the cellular communication capability through The cellular communication capability sharing request is sent to the distributed cellular communication module 5022 of the second device.
- the first device may also store the corresponding relationship between the device information of the first device and the cellular communication function. Before S906, the first device may determine the cellular communication function required by the device based on the device information of the first device. The communication function further executes the step shown in S906, and the first device sends the information including the cellular communication function to the second device through a cellular communication capability sharing request.
- the correspondence between the device information and the cellular communication function may be preset in the first device, or may be obtained by the first device based on the historical data of the user's use of the cellular communication function of the first device.
- the distributed cellular communication module 5011 of the first device may be based on the device information of the first device stored by the distributed cellular communication module (or other modules, etc.) According to the corresponding relationship, the cellular communication capability that can be enabled in this scenario is determined, and the information including the cellular communication capability is sent to the distributed cellular communication module 5022 of the second device through a cellular communication capability sharing request.
- a second device such as a mobile phone 11, has established an In the case of connection, the smart screen can apply to the second device for the function of sending and receiving short messages based on the corresponding relationship between the device and the function of sending and receiving short messages.
- the distributed cellular communication module 5011 of the first device may communicate with the cellular communication module based on the device information of the first device stored by the distributed cellular communication module (or other modules, etc.).
- the corresponding relationship of functions determines the cellular communication capability that can be enabled by the device, and sends the information including the cellular communication capability to the distributed cellular communication module 5022 of the second device through a cellular communication capability sharing request.
- the smart screen can obtain the corresponding cellular communication function of the device, such as the SMS sending and receiving function, and send a cellular communication capability sharing request for obtaining the SMS sending and receiving function to the second device; Furthermore, the smart screen can receive text messages based on the text message sending and receiving function, and view the text message content on the large screen.
- the corresponding cellular communication function of the device such as the SMS sending and receiving function
- the smart screen can receive text messages based on the text message sending and receiving function, and view the text message content on the large screen.
- the method for the first device to determine the required cellular communication function based on the device information of the first device can reduce the system cost when performing scene recognition. Energy consumption, saving the operating cost of the system.
- FIG. 13 is a schematic flowchart of another method for using a cellular communication function provided by an embodiment of the present application.
- the method for using the cellular communication function may include the following steps:
- the first device establishes a connection with the second device.
- the first device and the second device may establish a communication connection through a wired method; or, the first device and the second device may also establish a communication connection through a wireless method, for example, the first device and the second device may establish a communication connection through Bluetooth, WIFI, or connect to the same cloud account to establish a communication connection.
- the first device performs scene identification, and determines whether the cellular communication capability can be enabled according to the scene.
- the first device when the first device determines that the cellular communication capability that can be enabled is obtained according to the scenario, the first device may perform the steps shown in S1303; or, when the first device determines that there is no cellular communication capability that needs to be enabled according to the scenario , the first device may send prompt information to the second device, where the prompt information is used to indicate that the first device currently does not support the cellular communication capability.
- the first device acquires an interface corresponding to the cellular communication capability, and adds the interface corresponding to the cellular communication capability to a white list.
- the first device determines whether to forward the cellular communication service data according to the white list.
- the first device when the first device can find the interface corresponding to the cellular communication service data from the white list, the first device can forward the cellular communication service data; or, when the first device can not whitelist When the interface corresponding to the cellular communication service data is found, the first device may not process the cellular communication service data, for example, the first device may discard the cellular communication service data.
- the first device can implement flexible management and control of cellular communication functions based on business scenarios, such as matching appropriate cellular communication capabilities in different scenarios, enhancing the intelligence of cellular communication functions, and further improving users' experience in using cellular communication functions .
- Figure 14 is a schematic structural diagram of a device for using the cellular communication function provided by the embodiment of the present application.
- the device for using the cellular communication function may be the electronic device in the embodiment of the present application, or it may be an electronic device chip or system-on-a-chip.
- the device 140 for using the cellular communication function may be used in a communication device, circuit, hardware component or chip, and the device for using the cellular communication function includes: a display unit 1401 , a processing unit 1402 and a communication unit 1403 .
- the display unit 1401 is used to support the steps of displaying by the method of exiting the cellular communication function
- the processing unit 1402 is used to support the steps of information processing performed by the device using the cellular communication function
- the communication unit 1403 is used to support the use of the cellular communication function The data sending and data receiving steps performed by the method.
- the embodiment of the present application provides an apparatus for using the cellular communication function.
- the communication unit 1403 is used to establish a connection with the second device;
- the processing unit 1402 is used to identify the target scene where the first device is located; wherein, the target The scene is one of multiple predefined scenes, and any scene corresponds to the cellular communication function that is allowed to be turned on when the cellular communication is shared;
- the processing unit 1402 is also used to determine the target cellular communication function that is allowed to be turned on according to the target scene; the processing unit 1402.
- the processing unit 1402 is also used to determine whether the interface corresponding to the cellular communication service data meets the requirements.
- a preset interface list the processing unit 1402 is further configured to determine whether to forward the cellular communication service data according to the preset interface list.
- first device multiple sets of first correspondences are set in the first device, and any set of first correspondences is used to indicate a scene and a correspondence with a cellular communication function.
- the processing unit 1402 specifically uses From the first correspondence, determine the target cellular communication function corresponding to the target scene; the processing unit 1402 is also specifically configured to determine the target cellular communication function that is allowed to be turned on.
- the first correspondence is set in the distributed cellular communication module of the first device, and the first correspondence is also set in the distributed cellular communication module of the second device; the distribution of the first device
- the distributed cellular communication module is set in the application framework layer or system library of the first device
- the distributed cellular communication module of the second device is set in the application framework layer or system library of the second device.
- multiple sets of second correspondences are set in the first device, and any set of second correspondences is used to indicate the correspondence between cellular communication functions and interfaces.
- the processing unit 1402 specifically uses Determine the interface corresponding to the target cellular communication function according to the second correspondence; the processing unit 1402 is further specifically configured to add the interface corresponding to the target cellular communication function to a preset interface list.
- the second correspondence is set in the distributed cellular communication module of the first device, and the second correspondence is set in the distributed cellular communication module of the second device; the distributed cellular communication module of the first device
- the cellular communication module is set in the application framework layer or system library of the first device
- the distributed cellular communication module of the second device is set in the application framework layer or system library of the second device.
- the communication unit 1403 when the interface corresponding to the cellular communication service data satisfies the first type of interface, and the interface corresponding to the cellular communication service data satisfies the preset interface list, the communication unit 1403 is specifically used to transfer the cellular communication service The data is forwarded to the second device; or, when the interface corresponding to the cellular communication service data satisfies the first type of interface, and the interface corresponding to the cellular communication service data does not meet the preset interface list, the communication unit 1403 is also specifically used to send the cellular communication service data to the second device.
- the application corresponding to the communication service data sends a first message; the first message is used to indicate that the first device does not support processing of the cellular communication service data.
- the communication unit 1403 when the interface corresponding to the cellular communication service data satisfies the second type of interface, and the interface corresponding to the cellular communication service data satisfies the preset interface list, the communication unit 1403 is specifically used to transfer the cellular communication service The data is forwarded to the application corresponding to the cellular communication service data; or, when the interface type corresponding to the cellular communication service data meets the second type of interface, and the interface type corresponding to the cellular communication service data does not meet the preset interface list, the processing unit 1402, It is specifically used for discarding cellular communication service data.
- the processing unit 1402 is further configured to receive a first operation for the first application; the first operation is used to set a scene applicable to cellular communication sharing; in response to the first operation, the display unit 1401, For displaying the first interface; the first interface includes the target scene; the processing unit 1402 is also used for receiving a second operation on the target scene; in response to the second operation, the display unit 1401 is also used for displaying the second interface;
- the second interface includes a cellular communication function that is allowed to be turned on when the cellular communication is shared; the processing unit 1402 is also configured to receive a third operation for the cellular communication function in the second interface; in response to the third operation, the processing unit 1402 is also configured to Set the target cellular communication functions that are allowed to be turned on in the target scene.
- the communication unit 1403 is further configured to send a prompt message to the second device; the prompt message is used to instruct the first device to Cellular communication functionality is not supported.
- the communication unit 1403 may be an input or output interface, a pin, or a circuit.
- the device for using the cellular communication function may further include: a storage unit 1404 .
- the processing unit 1402, the communication unit 1403, and the storage unit 1404 are connected through lines.
- the storage unit 1404 may include one or more memories, and the memories may be devices used to store programs or data in one or more devices and circuits.
- the storage unit 1404 may exist independently, and is connected to the processing unit 1402 of the device using the cellular communication function through a communication line.
- the storage unit 1404 can also be integrated with the processing unit 1402 .
- the storage unit 1404 may store computer execution instructions of the methods in the electronic device, so as to enable the processing unit 1402 to execute the methods in the foregoing embodiments.
- the storage unit 1404 may be a register, a cache, or a RAM, etc., and the storage unit 1404 may be integrated with the processing unit 1402 .
- the storage unit 1404 may be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, and the storage unit 1404 may be independent from the processing unit 1402.
- FIG. 15 is a schematic diagram of the hardware structure of a control device provided in the embodiment of the present application. As shown in FIG. 1503 as an example for illustration).
- the processor 1501 can be a general-purpose central processing unit (central processing unit, CPU), a microprocessor, a specific application integrated circuit (application-specific integrated circuit, ASIC), or one or more for controlling the execution of the application program program integrated circuit.
- CPU central processing unit
- ASIC application-specific integrated circuit
- Communication lines 1504 may include circuitry that communicates information between the components described above.
- the communication interface 1503 uses any device such as a transceiver for communicating with other devices or communication networks, such as Ethernet, wireless local area networks (wireless local area networks, WLAN) and so on.
- a transceiver for communicating with other devices or communication networks, such as Ethernet, wireless local area networks (wireless local area networks, WLAN) and so on.
- control device may also include a memory 1502 .
- the memory 1502 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM) or other types that can store information and instructions It can also be an electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be programmed by a computer Any other medium accessed, but not limited to.
- the memory may exist independently and be connected to the processor through the communication line 1504 . Memory can also be integrated with the processor.
- the memory 1502 is used to store computer-executed instructions for implementing the solution of the present application, and the execution is controlled by the processor 1501 .
- the processor 1501 is configured to execute the computer-executed instructions stored in the memory 1502, so as to implement the method for using the cellular communication function provided in the embodiment of the present application.
- the computer-executed instructions in the embodiment of the present application may also be referred to as application program code, which is not specifically limited in the embodiment of the present application.
- the processor 1501 may include one or more CPUs, for example, CPU0 and CPU1 in FIG. 15 .
- control device may include multiple processors, for example, processor 1501 and processor 1505 in FIG. 15 .
- processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.
- a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
- FIG. 16 is a schematic structural diagram of a chip provided by an embodiment of the present application.
- the chip 160 includes one or more than two (including two) processors 1620 and a communication interface 1630 .
- memory 1640 stores the following elements: executable modules or data structures, or subsets thereof, or extensions thereof.
- the memory 1640 may include a read-only memory and a random access memory, and provides instructions and data to the processor 1620 .
- a part of the memory 1640 may also include a non-volatile random access memory (non-volatile random access memory, NVRAM).
- the memory 1640 , the communication interface 1630 and the memory 1640 are coupled together through the bus system 1610 .
- the bus system 1610 may include not only a data bus, but also a power bus, a control bus, and a status signal bus.
- the various buses are labeled bus system 1610 in FIG. 16 .
- the methods described in the foregoing embodiments of the present application may be applied to the processor 1620 or implemented by the processor 1620 .
- the processor 1620 may be an integrated circuit chip with signal processing capability.
- each step of the above method may be implemented by an integrated logic circuit of hardware in the processor 1620 or instructions in the form of software.
- the above-mentioned processor 1620 may be a general-purpose processor (for example, a microprocessor or a conventional processor), a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), an off-the-shelf programmable gate Array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates, transistor logic devices or discrete hardware components, the processor 1620 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present invention .
- DSP digital signal processing
- ASIC application specific integrated circuit
- FPGA field-programmable gate array
- the steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor.
- the software module may be located in a mature storage medium in the field such as random access memory, read-only memory, programmable read-only memory, or electrically erasable programmable read only memory (EEPROM).
- the storage medium is located in the memory 1640, and the processor 1620 reads the information in the memory 1640, and completes the steps of the above method in combination with its hardware.
- the instructions stored in the memory for execution by the processor may be implemented in the form of computer program products.
- the computer program product may be written in the memory in advance, or may be downloaded and installed in the memory in the form of software.
- a computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part.
- the computer can be a general purpose computer, special purpose computer, computer network, or other programmable device.
- Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g. Coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL) or wireless (such as infrared, wireless, microwave, etc.) transmission to another website site, computer, server or data center.
- Computer readable storage medium can be Any available media capable of being stored by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media.
- available media may include magnetic media (e.g., floppy disks, hard disks, or tapes), optical media (e.g., A digital versatile disc (digital versatile disc, DVD)), or a semiconductor medium (for example, a solid state disk (solid state disk, SSD)), etc.
- magnetic media e.g., floppy disks, hard disks, or tapes
- optical media e.g., A digital versatile disc (digital versatile disc, DVD)
- a semiconductor medium for example, a solid state disk (solid state disk, SSD)
- Computer-readable media may include computer storage media and communication media, and may include any medium that can transfer a computer program from one place to another.
- a storage media may be any target media that can be accessed by a computer.
- the computer-readable medium may include compact disc read-only memory (compact disc read-only memory, CD-ROM), RAM, ROM, EEPROM or other optical disc storage; the computer-readable medium may include a magnetic disk memory or other disk storage devices.
- any connected cord is properly termed a computer-readable medium.
- Disk and disc includes compact disc (CD), laser disc, compact disc, digital versatile disc (DVD), floppy disk and Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Reproduce data.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Human Computer Interaction (AREA)
- Telephone Function (AREA)
Abstract
本申请实施例提供一种蜂窝通信功能的使用方法和装置,涉及终端技术领域,方法包括:第一设备与第二设备建立连接;第一设备识别第一设备所处的目标场景;第一设备根据目标场景确定允许开启的目标蜂窝通信功能;第一设备将目标蜂窝通信功能对应的接口加入到预设的接口名单;当第一设备接收到蜂窝通信业务数据时,第一设备确定蜂窝通信业务数据对应的接口是否满足预设的接口名单;第一设备根据预设的接口名单确定是否转发蜂窝通信业务数据。这样,第一设备可以实现将各类蜂窝通信能力进行细分并独立共享,同时可以根据不同使用场景,匹配合适的蜂窝通信能力,增强共享蜂窝通信功能的智能性。
Description
本申请要求于2021年10月26日提交中国国家知识产权局、申请号为202111249130.5、申请名称为“蜂窝通信功能的使用方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及终端技术领域,尤其涉及一种蜂窝通信功能的使用方法和装置。
蜂窝通信是采用蜂窝无线组网方式,在终端和网络设备之间通过无线通道连接起来,进而实现用户在活动中可相互通信,其主要特征是终端的移动性,并具有越区切换和跨本地网自动漫游功能。例如,像手机等具有蜂窝通信功能的设备,可以实现将其蜂窝通信能力共享给其他如平板(WIFI版本)、智能手表、智慧屏、笔记本电脑等不具备蜂窝通信能力的设备,使得用户可以在该不具备蜂窝通信能力的设备中正常使用蜂窝通信功能。
通常情况下,在手机已经将蜂窝通信功能共享给平板的情况下,则平板可以基于手机共享的蜂窝通信功能,实现拨打电话、收发短信、以及应用一键登录等多种功能。
然而,上述蜂窝通信功能的使用方法,无法实现对于部分蜂窝通信能力的分类共享与智能管控。
发明内容
本申请实施例提供一种蜂窝通信功能的使用方法和装置,可以将各类蜂窝通信能力进行细分并独立共享,同时可以根据用户的不同使用场景,匹配合适的蜂窝通信能力,增强蜂窝通信功能的智能性,减少不必要的待机功耗,进而提升用户对于蜂窝通信功能的使用体验。
第一方面,本申请实施例提供一种蜂窝通信功能的使用方法,方法包括:第一设备与第二设备建立连接;第一设备识别第一设备所处的目标场景;其中,目标场景为预先定义的多个场景中的其中一个,任一个场景对应有蜂窝通信共享时允许开启的蜂窝通信功能;第一设备根据目标场景确定允许开启的目标蜂窝通信功能;第一设备将目标蜂窝通信功能对应的接口加入到预设的接口名单;当第一设备接收到蜂窝通信业务数据时,第一设备确定蜂窝通信业务数据对应的接口是否满足预设的接口名单;第一设备根据预设的接口名单确定是否转发蜂窝通信业务数据。这样,第一设备可以实现将各类蜂窝通信能力进行细分并独立共享,同时可以根据用户的不同使用场景,匹配合适的蜂窝通信能力,增强蜂窝通信功能的智能性,减少不必要的待机功耗,进而提升用户对于蜂窝通信功能的使用体验。
在一种可能的实现方式中,第一设备中设置有多组第一对应关系,任一组第一对应关系用于指示场景、与蜂窝通信功能之间的对应关系,第一设备根据目标场景确定 允许开启的目标蜂窝通信功能,包括:第一设备从第一对应关系中,确定目标场景对应的目标蜂窝通信功能;第一设备确定允许开启的目标蜂窝通信功能。这样,第一设备可以根据预设的第一对应关系,迅速匹配到该目标场景对应的蜂窝通信功能,提高用户对于蜂窝通信功能的使用体验。
在一种可能的实现方式中,第一对应关系设置在第一设备的分布式蜂窝通信模块中,并且第一对应关系还设置在第二设备的分布式蜂窝通信模块中;第一设备的分布式蜂窝通信模块设置于第一设备的应用程序框架层或系统库,第二设备的分布式蜂窝通信模块设置于第二设备的应用程序框架层或系统库。
在一种可能的实现方式中,第一设备中设置有多组第二对应关系,任一组第二对应关系用于指示蜂窝通信功能、与接口之间的对应关系,第一设备将目标蜂窝通信功能对应的接口加入到预设的接口名单,包括:第一设备根据第二对应关系确定目标蜂窝通信功能对应的接口;第一设备将目标蜂窝通信功能对应的接口加入到预设的接口名单。这样,第一设备可以基于该第二对应关系,迅速匹配到该目标蜂窝通信功能对应的接口,并通过设置预设的接口名单,实现对于蜂窝通信功能的独立管控,增强蜂窝通信功能的智能性。
在一种可能的实现方式中,第二对应关系设置在第一设备的分布式蜂窝通信模块中,并且第二对应关系设置在第二设备的分布式蜂窝通信模块中;第一设备的分布式蜂窝通信模块设置于第一设备的应用程序框架层或系统库,第二设备的分布式蜂窝通信模块设置于第二设备的应用程序框架层或系统库。
在一种可能的实现方式中,第一设备根据预设的接口名单确定是否转发蜂窝通信业务数据,包括:当蜂窝通信业务数据对应的接口满足第一类接口,且蜂窝通信业务数据对应的接口满足预设的接口名单时,第一设备将蜂窝通信业务数据转发至第二设备;或者,当蜂窝通信业务数据对应的接口满足第一类接口,且蜂窝通信业务数据对应的接口不满足预设的接口名单时,第一设备向蜂窝通信业务数据对应的应用发送第一消息;第一消息用于指示第一设备不支持蜂窝通信业务数据的处理。这样,第一设备可以根据蜂窝通信业务数据对应的接口类型,对该蜂窝通信业务数据进行灵活处理。
其中,该第一类接口可以为本申请实施例中的请求类接口;该第二类接口可以为本申请实施例中的上报类接口。
在一种可能的实现方式中,第一设备根据预设的接口名单确定是否转发蜂窝通信业务数据,包括:当蜂窝通信业务数据对应的接口满足第二类接口,且蜂窝通信业务数据对应的接口满足预设的接口名单时,第一设备将蜂窝通信业务数据转发至蜂窝通信业务数据对应的应用;或者,当蜂窝通信业务数据对应的接口类型满足第二类接口,且蜂窝通信业务数据对应的接口类型不满足预设的接口名单时,第一设备丢弃蜂窝通信业务数据。这样,第一设备可以根据蜂窝通信业务数据对应的接口类型,对该蜂窝通信业务数据进行灵活处理。
在一种可能的实现方式中,还包括:第一设备接收针对第一应用的第一操作;第一操作用于设置蜂窝通信共享时适用的场景;响应于第一操作,第一设备显示第一界面;第一界面中包括目标场景;第一设备接收针对目标场景的第二操作;响应于第二操作,第一设备显示第二界面;第二界面中包括蜂窝通信共享时允许开启的蜂窝通信 功能;第一设备接收针对第二界面中的蜂窝通信功能的第三操作;响应于第三操作,第一设备设置目标场景中允许开启的目标蜂窝通信功能。这样,第一设备可以支持用户对于场景以及蜂窝通信功能的灵活设置,使得基于用户设置开启的目标蜂窝通信功能,可以更加符合用户的使用体验。
在一种可能的实现方式中,还包括:当第一设备确定目标场景中没有允许开启的目标蜂窝通信功能时,第一设备向第二设备发送提示消息;提示消息用于指示第一设备不支持蜂窝通信功能。这样,第一设备可以通过向第二设备发送提示消息,使得第二设备可以及时感知蜂窝通信功能的使用情况,并对特殊情况进行及时处理。
第二方面,本申请实施例提供一种蜂窝通信功能的使用装置,通信单元,用于与第二设备建立连接;处理单元,用于识别第一设备所处的目标场景;其中,目标场景为预先定义的多个场景中的其中一个,任一个场景对应有蜂窝通信共享时允许开启的蜂窝通信功能;处理单元,还用于根据目标场景确定允许开启的目标蜂窝通信功能;处理单元,还用于将目标蜂窝通信功能对应的接口加入到预设的接口名单;当第一设备接收到蜂窝通信业务数据时,处理单元,还用于确定蜂窝通信业务数据对应的接口是否满足预设的接口名单;处理单元,还用于根据预设的接口名单确定是否转发蜂窝通信业务数据。
在一种可能的实现方式中,第一设备中设置有多组第一对应关系,任一组第一对应关系用于指示场景、与蜂窝通信功能之间的对应关系,处理单元,具体用于从第一对应关系中,确定目标场景对应的目标蜂窝通信功能;处理单元,还具体用于确定允许开启的目标蜂窝通信功能。
在一种可能的实现方式中,第一对应关系设置在第一设备的分布式蜂窝通信模块中,并且第一对应关系还设置在第二设备的分布式蜂窝通信模块中;第一设备的分布式蜂窝通信模块设置于第一设备的应用程序框架层或系统库,第二设备的分布式蜂窝通信模块设置于第二设备的应用程序框架层或系统库。
在一种可能的实现方式中,第一设备中设置有多组第二对应关系,任一组第二对应关系用于指示蜂窝通信功能、与接口之间的对应关系,处理单元,具体用于根据第二对应关系确定目标蜂窝通信功能对应的接口;处理单元,还具体用于将目标蜂窝通信功能对应的接口加入到预设的接口名单。
在一种可能的实现方式中,第二对应关系设置在第一设备的分布式蜂窝通信模块中,并且第二对应关系设置在第二设备的分布式蜂窝通信模块中;第一设备的分布式蜂窝通信模块设置于第一设备的应用程序框架层或系统库,第二设备的分布式蜂窝通信模块设置于第二设备的应用程序框架层或系统库。
在一种可能的实现方式中,当蜂窝通信业务数据对应的接口满足第一类接口,且蜂窝通信业务数据对应的接口满足预设的接口名单时,通信单元,具体用于将蜂窝通信业务数据转发至第二设备;或者,当蜂窝通信业务数据对应的接口满足第一类接口,且蜂窝通信业务数据对应的接口不满足预设的接口名单时,通信单元,还具体用于向蜂窝通信业务数据对应的应用发送第一消息;第一消息用于指示第一设备不支持蜂窝通信业务数据的处理。
在一种可能的实现方式中,当蜂窝通信业务数据对应的接口满足第二类接口,且 蜂窝通信业务数据对应的接口满足预设的接口名单时,通信单元,具体用于将蜂窝通信业务数据转发至蜂窝通信业务数据对应的应用;或者,当蜂窝通信业务数据对应的接口类型满足第二类接口,且蜂窝通信业务数据对应的接口类型不满足预设的接口名单时,处理单元,具体用于丢弃蜂窝通信业务数据。
在一种可能的实现方式中,处理单元,还用于接收针对第一应用的第一操作;第一操作用于设置蜂窝通信共享时适用的场景;响应于第一操作,显示单元,用于显示第一界面;第一界面中包括目标场景;处理单元,还用于接收针对目标场景的第二操作;响应于第二操作,显示单元,还用于显示第二界面;第二界面中包括蜂窝通信共享时允许开启的蜂窝通信功能;处理单元,还用于接收针对第二界面中的蜂窝通信功能的第三操作;响应于第三操作,处理单元,还用于设置目标场景中允许开启的目标蜂窝通信功能。
在一种可能的实现方式中,当第一设备确定目标场景中没有允许开启的目标蜂窝通信功能时,通信单元,还用于向第二设备发送提示消息;提示消息用于指示第一设备不支持蜂窝通信功能。
第三方面,本申请实施例提供一种蜂窝通信功能的使用装置,该装置包括处理器和存储器,存储器用于存储代码指令,处理器用于运行代码指令,以执行第一方面或第一方面的任意一种可能的实现方式中描述的方法。
第四方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机程序或指令,当计算机程序或指令在计算机上运行时,使得计算机执行第一方面或第一方面的任意一种可能的实现方式中描述的方法。
第五方面,本申请实施例提供一种包括计算机程序的计算机程序产品,当计算机程序在计算机上运行时,使得计算机执行第一方面或第一方面的任意一种可能的实现方式中描述的方法。
第六方面,本申请提供一种芯片或者芯片系统,该芯片或者芯片系统包括至少一个处理器和通信接口,通信接口和至少一个处理器通过线路互联,至少一个处理器用于运行计算机程序或指令,以执行第一方面或第一方面的任意一种可能的实现方式中描述的方法;其中,芯片中的通信接口可以为输入/输出接口、管脚或电路等。
在一种可能的实现方式中,本申请中上述描述的芯片或者芯片系统还包括至少一个存储器,该至少一个存储器中存储有指令。该存储器可以为芯片内部的存储单元,例如,寄存器、缓存等,也可以是该芯片的存储单元(例如,只读存储器、随机存取存储器等)。
应当理解的是,本申请的第二方面至第六方面与本申请的第一方面的技术方案相对应,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。
图1为本申请实施例提供的一种场景示意图;
图2为本申请实施例提供的另一种场景示意图;
图3为本申请实施例提供的一种电子设备的硬件结构示意图;
图4为本申请实施例提供的另一种电子设备的硬件结构示意图;
图5为本申请实施例提供的一种蜂窝通信功能的使用系统的系统架构示意图;
图6为本申请实施例提供的一种蜂窝通信业务的请求在应用程序框架层的路径示意图;
图7为本申请实施例提供的另一种蜂窝通信功能的使用系统的系统架构示意图;
图8为本申请实施例提供的再一种蜂窝通信功能的使用系统的系统架构示意图;
图9为本申请实施例提供的一种蜂窝通信功能的使用方法的流程示意图;
图10为本申请实施例提供的又一种场景示意图;
图11为本申请实施例提供的一种设置蜂窝通信能力的界面示意图;
图12为本申请实施例提供的另一种设置蜂窝通信能力的界面示意图;
图13为本申请实施例提供的另一种蜂窝通信功能的使用方法的流程示意图;
图14为本申请实施例提供的一种蜂窝通信功能的使用装置的结构示意图;
图15为本申请实施例提供的一种控制设备的硬件结构示意图;
图16为本申请实施例提供的一种芯片的结构示意图。
为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。例如,第一值和第二值仅仅是为了区分不同的值,并不对其先后顺序进行限定。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。
需要说明的是,本申请中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a和b,a和c,b和c,或a、b和c,其中a,b,c可以是单个,也可以是多个。
蜂窝通信能力由调制解调处理器(Modem)提供,Modem运行于基带芯片加协处理器上,通过Modem可以支持设备实现短信收发功能、5G相关功能、拨打电话功能、接听电话功能、数据业务上网能力、读取用户身份识别卡(subscriber identification module,SIM)能力、以及应用一键登录能力等一系列蜂窝通信功能(或称为蜂窝通信能力)。示例性的,用户在使用具有蜂窝通信能力的设备时,可以通过触发本地应用,实现一系列蜂窝通信功能;或者,当具有蜂窝通信能力的设备将该蜂窝通信能力分享给不具备蜂窝通信能力的设备时,该不具备蜂窝通信能力的设备也可以利用具有蜂窝通信能力的设备中的Modem实现上述一系列蜂窝通信功能。
在一些场景中,当具备蜂窝通信能力的设备已向不具备蜂窝通信能力的设备共享了自身的蜂窝通信能力(即共享了该具备蜂窝通信能力的设备的Modem)时,不具备蜂窝通信能力的设备可以基于该具备蜂窝通信能力的设备中的Modem,使用该具备蜂窝通信能力的设备所具有的所有蜂窝通信能力,即能够使用所有的蜂窝通信功能。
通常情况下,在不同的业务场景中,用户所需要的蜂窝通信能力可能不同。例如,在具有蜂窝通信能力的设备,如手机,已经将其蜂窝通信功能共享给不具有蜂窝通信能力的设备,如平板的情况下,当用户利用平板打游戏或利用平板上网课时,可能不需要受到外界因素的影响,如可能不需要手机提供的接收短信功能、以及来电接听功能等;或者,当用户在夜晚休息时,可能不需要手机提供的数据业务上网功能等。
然而,由于该不具备蜂窝通信能力的设备,无法实现在不同的业务场景中对所有的蜂窝通信能力进行统一管控,使得使用蜂窝通信功能的灵活性较差。因此,设备在具备使用所有蜂窝通信能力的基础上,还需要支持对各种蜂窝通信功能进行独立的管理,使得各项蜂窝通信功能均能够动态独立的实现打开和关闭共享。
有鉴于此,本申请实施例提供一种蜂窝通信功能的使用方法,可以将各类蜂窝通信能力进行细分并独立共享,同时可以根据用户的不同使用场景,匹配合适的蜂窝通信能力,增强蜂窝通信共享的智能性,减少不必要的待机功耗。
为了下述对本申请提出的蜂窝通信功能的使用过程的实施例描述清楚,首先给出与本申请实施例相关技术的简要介绍:
代理场景是一种设计模式,用于通过创建目标对象的代理对象的方式,提供对目标对象额外的访问方式。其中,目标对象为一种接口,例如硬件抽象层接口定义语言(HAL interface definition language,HIDL)接口。通过代理对象访问目标对象,可以在不修改原目标对象的前提下,通过代理对象提供额外的功能操作,扩展原目标对象的功能。简言之,代理模式就是设置一个代理对象作为中间代理,来控制对原目标对象的访问,以达到增强原目标对象的功能和简化访问流程的目的。
在一种具有蜂窝通信能力的电子设备使用本地的蜂窝通信功能的方案中,具有蜂窝通信能力的电子设备的应用程序层中的应用触发了蜂窝通信业务的请求,该蜂窝通信业务的请求从本地应用程序层下发到本地的应用程序框架层,再由本地的应用程序框架层调用本地系统库上的HIDL接口,然后通过本地的HIDL接口将蜂窝通信业务的请求发送给本地的Modem(Modem)处理,本地的Modem处理后得到蜂窝通信业务的请求对应的响应数据,然后将蜂窝业务请求对应的响应数据通过本地系统库的HIDL接口上报至本地的应用程序框架层,再由应用程序框架层发送到该响应数据对应的应用。本地的Modem还将蜂窝通信业务主动通过本地的HIDL接口上报至应用程序框架层,然后应用程序框架层再继续将蜂窝通信业务上报至蜂窝通信业务对应的应用。示例性的,所有与蜂窝通信相关的业务或者能力都可以称为蜂窝通信业务,例如通话、短信、SIM卡变更、呼叫转移等,都可以称为蜂窝通信业务。
其中,具有蜂窝通信能力的电子设备使用本地的蜂窝通信功能的方案中所提及的HIDL接口按照调用方向划分,可以分为三类:第一类的调用方向为应用程序层和应用程序框架层所在的应用侧的蜂窝通信业务的请求主动下发至Modem侧的调用方向,第二类调用方向为Modem侧将应用侧发起的蜂窝通信业务的请求对应的响应数据上报 到应用侧的方向,第三类的调用方向为Modem侧主动上报蜂窝通信业务的通知至应用侧的方向。
下面对本申请实施例提供的蜂窝通信功能的使用方法的使用场景进行介绍。示例性的,图1为本申请实施例提供的一种场景示意图,本申请实施例提供的蜂窝通信功能的使用方法可以适用于图1示出的场景。
如图1所示,具有蜂窝通信能力的设备(或称为第二设备)可以为图1中的手机11。不具有蜂窝通信能力的设备(或称为第一设备)可以为图1中的平板12、智能眼镜13、智能手表14、智能音箱15、智慧屏16、或笔记本电脑17等智能设备。如图1所示,手机11可以与平板12、智能眼镜13、智能手表14、智能音箱15、智慧屏16、笔记本电脑17分别建立连接,并向平板12、智能眼镜13、智能手表14、智能音箱15、智慧屏16、笔记本电脑17提供手机11的蜂窝通信能力。在另一些实施例中,手机11还可以向媒体播放器(例如MP3、MP4等)、超级移动个人计算机(ultra-mobile personal computer,UMPC)、个人数字助理(personal digital assistant,PDA)、无线耳机、智能手环、无线车载、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备或电视等设备提供手机11的蜂窝通信能力。
如图1所示,手机11与图1中的其他的智能设备建立连接之后,向其他的智能设备提供自身的蜂窝通信能力,以使得平板12、智能眼镜13、智能手表14、智能音箱15、智慧屏16、笔记本电脑17等其他不具有蜂窝通信能力的智能设备,可以使用手机11的蜂窝通信能力,实现所有的蜂窝通信功能。例如,平板12可以获取手机11中的蜂窝通信网络的状态,进而平板12可根据蜂窝通信网络的状态,自动选择使用无线网络或者蜂窝通信网络上网。又例如,智慧屏16可以使用手机11中的SIM卡拨打和接听电话。
示例性的,图2为本申请实施例提供的另一种场景示意图。可能的实现方式中,本申请实施例提供的蜂窝通信功能的使用方法还可以适用于图2示出的场景。
如图2所示,第一设备可以是手机21,第二设备可以是手机22和手机23。手机21分别与手机22、手机23等多个手机建立连接,手机22和手机23均向手机21提供蜂窝通信能力,手机21可以使用手机22和手机23的蜂窝通信能力。例如,手机21可以使用手机22、手机23中的任意一个SIM卡拨打和接听电话,还可以任意选择使用手机22和手机23的蜂窝通信网络上网。
在一些实施例中,第一设备也可以是手机、平板电脑、桌面型、膝上型、笔记本电脑、超级移动个人计算机(Ultra-mobile Personal Computer,UMPC)、手持计算机、上网本、个人数字助理(Personal Digital Assistant,PDA)、可穿戴电子设备、智能手表等电子设备,第二设备为手机、智能通话手表等具有蜂窝通信能力的电子设备,本申请对上述电子设备的具体形式不做特殊限制。需要说明的是,本申请实施例中的第一设备均指的是第二设备的蜂窝通信能力的使用方,而第二设备均指的是蜂窝通信能力的提供方。
示例性的,图3为本申请实施例提供的一种电子设备的硬件结构示意图。
在本申请实施例中,第二设备结构可以如图3所示,第二设备在图3中统称为电子设备进行介绍,电子设备可以包括处理器310,外部存储器接口320,内部存储器 331,通用串行总线(universal serial bus,USB)接口330,天线1,天线2,移动通信模块350,无线通信模块360,音频模块370,传感器模块380,摄像头393,显示屏394,以及用户标识模块(subscriber identification module,SIM)卡接口395等。
可以理解的是,本实施例示意的结构并不构成对电子设备的具体限定。在另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器310可以包括一个或多个处理单元,例如:处理器310可以包括应用处理器(application processor,AP),Modem,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。在本申请实施例中,处理器310可以执行本申请实施例任一的蜂窝通信功能的使用方法。
处理器310中还可以设置存储器,用于存储指令和数据。
在一些实施例中,处理器310可以包括一个或多个接口。接口可以包括集成电路(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)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。I2S接口可以用于音频通信。PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。UART接口是一种通用串行数据总线,用于异步通信。MIPI接口可以被用于连接处理器310与显示屏394,摄像头393等外围器件。GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。
USB接口330是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。
可以理解的是,本实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备的结构限定。在本申请另一些实施例中,电子设备也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
电子设备的无线通信功能可以通过天线1,天线2,移动通信模块350,无线通信模块360,Modem310A以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。
移动通信模块350可以提供应用在电子设备上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块350可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。在一些实施例中,移动通信模块350的至少部分功能模块可以被设置于处理器310中。在一些实施例中,移动通信模块350的至 少部分功能模块可以与处理器310的至少部分模块被设置在同一个器件中。
Modem310A可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器,受话器等)输出声音信号,或通过显示屏394显示图像或视频。在一些实施例中,Modem310A可以是独立的器件。在另一些实施例中,Modem310A可以独立于处理器310,与移动通信模块350或其他功能模块设置在同一个器件中。例如,在本申请的一些实施例中,当电子设备为图1示出的第一设备时,可以不具有Modem310A,而当电子设备为图1示出的第二设备时,需具有Modem310A,以向第一设备提供蜂窝通信能力。例如,在本申请实施例中,当电子设备为图1示出的第二设备时,Modem310A可以为下述本申请实施例所提及的任一蜂窝通信功能的使用方法中的第二设备中的Modem。
无线通信模块360可以提供应用在电子设备上的包括无线局域网(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)等无线通信的解决方案。
在一些实施例中,电子设备的天线1和移动通信模块350耦合,天线2和无线通信模块360耦合,使得电子设备可以通过无线通信技术与网络以及其他设备通信。无线通信技术可以包括全球移动通讯系统(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)。
显示屏394用于显示图像,视频等。显示屏394包括显示面板。电子设备的显示屏394上可以显示一系列图形用户界面(graphical user interface,GUI),这些GUI都是该电子设备的主屏幕。电子设备可以通过ISP,摄像头393,视频编解码器,GPU,显示屏394以及应用处理器等实现拍摄功能。
摄像头393用于捕获静态图像或视频。在一些实施例中,电子设备可以包括1个或N个摄像头393,N为大于1的正整数。
外部存储器接口320可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备的存储能力。
内部存储器331可以用于存储计算机可执行程序代码,可执行程序代码包括指令。
电子设备可以包括音频模块370,该音频模块370可以包括:扬声器,受话器,麦克风,耳机接口,以及应用处理器等实现音频功能。例如音乐播放,录音等。
电子设备可以包括传感器模块380,该传感器模块380可以包括:压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器,骨传导传感器等。本申请实施例中,该加速度传感器以及陀螺仪传感器等可以用于检测电子设备的运动状态;该触摸传感器用于接收用户针对触摸屏的触摸操作。
SIM卡接口395用于连接SIM卡。SIM卡可以通过插入SIM卡接口395,或从SIM卡接口395拔出,实现和电子设备的接触和分离。电子设备可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口395可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口395可以同时插入多张卡。多张卡的类型可以相同,也可以不同。SIM卡接口395也可以兼容不同类型的SIM卡。SIM卡接口395也可以兼容外部存储卡。电子设备通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备中,不能和电子设备分离。
另外,在上述部件之上,运行有操作系统。例如鸿蒙操作系统、iOS操作系统,Android操作系统,或Windows操作系统等。在该操作系统上可以安装运行应用程序。
示例性的,图4为本申请实施例提供的另一种电子设备的硬件结构示意图。
在本申请实施例中,第一设备的结构可以如图4所示,第一设备在图4中统称为电子设备进行介绍,例如该第一设备可以为不具有Modem能力的平板。
参照图4,电子设备可以包括多个子系统,这些子系统协作以执行、协调或监控电子设备的一个或多个操作或功能。电子设备包括处理器410、输入表面420、协调引擎430、电源子系统440、电源连接器450、无线接口460和显示器470。
示例性的,协调引擎430可以用于与电子设备的其他子系统进行通信和/或处理数据。
电子设备的协调引擎430包括或以其他方式可通信地耦接至位于输入表面420下方或与该输入表面集成一体的传感器层。在一种实施例中,输入表面420可以称为触摸屏。
在其他情况下,端信号和/或环信号还可以包括用于令电子设备识别特定用户的特定信息和/或数据。此类信息在本文通常被称为“用户身份”信息。
协调引擎430可以将用户身份信息(如果检测到和/或可复原的话)转发到处理器410。如果用户身份信息不能从尖端信号和/或环信号中复原,则协调引擎430可以可选地向处理器410指示用户身份信息不可用。处理器410能够以任何合适的方式利用用户身份信息(或不存在该信息的情况),包括但不限于:接受或拒绝来自特定用户的输入,允许或拒绝访问电子设备的特定功能等。处理器410可以使用用户身份信息来同时接收来自一个以上的用户的输入。
一般而言,处理器410可被配置为执行、协调和/或管理电子设备的功能。此类功能可以包括但不限于:与电子设备的其他子系统通信和/或交易数据,通过无线接口进行数据通信和/或交易数据,通过有线接口进行数据通信和/或交易数据,促进通过无线(例如,电感式、谐振式等)或有线接口进行电力交换等。
处理器410可被实现为能够处理、接收或发送数据或指令的任何电子设备。例如, 处理器可以是微处理器、中央处理单元、专用集成电路、现场可编程门阵列、数字信号处理器、模拟电路、数字电路或这些设备的组合。处理器可以是单线程或多线程处理器。处理器可以是单核或多核处理器。
在使用期间,处理器410可被配置为访问存储有指令的存储器。该指令可被配置为使处理器执行、协调或监视电子设备的一个或多个操作或功能。
存储在存储器中的指令可被配置为控制或协调电子设备的其他部件的操作,该部件诸如但不限于:另一处理器、模拟或数字电路、易失性或非易失性存储器模块、显示器、扬声器、麦克风、旋转输入设备、按钮或其他物理输入设备、生物认证传感器和/或系统、力或触摸输入/输出部件、通信模块(诸如无线接口和/或电源连接器),和/或触觉或触觉反馈设备。
电子设备还包括电源子系统440。电源子系统440可包括电池或其它电源。
电子设备还包括无线接口460。在一些实施例中,通信接口有利于电子设备与外部通信网络、设备或平台之间的电子通信。
无线接口460可被实现为一个或多个无线接口、蓝牙接口、近场通信接口、磁性接口、通用串行总线接口、电感接口、谐振接口,电容耦合接口、Wi-Fi接口、TCP/IP接口、网络通信接口、光学接口、声学接口或任何传统的通信接口。
电子设备还包括显示器470。显示器470可以位于输入表面420后方,或者可以与其集成一体。显示器470可以通信地耦接至处理器410。处理器410可以使用显示器470向用户呈现信息。
对于本领域的技术人员而言将显而易见的是,上文关于电子设备所呈现的具体细节中的一些细节可为实践特定的实施方案或其等同物所不需要的。类似地,其他电子设备可以包括更多数量的子系统、模块、部件等。在适当的情况下,一些子模块可以被实现为软件或硬件。因此,应当理解,上述描述并非旨在穷举或将本公开限制于本文的精确形式。相反,对于本领域的普通技术人员而言将显而易见的是,根据上述教导内容,许多修改和变型是可能的。
示例性的,图5为本申请实施例提供的一种蜂窝通信功能的使用系统的系统架构示意图。
如图5所示,在一些实施例中,第一设备的分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层等。可能的实现方式中,该Android系统还可以包括硬件层(图5中未示出)。
其中,应用程序层可以包括一系列应用程序包。如图5所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,游戏,视频,以及短信息等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。如图1所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,分布式蜂窝通信模块5011,电话管理器(telephony)5012,分布式总线5013,资源管理器, 通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器5012用于提供第一设备的蜂窝通信功能。例如通话状态的管理(包括接通,以及挂断等)。
分布式蜂窝通信模块5011用于将电话管理器5012的蜂窝通信业务的请求转发至第二设备的分布式蜂窝通信模块5022。第一设备的分布式蜂窝通信模块5011在本申请实施例中的功能具体可参见下述对蜂窝通信功能的使用系统中第一设备的分布式蜂窝通信模块5011的描述。本申请实施例中,该分布式蜂窝通信模块5011中可以存储有配置文件,该配置文件中包括场景信息、蜂窝通信功能、以及HIDL接口之间的对应关系。其中,任一场景可以对应于一个或多个蜂窝通信功能,并且,任一蜂窝通信功能可以对应于一个或多个HIDL接口。其中,该HIDL接口可以为请求类接口和/或上报类接口。
分布式总线5013用于建立第一设备的分布式蜂窝通信模块5011和第二设备的分布式蜂窝通信模块5022的连接通道,连接第一设备的分布式蜂窝通信模块5011和第二设备的分布式蜂窝通信模块5022。在一些实施例中,分布式总线5013可以负责近距离、局域网、或者远场同账号下的设备发现、自连接、鉴权管理等。还可以负责不同通道的调度管理、服务质量体验评估等,对应用程序层透明。还可以负责通道的保持,提供低功耗待机机制。还可以负责控制面信令(例如本申请实施例提及的蜂窝通信业务的请求、蜂窝通信业务的请求对应的响应数据)的转发/响应,以及加密封装等。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(media libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL),HAL,以及在HAL上的RIL模块等。RIL模块上还提供有HIDL接口。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,H.265,H.266,VP9,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
如图5所示,第二设备的分层架构也将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,内核层,以及Modem5021。
其中,应用程序层可以包括一系列应用程序包。如图5所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,游戏,视频,以及短信息等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。如图1所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,分布式蜂窝通信模块5022,电话管理器5023,分布式总线5024、资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。
在一些实施例中,电话管理器5023可用于提供第二设备的蜂窝通信功能。例如通话状态的管理(包括接通,挂断等)。电话管理器5023所接收到的本地的蜂窝通信业务的请求,可以发送到第二设备的分布式蜂窝通信模块5022,由分布式蜂窝通信模块5022将本地的蜂窝通信业务的请求继续发往Modem5021进行处理。
分布式蜂窝通信模块5022用于将第一设备发送的蜂窝通信业务的请求发送至Modem5021处理,并将蜂窝通信业务的请求对应的响应数据发送至第一设备。具体的,第二设备的分布式蜂窝通信模块5022在本申请实施例中的功能具体可参见下述对蜂窝通信功能的使用系统中第二设备的分布式蜂窝通信模块5022的描述。
第二设备的分布式总线5024的原理和执行过程与第一设备的分布式总线5013一 致,可参见,此处不再赘述。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
Modem5021用于将接收到的蜂窝通信业务的请求进行处理,得到蜂窝通信业务的请求对应的响应数据,然后将蜂窝通信业务的请求对应的响应数据发送至分布式蜂窝通信模块5022。
需要说明的是,本申请实施例虽然以Android系统为例进行说明,但是其基本原理同样适用于基于鸿蒙、iOS或Windows等操作系统的电子设备。
如图5所示,基于上述相关技术,本申请实施例提出一种蜂窝通信功能的使用系统。蜂窝通信功能的使用系统,包括:第一设备和第二设备,第一设备的应用框架层中设置有分布式蜂窝通信模块5011和电话管理器5012,第二设备的应用程序框架层中也设置有分布式蜂窝通信模块5022和电话管理器5023,第二设备中还具有Modem5021。第一设备的分布式蜂窝通信模块5011和第二设备的分布式蜂窝通信模块5022之间通过第一设备的分布式总线5013和第二设备的分布式总线5024建立连接。
在一些实施例中,当第二设备已向第一设备共享了自身的蜂窝通信能力(即共享了第二设备的Modem)时,蜂窝通信业务的请求在图5的系统中的处理过程可以是:第一设备触发蜂窝通信业务的请求,并执行步骤S5012,第一设备将蜂窝通信业务的请求发送到本地的电话管理器中,在步骤S5013中,第一设备的电话管理器又将蜂窝通信业务的请求发送到本地的分布式蜂窝通信模块。在步骤S5014中,第一设备的分布式蜂窝通信模块将蜂窝通信业务的请求转发到第二设备的分布式蜂窝通信模块中。第二设备执行步骤S5015,第二设备的分布式蜂窝通信模块将蜂窝通信业务的请求发送给第二设备本地的Modem处理,第二设备的Modem得到蜂窝通信业务的请求对应的响应数据。
示例性的,蜂窝通信业务的请求在系统中的传输过程可以如图5示出的实线的路径所示:第一设备的应用程序层中的短消息应用触发了蜂窝通信业务的请求,该蜂窝通信业务的请求可以是短消息发送请求。第一设备执行步骤S5012,将应用程序层触发的蜂窝通信业务的请求发送到本地的电话管理器5012。步骤S5013中,第一设备的电话管理器5012将蜂窝通信请求发送到第一设备的分布式蜂窝通信模块5011,步骤S5014中,第一设备的分布式蜂窝通信模块5011则将第一设备的电话管理器5012接收到的蜂窝通信业务的请求,转发至第二设备的分布式蜂窝通信模块5022。步骤S5015中,第二设备的分布式蜂窝通信模块5022则将蜂窝通信业务的请求发送给本地的Modem5021处理。在一些实施例中,第二设备的分布式蜂窝通信模块5022通过系统库的硬件抽象层(hardware abstraction layer,HAL)上的无线接口层(radio layer interface,RIL)模块,调用硬件抽象层接口定义语言(HAL interface definition language,HIDL)接口,将蜂窝通信业务的请求传输给本地的Modem5021处理。Modem5021对蜂窝通信业务的请求进行处理之后,会得到蜂窝通信业务的请求对应的响应数据。
在另一些实施例中,第一设备的蜂窝通信业务的请求也可以不通过电话管理器5012发送到分布式蜂窝通信模块5011,例如,IP多媒体子系统(IP multimedia subsystem,IMS)可以在应用程序层直接调用分布式蜂窝通信模块5011,即蜂窝通信业务的请求直接从应用程序层发送到分布式蜂窝通信模块5011。上层应用(即应用程序层和应用程序框架层)调用分布式蜂窝通信模块的方式有很多,本申请实施例对此不做限定。
在一些实施例中,蜂窝通信业务的请求对应的响应数据在图5的系统中的处理过程可以是:步骤S5021中,第二设备的Modem将蜂窝通信业务的请求对应的响应数据发送给本地的分布式蜂窝通信模块,在步骤S5022中,第二设备的分布式蜂窝通信模块将蜂窝通信业务的请求对应的响应数据发送至第一设备的分布式蜂窝通信模块。步骤S5023中,第一设备的分布式蜂窝通信模块将蜂窝通信业务的请求对应的响应数据发送至本地的电话管理器,步骤S5024中,第一设备的电话管理器将蜂窝通信业务的请求对应的响应数据发送给触发蜂窝通信业务的请求的应用。
示例性的,蜂窝通信业务的请求对应的响应数据的传输路径可以如图5中的虚线的路径所示:步骤S5021中,第二设备的Modem5021将蜂窝通信业务的请求对应的响应数据传输给分布式蜂窝通信模块5022。在一些实施例中,执行步骤S5021时,第二设备的Modem5021将蜂窝通信业务的请求对应的响应数据通过系统库中的RIL模块调用HIDL接口,将蜂窝通信业务的请求对应的响应数据传输至分布式蜂窝通信模 块5022,步骤S5022中,分布式蜂窝通信模块5022将蜂窝通信业务的请求对应的响应数据传输发送给第一设备的分布式蜂窝通信模块5011,步骤S5023中,第一设备的分布式蜂窝通信模块5011将蜂窝通信业务的请求对应的响应数据发送至电话管理器5012,步骤S5024中,电话管理器5012将蜂窝通信业务的请求对应的响应数据传输至短消息应用。
需要说明的是,第一设备的分布式总线5013和第二设备的分布式总线5024之间建立通信连接的形式有很多,可以通过有线的形式建立通信连接,还可以通过无线的形式建立通信连接。例如图1中,当第一设备为平板12,第二设备为手机11时,手机11和平板12可以通过蓝牙的方式建立无线连接,还可以通过连接同样的无线Wi-Fi建立通信连接。第一设备和第二设备之间建立通信连接的方式的不同并不影响本申请实施例的实现。
由于第一设备的蜂窝通信业务的请求均能够通过第一设备的分布式蜂窝通信模块5011转发给第二设备的Modem5021处理,且第二设备的分布式蜂窝通信模块5022能通过将蜂窝通信业务的请求对应的响应数据发送给第一设备的分布式蜂窝通信模块5011的方式,实现将蜂窝通信业务的请求对应的响应数据传输至第一设备,因此第一设备能够实现使用第二设备所具有的所有蜂窝通信能力,即能够使用所有的蜂窝通信功能。
可能的实现方式中,如图5所示,该电话管理器5012中还可以包括:开发工具包的接口、电话管理器的服务(telephony service)接口、以及无线电接口(Radio Interface)的访问接口等。
示例性的,图6为本申请实施例提供的一种蜂窝通信业务的请求在应用程序框架层的路径示意图。如图6所示,第一设备蜂窝通信业务的请求在应用程序框架层中的发送过程为:第一设备蜂窝通信业务的请求通过蜂窝通信业务的请求调用电话管理器中的Android开放源代码项目(android open source project,AOSP)的开发工具包(software development kit,SDK)应用程序接口(application programming interface,API),然后AOSP SDK API又再调用电话管理器的服务接口,然后电话管理器的服务再调用无线电接口的访问接口,然后再由无线电接口的访问接口发送到第一设备的分布式蜂窝通信模块,第一设备的分布式蜂窝通信模块实现接收本地电话管理器的蜂窝通信业务的请求。其中,由于第一设备的分布式蜂窝通信模块预先创建了请求接口的代理对象,因此能够代理无线电接口的访问接口,接收发送到无线电接口的访问接口的蜂窝通信业务的请求。
可能的实现方式中,如图5所示,该第一设备的分布式蜂窝通信模块5011也可以设置在系统库的RIL模块中;适应的,该第二设备的分布式蜂窝通信模块5022则可以设置在系统库的供应商无线接口层(Vendor-RIL)中。
示例性的,图7为本申请实施例提供的另一种蜂窝通信功能的使用系统的系统架构示意图。如图7所示,第一设备的分布式蜂窝通信模块701还可以设置在系统库中的RIL模块中,第二设备的分布式蜂窝通信模块702则可以设置在系统库的供应商无线接口层(Vendor-RIL)中。并且,第一设备的分布式蜂窝通信模块701可以和第二 设备的分布式蜂窝通信模块702之间建立连接。
在一些实施例中,可以是通过第一设备中的分布式总线703和第二设备中的分布式总线704,建立第一设备的分布式蜂窝通信模块701和第二设备的分布式蜂窝通信模块702之间的连接。并且,在第一设备向第二设备发送蜂窝通信能力共享请求的过程中,第一设备可以不用创建相关接口的代理对象,并且第二设备可以不用创建相关接口的代理对象,通过预先对第一设备的分布式蜂窝通信模块701进行预配置,即可实现让第一设备的分布式蜂窝通信模块701将通过RIL模块上的HIDL接收到的蜂窝通信业务的请求,转发至第二设备的分布式蜂窝通信模块702中。通过对第二设备的分布式蜂窝通信模块702进行预设置,即可实现让第二设备的分布式蜂窝通信模块702将蜂窝通信业务的请求对应的响应数据转发至第一设备的分布式蜂窝通信模块701,还将本地的Modem上报的蜂窝通信业务,转发至第一设备的分布式蜂窝通信模块中。
如图7所示,由于第一设备的分布式蜂窝通信模块701设置于第一设备的系统库的RIL中,第二设备的分布式蜂窝通信模块702设置在第二设备的系统库中,因此在第一设备向第二设备发送蜂窝通信业务的请求时,第一设备的蜂窝通信业务的请求(例如短消息发送请求)是从第一设备的应用程序层发送到应用程序框架层中的电话管理器、然后从应用程序框架层中的电话管理器再到系统库中的分布式蜂窝通信模块701,然后再通过第一设备的分布式总线703和第二设备的分布式总线704,发送到第二设备系统库中的分布式蜂窝通信模块702,分布式蜂窝通信模块702再将蜂窝通信业务的请求发送到本地的Modem中,如图7中的虚线路径所示:Modem又将蜂窝通信业务的请求对应的响应数据发送到分布式蜂窝通信模块702,分布式蜂窝通信模块702通过第二设备的分布式总线704和第一设备的分布式总线703,将蜂窝通信业务的请求对应的响应数据发送到第一设备的分布式蜂窝通信模块701,然后第一设备的分布式蜂窝通信模块701将蜂窝通信业务的请求对应的响应数据发送到电话管理器,再由电话管理发送到第一设备的对应的应用中。
需要说明的是,图7中的第一设备和第二设备之间对蜂窝通信能力的使用过程的原理和执行过程与上述对图5示出的步骤的原理和执行过程是相似的,可参见,此处不再赘述。
可能的实现方式中,如图5所示,该第一设备的分布式蜂窝通信模块5011也可以设置在系统库的Vendor-RIL中;适应的,该第二设备的分布式蜂窝通信模块5022则可以设置在系统库的Vendor-RIL中。
示例性的,图8为本申请实施例提供的再一种蜂窝通信功能的使用系统的系统架构示意图。如图8所示,第一设备的分布式蜂窝通信模块701还可以设置在系统库中的Vendor-RIL中,第二设备的分布式蜂窝通信模块702则可以设置在系统库的Vendor-RIL中。
如图8中的实现路径所示:第一设备的蜂窝通信业务的请求(例如短消息发送请求)是从第一设备的应用程序层发送到应用程序框架层中的电话管理器、然后从应用程序框架层中的电话管理器再到系统库中的RIL模块,然后由RIL模块到分布式蜂窝模块501,然后再通过第一设备的分布式总线703和第二设备的分布式总线704,发送到第二设备系统库中的分布式蜂窝通信模块702,分布式蜂窝通信模块702再将蜂窝 通信业务的请求发送到本地的Modem中,如图8中的虚线路径所示:Modem又将蜂窝通信业务的请求对应的响应数据发送到分布式蜂窝通信模块702,分布式蜂窝通信模块702通过第二设备的分布式总线704和第一设备的分布式总线703,将蜂窝通信业务的请求对应的响应数据发送到第一设备的分布式蜂窝通信模块701,然后第一设备的分布式蜂窝通信模块701将蜂窝通信业务的请求对应的响应数据发送到RIL模块,RIL模块则继续发送到电话管理器,再由电话管理发送到第一设备的对应应用中。蜂窝通信业务的传输路径与图8示出的虚线路径一致,此处不再赘述。
需要说明的是,图8中的第一设备和第二设备之间对蜂窝通信能力的使用过程的原理和执行过程与上述对图7示出的步骤的原理和执行过程是相似的,可参见,此处不再赘述。
基于图5示出的系统架构,下面将具体结合图9对本申请实施例中第一设备和第二设备之间的蜂窝通信功能的使用过程进行描述。
示例性的,图9为本申请实施例提供的一种蜂窝通信功能的使用方法的流程示意图。以第一设备和第二设备均为Android操作系统的电子设备为例,其中第一设备为蜂窝通信能力的需求方(或者说使用方),第二设备为蜂窝通信能力的提供方。
本申请实施例中,如图5所示,该第一设备的分布式蜂窝通信模块5011,以及第二设备的分布式蜂窝通信模块5022均可以预设有配置文件,该配置文件中可以预设有场景信息、蜂窝通信功能、以及接口之间的对应关系。其中,该场景信息可以包括下述一种或多种:工作场景、游戏场景、省电场景、睡眠场景、或登机场景等;任一场景所对应的蜂窝通信功能可以包括下述一种或多种:基础公共功能、主叫通话功能、被叫通话功能、短信收发功能、读取SIM卡功能、或数据业务上网功能等;任一蜂窝通信功能所对应的接口可以包括下述一种或多种:请求类接口(如蜂窝通信业务的请求对应的接口)、或上报类接口(如蜂窝通信业务的通知对应的接口、或蜂窝通信业务的响应消息对应的接口)等。
可以理解的是,本申请实施例中可以支持该场景信息以及该蜂窝通信功能的自定义,并且,也可以支持该场景信息以及该蜂窝通信功能的更新,本申请实施例中的提供的蜂窝通信功能的使用方法不限定于上述场景以及蜂窝通信功能。例如,可以通过设备的分布式蜂窝通信模块中的配置文件的更新,实现该场景信息以及蜂窝通信功能的更新,使得第一设备以及第二设备可以基于更新后的配置文件,在不同场景中实现不同的蜂窝通信功能。
如图9所示,该蜂窝通信功能的使用方法具体可以包括以下步骤:
S901、第二设备开启蜂窝通信能力共享功能。
蜂窝通信能力共享功能指的是将本地的Modem共享给其他设备使用的功能,由于Modem能够提供蜂窝通信能力,因此将本地的Modem共享给其他设备使用即意味着共享给其他设备使用蜂窝通信能力。本申请实施例中的第二设备指的是具有蜂窝通信能力的电子设备。
在一些实施例中,响应于用户的操作,第二设备开启蜂窝通信能力共享功能,在另一些实施例中,第二设备可以通过第二设备的分布式蜂窝通信模块开启蜂窝通信能力共享功能。其中,第二设备的分布式蜂窝通信模块可以如图5示出的分布式蜂窝通 信模块5022所示,设置于第二设备的应用程序框架层。在另一些实施例中,步骤S901可以由第二设备中的一个或多个模块配合执行,执行步骤S901的模块可以位于第二设备中的不同的框架层。
在一些实施例中,当第二设备的分布式蜂窝通信模块开启蜂窝通信能力共享功能时,第二设备处于可被其他设备发现的状态,其他设备发现第二设备时可知道第二设备当前的蜂窝通信能力共享功能是开启的,能够被其他设备共享使用。而使第二设备处于可被其他设备发现的状态的方式由很多,例如第二设备开启蓝牙可被开启蓝牙功能的其他设备发现、第二设备接入局域网可被局域网内的其他设备发现、第二设备接入近场网络(例如无线网络)可被近场网络中的其他设备发现、第二设备登录账号,可被该账号下的其他设备发现等等。
在一些实施例中,可以是第二设备的开机操作触发第二设备的分布式蜂窝通信模块执行开启蜂窝通信能力共享功能,也可以是第二设备开机后默认开启蜂窝通信能力共享功能,还可以是用户通过点击第二设备界面上的开启蜂窝通信能力的开关按键,本申请实施例中对此不做限定。示例性的,如图11中的a所示的界面,蜂窝通信共享设置界面上具有蜂窝通信能力的开关按键,当用户将开关按键1101操作为如图11中的a所示的界面时,蜂窝通信能力共享功能开启。用户开启蜂窝通信能力的开关按键的操作指令通过应用程序层传达到应用程序框架层中的第二设备的分布式蜂窝通信模块,实现触发第二设备的分布式蜂窝通信模块开启蜂窝通信能力共享功能。
可能的实现方式中,也可以不执行步骤S901,第二设备默认开启蜂窝通信能力共享功能,或者检测到特定条件时,自动开启蜂窝通信能力共享功能。例如,特定条件可以是检测到附近有相同品牌的设备,或者服务器通知开启等。
S902、第一设备查询网络中开启蜂窝通信能力共享功能的设备。
第一设备具有发现设备的功能,网络中开启了蜂窝通信能力共享功能的设备能够被第一设备发现。在一些实施例中,第一设备查询出网络中开启蜂窝通信能力共享功能的设备之后,还可以展示在第一设备的界面上,供用户进行选择。例如图11中的a所示的界面,设备发现界面上展示了可用蜂窝通信设备(即网络中开启蜂窝通信能力共享功能的设备),如设备1和设备2均为网络中开启蜂窝通信能力共享功能的设备,如按键开关1102所示代表着用户不使用设备1的蜂窝通信能力,如开关按键1103所示代表着用户选用设备2的蜂窝通信能力。
在一些实施例中,用户可以同时选择连接设备1和设备2,此时用户可以同时使用至少两个设备的蜂窝通信能力。例如,设备1装有电信卡,设备2装有移动卡,则用户可以在设备上同时使用设备1和设备2的蜂窝通信能力,即同时使用电信和移动的卡。
在一些实施例中,第一设备可以通过第一设备的分布式蜂窝通信模块执行步骤S902。其中,第一设备的分布式蜂窝通信模块可以如图5所示,设置于第一设备的应用程序框架层。第一设备的分布式蜂窝通信模块能够通过第一设备的蓝牙发现功能查询到开启了蓝牙的、且开启蜂窝通信能力共享功能的设备,还可以是查询第一设备所处局域网内的、开启了蜂窝通信能力共享功能的设备,还可以是查询第一设备所在的近场网络内的、开启了蜂窝通信能力共享功能的设备,还可以是查询第一设备的登录 账户下的其他设备。
在一些实施例中,第一设备的分布式蜂窝通信模块可以通过第一设备中的分布式总线实现在近场网络、局域网、或者远场网络中发现开启蜂窝通信能力共享功能的设备,进而实现查询到网络中开启蜂窝通信能力共享功能的设备。例如,第一设备的分布式蜂窝通信模块可以通过分布式总线发现远场网络中相同账号下开启了蜂窝通信能力共享功能的设备。
在一些实施例中,第一设备与第二设备可以通过有线方式建立通信连接;或者,第一设备与第二设备也可以通过无线方式建立通信连接,例如第一设备与第二设备通过蓝牙、WIFI、或连接到同一云端账号等无线方式建立通信连接,本申请实施例中对第一设备与第二设备建立通信连接的方式不做限定。
可以理解的是,第一设备与第二设备可以通过分布式总线实现上述通信连接的各种方式。可能的实现方式中,如图5所示,可以通过第一设备的分布式总线5013和第二设备的分布式总线5024实现上述通信连接方式。
在一些实施例中,步骤S902可以由用户触发执行,具体的,用户通过第一设备显示界面执行查询网络中开启蜂窝通信能力共享功能的设备的操作,第一设备的分布式蜂窝通信模块响应于用户的操作,执行步骤S902,也可以是第一设备在开机时自动触发执行步骤S902,触发执行步骤S902的方式有很多,包括但不限于本申请实施例所提出的内容。
由于本申请实施例中第二设备执行了步骤S901,因此在第一设备执行步骤S902时,就能够查询到第二设备开启了蜂窝通信能力共享功能的设备,知道第二设备的蜂窝通信能力能够被共享使用,即第二设备的Modem允许共享给第一设备。
S903、第一设备从查询出的所有开启蜂窝通信能力共享功能的设备中,选取出第二设备。
本申请实施例中的第二设备指的是第一设备所需使用蜂窝通信能力的设备,即第一设备选择使用第二设备的蜂窝通信能力。
第一设备通过步骤S902会查询出一个或多个开启了蜂窝通信能力共享功能的设备。第一设备可以从查询出的所有开启蜂窝通信能力共享功能的设备中,选取出自身想要使用其蜂窝通信能力的设备,作为第二设备。
在一些实施例中,可以从查询出的所有开启蜂窝通信能力共享功能的设备中选取出其中一个设备,作为第二设备,即第一设备仅选择使用一个设备所具有的蜂窝通信功能。在另一些实施例中,可以从查询出的所有开启蜂窝通信能力共享功能的设备中选取出多个设备,均作为第二设备,即第一设备可以选择使用多个设备各自具有的蜂窝通信功能。
在一些实施例中,步骤S903可以通过第一设备的分布式蜂窝通信模块执行,也可以是通过第一设备中的多个模块配合执行。
在一些实施例中,第二设备可以是由第一设备的分布式蜂窝通信模块按照预配置好的选取规则自动选定的。选取规则可以是随机任意选取,可以是优先选取距离最近的设备,也可以是优先选取信号最强的设备等等。选取规则的设定方式有很多,包括但不限于本申请实施例所提出的内容。
在另一些实施例中,第一设备可以是响应用户的选取操作,从查询出的所有开启蜂窝通信能力共享功能的设备中,选取出第二设备。例如,在执行步骤S902之后,第一设备的分布式蜂窝通信模块将查询出的所有开启蜂窝通信能力共享功能的设备发送回应用程序层,显示于第一设备的显示界面上,用户再从显示界面上所显示的所有设备中,通过点击的方式选取出第二设备。例如图11中的a所示的界面,用户从可用蜂窝通信设备的列表中选取出了设备2,作为第二设备。然后第一设备响应用户的选取操作,执行步骤S903,即从查询出的所有开启蜂窝通信能力共享功能的设备中,选取出用户选取操作所指定的第二设备。第一设备选取出第二设备的方式有很多,包括但不限于本申请实施例所提出的内容。
需要说明的是,步骤S901至S903为可选步骤,在一些实施例中,第二设备是提前预置的,当第一设备发现第二设备时,可以直接建立连接,即直接执行步骤S904。例如,当第二设备和第一设备都处于开机状态时,默认直接执行步骤S904,可以不执行步骤S901至步骤S903。
S904、第一设备向第二设备发送套接字(socket)连接请求。
若想建立第一设备和第二设备之间的socket连接,至少需要一对socket,其中一个socket运行于第一设备(即蜂窝通信能力的使用方),另一个运行于第二设备(即蜂窝通信能力的提供方)。
在一些实施例中,可以是第一设备的分布式蜂窝通信模块使用第一设备的socket向第二设备的分布式蜂窝通信模块提出socket连接请求。socket连接请求中描述了要连接的第二设备的套接字,指出第二设备的套接字的地址和端口号,socket连接请求也描述了第一设备自身的套接字。
第一设备创建Socket连接请求时,可以指定使用的协议,例如发送控制协议(Transmission Control Protocol,TCP)、用户数据报协议(User Datagram Protocol,UDP)等。
S905、第二设备响应于socket连接请求,与第一设备建立连接。
第二设备响应于socket连接请求,与第一设备建立连接之后,第一设备和第二设备之间则可以实现通信。
在一些实施例中,可以是第二设备的分布式蜂窝通信模块接收第一设备发送的socket连接请求之后,响应socket连接请求,然后进行一些对连接请求鉴权的操作,鉴权通过后与第一设备的分布式蜂窝通信模块建立连接。在一些实施例中,第二设备的分布式蜂窝通信模块与第一设备的分布式蜂窝通信模块可以通过分布式总线建立连接。第一设备的分布式蜂窝通信模块与第一设备的分布式蜂窝通信模块可以通过分布式总线建立连接之后,分布式通信总线可以维持连接通道不断开。分布式总线还可以在第一设备和第二设备处于连接状态的过程中,处于低功耗待机机制,仅在需要分布式总线进行发送工作时处于工作状态,其他时刻处于低功耗的待机状态。示例性的,第一设备的分布式蜂窝通信模块和第二设备的分布式蜂窝通信模块可以通过如图5示出的分布式总线5013和分布式总线5024建立连接。
在一些实施例中,步骤S904至步骤S905可以理解为是第一设备的分布式蜂窝通信模块和第二设备的分布式蜂窝通信模块之间建立连接的过程,建立连接的方式除了 通过socket方式建立,还可以是硬件连接的方式、无线网络连接的方式、或者其他网络连接协议的方式等建立,即第一设备的分布式蜂窝通信模块和第二设备的分布式蜂窝通信模块之间建立连接的方式有很多,包括但不限于本申请实施例所提出的内容。
S906、第一设备向第二设备发送蜂窝通信能力共享请求。
第一设备与第二设备建立连接之后,自动触发向第二设备发送蜂窝通信能力共享请求。蜂窝通信能力共享请求用于请求第二设备共享第二设备自身具有的蜂窝通信能力,也可以理解为时请求给予第一设备使用第二设备的Modem的权限。
在一些实施例中,蜂窝通信能力共享请求可以由第一设备的分布式蜂窝通信模块触发生成,发送给第二设备的分布式蜂窝通信模块。在另一些实施例中,也可以是在第一设备中的一个或多个模块的配合下,将蜂窝通信能力共享请求发送给第二设备。
在一些实施例中,蜂窝通信能力共享请求中可以携带有第一设备的唯一标识(例如第一设备的地址和端口号)以及第二设备的唯一标识(例如第二设备的地址和端口号)。
在一些实施例中,若步骤S905中第一设备的分布式蜂窝通信模块和第二设备的分布式蜂窝通信模块通过分布式总线连接,那么第一设备执行步骤S906时,也是通过分布式总线发送通信能力共享请求。在一些实施例中,分布式总线可以对发送的数据(例如蜂窝通信能力共享请求)进行加密封装,以保障发送过程中的数据安全。
S907、第一设备创建请求接口的代理对象。
请求接口的代理对象用于将在第一设备本地接收到的蜂窝通信业务的请求,转发至第二设备的分布式蜂窝通信模块。
蜂窝通信业务的请求是用于请求执行应用相关的蜂窝通信业务功能的请求,例如短信应用触发的短信发送请求、电话应用触发的电话拨打请求、电话接听请求等。蜂窝通信业务的请求对应的响应数据是Modem处理了蜂窝通信业务的请求之后的处理结果数据,例如若蜂窝通信业务的请求为短信发送请求,那么该蜂窝通信业务的请求对应的响应数据可以是说明了短信是否发送成功、短信发送失败的具体原因等。
在一些实施例中,可以是第一设备的分布式蜂窝通信模块执行创建的请求接口的代理对象。请求接口可以创建于第一设备的分布式蜂窝通信模块内部。
具体的,执行步骤S907的过程可以是:基于代理模式这一设计模式,创建请求接口的代理对象。其中,创建请求接口的代理对象可以是创建面向上述提及的具有蜂窝通信能力的电子设备使用本地的蜂窝通信功能的方案中的第一类HIDL接口的代理对象。创建的请求接口的代理对象具备上述提及的第一类HIDL接口的功能,且扩展了其他的功能,通过在请求接口的代理对象中扩展额外的功能操作的方式,可以实现让请求接口的代理对象能够将第一设备本地的电话管理器接收到的蜂窝通信业务的请求,转发至第二设备的分布式蜂窝通信模块。需要说明的是,有关代理模式的具体原理介绍可参见上述提及到的代理模式的相关部分,此处不再赘述。有关具有蜂窝通信能力的电子设备使用本地的蜂窝通信功能的方案的详细介绍可参见上述提及的具有蜂窝通信能力的电子设备使用本地的蜂窝通信功能的方案的相关部分,此处不再赘述。
在另一些实施例中,第一设备可以创建面向Radio Interface的请求接口代理对象,将Radio Interface切换至远程访问模式。当第一设备本身具有蜂窝通信能力,即第一 设备具有Modem时,可以通过将Radio Interface切换至远程访问模式,实现不使用本地的Modem处理蜂窝通信请求,而是将蜂窝通信请求给远端的设备(即第二设备)的Modem来处理。在一些实施例中,第一设备所创建的请求接口的代理对象可以实现异步调用处理。
在一些实施例中,除了执行步骤S907,还需要对第一设备应用程序框架层中的电话管理器进行修改,以使得电话管理器在接收到蜂窝通信业务的请求后,不调用原本的HIDL接口,而是调用步骤S907中创建的请求接口的代理对象。
在一些实施例中,步骤S907可以是由步骤S905或者步骤S906触发执行,即第一设备和第二设备之间建立连接之后,触发执行步骤S907,或者是第一设备的分布式蜂窝通信模块发送蜂窝通信能力共享请求后自动触发执行步骤S907。在另一些实施例中,也可以是由步骤S909触发执行,即在收到蜂窝通信能力共享成功信息,确保第二设备成功响应蜂窝通信能力的共享请求后,再触发执行步骤S907。
上述提及的蜂窝通信功能的使用方案中,需要通过第一设备和第二设备配置的相同的特定应用,从应用程序层面将第一设备的请求转发到具有蜂窝通信能力的设备(即第二设备)中,然后再由第二设备利用蜂窝通信能力,将应用程序层面的请求使用本地的Modem进行处理,完成特定应用所支持的蜂窝通信功能的转移。因此各设备必须安装相同的特定应用才能完成蜂窝通信功能的转移,且一个特定应用仅支持一项蜂窝通信功能的转移,部分基础的蜂窝通信功能甚至不能够通过配置特定应用的方式实现功能转移。
而本申请实施例中,由于第一设备中新增加了一个分布式蜂窝通信模块,第一设备的分布式蜂窝通信模块又通过创建请求接口的代理对象的方式,实现将第一设备的电话管理器所接收到的蜂窝通信业务的请求不再通过HIDL接口发送给Modem,而是通过请求接口的代理对象请求接口的代理对象将蜂窝通信业务的请求转发给第二设备的分布式蜂窝通信模块,进而第二设备的分布式蜂窝通信模块就能够再将蜂窝通信业务的请求发送往本地的Modem进行处理,帮助第一设备使用蜂窝通信能力。其中,Modem可以是图5中的调制解调处理器5021。如图5所示,第一设备的分布式蜂窝通信模块通过创建请求接口的代理对象的方式,实现建立第一设备和第二设备在应用程序框架层之间的连接,进而可以实现执行图5中的步骤S5014,即将蜂窝通信业务的请求转发给第二设备,进一步的,第二设备可以执行步骤S5015,将蜂窝通信业务的请求发送到调制解调处理器5021中。又例如,Modem还可以是图1中手机11中的Modem。如图1所示,当第一设备为智慧屏16,第二设备为手机11时,智慧屏16通过创建请求接口的代理对象请求接口的代理对象,将蜂窝通信业务的请求转发给手机11中,进而手机11就能够再将蜂窝通信业务的请求发送往手机11的Modem进行处理,帮助智慧屏16使用手机11的蜂窝通信能力。
由此可以看出,本申请实施例中,第一设备的蜂窝通信业务的请求不需要经过第二设备的应用程序层面,因此也就不依赖于第二设备和第一设备中所需安装的相同的特定应用,又由于第一设备创建请求接口的代理对象之后,第一设备的蜂窝通信业务的请求均能够通过第一设备的分布式蜂窝通信模块转发给第二设备的Modem处理,因此第一设备能够实现使用第二设备所具有的所有蜂窝通信能力,而不像现有技术中一 样仅能够使用各设备安装的应用所支持转移的蜂窝通信功能。
需要说明的是,步骤S907中第一设备所创建的接口的类型和具体方式不做限定,第一设备除了可以创建请求接口的代理对象,也可以创建其他类型接口的代理对象。
S908、第二设备响应蜂窝通信能力共享请求,创建响应接口的代理对象和通知接口的代理对象。
其中,响应接口的代理对象用于将蜂窝通信业务的请求对应的响应数据转发至第一设备的分布式蜂窝通信模块。通知接口的代理对象用于将本地的Modem上报的蜂窝通信业务的通知,转发至第一设备的分布式蜂窝通信模块。在一些实施例中,当Modem检测到有蜂窝通信业务时,例如检测到有短信通知,则会通过通知接口的代理对象通知第二设备的分布式蜂窝通信模块,而通知接口的代理对象就会将蜂窝通信业务的通知发送到第一设备的分布式蜂窝通信模块。其中,蜂窝通信业务的通知的格式、数量和内容具体可以参考安卓或者IOS等操作系统的规定,本申请实施例在此不做限定。而Modem上报蜂窝通信业务的通知的具体方式也可以参考安卓或者IOS等操作系统的规定,本申请实施例在此不做限定。
蜂窝通信业务的请求对应的响应数据为用于响应蜂窝通信业务的请求的数据,与蜂窝通信业务的请求对应。在一些实施例中,蜂窝通信业务的通知可以是例如第二设备的SIM卡收到的短信,呼入第二设备的SIM卡的电话等等。蜂窝通信业务的请求对应的响应数据与蜂窝通信业务都可以来源于Modem,由Modem上报发送。
在一些实施例中,可以是第二设备的分布式蜂窝通信模块执行创建的响应接口的代理对象和通知接口的代理对象。响应接口的代理对象和通知接口的代理对象可以创建于第二设备的分布式蜂窝通信模块内部。
具体的,执行步骤S908的过程可以是,基于代理模式这一设计模式,创建响应接口的代理对象和通知接口的代理对象。其中,响应接口的代理对象为上述提及的具有蜂窝通信能力的电子设备使用本地的蜂窝通信功能的方案中的第二类HIDL接口的代理对象。创建的响应接口的代理对象具备上述提及的第二类HIDL接口的功能,且扩展了其他的功能,通过在响应接口的代理对象中扩展额外的功能操作的方式,可以实现让响应接口的代理对象能够将蜂窝通信业务的请求对应的响应数据转发至第一设备的分布式蜂窝通信模块。而通知接口的代理对象为上述提及的具有蜂窝通信能力的电子设备使用本地的蜂窝通信功能的方案中的第三类HIDL接口的代理对象,创建的通知接口的代理对象具备上述提及的第三类HIDL接口的功能,且扩展了其他的功能,通过在通知接口的代理对象中扩展额外的功能操作的方式,可以实现让通知接口的代理对象能够将本地的Modem上报的蜂窝通信业务的通知,转发至第一设备的分布式蜂窝通信模块。
需要说明的是,有关代理模式的具体原理介绍可参见上述提及到的代理模式的相关部分,此处不再赘述。有关具有蜂窝通信能力的电子设备使用本地的蜂窝通信功能的方案的详细介绍可参见上述提及的具有蜂窝通信能力的电子设备使用本地的蜂窝通信功能的方案的相关部分,此处不再赘述。
蜂窝通信业务的请求对应的响应数据原本是从Modem通过上述提及的第二类HIDL接口发送到本地应用程序框架层的电话管理器的,但响应接口的代理对象创建了 之后,Modem需要发送的蜂窝通信业务的请求对应的响应数据会发送给响应接口的代理对象,而不会直接返回给本地的电话管理器。
蜂窝通信业务的通知原本也是需从Modem通过第三类HIDL接口主动上报至本地应用程序框架层的电话管理器的,但通知接口的代理对象创建了之后,Modem需要上报的蜂窝通信业务的通知会发送给通知接口的代理对象,而不会发送给本地的电话管理器。通过响应接口的代理对象和通知接口的代理对象,Modem通知的蜂窝通信业务的请求对应的响应数据以及蜂窝通信业务的通知,可全部都发送到第二设备的分布式蜂窝通信模块,后续再由第二设备的分布式蜂窝通信模块进行分发。
由上述提及的一种具有蜂窝通信能力的电子设备使用本地的蜂窝通信功能的方案的介绍中可知,在上述方案中,蜂窝通信业务的请求对应的响应数据以及蜂窝通信业务都是由本地的Modem发送到本地的应用程序框架层中的电话管理器,然后电话管理器再直接发送到本地的蜂窝通信业务的请求对应的应用,即蜂窝通信业务的请求对应的响应数据以及蜂窝通信业务仅能够在具有蜂窝通信能力的设备的本地发送。而本申请实施例中,为了让第一设备能够具有第二设备的蜂窝通信能力,即能够接收到蜂窝通信业务的请求对应的响应数据以及蜂窝通信业务,通过在第二设备中新增一个分布式蜂窝通信模块,然后第二设备的分布式蜂窝通信模块通过创建响应接口的代理对象和通知接口的代理对象的方式,使得第二设备的Modem处理得到的蜂窝通信业务的请求对应的响应数据和蜂窝通信业务的通知,不再从Modem发送到电话管理器,而是由Modem发送到第二设备的分布式蜂窝通信模块,第二设备的分布式蜂窝通信模块就会通过创建好的响应接口的代理对象接收蜂窝通信业务的请求对应的响应数据,通过通知接口的代理对象接收蜂窝通信业务,然后将接收到的蜂窝通信业务的通知和蜂窝通信业务的请求对应的响应数据发送到第一设备的分布式蜂窝通信模块。
因此第一设备将蜂窝通信业务的请求转发到第二设备后,第二设备的分布式蜂窝通信模块能够通过创建的响应接口的代理对象实现让第一设备接收到该蜂窝通信业务的请求对应的响应数据,能够使第一设备成功实现使用第二设备的蜂窝通信能力。且第二设备还能通过通知接口的代理对象主动向第一设备上报蜂窝通信业务的通知。
在一些实施例中,创建响应接口的代理对象和通知接口的代理对象可以是仅针对第一设备创建的,即通知接口的代理对象和通知接口的代理对象只用于转发到第一设备的分布式蜂窝通信模块,而不用于转发到其他设备的分布式蜂窝通信模块。若有其他设备发送蜂窝通信能力共享请求,则需针对其他设备创建其他设备专属的通知接口的代理对象和通知接口的代理对象处理。在另一些实施例中,创建的响应接口的代理对象和通知接口的代理对象可以是针对于所有想用使用第二设备共享的蜂窝通信能力的设备创建的,即通知接口的代理对象和通知接口的代理对象可转发到所有发出了蜂窝通信能力共享请求的设备的分布式蜂窝通信模块,并不单单针对于第一设备。
在一些实施例中,第二设备的分布式蜂窝通信模块接收到蜂窝通信能力共享请求,响应蜂窝通信能力共享请求之后,可以是直接为第一设备创建响应接口的代理对象和通知接口的代理对象,也可以是在对蜂窝通信能力共享请求进行一系列鉴权操作之后,在鉴权通过后再创建响应接口的代理对象和通知接口的代理对象。如果鉴权不通过,那就不进行创建。
现有方案中,只能通过单独开发应用的方式实现某项蜂窝通信能力的跨设备使用,其他应用无法使用蜂窝通信能力。而本方案中,通过第一设备创建请求接口的代理对象,第二设备创建响应接口的代理对象和通知接口的代理对象,可实现让第一设备调用第二设备的蜂窝功能,第一设备相当于在本地模拟一个蜂窝模块,从而让第一设备能具有完整的蜂窝通信能力。
需要说明的是,除了可以通过步骤S907和步骤S908以使得第一设备具有使用第二设备的所有蜂窝通信能力的条件外,也可以通过其他的方式使得第一设备具有使用第二设备的所有蜂窝通信能力的条件,步骤S907和步骤S908仅是让第一设备和第二设备之间具备第一设备使用第二设备的所有蜂窝通信能力的条件的一种实施方式。
还需要说明的是,步骤S908中第二设备创建的接口的类型和方式,本申请实施例中不做限定,第二设备也可以创建其他类型接口的代理对象。在一些实施例中,若第二设备只具有响应接口,而不具有通知接口,则也可以在执行步骤S908时只创建响应接口的代理对象。
S909、第二设备向第一设备发送蜂窝通信能力共享成功信息。
蜂窝通信能力共享成功信息用于说明第二设备已经接受了步骤S906中第一设备所发送的蜂窝通信能力共享请求,并愿意向第一设备共享第二设备所具有的蜂窝通信能力,进而第一设备可以获得第二设备的所有可共享使用的蜂窝通信能力。
可能的实现方式中,该蜂窝通信能力共享信息中可以包括第二设备的所有共享使用的蜂窝通信能力的信息,当第一设备接收到该蜂窝通信能力共享成功信息时,可以获取第二设备的所有可共享使用的蜂窝通信能力。
通过步骤S901至步骤S909,第一设备完成了使用第二设备的Modem的配置工作,第二设备完成了为第一设备提供第二设备的Modem的配置工作,即通过步骤S901至步骤S909完成了第一设备在使用第二设备的蜂窝通信能力之前的准备工作。
在一些实施例中,可以是由第二设备的分布式蜂窝通信模块向第一设备的分布式蜂窝通信模块发送蜂窝通信能力共享成功信息。
需要说明的是,步骤S901至步骤S909仅是实现第一设备在使用第二设备的蜂窝通信能力之前的准备工作的一种实施方式,在另一些实施例中,也可以通过其他方式完成第一设备在使用第二设备的蜂窝通信能力之前的准备工作。
S910、第一设备进行场景识别,并根据场景确定是否可以开启蜂窝通信能力。
本申请实施例中,第一设备中可以存储有场景与蜂窝通信功能之间的对应关系。该场景与蜂窝通信功能之间的对应关系可以为:第一设备中预设的,或者,该场景与蜂窝通信功能之间的对应关系可以为第一设备基于用户使用第一设备的历史数据的自学习得到的。其中,该场景可以为第一设备基于用户当前使用的应用、第一设备显示的内容、和/或第一设备基于人工智能(artificial intelligence,AI)识别模块检测到的用户(或者第一设备)的状态等进行场景识别得到的。
示例性的,第一设备进行场景识别,并且可以基于该场景与蜂窝通信功能之间的对应关系,确定该场景下是否可以开启蜂窝通信功能。例如,当第一设备识别到当前场景,并从该场景与蜂窝通信功能之间的对应关系中查找到该场景对应的蜂窝通信功能时,则可以确定可以开启的蜂窝通信功能;或者,当第一设备未识别到当前场景, 或者识别当前场景且未从该场景与蜂窝通信功能之间的对应关系中查找到当前场景对应的蜂窝通信功能时,则可以确定没有需要开启的蜂窝通信功能。
示例性的,场景可以包括下述一种或多种,例如:工作场景、游戏场景、省电场景、睡眠场景、或登机场景等。可以理解的是,当第一设备处于不同的场景中,可以适配不同的蜂窝通信功能。示例性的,表1为本申请实施例提供的一种场景与蜂窝通信功能对应关系示意表。
表1为本申请实施例提供的一种场景与蜂窝通信功能对应关系示意表
可以理解的是,本申请实施例中对场景的种类和数量,以及该场景所对应的蜂窝通信功能的种类和数量不做具体限定。
示例性的,图10为本申请实施例提供的又一种场景示意图。如图10所示,该场景中可以包括手机1001、以及平板1002。其中,该平板1002可以理解为本申请实施例中描述的第一设备,该手机1001可以理解为本申请实施例中描述的第二设备。
示例性的,如图10所示,在手机1001已经基于S901-S909所示的步骤将蜂窝通信能力共享给平板1002的情况下,用户可以利用平板1002实现打游戏功能、短信收发功能、以及被叫通话功能等功能。
如图10所示,当用户在平板1002中开启游戏应用时,该平板1002可以基于数据业务上网功能显示游戏界面;或者,当平板1002基于被叫通话功能接收到电话时,该平板1002的界面中还可以显示提示信息1003,该提示信息1003用于提示用户接收到来电,该提示信息1003中可以包括来电的用户姓名、电话号码、接听控件1004、以及挂断控件1005等内容。进一步的,当用户在打游戏过程中确定接听电话时,可以通过触发接听控件1004接听电话;或者,当用户在打游戏过程中确定挂断电话时,可以通过触发挂断控件1005挂断电话。
可以理解的是,在不同的场景中,用户可能对蜂窝通信功能具有不同的需求,例 如用户在白天工作的空闲时间打游戏时,则即使在打游戏的过程中也需要时刻关注电话以及短信等内容,避免错过工作中的重要信息;或者,用户在下班时间打游戏时,则不需要关注甚至需要屏蔽电话以及短信等内容,避免电话以及短信等内容对于游戏操作的影响。
可能的实现方式中,如图5所示,该场景与蜂窝通信功能之间的对应关系可以设置在分布式蜂窝通信模块5011的配置文件中;该AI识别模块可以设置在应用程序框架层中。可以理解的是,该场景与蜂窝通信功能之间的对应关系以及该AI识别模块可以根据实际场景设置在其他位置,本申请实施例中对此不做限定。
本申请实施例中,第一设备可以基于下述两种方法确定不同场景下可以开启的蜂窝通信能力。其中,方法一,第一设备可以对场景进行自动识别,并基于预设的对应关系或者基于用户使用第一设备的历史数据的自学习得到的预设关系,确定该场景下可以开启的蜂窝通信功能;方法二,第一设备可以基于用户的手动设置,确定不同场景可以开启的蜂窝通信功能。
方法一:第一设备可以对场景进行自动识别,并基于预设的对应关系或者基于用户使用第一设备的历史数据的自学习得到的预设关系,确定该场景下可以开启的蜂窝通信功能。
其中,第一设备可以获取一段时间,例如7天内,用户在不同的场景下使用蜂窝通信功能的历史数据,并通过对该历史数据的进一步学习,得到场景与蜂窝通信功能之间的对应关系。示例性的,当第一设备记录到用户在上午9:00-下午6:00的时间段内打游戏时,经常接听电话以及查看短信,并且记录到用户在下午8:00-下午11:30的时间段内打游戏时,经常挂断电话并取消查看短信时,则第一设备可以基于用户的上述历史操作,在上午9:00-下午6:00的时间段内,建立工作场景(例如游戏应用)与短信收发功能、被叫通话功能、以及数据业务上网功能等功能之间的对应关系,并且在下午8:00-下午11:30的时间段内,建立游戏场景(例如游戏应用)与数据业务上网功能等功能之间的对应关系。可以理解的是,第一设备基于用户历史数据的自学习得到的场景与蜂窝通信功能之间的对应关系,可以更符合用户的使用习惯。
一种实现中,第一设备中可以存储有场景与蜂窝通信功能之间的对应关系。例如,第一设备中可以存储有游戏场景与数据业务上网功能等功能之间的对应关系。
本申请实施例中,如图10对应的场景,在第二设备(如手机1001)已将蜂窝通信能力共享到第一设备(如平板1002)的情况下,当第一设备(如平板1002)检测到用户打开游戏应用的操作时,第一设备(如平板1002)可以基于该游戏应用所属的场景,确定该游戏场景下可以开启数据业务上网功能。
可能的实现方式中,如图5所示,第一设备的分布式蜂窝通信模块5011中可以存储有场景与蜂窝通信功能之间的对应关系,并且该分布式蜂窝通信模块5011中可以设置有监听器。该监听器用于监听目标对象(例如目标应用或目标事件),当该目标对象触发指定的事件时,则分布式蜂窝通信模块5011中的监听器可以接收到通知。
示例性的,当用户打开游戏应用时,第一设备的分布式蜂窝通信模块5011可以基于监听器监听到游戏应用被触发,并识别该游戏应用满足游戏场景所属的应用;进而,该分布式蜂窝通信模块5011可以基于对应关系,确定该游戏场景下可以开启数据业务 上网功能等。
另一种实现中,第一设备中可以存储有场景与蜂窝通信功能之间的对应关系,并且第一设备中还设置有AI识别模块。
本申请实施例中,在第二设备已将蜂窝通信能力共享到第一设备的情况下,当第一设备基于接收到的购票信息确定用户已经订购机票,以及接近该订票信息中指示的起飞时间,并且基于GPS定位确定用户位于机场时,则第一设备可以基于AI识别模块识别当前用户可能正在登机或者等待起飞,满足登机场景;进而,第一设备可以确定该登机场景下可以关闭所有蜂窝通信功能。
可能的实现方式中,如图5所示,第一设备的分布式蜂窝通信模块5011中可以存储有场景与蜂窝通信功能之间的对应关系;第一设备的应用程序框架层中可以设置有AI识别模块。
示例性的,如图5所示,以该AI识别模块设置在应用程序框架层中为例进行示例说明。第一设备的中的GPS可以实时将用户的位置消息,发送到应用程序框架层中的AI识别模块;该AI识别模块可以基于第一设备的短信息应用中指示的短信内容,如购票信息,以及由GPS发送来的用户的位置消息对当前场景进行识别,并确定当前场景下满足登机场景;将包含该登机场景的信息发送到分布式蜂窝通信模块5011中;进而,该分布式蜂窝通信模块5011可以基于对应关系,确定在登机场景下没有需要开启的蜂窝通信功能。
再一种实现中,第一设备中可以存储有场景与蜂窝通信功能之间的对应关系,并且第一设备中还设置有AI识别模块。其中,该AI识别模块不仅实现场景识别,也可以基于场景智能确定该场景下可以开启的蜂窝通信功能。
本申请实施例中,在第二设备,例如手机已将蜂窝通信能力共享到多个第一设备,例如智能手表、以及平板等设备的情况下,当平板基于摄像头检测到用户当前正在注视平板时,则平板可以基于AI识别模块确定当前用户正在使用本设备,并智能确定该场景下可以开启所有蜂窝通信功能,并且,智能手表基于摄像头检测到用户没有注视智能手表时,则智能手表可以基于AI识别模块确定当前用户没有使用本设备,并智能确定该场景下可以关闭所有蜂窝通信功能。
示例性的,如图5所示,以该AI识别模块设置在应用程序框架层中为例进行示例说明。第一设备的硬件层中的摄像头可以将拍摄得到的图像,经由内核层以及系统库发送到应用程序框架层中的AI识别模块;该AI识别模块可以对该图像进行图像识别。进一步的,当平板中的AI识别模块基于图像以及预设的人脸信息(或者人形信息、或眼球信息等),确定用户正在使用平板时,则可以确定开启平板的所有蜂窝通信功能,并将包含开启所有蜂窝通信功能的消息发送至分布式蜂窝通信模块5011中,由该分布式蜂窝通信模块5011开启所有蜂窝通信功能;或者,当智能手表中的AI识别模块基于图像以及预设的人脸信息(或者人形信息、或眼球信息等),确定用户并没有使用智能手表时,则可以确定关闭智能手表的所有蜂窝通信功能,并将包含关闭所有蜂窝通信功能的消息发送至分布式蜂窝通信模块5011中,由该分布式蜂窝通信模块5011关闭所有蜂窝通信功能。
可以理解的是,AI识别模块可以结合本设备的传感器,对设备的状态或者用户的 状态等进行智能识别,得到更为准确的场景信息,或者,得到更为准确的可以开启或关闭的蜂窝通信功能。
可能的实现方式中,除了上述AI识别模块外,第一设备也可以结合该设备中设置的其他智能识别模块进行场景识别,本申请实施例中对此不做限定。
可以理解的是,上述关于场景识别、以及不同场景所对应的蜂窝通信功能的描述仅作为一种示例,并不能构成对本申请实施例的进一步限定。
可能的实现方式中,当第二设备为双卡设备,例如包括SIM卡1以及SIM卡2时,其双卡也可以分别为不同的设备提供蜂窝通信功能。示例性的,在具有双卡的第二设备,如手机已经将蜂窝通信能力共享给多个第一设备,如平板以及智能手表的情况下,平板可以基于手机中的SIM卡1实现收发短信等功能,并且,智能手表可以基于手机的SIM卡2实现接打电话等功能。
可能的实现方式中,第一设备可以为双卡设备,例如包括SIM卡1以及SIM卡2。示例性的,在第二设备已经将蜂窝通信能力共享给具有双卡的第一设备的情况下,第一设备的SIM卡1可以基于本地modem实现蜂窝通信功能,第一设备的SIM卡2可以基于第二设备的modem实现蜂窝通信功能。
可以理解的是,本申请实施例中对第一设备中包含的SIM卡的数量,以及第二设备中包含的SIM卡的数量不做具体限定。
方法二、第一设备也可以基于用户的手动设置,确定不同场景可以开启的蜂窝通信功能。
本申请实施例中,第一设备可以基于用户在设置应用中对于不同场景下蜂窝通信功能的设置、或者在任一应用中对该应用中可以开启的蜂窝通信功能的设置,确定不同场景可以开启的蜂窝通信能力。
一种实现中,第一设备可以实现用户在设置应用中对于不同场景下蜂窝通信功能进行设置。示例性的,图11为本申请实施例提供的一种设置蜂窝通信能力的界面示意图。在图11对应的实施例中,以第一设备为手机为例进行示例说明,该示例并不构成对本申请实施例的限定。
当手机接收到用户打开设置应用中的蜂窝通信共享设置功能的操作时,手机可以显示如图11中的a所示的界面,该界面中可以包括用于开启蜂窝通信功能共享的控件、在开启蜂窝通信功能共享情况下搜索到的可用蜂窝通信设备如设备1以及设备2、以及用于对蜂窝通信共享设置进行其他设置的高级设置控件等。
当手机接收到用户在如图11中的a所示的界面中触发该高级设置控件的操作时,手机可以显示如图11中的b所示的界面。如图11中的b所示的界面,该界面中可以包括多种场景,如工作场景、游戏场景、省电场景、睡眠场景以及登机场景等。其中,在省电场景下,当设备电量低于30%时,设备可以自动进入省电场景。
当手机接收到用户在如图11中的b所示的界面中触发该工作场景对应的控件的操作时,手机可以显示如图11中的c所示的界面。如图11中的c所示的界面,该界面中可以包括用于开启工作场景的控件,以及在开启工作场景的情况下可以设置的多种蜂窝通信功能。其中,该工作场景的适用时间可以为上午9:00-下午6:00的时间段内,且该工作场景可对应于基础公共功能的开启状态、主叫通话功能的开启状态、被叫通 话功能的开启状态、短信收发功能的开启状态、数据业务上网功能的开启状态以及读取SIM卡功能的开启状态等。
可以理解的是,用户可以基于如图11对应的实施例对游戏场景、省电场景、睡眠场景、以及登机场景等场景下的蜂窝通信功能进行灵活设置。例如,游戏场景可以对应于基础公共功能的开启状态以及数据业务上网功能的开启状态等;省电场景可以对应于基础公共功能的开启状态、主叫通话功能的开启状态、被叫通话功能的开启状态以及短信收发功能开启状态等;睡眠场景可以对应于基础公共功能的开启状态;登机场景可以对应于所有蜂窝通信功能的关闭状态等。
可能的实现方式中,第一设备还可以支持例如视频场景、或运动场景等多种场景下共享不同的蜂窝通信功能。例如,视频场景可以理解为用户进行视频观看的场景,例如用户观看电影、或者查看短视频等,且该视频场景可以对应于基础公共功能的开启状态、数据业务上网功能的开启状态、主叫通话功能的开启状态、被叫通话功能的开启状态以及短信收发功能开启状态等。该运动场景可以理解为用户进行运动时的场景,该运动场景可以对应于基础公共功能的开启状态、数据业务上网功能的开启状态、主叫通话功能的开启状态、以及被叫通话功能的开启状态等。
可能的实现方式中,第一设备可以支持自动开启相应蜂窝通信功能,或者第一设备也可以支持在特定的时间段内自动开启上述场景对应的蜂窝通信功能。例如,第一设备可以支持用户在上述任一场景中设置场景的自动开启时间,例如用户可以将睡眠场景的开启时间设置为晚上11:30到-上午7:00,则可以理解为在晚上11:30到-上午7:00的时间段内,第一设备将自动进入睡眠模式,并自动开启该睡眠模式对应的基础公共功能,关闭其他与睡眠模式不相关的蜂窝通信功能。
可能的实现方式中,第一设备可以支持对上述模式的增加和删减功能、以及模式的自动推荐。例如,第一设备可以支持用户删减不经常使用的模式,以及增加与用户使用习惯更为相关的蜂窝通信功能。第一设备也可以对用户使用蜂窝通信功能的场景以及相关蜂窝通信功能进行自动识别,并在该蜂窝通信共享设置界面中(例如图11中的b所示的界面),将学习到的场景以及该场景中用户经常使用的蜂窝通信功能推荐给用户。
可能的实现方式中,在第二设备已经将蜂窝通信能力共享给多个第一设备的情况下,任一第一设备也可以支持该蜂窝通信共享设置中的场景和蜂窝通信能力的设备共享。例如,当该多个第一设备中包括平板、以及智能手表等设备时,平板可以将本设备中设置好的场景以及蜂窝通信功能通过设备共享,发送给智能手表。
可能的实现方式中,第一设备也可以在负一屏、或下拉通知界面中增加用于开启蜂窝通信共享设置界面的控件,进而用户可以通过在负一屏、或下拉通知界面中,触发该用于开启蜂窝通信共享设置界面的控件,便捷的进入到蜂窝通信共享设置界面(例如图11中的a所示的界面,或如图11中的b所示的界面)中。
可能的实现方式中,第一设备的负一屏、或下拉通知界面中也可以设置有图标,该图标用于标识当前适用的场景。进一步的,用户可以通过触发该图标,更改当前场景,进而更改当前场景所对应的蜂窝通信功能;或可以理解为用户可以不用进入到蜂窝通信共享设置界面,在第一设备的负一屏、或下拉通知界面中实现模式(以及该模 式对应的蜂窝通信功能)的快速切换。
另一种实现中,第一设备可以实现用户在应用中对于不同应用下蜂窝能力进行设置。示例性的,图12为本申请实施例提供的另一种设置蜂窝通信能力的界面示意图。在图12对应的实施例中,以第一设备为手机为例进行示例说明,该示例并不构成对本申请实施例的限定。
示例性的,以设置第一设备的通话应用中的蜂窝通信能力为例进行示例说明。当手机接收到用户打开通话应用中的设置功能的操作时,手机可以显示如图12中的a所示的界面,该界面中可以显示常用功能对应的陌生号码识别、以及通话记录合并等功能,以及其他功能对应的来电拒接短信、快速拨号等功能,该界面中还可以包括高级设置控件。
当手机接收到用户在如图12中的a所示的界面中触发该高级设置控件的操作时,手机可以显示如图12中的b所示的界面。如图12中的b所示的界面,该界面中可以显示用于开启按电源键结束通话功能的控件、以及蜂窝通信共享设置控件等内容。
当手机接收到用户在如图12中的b所示的界面中触发该蜂窝通信共享设置控件的操作时,手机可以显示如图12中的c所示的界面。如图12中的c所示的界面,该界面中可以显示在通话应用中可以设置的多种蜂窝通信功能。例如,在通话应用中可以对应于基础公共功能的开启状态、主叫通话功能的开启状态、被叫通话功能的开启状态、短信收发功能的开启状态、数据业务上网功能的开启状态以及读取SIM卡功能的开启状态等。
可以理解的是,在其他应用中设置可以支持的蜂窝通信功能的方法,可以参见如图12对应的实施例,在此不再赘述。
可能的实现方式中,用户也可以在设置应用中,设置不同应用所适用的蜂窝通信功能;或者,用户也可以在其他应用中,设置不同应用所属的场景所对应的蜂窝通信功能,本申请实施例中对此不做具体限定。
可能的实现方式中,第一设备可以周期性的进行场景识别,或者,第一设备可以在S905所示的步骤中与第二设备建立连接后进行场景识别,或者第一设备也可以在S902所示的步骤中进行设备发现后进行场景识别。可以理解的是,该S810所示的步骤可以在S902-S909之间的任一步骤执行,本申请实施例中对此不做限定。示例性的,当第一设备在S902所示的步骤中进行场景识别,并确定该场景下不需要开启蜂窝通信功能时,可以向第二设备发送提示消息,该提示消息用于提示第一设备当前不支持开启蜂窝通信功能。
S911、第一设备获取蜂窝通信能力对应的接口,并将该蜂窝通信能力对应的接口加入到白名单。
本申请实施例中,该白名单中用于存储可以支持蜂窝通信能力调用的接口。可能的实现方式中,如图5所示,该第一设备的分布式蜂窝通信模块5011以及第二设备的分布式蜂窝通信模块5022中均可以存储有配置文件,该配置文件中预设有场景信息、蜂窝通信功能以及接口之间的对应关系。
示例性的,第一设备可以将基于S910所示的步骤中的场景识别确定的可以开启的蜂窝通信功能,并基于分布式蜂窝通信模块的配置文件中预设的场景信息、蜂窝通信 功能、以及接口之间的对应关系,确定该开启的蜂窝通信功能对应的接口,并将该开启的蜂窝通信功能对应的接口加入到白名单中。下表2为本申请实施例提供的一种蜂窝通信功能与接口对应关系示意表。
表2蜂窝通信功能与接口对应关系示意表
可以理解的是,本申请实施例中对蜂窝通信功能的数量,以及该蜂窝通信功能所对应的接口的数量不做具体限定。
可能的实现方式中,如图5所示,第一设备的布式蜂窝通信模块5011也可以将该白名单更新到第二设备的布式蜂窝通信模块5022中。例如,第一设备的布式蜂窝通信模块5011可以将包含白名单中的接口的消息发送至第二设备的布式蜂窝通信模块5022;第二设备的布式蜂窝通信模块5022接收到该包含白名单中的接口的消息,并向第一设备的布式蜂窝通信模块5011返回响应消息,此时第一设备与第二设备可以实现能力协商,使得第二设备可以获取到第一设备基于场景确定的白名单。
S912、当第一设备接收到蜂窝通信业务数据时,确定该蜂窝通信业务数据对应的接口是否满足白名单。
本申请实施例中,该蜂窝通信业务数据可以为蜂窝通信业务的请求(该蜂窝通信业务的请求可以对应于请求类接口),或者,该蜂窝通信业务数据也可以为蜂窝通信业务的通知或蜂窝通信业务的响应消息(该蜂窝通信业务的通知以及该蜂窝通信业务的响应消息均可以对应于主动上报类接口)。其中,该请求类接口可以为上述实施例中描述的第一类HIDL接口;该主动上报类接口可以为第二类HIDL接口或第三类HIDL接口。
示例性的,以该蜂窝通信业务数据为蜂窝通信业务的请求为例进行示例说明。如图5所示,当第一设备的应用程序层中的短信息应用触发了蜂窝通信业务的请求时,短信息应用可以将该蜂窝通信业务的请求经由应用程序框架层中的电话管理器5012,发送到第一设备的分布式蜂窝通信模块5011;进而,第一设备的分布式蜂窝通信模块 5011执行S912所示的步骤,确定该蜂窝通信业务的请求所对应的接口是否满足白名单。
示例性的,以该蜂窝通信业务数据为蜂窝通信业务的通知(或蜂窝通信业务的响应消息)为例进行示例说明,如图5所示,当第一设备的分布式蜂窝通信模块5011接收到第二设备的分布式蜂窝通信模块5022发送的蜂窝通信业务的通知(或者蜂窝通信业务的响应消息)时,第一设备的分布式蜂窝通信模块5011执行S912所示的步骤,确定该蜂窝通信业务的通知(或者蜂窝通信业务的响应消息)所对应的接口是否满足白名单。
可能的实现方式中,如图5所示,在第一设备的布式蜂窝通信模块5011基于S912所示的步骤中,将该白名单更新到第二设备的布式蜂窝通信模块5022中的情况下,当第二设备的分布式蜂窝通信模块5022接收到,由第二设备的Modem5021将蜂窝通信业务的通知(或者蜂窝通信业务的响应消息)经由系统库中的RIL模块传输至分布式蜂窝通信模块5022时,第二设备的分布式蜂窝通信模块5022可以确定该蜂窝通信业务的通知(或者蜂窝通信业务的响应消息)所对应的接口是否满足白名单。
S913、第一设备根据白名单确定是否转发蜂窝通信业务数据。
示例性的,以该蜂窝通信业务数据为蜂窝通信业务的请求为例进行示例说明。如图5所示,当第一设备分布式蜂窝通信模块5011确定该蜂窝通信业务的请求所对应的接口满足白名单时,则可以将该蜂窝通信业务的请求转发至第二设备的分布式蜂窝通信模块5022;或者,当第一设备分布式蜂窝通信模块5011确定该蜂窝通信业务的请求所对应的接口不满足白名单时,则可以向上层返回不支持(not support)。
可能的实现方式中,当第一设备分布式蜂窝通信模块5011确定该蜂窝通信业务的请求所对应的接口不满足白名单时,第一设备的分布式蜂窝通信模块5011可以将包含not support的消息经由应用程序框架层中的电话管理器5012,发送到应用程序层中的短信息应用中,此时该短信息应用的界面中可以显示提示信息,该提示信息用于指示第一设备当前不支持使用该蜂窝通信业务的请求所对应的蜂窝通信功能。
示例性的,以该蜂窝通信业务数据为蜂窝通信业务的通知(或蜂窝通信业务的响应消息)为例进行示例说明。如图5所示,当第一设备分布式蜂窝通信模块5011确定,该第二设备的分布式蜂窝通信模块5022发送的蜂窝通信业务的通知(或蜂窝通信业务的响应消息)所对应的接口满足白名单时,则可以将该蜂窝通信业务的通知(或蜂窝通信业务的响应消息)经由应用程序框架层中的电话管理器5012,发送到应用程序层中的短信息应用中;或者,当第一设备分布式蜂窝通信模块5011确定,该第二设备的分布式蜂窝通信模块5022发送的蜂窝通信业务的通知(或蜂窝通信业务的响应消息)所对应的接口不满足白名单时,则可以丢弃该蜂窝通信业务的通知(或蜂窝通信业务的响应消息)。
可能的实现方式中,如图5所示,在第一设备的布式蜂窝通信模块5011基于S912所示的步骤中,将该白名单更新到第二设备的布式蜂窝通信模块5022中的情况下,当第二设备的分布式蜂窝通信模块5022接收到,由第二设备的Modem5021将蜂窝通信业务的通知(或者蜂窝通信业务的响应消息)经由系统库中的RIL模块传输至分布式蜂窝通信模块5022;进一步的,第二设备的分布式蜂窝通信模块5022可以确定该蜂窝通信业务的通知所对应的接口满足白名单时,该第二设备的分布式蜂窝通信模块5022可以 将该蜂窝通信业务的通知(或者蜂窝通信业务的响应消息)发送至第一设备的分布式蜂窝通信模块5011中;或者,当第二设备的分布式蜂窝通信模块5022确定该蜂窝通信业务的通知(或者蜂窝通信业务的响应消息)所对应的接口不满足白名单时,该第二设备的分布式蜂窝通信模块5022可以丢弃该蜂窝通信业务的通知(或者蜂窝通信业务的响应消息)。
基于此,第一设备可以基于业务场景实现对蜂窝通信功能的灵活管控,例如在不同的场景中匹配合适的蜂窝通信能力,增强蜂窝通信功能的智能性,进而提高用户对于蜂窝通信功能的使用体验。
可能的实现方式中,在S906之前,第一设备也可以先对业务场景进行识别,并确定该场景下可以适用的蜂窝通信功能,再向第二设备获取该场景下可以适用的蜂窝通信功能。
本申请实施例中,在S906之前,第一设备可以基于S910所示的步骤进行场景识别,并根据场景确定是否可以开启蜂窝通信能力,进而可以执行S906所示的步骤,第一设备向第二设备发送该可以开启的蜂窝通信能力所对应的蜂窝通信能力共享请求。
示例性的,如图5所示,在S906之前,第一设备的分布式蜂窝通信模块5011可以基于场景识别,确定该场景下可以开启的蜂窝通信能力,并将包含该蜂窝通信能力的信息通过蜂窝通信能力共享请求,发送至第二设备的分布式蜂窝通信模块5022。
可能的实现方式中,第一设备中也可以存储有第一设备的设备信息与蜂窝通信功能的对应关系,在S906之前,第一设备可以基于第一设备的设备信息,确定本设备需要的蜂窝通信功能,进而执行S906所示的步骤,第一设备将包含该蜂窝通信功能的信息通过蜂窝通信能力共享请求,发送至第二设备。其中,该设备信息与蜂窝通信功能的对应关系可以为第一设备中预设的,或者,也可以为第一设备基于用户使用第一设备的蜂窝通信功能的历史数据的自学习得到的。
示例性的,如图5所示,在S906之前,第一设备的分布式蜂窝通信模块5011可以基于分布式蜂窝通信模块(获其他模块等)存储的第一设备的设备信息与蜂窝通信功能的对应关系,确定该场景下可以开启的蜂窝通信能力,并将包含该蜂窝通信能力的信息通过蜂窝通信能力共享请求,发送至第二设备的分布式蜂窝通信模块5022。
示例性的,如图1对应的场景,在第二设备,例如手机11已经与第一设备,例如平板12、智能眼镜13、智能手表14、智能音箱15、智慧屏16、笔记本电脑17等建立连接的情况下,智慧屏可以基于本设备与短信收发功能之间的对应关系,向第二设备申请该短信收发功能。
可能的实现方式中,如图5所示,在S906之前,第一设备的分布式蜂窝通信模块5011可以基于分布式蜂窝通信模块(获其他模块等)存储的第一设备的设备信息与蜂窝通信功能的对应关系,确定本设备可以开启的蜂窝通信能力,并将包含该蜂窝通信能力的信息通过蜂窝通信能力共享请求,发送至第二设备的分布式蜂窝通信模块5022。例如,当第一设备为智慧屏时,智慧屏可以获取到本设备对应的蜂窝通信功能,例如短信收发功能等,并向第二设备发送用于获取短信收发功能等的蜂窝通信能力共享请求;进而,智慧屏可以基于短信收发功能接收短信,并在大屏中查看短信内容。
基于此,相比于第一设备基于场景识别确定当前场景下可以开启的蜂窝通信功能, 第一设备基于第一设备的设备信息确定所需要的蜂窝通信功能的方法可以降低进行场景识别时的系统耗能,节省系统的运行成本。
可能的实现方式中,基于上述图8-图12中关于蜂窝通信功能的使用方法的表述,本申请实施例中提供了另一种蜂窝通信功能的使用方法。示例性的,图13为本申请实施例提供的另一种蜂窝通信功能的使用方法的流程示意图。
如图13所示,该蜂窝通信功能的使用方法可以包括如下步骤:
S1301、第一设备与第二设备建立连接。
本申请实施例中,第一设备与第二设备可以通过有线方式建立通信连接;或者,第一设备与第二设备也可以通过无线方式建立通信连接,例如第一设备与第二设备通过蓝牙、WIFI、或连接到同一云端账号等方式建立通信连接。
可以理解的是,S1301的执行过程和原理可以参见S901-S905中的描述,在此不再赘述。
S1302、第一设备进行场景识别,并根据场景确定是否可以开启蜂窝通信能力。
本申请实施例中,当第一设备根据场景确定得到可以开启的蜂窝通信能力时,第一设备可以执行S1303所示的步骤;或者,当第一设备根据场景确定没有需要开启的蜂窝通信能力时,第一设备可以向第二设备发送提示信息,该提示信息用于指示第一设备当前不支持蜂窝通信能力。
可以理解的是,S1302的执行过程和原理可以参见S910中的描述,在此不再赘述。
S1303、第一设备获取蜂窝通信能力对应的接口,并将该蜂窝通信能力对应的接口加入到白名单。
可以理解的是,S1303的执行过程和原理可以参见S911中的描述,在此不再赘述。
S1304、当第一设备接收到蜂窝通信业务数据时,确定该蜂窝通信业务数据对应的接口是否满足白名单。
可以理解的是,S1304的执行过程和原理可以参见S912中的描述,在此不再赘述。
S1305、第一设备根据白名单确定是否转发蜂窝通信业务数据。
本申请实施例中,当第一设备可以从白名单中找到该蜂窝通信业务数据对应的接口时,第一设备可以对该蜂窝通信业务数据进行转发处理;或者,当第一设备可以未白名单中找到该蜂窝通信业务数据对应的接口时,第一设备可以不对该蜂窝通信业务数据进行处理,例如第一设备可以丢弃该蜂窝通信业务数据。
可以理解的是,S1305的执行过程和原理可以参见S913中的描述,在此不再赘述。
基于此,第一设备可以基于业务场景实现对蜂窝通信功能的灵活管控,例如在不同的场景中匹配合适的蜂窝通信能力,增强蜂窝通信功能的智能性,进而提高用户对于蜂窝通信功能的使用体验。
可以理解的是,本申请实施例提供的界面仅作为一种示例,并不能构成对本申请实施例的进一步限定。
上面结合图9-图13,对本申请实施例提供的方法进行了说明,下面对本申请实施例提供的执行上述方法的装置进行描述。如图14所示,图14为本申请实施例提供的一种蜂窝通信功能的使用装置的结构示意图,该蜂窝通信功能的使用装置可以是本申请实施例中的电子设备,也可以是电子设备内的芯片或芯片系统。
如图14所示,蜂窝通信功能的使用装置140可以用于通信设备、电路、硬件组件或者芯片中,该蜂窝通信功能的使用装置包括:显示单元1401、处理单元1402以及通信单元1403。其中,显示单元1401用于支持退出蜂窝通信功能的使用方法执行的显示的步骤;处理单元1402用于支持蜂窝通信功能的使用装置执行信息处理的步骤;通信单元1403用于支持蜂窝通信功能的使用方法执行的数据发送以及数据接收的步骤。
具体的,本申请实施例中提供一种蜂窝通信功能的使用装置,通信单元1403,用于与第二设备建立连接;处理单元1402,用于识别第一设备所处的目标场景;其中,目标场景为预先定义的多个场景中的其中一个,任一个场景对应有蜂窝通信共享时允许开启的蜂窝通信功能;处理单元1402,还用于根据目标场景确定允许开启的目标蜂窝通信功能;处理单元1402,还用于将目标蜂窝通信功能对应的接口加入到预设的接口名单;当第一设备接收到蜂窝通信业务数据时,处理单元1402,还用于确定蜂窝通信业务数据对应的接口是否满足预设的接口名单;处理单元1402,还用于根据预设的接口名单确定是否转发蜂窝通信业务数据。
在一种可能的实现方式中,第一设备中设置有多组第一对应关系,任一组第一对应关系用于指示场景、与蜂窝通信功能之间的对应关系,处理单元1402,具体用于从第一对应关系中,确定目标场景对应的目标蜂窝通信功能;处理单元1402,还具体用于确定允许开启的目标蜂窝通信功能。
在一种可能的实现方式中,第一对应关系设置在第一设备的分布式蜂窝通信模块中,并且第一对应关系还设置在第二设备的分布式蜂窝通信模块中;第一设备的分布式蜂窝通信模块设置于第一设备的应用程序框架层或系统库,第二设备的分布式蜂窝通信模块设置于第二设备的应用程序框架层或系统库。
在一种可能的实现方式中,第一设备中设置有多组第二对应关系,任一组第二对应关系用于指示蜂窝通信功能、与接口之间的对应关系,处理单元1402,具体用于根据第二对应关系确定目标蜂窝通信功能对应的接口;处理单元1402,还具体用于将目标蜂窝通信功能对应的接口加入到预设的接口名单。
在一种可能的实现方式中,第二对应关系设置在第一设备的分布式蜂窝通信模块中,并且第二对应关系设置在第二设备的分布式蜂窝通信模块中;第一设备的分布式蜂窝通信模块设置于第一设备的应用程序框架层或系统库,第二设备的分布式蜂窝通信模块设置于第二设备的应用程序框架层或系统库。
在一种可能的实现方式中,当蜂窝通信业务数据对应的接口满足第一类接口,且蜂窝通信业务数据对应的接口满足预设的接口名单时,通信单元1403,具体用于将蜂窝通信业务数据转发至第二设备;或者,当蜂窝通信业务数据对应的接口满足第一类接口,且蜂窝通信业务数据对应的接口不满足预设的接口名单时,通信单元1403,还具体用于向蜂窝通信业务数据对应的应用发送第一消息;第一消息用于指示第一设备不支持蜂窝通信业务数据的处理。
在一种可能的实现方式中,当蜂窝通信业务数据对应的接口满足第二类接口,且蜂窝通信业务数据对应的接口满足预设的接口名单时,通信单元1403,具体用于将蜂窝通信业务数据转发至蜂窝通信业务数据对应的应用;或者,当蜂窝通信业务数据对应的接口类型满足第二类接口,且蜂窝通信业务数据对应的接口类型不满足预设的接 口名单时,处理单元1402,具体用于丢弃蜂窝通信业务数据。
在一种可能的实现方式中,处理单元1402,还用于接收针对第一应用的第一操作;第一操作用于设置蜂窝通信共享时适用的场景;响应于第一操作,显示单元1401,用于显示第一界面;第一界面中包括目标场景;处理单元1402,还用于接收针对目标场景的第二操作;响应于第二操作,显示单元1401,还用于显示第二界面;第二界面中包括蜂窝通信共享时允许开启的蜂窝通信功能;处理单元1402,还用于接收针对第二界面中的蜂窝通信功能的第三操作;响应于第三操作,处理单元1402,还用于设置目标场景中允许开启的目标蜂窝通信功能。
在一种可能的实现方式中,当第一设备确定目标场景中没有允许开启的目标蜂窝通信功能时,通信单元1403,还用于向第二设备发送提示消息;提示消息用于指示第一设备不支持蜂窝通信功能。
在一种可能的实施例中,通信单元1403可以是输入或者输出接口、管脚或者电路等。
在一种可能的实施例中,蜂窝通信功能的使用装置还可以包括:存储单元1404。处理单元1402、通信单元1403、以及存储单元1404通过线路相连。
存储单元1404可以包括一个或者多个存储器,存储器可以是一个或者多个设备、电路中用于存储程序或者数据的器件。
存储单元1404可以独立存在,通过通信线路与蜂窝通信功能的使用装置具有的处理单元1402相连。存储单元1404也可以和处理单元1402集成在一起。
存储单元1404可以存储电子设备中的方法的计算机执行指令,以使处理单元1402执行上述实施例中的方法。
存储单元1404可以是寄存器、缓存或者RAM等,存储单元1404可以和处理单元1402集成在一起。存储单元1404可以是只读存储器(read-only memory,ROM)或者可存储静态信息和指令的其他类型的静态存储设备,存储单元1404可以与处理单元1402相独立。
图15为本申请实施例提供的一种控制设备的硬件结构示意图,如图15所示,该控制设备包括处理器1501,通信线路1504以及至少一个通信接口(图15中示例性的以通信接口1503为例进行说明)。
处理器1501可以是一个通用中央处理器(central processing unit,CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。
通信线路1504可包括在上述组件之间传送信息的电路。
通信接口1503,使用任何收发器一类的装置,用于与其他设备或通信网络通信,如以太网,无线局域网(wireless local area networks,WLAN)等。
可能的,该控制设备还可以包括存储器1502。
存储器1502可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通 用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过通信线路1504与处理器相连接。存储器也可以和处理器集成在一起。
其中,存储器1502用于存储执行本申请方案的计算机执行指令,并由处理器1501来控制执行。处理器1501用于执行存储器1502中存储的计算机执行指令,从而实现本申请实施例所提供的蜂窝通信功能的使用方法。
可能的,本申请实施例中的计算机执行指令也可以称之为应用程序代码,本申请实施例对此不作具体限定。
在具体实现中,作为一种实施例,处理器1501可以包括一个或多个CPU,例如图15中的CPU0和CPU1。
在具体实现中,作为一种实施例,控制设备可以包括多个处理器,例如图15中的处理器1501和处理器1505。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
示例性的,图16为本申请实施例提供的一种芯片的结构示意图。芯片160包括一个或两个以上(包括两个)处理器1620和通信接口1630。
在一些实施方式中,存储器1640存储了如下的元素:可执行模块或者数据结构,或者他们的子集,或者他们的扩展集。
本申请实施例中,存储器1640可以包括只读存储器和随机存取存储器,并向处理器1620提供指令和数据。存储器1640的一部分还可以包括非易失性随机存取存储器(non-volatile random access memory,NVRAM)。
本申请实施例中,存储器1640、通信接口1630以及存储器1640通过总线系统1610耦合在一起。其中,总线系统1610除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。为了便于描述,在图16中将各种总线都标为总线系统1610。
上述本申请实施例描述的方法可以应用于处理器1620中,或者由处理器1620实现。处理器1620可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器1620中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器1620可以是通用处理器(例如,微处理器或常规处理器)、数字信号处理器(digital signal processing,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门、晶体管逻辑器件或分立硬件组件,处理器1620可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。
结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。其中,软件模块可以位于随机存储器、只读存储器、可编程只读存储器或带电可擦写可编程存储器(electrically erasable programmable read only memory,EEPROM)等本领域成熟的存储介质中。该存储介质位于存储器1640,处理器1620读取存储器1640中的信息,结合其硬件完成上述方法的步骤。
在上述实施例中,存储器存储的供处理器执行的指令可以以计算机程序产品的形式实 现。其中,计算机程序产品可以是事先写入在存储器中,也可以是以软件形式下载并安装在存储器中。
计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包括一个或多个可用介质集成的服务器、数据中心等数据存储设备。例如,可用介质可以包括磁性介质(例如,软盘、硬盘或磁带)、光介质(例如,数字通用光盘(digital versatile disc,DVD))、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。
本申请实施例还提供了一种计算机可读存储介质。上述实施例中描述的方法可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。计算机可读介质可以包括计算机存储介质和通信介质,还可以包括任何可以将计算机程序从一个地方传送到另一个地方的介质。存储介质可以是可由计算机访问的任何目标介质。
作为一种可能的设计,计算机可读介质可以包括紧凑型光盘只读储存器(compact disc read-only memory,CD-ROM)、RAM、ROM、EEPROM或其它光盘存储器;计算机可读介质可以包括磁盘存储器或其它磁盘存储设备。而且,任何连接线也可以被适当地称为计算机可读介质。例如,如果使用同轴电缆,光纤电缆,双绞线,DSL或无线技术(如红外,无线电和微波)从网站,服务器或其它远程源传输软件,则同轴电缆,光纤电缆,双绞线,DSL或诸如红外,无线电和微波之类的无线技术包括在介质的定义中。如本文所使用的磁盘和光盘包括光盘(CD),激光盘,光盘,数字通用光盘(digital versatile disc,DVD),软盘和蓝光盘,其中磁盘通常以磁性方式再现数据,而光盘利用激光光学地再现数据。
上述的组合也应包括在计算机可读介质的范围内。以上,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。
Claims (21)
- 一种蜂窝通信功能的使用方法,其特征在于,所述方法包括:第一设备与第二设备建立连接;所述第一设备识别所述第一设备所处的目标场景;其中,所述目标场景为预先定义的多个场景中的其中一个,任一个所述场景对应有蜂窝通信共享时允许开启的蜂窝通信功能;所述第一设备根据所述目标场景确定允许开启的目标蜂窝通信功能;所述第一设备将所述目标蜂窝通信功能对应的接口加入到预设的接口名单;当所述第一设备接收到蜂窝通信业务数据时,所述第一设备确定所述蜂窝通信业务数据对应的接口是否满足所述预设的接口名单;所述第一设备根据所述预设的接口名单确定是否转发所述蜂窝通信业务数据。
- 根据权利要求1所述的方法,其特征在于,所述第一设备中设置有多组第一对应关系,任一组所述第一对应关系用于指示所述场景、与所述蜂窝通信功能之间的对应关系,所述第一设备根据所述目标场景确定允许开启的目标蜂窝通信功能,包括:所述第一设备从所述第一对应关系中,确定所述目标场景对应的所述目标蜂窝通信功能;所述第一设备确定允许开启的目标蜂窝通信功能。
- 根据权利要求2所述的方法,其特征在于,所述第一对应关系设置在所述第一设备的分布式蜂窝通信模块中,并且所述第一对应关系还设置在所述第二设备的分布式蜂窝通信模块中;所述第一设备的分布式蜂窝通信模块设置于所述第一设备的应用程序框架层或系统库,所述第二设备的分布式蜂窝通信模块设置于所述第二设备的应用程序框架层或系统库。
- 根据权利要求1所述的方法,其特征在于,所述第一设备中设置有多组第二对应关系,任一组所述第二对应关系用于指示所述蜂窝通信功能、与接口之间的对应关系,所述第一设备将所述目标蜂窝通信功能对应的接口加入到预设的接口名单,包括:所述第一设备根据所述第二对应关系确定所述目标蜂窝通信功能对应的接口;所述第一设备将所述目标蜂窝通信功能对应的接口加入到所述预设的接口名单。
- 根据权利要求4所述的方法,其特征在于,所述第二对应关系设置在所述第一设备的分布式蜂窝通信模块中,并且所述第二对应关系设置在所述第二设备的分布式蜂窝通信模块中;所述第一设备的分布式蜂窝通信模块设置于所述第一设备的应用程序框架层或系统库,所述第二设备的分布式蜂窝通信模块设置于所述第二设备的应用程序框架层或系统库。
- 根据权利要求5所述的方法,其特征在于,所述第一设备根据所述预设的接口名单确定是否转发所述蜂窝通信业务数据,包括:当所述蜂窝通信业务数据对应的接口满足第一类接口,且所述蜂窝通信业务数据对应的接口满足所述预设的接口名单时,所述第一设备将所述蜂窝通信业务数据转发至所述第二设备;或者,当所述蜂窝通信业务数据对应的接口满足所述第一类接口,且所述蜂窝通信业务数据对应的接口不满足所述预设的接口名单时,所述第一设备向所述蜂窝通信业 务数据对应的应用发送第一消息;所述第一消息用于指示所述第一设备不支持所述蜂窝通信业务数据的处理。
- 根据权利要求5所述的方法,其特征在于,所述第一设备根据所述预设的接口名单确定是否转发所述蜂窝通信业务数据,包括:当所述蜂窝通信业务数据对应的接口满足第二类接口,且所述蜂窝通信业务数据对应的接口满足所述预设的接口名单时,所述第一设备将所述蜂窝通信业务数据转发至所述蜂窝通信业务数据对应的应用;或者,当所述蜂窝通信业务数据对应的接口类型满足所述第二类接口,且所述蜂窝通信业务数据对应的接口类型不满足所述预设的接口名单时,所述第一设备丢弃所述蜂窝通信业务数据。
- 根据权利要求1所述的方法,其特征在于,还包括:所述第一设备接收针对第一应用的第一操作;所述第一操作用于设置蜂窝通信共享时适用的场景;响应于所述第一操作,所述第一设备显示第一界面;所述第一界面中包括所述目标场景;所述第一设备接收针对所述目标场景的第二操作;响应于所述第二操作,所述第一设备显示第二界面;所述第二界面中包括所述蜂窝通信共享时允许开启的蜂窝通信功能;所述第一设备接收针对所述第二界面中的蜂窝通信功能的第三操作;响应于所述第三操作,所述第一设备设置所述目标场景中允许开启的目标蜂窝通信功能。
- 根据权利要求1所述的方法,其特征在于,还包括:当所述第一设备确定所述目标场景中没有允许开启的目标蜂窝通信功能时,所述第一设备向所述第二设备发送提示消息;所述提示消息用于指示所述第一设备不支持蜂窝通信功能。
- 一种蜂窝通信功能的使用装置,其特征在于,所述装置包括:通信单元,用于与第二设备建立连接;处理单元,用于识别第一设备所处的目标场景;其中,所述目标场景为预先定义的多个场景中的其中一个,任一个所述场景对应有蜂窝通信共享时允许开启的蜂窝通信功能;所述处理单元,还用于根据所述目标场景确定允许开启的目标蜂窝通信功能;所述处理单元,还用于将所述目标蜂窝通信功能对应的接口加入到预设的接口名单;当所述第一设备接收到蜂窝通信业务数据时,所述处理单元,还用于确定所述蜂窝通信业务数据对应的接口是否满足所述预设的接口名单;所述处理单元,还用于根据所述预设的接口名单确定是否转发所述蜂窝通信业务数据。
- 根据权利要求10所述的装置,其特征在于,所述第一设备中设置有多组第一对应关系,任一组所述第一对应关系用于指示所述场景、与所述蜂窝通信功能之间的对应关系,所述处理单元,具体用于从所述第一对应关系中,确定所述目标场景对应的所述目标蜂窝通信功能;所述处理单元,还具体用于确定允许开启的目标蜂窝通信功能。
- 根据权利要求11所述的装置,其特征在于,所述第一对应关系设置在所述第一设备的分布式蜂窝通信模块中,并且所述第一对应关系还设置在所述第二设备的分布式蜂窝通信模块中;所述第一设备的分布式蜂窝通信模块设置于所述第一设备的应用程序框架层或系统库,所述第二设备的分布式蜂窝通信模块设置于所述第二设备的应用程序框架层或系统库。
- 根据权利要求10所述的装置,其特征在于,所述第一设备中设置有多组第二对应关系,任一组所述第二对应关系用于指示所述蜂窝通信功能、与接口之间的对应关系,所述处理单元,具体用于根据所述第二对应关系确定所述目标蜂窝通信功能对应的接口;所述处理单元,还具体用于将所述目标蜂窝通信功能对应的接口加入到所述预设的接口名单。
- 根据权利要求13所述的装置,其特征在于,所述第二对应关系设置在所述第一设备的分布式蜂窝通信模块中,并且所述第二对应关系设置在所述第二设备的分布式蜂窝通信模块中;所述第一设备的分布式蜂窝通信模块设置于所述第一设备的应用程序框架层或系统库,所述第二设备的分布式蜂窝通信模块设置于所述第二设备的应用程序框架层或系统库。
- 根据权利要求14所述的装置,其特征在于,当所述蜂窝通信业务数据对应的接口满足第一类接口,且所述蜂窝通信业务数据对应的接口满足所述预设的接口名单时,所述通信单元,具体用于将所述蜂窝通信业务数据转发至所述第二设备;或者,当所述蜂窝通信业务数据对应的接口满足所述第一类接口,且所述蜂窝通信业务数据对应的接口不满足所述预设的接口名单时,所述通信单元,还具体用于向所述蜂窝通信业务数据对应的应用发送第一消息;所述第一消息用于指示所述第一设备不支持所述蜂窝通信业务数据的处理。
- 根据权利要求14所述的装置,其特征在于,当所述蜂窝通信业务数据对应的接口满足第二类接口,且所述蜂窝通信业务数据对应的接口满足所述预设的接口名单时,所述通信单元,具体用于将所述蜂窝通信业务数据转发至所述蜂窝通信业务数据对应的应用;或者,当所述蜂窝通信业务数据对应的接口类型满足所述第二类接口,且所述蜂窝通信业务数据对应的接口类型不满足所述预设的接口名单时,所述处理单元,具体用于丢弃所述蜂窝通信业务数据。
- 根据权利要求10所述的装置,其特征在于,所述处理单元,还用于接收针对第一应用的第一操作;所述第一操作用于设置蜂窝通信共享时适用的场景;响应于所述第一操作,显示单元,用于显示第一界面;所述第一界面中包括所述目标场景;所述处理单元,还用于接收针对所述目标场景的第二操作;响应于所述第二操作,所述显示单元,还用于显示第二界面;所述第二界面中包括所述蜂窝通信共享时允许开启的蜂窝通信功能;所述处理单元,还用于接收针对所述第二界面中的蜂窝通信功能的第三操作;响应于所述第三操作,所述处理单元,还用于设置所述目标场景中允许开启的目标蜂窝通信功能。
- 根据权利要求10所述的装置,其特征在于,当所述第一设备确定所述目标场景中没有允许开启的目标蜂窝通信功能时,所述通信单元,还用于向所述第二设备发送提示消息;所述提示消息用于指示所述第一设备不支持蜂窝通信功能。
- 一种蜂窝通信功能的使用装置,其特征在于,包括处理器和存储器,所述存储器用于存储代码指令;所述处理器用于运行所述代码指令,以执行如权利要求1-9中任一项所述的方法。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有指令,当所述指令被执行时,使得计算机执行如权利要求1-9中任一项所述的方法。
- 一种计算机程序产品,其特征在于,包括计算机程序,当所述计算机程序被运行时,使得计算机执行如权利要求1-9中任一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111249130.5A CN116033592B (zh) | 2021-10-26 | 2021-10-26 | 蜂窝通信功能的使用方法和装置 |
CN202111249130.5 | 2021-10-26 |
Publications (2)
Publication Number | Publication Date |
---|---|
WO2023071558A1 WO2023071558A1 (zh) | 2023-05-04 |
WO2023071558A9 true WO2023071558A9 (zh) | 2023-06-15 |
Family
ID=86078253
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/118322 WO2023071558A1 (zh) | 2021-10-26 | 2022-09-13 | 蜂窝通信功能的使用方法和装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN116033592B (zh) |
WO (1) | WO2023071558A1 (zh) |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102238293B (zh) * | 2010-04-29 | 2014-03-26 | 华为技术有限公司 | 一种实现电话会议限呼的方法及装置 |
US9451415B2 (en) * | 2011-06-17 | 2016-09-20 | Qualcomm Incorporated | Cooperative data transport |
CN103248615A (zh) * | 2012-02-10 | 2013-08-14 | 中国移动通信集团公司 | 一种互联游戏的实现方法、终端、服务器及系统 |
US8977269B2 (en) * | 2012-11-08 | 2015-03-10 | Apple Inc. | Extending use of a cellular communication capabilities in a wireless device to another device |
US9247075B2 (en) * | 2013-08-27 | 2016-01-26 | International Business Machines Corporation | Data sharing with mobile devices |
US9526032B2 (en) * | 2014-09-26 | 2016-12-20 | Apple Inc. | Network bandwidth sharing for small mobile devices |
GB2548663B (en) * | 2016-12-09 | 2018-05-09 | Polar Electro Oy | System for providing wrist device with cellular communication capability |
CN108647088A (zh) * | 2018-03-13 | 2018-10-12 | 广东欧珀移动通信有限公司 | 资源配置方法、装置、终端及存储介质 |
CN112752316B (zh) * | 2020-12-28 | 2023-12-19 | 维沃移动通信有限公司 | 电子设备联网控制方法、装置、电子设备和存储介质 |
CN113242261B (zh) * | 2021-06-10 | 2023-04-07 | Oppo广东移动通信有限公司 | 共享数据网络的方法、装置、电子设备及存储介质 |
-
2021
- 2021-10-26 CN CN202111249130.5A patent/CN116033592B/zh active Active
-
2022
- 2022-09-13 WO PCT/CN2022/118322 patent/WO2023071558A1/zh unknown
Also Published As
Publication number | Publication date |
---|---|
CN116033592B (zh) | 2023-10-20 |
CN116033592A (zh) | 2023-04-28 |
WO2023071558A1 (zh) | 2023-05-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11385857B2 (en) | Method for displaying UI component and electronic device | |
WO2021023220A1 (zh) | 一种内容接续方法、系统及电子设备 | |
US20220163932A1 (en) | Device control page display method, related apparatus, and system | |
US20230422154A1 (en) | Method for using cellular communication function, and related apparatus and system | |
WO2022257977A1 (zh) | 电子设备的投屏方法和电子设备 | |
US20230021994A1 (en) | Cross-Device Content Projection Method and Electronic Device | |
US20230216990A1 (en) | Device Interaction Method and Electronic Device | |
WO2020155014A1 (zh) | 智能家居设备分享系统、方法及电子设备 | |
WO2021017894A1 (zh) | 一种使用远程sim模块的方法及电子设备 | |
WO2021052204A1 (zh) | 基于通讯录的设备发现方法、音视频通信方法及电子设备 | |
US11949805B2 (en) | Call method and apparatus | |
CN112130788A (zh) | 一种内容分享方法及其装置 | |
US20240073978A1 (en) | Method for monitoring link and terminal device | |
WO2021218544A1 (zh) | 一种提供无线上网的系统、方法及电子设备 | |
US20240094972A1 (en) | Page Display Method and Apparatus, Electronic Device, and Readable Storage Medium | |
WO2020062304A1 (zh) | 一种文件传输方法及电子设备 | |
WO2024027199A1 (zh) | 风险识别方法和电子设备 | |
WO2023072139A1 (zh) | 播放音频的方法、电子设备及系统 | |
CN111886849B (zh) | 一种传输信息的方法及电子设备 | |
CN115242994B (zh) | 视频通话系统、方法和装置 | |
WO2023071558A9 (zh) | 蜂窝通信功能的使用方法和装置 | |
WO2023124258A1 (zh) | 远程访问用户识别模块sim卡的方法和装置 | |
CN117061266B (zh) | 智能家居设备的控制方法和控制装置 | |
CN115087134B (zh) | 一种蓝牙连接的方法和电子设备 | |
WO2023071590A1 (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: 22885445 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |