Information sharing method and device, information processing method and device, and related products
By independently collecting and interacting context information using a low-power processor in electronic devices, the problem of high power consumption of context information interaction in the prior art is solved, and the battery life and interaction efficiency of the equipment are improved.
Patent Information
- Application Number
- CN202411997301.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-15
AI Technical Summary
In the prior art, electronic devices consume too much power when interacting with context information, resulting in a decrease in battery life.
By introducing a low-power processor in electronic devices, independent of the high-power main processor, it is responsible for the collection and interaction of context information. The low-power processor acquires context information and sends it to other devices through the communication module, avoiding the direct participation of the high-power processor.
It effectively reduces the power consumption generated by context information interaction, improves the battery life of electronic devices, and reduces the power consumption during interaction between different devices.
Smart Images

Figure CN119835609A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and specifically to an information sharing method and device, an information processing method and device, and related products. Background Art
[0002] With the development of intelligent electronic devices, electronic devices can dynamically adjust operation behaviors and response methods according to context information such as the current environment, user behavior, and user preferences, so as to provide users with more personalized and intelligent services, thereby improving user experience. At present, there is a problem of high power consumption in the interactive solutions for context information. Summary of the invention
[0003] The embodiments of the present application disclose an information sharing method and device, an information processing method and device, and related products, which can reduce the power consumption generated by context information interaction and improve the battery life of electronic devices.
[0004] In addition, the first electronic device sends the first target context information to the second electronic device in advance before the business use case of the second electronic device starts running, which can reduce the delay of the business use case in obtaining the required context information.
[0005] The embodiment of the present application discloses an information sharing method, which is applied to a first electronic device, wherein the first electronic device includes a first processor, a second processor, and a first communication module, and the power consumption of the first processor is less than the power consumption of the second processor; the method includes:
[0006] The first processor acquires first target context information corresponding to the first electronic device, where the first target context information is obtained by the first processor according to context information sent by one or more information sources;
[0007] The first processor sends the first target context information through the first communication module.
[0008] The embodiment of the present application discloses an information sharing method, which is applied to a second electronic device, wherein the second electronic device includes a third processor, a fourth processor, and a second communication module, and the power consumption of the third processor is less than the power consumption of the fourth processor; the method includes:
[0009] The third processor receives the first target context information sent by the first electronic device through the second communication module;
[0010] The third processor stores the first target context information.
[0011] The embodiment of the present application discloses an information processing method, which is applied to a first electronic device, wherein the first electronic device includes a first processor and a second processor, and the power consumption of the first processor is less than the power consumption of the second processor; the method includes:
[0012] The first processor obtains context information sent by one or more information sources;
[0013] The first processor sends update information to the second processor according to the context information, where the update information is used to indicate that the context information is updated;
[0014] The target application running on the second processor obtains second target context information based on the update information.
[0015] The embodiment of the present application discloses an information sharing device, which is applied to a first electronic device, wherein the first electronic device includes a first processor, a second processor, and a first communication module, and the power consumption of the first processor is less than the power consumption of the second processor; the device includes:
[0016] A first acquisition module, configured to acquire, through the first processor, first target context information corresponding to the first electronic device, where the first target context information is obtained by the first processor according to context information sent by one or more information sources;
[0017] A sending module is used to use the first processor to send the first target context information through the first communication module.
[0018] The embodiment of the present application discloses an information sharing device, which is applied to a second electronic device, wherein the second electronic device includes a third processor, a fourth processor, and a second communication module, and the power consumption of the third processor is less than the power consumption of the fourth processor; the device includes:
[0019] a receiving module, configured to use the third processor to receive first target context information sent by a first electronic device through the second communication module;
[0020] A storage module is used to store the first target context information through the third processor.
[0021] The embodiment of the present application discloses an information processing device, which is applied to a first electronic device, wherein the first electronic device includes a first processor and a second processor, and the power consumption of the first processor is less than the power consumption of the second processor; the device includes:
[0022] A second acquisition module, configured to acquire, through the first processor, context information sent by one or more information sources;
[0023] a reporting module, configured to send update information to the second processor through the first processor according to the context information, wherein the update information is used to indicate that the context information is updated;
[0024] A third acquisition module is configured to acquire second target context information based on the update information through a target application running on the second processor.
[0025] An embodiment of the present application discloses an electronic device, including a memory, a processor, and a transceiver unit. The memory stores a computer program. When the computer program is executed by the processor, the electronic device implements the method described in any of the above embodiments.
[0026] An embodiment of the present application discloses a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor in an electronic device, the electronic device implements the method described in any of the above embodiments.
[0027] An embodiment of the present application discloses a computer program product, including a computer program. When the computer program is executed by a processor in an electronic device, the electronic device implements the method described in any of the above embodiments.
[0028] The information sharing method and device, and related products disclosed in the embodiments of the present application, a first electronic device includes a first processor, a second processor, and a first communication module, the power consumption of the first processor is less than the power consumption of the second processor, the first processor obtains the first target context information corresponding to the first electronic device, the first target context information is obtained by the first processor based on the context information sent by one or more information sources, the first processor sends the first target context information through the first communication module, so that the second electronic device can receive the first target context information. The first electronic device collects the context information sent by one or more information sources through the low-power first processor, and shares the first target context information corresponding to the first electronic device with the second electronic device through the low-power first processor. The sharing process does not need to pass through the second processor, which can effectively reduce the power consumption of the first electronic device, reduce the power consumption generated by the interaction of context information between different electronic devices, and improve the endurance of the electronic device.
[0029] In addition, the second electronic device includes a third processor, a fourth processor and a second communication module, the power consumption of the third processor is less than that of the fourth processor, and the third processor receives the first target context information sent by the first electronic device through the second communication module, and stores the first target context information. The second electronic device receives the first target context information shared by the first electronic device through the low-power third processor, realizes the collection of context information, can effectively reduce the power consumption of the second electronic device, realizes low-power context information interaction between different electronic devices, and improves the endurance of the electronic device.
[0030] In addition, when the first processor of the first electronic device detects that the context information has been updated, it can send the latest first target context information to the second electronic device, ensuring that the second electronic device can obtain the first target context information updated in real time. The first electronic device sends the first target context information to the second electronic device in advance before the business use case of the second electronic device starts running, which can reduce the delay in the business use case obtaining the required context information and improve the user experience.
[0031] The information processing method and device, and related products disclosed in the embodiments of the present application, a first electronic device includes a first processor and a second processor, the power consumption of the first processor is less than the power consumption of the second processor, the first processor obtains context information sent by one or more information sources, the first processor sends update information to the second processor based on the context information, the update information is used to indicate that the context information is updated, the target application running on the second processor obtains second target context information based on the update information, the first electronic device collects the context information sent by one or more information sources through the low-power first processor, and performs operations such as collection of context information on the first processor independent of the second processor, which can effectively reduce the power consumption of the first electronic device, the first processor can report the update information to the second processor, so that the target application running on the second processor can obtain the required second target context information, thereby ensuring normal business processing of the target application. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0033] Figure 1 An application scenario diagram of an information sharing method in an embodiment;
[0034] Figure 2is a structural diagram of an information sharing method in an embodiment;
[0035] Figure 3 is a software architecture diagram of an electronic device in one embodiment;
[0036] Figure 4 is a flow chart of an information sharing method in one embodiment;
[0037] Figure 5 is a timing diagram of an information sharing method in one embodiment;
[0038] Fig. 6A A schematic diagram of the flow of first target context information in a DCP of a first electronic device in an embodiment;
[0039] Figure 6B is a schematic diagram of the flow of first target context information in the DCP of the second electronic device in one embodiment;
[0040] Figure 6C A schematic diagram of reducing latency of context information between different electronic devices in one embodiment;
[0041] Figure 7 is a flow chart of an information sharing method in another embodiment;
[0042] Figure 8 A flowchart of a first processor generating a data packet and sending a data packet in one embodiment;
[0043] Fig. 9 is a structural diagram of context information in one embodiment;
[0044] Fig.10 is a schematic diagram of the flow of the first target context information in the DCP of the second electronic device in another embodiment;
[0045] Fig.11 A flowchart of a first processor reporting update information of context information being updated to a second processor in one embodiment;
[0046] Fig.12 A schematic diagram of reducing the frequency of waking up a main processor in one embodiment;
[0047] Fig.13 A schematic diagram of the flow of context information in a DCP of a first electronic device in an embodiment;
[0048] Fig.14 is a flow chart of an information sharing method in another embodiment;
[0049] Fig.15 is a flow chart of an information processing method in one embodiment;
[0050] Fig.16 is a block diagram of an information sharing device in one embodiment;
[0051] Fig.17 is a block diagram of an information sharing device in another embodiment;
[0052] Fig.18 is a block diagram of an information processing device in one embodiment;
[0053] Fig.19 FIG. 4 is a structural block diagram of an electronic device in an embodiment. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0055] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present application and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0056] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first processor may be referred to as a second processor, and similarly, a second processor may be referred to as a first processor. Both the first processor and the second processor are processors, but they are not the same processor. The term "plurality" used in this application refers to two or more. The term "and / or" used in this application refers to one of the schemes, or any combination of multiple schemes.
[0057] Figure 1 FIG. 1 is an application scenario diagram of an information sharing method in an embodiment. Figure 1As shown, the application scenario of the information sharing method may include a first electronic device 10 and a second electronic device 20. The first electronic device 10 and the second electronic device 20 may include but are not limited to mobile phones, wearable devices (such as smart watches, smart glasses, etc.), vehicle-mounted terminals, tablet computers, laptops, PCs (Personal Computers), smart home devices and other devices.
[0058] The first electronic device 10 and the second electronic device 20 may exchange context information. For example, the first electronic device 10 may send the acquired context information to the second electronic device 20 , and / or the second electronic device 20 may send the acquired context information to the first electronic device 10 .
[0059] Context information may include but is not limited to one or more of the following categories: environmental information, device information, user information, action information, etc., where environmental information can be used to describe the physical environment in which the electronic device is currently located, device information can be used to describe the device status of the electronic device, user information can be used to describe the personal situation and / or user behavior of the user using the electronic device, and action information can be used to describe the movement of the device. Each category of context information may include one or more context data, and different context data may be collected from different information sources, or may also be collected from the same information source, which is not limited here.
[0060] It should be noted that Figure 1 The first electronic device 10 and the second electronic device 20 shown are only used to illustrate the application scenario of the information sharing method, and are not used to limit the actual application scenario. In the actual application scenario, multiple first electronic devices 10 may be included, and multiple second electronic devices 20 may also be included, so that the interaction of context information between multiple electronic devices can be realized, and the context information sharing between different electronic devices can be realized. For example, in the IoT (Internet of Things) scenario, context information can be shared between multiple IoT devices to improve the intelligence of IoT devices.
[0061] Figure 2 FIG. 1 is a schematic diagram of an information sharing method in an embodiment. Figure 2 As shown, the first electronic device 10 may include a first processor 110, a second processor 120 and a first communication module 130, wherein the power consumption of the first processor 110 may be less than the power consumption of the second processor 120, and further, the performance of the second processor 120 may be better than the performance of the first processor 110, that is, the processing capability of the second processor 120 may be greater than the processing capability of the first processor 110.
[0062] Exemplarily, the second processor 120 may include an application processor (AP), a CPU (Central Processing Unit), a SoC (System on Chip), and the first processor 110 may include a coprocessor, an MCU (Microcontroller Unit), etc., but are not limited to this.
[0063] In some embodiments, the second processor 120 may run a host operating system (HLOS), which may be an intelligent operating system. For example, the second processor 120 may run an IOS system, an Android system, a Windows system, etc., but is not limited thereto. The first processor 110 may run an embedded system, such as a RTOS (Real Time Operate System), etc., but is not limited thereto.
[0064] The first communication module 130 may include, but is not limited to, one or more of a Bluetooth module, a Wi-Fi module, a cellular radio frequency module, an NFC (Near Field Communication, short-range wireless communication technology) module, and the like.
[0065] The second electronic device 20 may include a third processor 210, a fourth processor 220, and a second communication module 230, wherein the power consumption of the third processor 210 may be less than that of the fourth processor 220, and further, the performance of the fourth processor 220 may be better than that of the third processor 210. Exemplarily, the fourth processor 220 may include an application processor, a CPU, a SoC, etc., and the third processor 210 may include a coprocessor, an MCU, etc., but is not limited thereto.
[0066] In some embodiments, the fourth processor 220 can run a main operating system, which can be an intelligent operating system. For example, the fourth processor 220 can run an IOS system, an Android system, a Windows system, etc., but is not limited thereto. The third processor 210 can run an embedded system, such as an RTOS, etc., but is not limited thereto.
[0067] Taking the first electronic device 10 sending context information to the second electronic device 20 as an example, the first processor 110 of the first electronic device 10 can obtain the first target context information corresponding to the first electronic device 10, and the first target context information is obtained by the first processor 110 according to the context information sent by one or more information sources. The first processor 110 of the first electronic device 10 can send the first target context information through the first communication module 130, so that the second electronic device 20 receives the first target context information.
[0068] In some embodiments, the third processor 210 of the second electronic device 20 may receive the first target context information sent by the first electronic device 10 through the second communication module 230. The third processor 210 of the second electronic device 20 may store the first target context information. The first electronic device 10 and the second electronic device 20 both perform context information interaction through a low-power processor, which can realize low-power context information interaction between different electronic devices, effectively reduce the power consumption of electronic devices, and improve the endurance of electronic devices.
[0069] In some embodiments, the electronic device performs operations such as context information collection through a low-power processor, and the low-power processor can report update information of the context information to the main processor (the processor running the main operating system), so that the application running on the main processor can obtain the required context information. Taking the first electronic device 10 as an example, the first processor 110 of the first electronic device 10 obtains context information sent by one or more information sources. The first processor 110 can send update information to the second processor 120 based on the context information, and the update information can be used to indicate that the context information has been updated. The target application running on the second processor 120 obtains the required second target context information based on the update information. Further, the target application running on the second processor 120 can perform corresponding operations or responses based on the obtained second target context information.
[0070] For example, Figure 3 FIG. 1 is a software architecture diagram of an electronic device in an embodiment. Figure 3 As shown, a DCP (Distributed Context Platform) can be constructed based on the CHRE (Context Hub Runtime Environment) framework, and the DCP can be used to realize low-power context information interaction between different electronic devices, as well as context information interaction between a low-power processor and a main processor in the same electronic device. Optionally, the above-mentioned first electronic device 10, second electronic device 20, etc. can build the DCP.
[0071] Among them, CHRE is a general platform for running applications on low-power processors. CHRE is simple, standardized, and embedded-friendly, and provides friendly API (Application Programming Interface) support for underlying sensors, Bluetooth, Wi-Fi, audio and other modules.
[0072] The operating system of an electronic device may include an application layer, a framework layer, a sensor hardware abstraction layer (Sensors Hardware Abstraction Layer, Sensors HAL), a sensor hub, etc.
[0073] The application layer may include one or more applications. For example, the application layer may include camera, gallery, calendar, call, map, navigation and other applications, but is not limited thereto.
[0074] The framework layer can provide API and programming framework for the application of the application layer. The framework layer may include one or more services, such as window manager, content manager, view system, resource manager, etc., but not limited to them. Among them, the window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.; the content manager can be used to enable one application to access the data of another application, and the data may include but is not limited to video, images, audio, etc.; the view system can be used to build the interface of the application; the resource manager can be used to manage the resources of the application, such as pictures, layout files, etc.
[0075] Sensors HAL defines a series of functions for controlling and managing various sensors on electronic devices.
[0076] Sensor Hub is a hardware and software solution based on a low-power processor and a lightweight real-time operating system. Its main function is to connect and process data from various sensor devices. Sensor Hub may include Sensor PAL (Sensor Platform Layer), which can be used to obtain data collected by sensors. For example, Sensor PAL may include drivers for each sensor.
[0077] DCP can collect, integrate, manage and distribute the context information of electronic devices, achieve more complete and real-time management of context information, provide the required context information for application layer applications, and share context information with other electronic devices.
[0078] DCP may include DCP Service, Context Hub Service, Context Hub Hardware Abstraction Layer (Context Hub HAL), CHRE Platform Adapter, CHRE Framework (including CHRE API) and one or more DCP tasks.
[0079] The DCP service can be implemented in the application layer or framework layer of the operating system to provide the required context information for the application layer applications. Furthermore, the DCP service takes over the Context Hub service and provides DCP service interfaces such as permission application and context information configuration to the application layer applications.
[0080] Applications at the application layer can apply for permissions and configure the context information they need to obtain through the DCP service interface. The permission application may refer to the permission applied by the application to obtain context information. It should be noted that in order to ensure data security, applications at the application layer cannot directly obtain all context information, but can only obtain the context data if they have the corresponding permissions.
[0081] The DCP service can be used specifically for the message delivery logic on the application side of the application layer. For example, when an application at the application layer sends a message to a DCP task at the lower layer, it will first pass through the DCP service, which can detect the legitimacy of the message, whether the application has access rights, whether the application has the right to obtain context information, etc.; when a DCP task at the lower layer reports a message to an application at the application layer, it will also first pass through the DCP service, which will detect the legitimacy of the message or build an application group that needs to distribute the message, so as to distribute the message to a group of applications, etc.
[0082] Optionally, the DCP service may include a DCP Host Manager, which may be responsible for detecting the legitimacy of messages sent by applications at the application layer or messages sent by DCP tasks at the lower layer, related permissions of the application, message distribution, and other functions.
[0083] The Context Hub service can be implemented in the framework layer of the operating system and can be used to manage Nanoapps, process messages from Nanoapps and send them to the application or framework layer, or process messages from the application or framework layer and send them to the corresponding Nanoapps. Nanoapps refer to applications running in the CHRE platform.
[0084] Context Hub HAL is the interface between the framework layer and the CHRE platform implementation. Context Hub HAL defines APIs through which the framework layer can discover available context centers and Nanoapps and interact with these Nanoapps through messaging. Optionally, Context Hub HAL can also support loading or unloading Nanoapps at runtime.
[0085] The platform adaptation layer of CHRE can be understood as the implementation layer of CHRE. It can be the platform abstraction layer of CHRE, which is used to provide an interface for implementing the CHRE platform.
[0086] The CHRE framework (including the CHRE API) can be used to define the software interface between Nanoapp and the system, which is used to make Nanoapp's code compatible on devices that support CHRE.
[0087] DCP tasks are mainly used to process various real-time raw data, such as data received by Bluetooth, data received by Wi-Fi, data collected by various sensors, etc. These data are often difficult to directly apply to the business processing of application programs at the application layer. Therefore, DCP tasks can collect, integrate, and process these raw data for use by application layer applications.
[0088] The DCP task is essentially a Nanoapp that processes various types of contextual information, such as BLE Nanoapp (BluetoothLow Energy Nanoapp), health Nanoapp, positioning Nanoapp and Wi-Fi Nanoapp. Among them, BLE Nanoapp can be used to process data related to BLE communication, such as received BLE broadcast frames; health Nanoapp can be used to process contextual information related to health monitoring, such as heart rate data, breathing data, etc.; positioning Nanoapp can be used to process contextual information related to positioning functions, such as acceleration data, air pressure data, etc.; Wi-Fi Nanoapp can be used to process data related to Wi-Fi communication, such as data packets received through the Wi-Fi module.
[0089] In some embodiments, the DCP task may process the context information sent by each information source, and store the processed context information in a cache space (such as a Context cache, etc.) for acquisition and use by an application program at the application layer.
[0090] It should be noted that the above-mentioned Context Hub HAL, CHRE platform adaptation layer, CHRE API and DCP tasks can run on low-power processors, and Context Hub services and DCP services can run on the main processor.
[0091] Exemplarily, the DCP platform can realize bottom-up context information interaction. The sensors of the electronic device collect sensor data, and the Sensor Hub can obtain the changes in context information based on the sensor data collected by the sensor, and provide the updated context information to the CHRE API through the platform adaptation layer of CHRE. The platform adaptation layer of CHRE distributes the context information sent by the Sensor Hub to the associated DCP task (i.e., the corresponding Nanoapp) through the CHREAPI. The DCP task can process the received context information into easy-to-use context information, such as positioning information, navigation information, health information, etc., and can store the processed context information in the cache space. The DCP task can send a message to the upper-level DCP service. Further, the DCP task can send the message to the Context Hub HAL through the platform adaptation layer of CHRE. The Context Hub HAL passes the message to the Context Hub service, and then the Context Hub service passes it to the DCP service. The DCP service distributes the message to the application in the application layer, so that the application obtains the context information from the cache space.
[0092] Exemplarily, the DCP platform can implement top-down context information interaction. Applications running in the application layer of the operating system of the electronic device can collect context information and send the context information to the DCP service. The DCP service can send the context information to the corresponding DCP task (i.e., the corresponding Nanoapp). Further, the DCP service can pass the context information to the Context Hub service, and the Context Hub service can pass the context information to the Context HubHAL. The Context Hub HAL can provide the context information to the CHRE API through the platform adaptation layer of CHRE, and distribute the context information sent by the application layer application to the associated DCP task through the CHRE API. The DCP task can process the received context information into easy-to-use context information, such as user account information, operation information, etc., and can store the processed context information in the cache space.
[0093] Exemplarily, the DCP platform can realize the interaction of context information between different electronic devices. The DCP task can obtain the context information that needs to be distributed from the cache space, and distribute the context information to other electronic devices based on the distribution strategy. Optionally, the context information can be distributed to other electronic devices through communication methods such as Bluetooth or Wi-Fi. Taking the sending of context information through BLE broadcast as an example, the BLE Nanoapp can obtain the context information that needs to be distributed and encapsulate it into a BLE broadcast frame, and then send the BLE broadcast frame to the Bluetooth module through the platform adaptation layer of CHRE, and the Bluetooth module sends the BLE broadcast frame.
[0094] The DCP task can also process context information sent by other electronic devices. The communication module of the electronic device (such as a Bluetooth module or a Wi-Fi module) receives context information sent by other electronic devices, and can provide the received context information to the CHRE API through the platform adaptation layer of CHRE. The platform adaptation layer of CHRE distributes the context information sent by other electronic devices to the corresponding DCP task for processing through the CHRE API. Taking the reception of context information sent by other electronic devices based on BLE communication technology as an example, the Bluetooth module can send the scanned BLE broadcast frame to the platform adaptation layer of CHRE. The platform adaptation layer of CHRE sends the BLE broadcast frame to the BLE Nanoapp through the CHRE API. The BLE Nanoapp can parse the BLE broadcast frame to extract the required context information and store the context information in the cache space. Furthermore, the DCP task can also send messages to the upper-level DCP service so that the application program of the application layer can obtain the context information sent by other electronic devices.
[0095] The DCP built based on the CHRE framework can realize context information interaction between different electronic devices, as well as context information interaction between low-power processors and main processors in the same electronic device. The ability to realize low-power context information interaction can greatly enhance the integration and information sharing between multiple electronic devices in smart scenarios, and can enhance the intelligence of applications.
[0096] The DCP provided in the embodiments of the present application can be applied to different intelligent scenarios. For example, the DCP can also be integrated into the AI (Artificial Intelligence) training framework of the terminal platform. Furthermore, a DCP service dedicated to AI services can be established. The DCP service can more focused on processing the context information of the AI model to meet the AI model's requirements for low latency and customization of context information.
[0097] like Figure 4As shown, in one embodiment, an information sharing method is provided, which can be applied to the first electronic device mentioned above, and the method may include the following steps:
[0098] Step 410: The first processor obtains first target context information corresponding to the first electronic device. The first target context information is obtained by the first processor according to context information sent by one or more information sources.
[0099] The first electronic device may include a first processor and a second processor. The power consumption of the first processor may be lower than that of the second processor. Furthermore, the performance of the second processor may be better than that of the first processor, that is, the processing capability of the second processor may be greater than that of the first processor.
[0100] Optionally, the first processor may run an embedded system, such as RTOS, etc., and illustratively, the first processor may include but is not limited to a coprocessor, an MCU, etc. The second processor may run a main operating system, and illustratively, the second processor may include but is not limited to any one of an application processor, a CPU, a SoC, etc.
[0101] The first processor can collect, integrate and process context information from one or more information sources, where the information source refers to the source of the context information, and the information source may include but is not limited to one or more of sensors in the first electronic device, applications running on the second processor, and other electronic devices. The context information from different information sources can be integrated, which improves the richness of the context information and further improves the intelligence of the upper-layer business.
[0102] The sensor in the first electronic device can be used as a source of context information, and the sensor can include but is not limited to one or more of an acceleration sensor, a gyroscope, a brightness sensor, a distance sensor, a PPG (Photoplethys mography) sensor, etc. The sensor in the first electronic device can collect context data under various categories, for example, the brightness sensor can collect the ambient brightness data of the environment where the first electronic device is located, the acceleration sensor can collect the acceleration data of the first electronic device, the gyroscope can collect the rotation data of the first electronic device, the distance sensor can collect the distance data between the user and the first electronic device, and the PPG information can collect the user's heart rate data, pulse wave data, etc.
[0103] The application running on the second processor can serve as a source of context information. Optionally, the application running on the second processor can obtain various context data under the user information category. For example, the application can obtain one or more of the user's operation data, logged-in user account information, user habit information, etc.
[0104] Other electronic devices may serve as sources of context information, and the first processor of the first electronic device may obtain context information sent by other electronic devices, such as context data collected by sensors on the other electronic devices, user information of the other electronic devices, and the like.
[0105] In some embodiments, each information source may send the latest context information to the first processor in real time when detecting an update of the context information. Exemplarily, each information source may send the latest context information to the platform adaptation layer of CHRE in DCP in real time when detecting an update of the context information. The platform adaptation layer of CHRE may distribute the context information to the corresponding DCP task through the CHRE API, and the corresponding DCP task processes the context information, thereby achieving real-time, low-power acquisition of the context information and ensuring the accuracy of the context information.
[0106] The first processor may obtain first target context information corresponding to the first electronic device, and the first target context information may refer to context information that needs to be shared with other electronic devices. In some embodiments, the first processor may obtain the first target context information according to a preconfigured distribution strategy and share the first target context information.
[0107] Among them, the distribution strategy can be used to define the rules for distributing context information to other electronic devices. For example, it can define whether the context information is allowed to be distributed to other electronic devices, and / or, it can define the data type corresponding to each context data allowed to be distributed to other electronic devices, and / or, it can define the device categories of other electronic devices allowed to be shared, etc., but not limited to this.
[0108] Exemplarily, the distribution policy can define whether the context information is allowed to be distributed to other electronic devices. If the distribution policy indicates that the context information is not allowed to be distributed to other electronic devices, the first processor cannot perform the distribution action of sending the context information to other electronic devices, and the first processor does not obtain the first target context information; if the distribution policy indicates that the context information is allowed to be distributed to other electronic devices, the first processor can obtain the first target context information and share the first target context information.
[0109] Exemplarily, the distribution strategy may define the data type corresponding to each context data that is allowed to be distributed to other electronic devices. The data type may characterize the specific type to which the context data belongs. Optionally, the context information may include one or more categories, each category may include one or more context data, and each context data corresponds to a different data type. For example, the data type corresponding to the context data may include, but is not limited to, acceleration sensors, ambient brightness data, navigation positioning data, user touch data, etc., but is not limited thereto. The first processor may, according to the distribution strategy, obtain the context data of each data type defined by the distribution strategy that is allowed to be distributed to other electronic devices, obtain the first target context information, and share the first target context information.
[0110] Exemplarily, the distribution policy may define the device category of other electronic devices that are allowed to be shared, and the device category can be used to define the category to which other electronic devices belong, and the device category can be divided according to actual business needs. For example, the distribution policy may define that context information is allowed to be shared with other electronic devices in the same Wi-Fi wireless network, or the distribution policy may define that context information is allowed to be shared with other electronic devices that log in to the same user account information, or the distribution policy may define that context information is allowed to be shared with other electronic devices belonging to the smart home category, etc., but not limited thereto. By defining the device category of other electronic devices that are allowed to be shared through the distribution policy, the accuracy and security of context information interaction between different electronic devices can be improved.
[0111] In the above implementation, the first processor can share the context information with other electronic devices according to the distribution strategy, thereby realizing the context information interaction between different electronic devices. The configured distribution strategy can improve the accuracy and flexibility of context information distribution and ensure the security of context information interaction.
[0112] Step 420: The first processor sends first target context information via the first communication module.
[0113] After acquiring the first target context information, the first processor may send the first target context information through the first communication module, and the first target context information may be received by other electronic devices (such as the second electronic device), and the second electronic device may receive the first target context information sent by the first electronic device.
[0114] Exemplarily, the DCP in the first electronic device is used to implement the DCP task of context information distribution, which can obtain the first target context information and send the first target context information to the platform adaptation layer of CHRE through the CHRE API. The platform adaptation layer of CHRE can transmit the first target context information to the first communication module, and the first communication module sends the first target context information.
[0115] The first electronic device may send the first target context information through a short-range communication technology, and the second electronic devices around the first electronic device may receive the first target context information sent by the first electronic device.
[0116] Exemplarily, the first electronic device may send the first target context information via Bluetooth communication technology or Wi-Fi communication technology.
[0117] In some embodiments, the first communication module may include a first Bluetooth module, and the first processor may send the first target context information through the first Bluetooth module based on the BLE communication technology. Further, the first target context information may be sent through BLE broadcasting, and the first Bluetooth module may send a BLE broadcast frame carrying the first target context information. A second electronic device around the first electronic device may scan the BLE broadcast frame, and by parsing the BLE broadcast frame, the first target context information may be obtained.
[0118] In some embodiments, the first communication module may include a first Wi-Fi module, and the first processor may send the first target context information based on the Wi-Fi communication technology through the first Wi-Fi module. Further, the first Wi-Fi module may send a data packet carrying the first target context information, and the second electronic device may receive the data packet, and the first target context information may be obtained by parsing the data packet.
[0119] In the case of different communication modes, the first processor can obtain the first target context information through different DCP tasks and process the first target context information. For example, based on the BLE communication technology, the first processor can obtain the first target context information through the BLE Nanoapp, and encapsulate the first target context information into a BLE broadcast frame according to the agreed data format. The BLE Nanoapp can send the BLE broadcast frame to the platform adaptation layer of CHRE through the CHRE API, and then the platform adaptation layer of CHRE sends the BLE broadcast frame to the Bluetooth module, and the Bluetooth module broadcasts the BLE broadcast frame based on the BLE communication protocol.
[0120] For another example, based on the Wi-Fi communication technology, the first target context information is sent. The first processor can obtain the first target context information through the Wi-Fi Nanoapp, and encapsulate the first target context information into a data packet according to the agreed data format. The Wi-Fi Nanoapp can send the BLE broadcast frame to the platform adaptation layer of CHRE through the CHRE API, and then the platform adaptation layer of CHRE sends the BLE broadcast frame to the Wi-Fi module, and the Wi-Fi module sends the data packet.
[0121] As an implementation manner, the first processor may also select an appropriate first communication module to send the first target context information according to the status of the first Bluetooth module and the first Wi-Fi module. The status may be used to indicate whether data transmission is in progress, or may be used to indicate network quality, etc.
[0122] For example, if the first Bluetooth module is in a busy state (referring to a state in which data transmission is in progress) and the first Wi-Fi module is in an idle state (referring to a state in which data transmission is not in progress), the first processor may select the first Wi-Fi module to send the first target context information; if the first Bluetooth module is in an idle state, regardless of whether the first Wi-Fi module is in an idle state, the first processor may select the first Bluetooth module to send the first target context information, thereby reducing the power consumption of context information interaction.
[0123] For another example, the first processor may obtain network quality information corresponding to the first Bluetooth module and the first Wi-Fi module, such as signal strength, signal-to-noise ratio, etc. The first processor may select the first communication module with better network quality to send the first target context information based on the network quality information corresponding to the first Bluetooth module and the first Wi-Fi module, thereby ensuring the stability of context information interaction.
[0124] In the above-mentioned embodiment, the first processor of the first electronic device can send the first target context information through the first Bluetooth module or the first Wi-Fi module. The first processor directly has the ability to interact with the underlying first communication module. In the process of context information sharing, there is no need to go through the second processor, so low-power context information interaction between different electronic devices can be achieved.
[0125] The second electronic device may include a third processor, a fourth processor and a second communication module. The power consumption of the third processor may be less than that of the fourth processor. Furthermore, the performance of the fourth processor may be better than that of the third processor, that is, the processing capacity of the fourth processor may be greater than that of the third processor.
[0126] Optionally, the third processor may run an embedded system, such as RTOS, etc. For example, the first processor may include but is not limited to a coprocessor, an MCU, etc. The fourth processor may run a main operating system, for example, the fourth processor may include but is not limited to any one of an application processor, a CPU, a SoC, etc.
[0127] The third processor of the second electronic device may receive the first target context information sent by the first electronic device through the second communication module, and the third processor may store the first target context information.
[0128] The third processor can collect, integrate and process context information from one or more information sources. The first electronic device can serve as one of the information sources. The third processor can then obtain first target context information sent by the first electronic device, and process and store the first target context information.
[0129] Exemplarily, after the second communication module of the second electronic device receives the first target context information sent by the first electronic device, it can send the first target context information to the platform adaptation layer of CHRE. The platform adaptation layer of CHRE can distribute the first target context information to the corresponding DCP task through the CHRE API. The corresponding DCP task can process and store the first target context information.
[0130] The second electronic device may receive the first target context information sent by the first electronic device through Bluetooth communication technology or Wi-Fi communication technology.
[0131] In some embodiments, the second communication module may include a second Bluetooth module, and the third processor may receive the first target context information sent by the first electronic device through the second Bluetooth module based on the BLE communication technology. Further, the first target context information may be sent through BLE broadcast, and the second Bluetooth module may scan and receive the BLE broadcast frame carrying the first target context information.
[0132] In some embodiments, the second communication module may include a second Wi-Fi module, and the third processor may receive the first target context information sent by the first electronic device through the second Wi-Fi module based on the Wi-Fi communication technology. Further, the second Wi-Fi module may receive a data packet carrying the first target context information, and the third processor may parse the data packet to obtain the first target context information.
[0133] In the case of different communication modes, the third processor can obtain the first target context information sent by the first electronic device through different DCP tasks, and process the first target context information. For example, the second Bluetooth module receives the BLE broadcast frame based on the BLE communication technology, and can send the BLE broadcast frame to the platform adaptation layer of CHRE. The platform adaptation layer of CHRE can transmit the BLE broadcast frame to the BLE Nanoapp through the CHRE API. The BLE Nanoapp can parse the BEL broadcast frame to obtain the first target context information and store the first target context information.
[0134] For another example, based on the Wi-Fi communication technology, the first target context information is received. The second Wi-Fi module receives the data packet sent by the first electronic device and can send the data packet to the platform adaptation layer of CHRE. The platform adaptation layer of CHRE can transmit the data packet to Wi-Fi Nanoapp through the CHRE API. Wi-Fi Nanoapp can parse the data packet to obtain the first target context information and store the first target context information.
[0135] In the above-mentioned embodiment, the third processor of the second electronic device can receive the first target context information sent by the first electronic device through the second Bluetooth module or the second Wi-Fi module. The third processor directly has the ability to interact with the underlying second communication module. In the process of receiving the context information, there is no need to pass through the fourth processor, and low-power context information interaction between different electronic devices can be achieved.
[0136] For example, Figure 5 FIG. 1 is a timing diagram of an information sharing method in an embodiment. Figure 5 As shown, the first processor of the first electronic device can obtain the first target context information and transmit the first target context information to the first communication module, and the first communication module sends the first target context information. The second communication module of the second electronic device can receive the first target context information sent by the first electronic device, and the second communication module can transmit the first target context information to the third processor, and the third processor can store the first target context information.
[0137] For example, Fig. 6A FIG. 1 is a schematic diagram of the flow of the first target context information in the DCP of the first electronic device in an embodiment. Fig. 6AAs shown, the DCP task in the first electronic device (such as BLE Nanoapp or Wi-Fi Nanoapp, etc.) can obtain the first target context information and send the first target context information to the platform adaptation layer of CHRE through the CHRE API. The platform adaptation layer of CHRE can send the first target context information to the first communication module, and the first communication module sends the first target context information.
[0138] For example, Figure 6B FIG. 1 is a schematic diagram of the flow of the first target context information in the DCP of the second electronic device in an embodiment. Figure 6B As shown, the second communication module of the second electronic device receives the first target context information sent by the first electronic device. The second communication module can send the first target context information to the platform adaptation layer of CHRE. The platform adaptation layer of CHRE can distribute the first target context information to the corresponding DCP task (such as BLENanoapp or Wi-Fi Nanoapp, etc.) through the CHRE API for processing, and the DCP task can store the first target context information.
[0139] In an embodiment of the present application, a first electronic device collects context information sent by one or more information sources through a low-power first processor, and shares first target context information corresponding to the first electronic device with a second electronic device through the low-power first processor. The sharing process does not require the second processor, which can effectively reduce the power consumption of the first electronic device, reduce the power consumption generated by the interaction of context information between different electronic devices, and improve the battery life of the electronic device.
[0140] In addition, the second electronic device includes a third processor, a fourth processor and a second communication module, the power consumption of the third processor is less than that of the fourth processor, and the third processor receives the first target context information sent by the first electronic device through the second communication module, and stores the first target context information. The second electronic device receives the first target context information shared by the first electronic device through the low-power third processor, realizes the collection of context information, can effectively reduce the power consumption of the second electronic device, realizes low-power context information interaction between different electronic devices, and improves the endurance of the electronic device.
[0141] like Figure 7 As shown, in another embodiment, an information sharing method is provided, which can be applied to the first electronic device mentioned above, and the method may include the following steps:
[0142] Step 702: The first processor obtains context information sent by one or more information sources.
[0143] Step 704: The first processor processes the context information sent by one or more information sources to obtain target context information.
[0144] Since the context information sent by each information source has a lot of information content and is relatively complex, for example, the context information sent by each information source may carry some useless context information or some non-context information data, the first processor may process the context information sent by each information source to obtain target context information that is easier to use. The target context information may be context information that is easier to use for a business (such as an application at the application layer), or the target context information may be context information required by the first electronic device.
[0145] In some embodiments, due to different information sources, the data formats sent by each information source are also different. Therefore, the first processor can parse the context information sent by each information source based on the data format corresponding to each information source to obtain the target context information.
[0146] Exemplarily, the information source is an application at the application layer, and the data format of the data sent by the application, in addition to the data type corresponding to the context data and the specific context data, may also include one or more of the application ID (Identity document), the application package name, the operator information, the first timestamp, the decryption information, and the first data length, etc. Among them, the application ID and package name can be used to uniquely identify the application; the operator information can include but is not limited to the operator number and name of the application; the first timestamp can refer to the time when the application sends the data; the decryption information can be used to decrypt the data, for example, it may include an IV vector (Initialization Vector), a digital certificate, etc., and the first data length can be used to indicate the length corresponding to all context data, and / or can be used to indicate the length corresponding to each context data.
[0147] When the first processor obtains data carrying context information sent by an application at the application layer, it can parse the data according to the data format corresponding to the application to obtain various context data sent by the application, thereby parsing to obtain valid and usable target context information.
[0148] Exemplarily, the information source may be a sensor of the first electronic device. Since the context information sent by the sensor is usually the raw data generated by the sensor, the first processor may directly parse the raw data of each sensor according to the data format provided by the CHRE API to obtain the context data corresponding to each sensor, thereby parsing and obtaining effective and usable target context information.
[0149] Exemplarily, the information source may be other electronic devices. The data format of the data packets sent by the other electronic devices, in addition to the data type corresponding to the context data and the specific context data, may also include but is not limited to one or more of the protocol header of the communication protocol, the manufacturer identification, the protocol header of the load, the second timestamp, the second data length, the source device identification information, verification data, etc. Among them, the protocol header of the communication protocol may include the protocol identifier of the communication protocol for transmitting data, the protocol identifier of the agreed communication protocol, etc. The communication protocol for transmitting data may refer to a communication protocol used to transmit data, such as the BLE protocol, the TCP / IP (Transmission Control Protocol / Internet Protocol) protocol, etc. The agreed communication protocol may be a communication protocol specifically used to transmit context information, and the agreed communication protocol may be a private communication protocol; the manufacturer identifier may include the manufacturer ID and manufacturer name of the source device sending the context information; the protocol header of the load may be used to indicate the effective load carried by the data packet; the second timestamp may refer to the time when the data packet is sent; the second data length may be used to indicate the length corresponding to all context data carried by the data packet, and / or may be used to indicate the length corresponding to each context data; the source device identification information may refer to the device identifier of the source device sending the context information, such as the device ID, device name and / or MAC address (Media Access Control Address) of the source device; the verification data may be used to verify identity and / or authority, etc.
[0150] When the first processor obtains a data packet carrying context information sent by other electronic devices, it can parse the data packet according to the data format corresponding to the other electronic devices to obtain various context data sent by the application, thereby parsing to obtain valid and usable target context information.
[0151] Exemplarily, when one or more DCP tasks in the first processor obtain context information sent by an information source, the context information may be parsed according to a data format corresponding to the information source to obtain valid and usable target context information.
[0152] In some embodiments, after parsing the data sent by the information source to obtain context information, the DCP task may cut the context information according to the metadata structure to obtain target context information, and then store the target context information.
[0153] The metadata structure may refer to a data structure used to describe context data. The metadata structure may be configured according to actual business needs and is not limited here. For example, the gyroscope Nanoapp may parse the raw data collected by the acceleration sensor to obtain context information such as the sensor name, three-dimensional coordinate data, and three-dimensional coordinate error. Since the metadata structure only includes three-dimensional coordinate data, the context information may be cut, and only three-dimensional coordinate data remains after cutting, and the three-dimensional coordinate data is stored. The DCP task uses the metadata structure to cut the context information, so that the target context information obtained is more in line with the actual use needs of the business, improves the accuracy of the target context information, and ensures the normal operation of the business.
[0154] In an embodiment of the present application, the first processor may parse the context information sent by each information source according to the data format corresponding to each information source to obtain target context information, thereby improving the accuracy of the target context information.
[0155] Step 706: The first processor stores the target context information in the cache space.
[0156] The first processor can update the target context information obtained by parsing into the cache space. For example, the DCP task can update the obtained target context information into the cache space, thereby ensuring that real-time target context information is stored in the cache space, facilitating the application program at the application layer to obtain the required second target context information, and facilitating the first processor to obtain the first target context information and share it with other electronic devices.
[0157] Step 708: The first processor obtains first target context information corresponding to the first electronic device from the cache space.
[0158] The first processor may obtain the first target context information corresponding to the first electronic device from the cache space according to a preconfigured distribution strategy.
[0159] In some embodiments, if the distribution policy indicates that the context information is not allowed to be distributed to other electronic devices, that is, the target context information stored in the cache space is only available to the first electronic device itself, the first processor can configure the cache space to be split and started as an unavailable state. Exemplarily, when the cache space is in a state where the split is unavailable, the DCP task (such as BLE Nanoapp or Wi-Fi Nanoapp) used to implement the distribution action cannot read the required target context information from the cache space. If the distribution policy indicates that the context information is allowed to be distributed to other electronic devices, the first processor can configure the cache space to be split and started as an available state, and the DCP task (such as BLE Nanoapp or Wi-Fi Nanoapp) used to implement the distribution action can obtain the required first target context information from the cache space. By dynamically configuring the state of the cache space, the accuracy and flexibility of context information sharing can be achieved in conjunction with the distribution strategy.
[0160] In some embodiments, the distribution strategy can define the data types corresponding to each context data allowed to be distributed to other electronic devices. The first processor can obtain the context data of each data type allowed to be distributed to other electronic devices from the cache space according to the distribution strategy to obtain the first target context information.
[0161] Step 710: The first processor sends first target context information through a first communication module.
[0162] The description of step 710 may refer to the related description of step 420 in the above embodiment, which will not be repeated here.
[0163] In some embodiments, when detecting that the context information is updated, the first processor may obtain the latest first target context information corresponding to the first electronic device, and send the latest first target context information through the first communication module.
[0164] Each information source may send the latest context information to the first processor in real time when detecting context information update. The first processor may obtain the real-time context information sent by each information source, and if the obtained context information includes context data that is allowed to be distributed to other electronic devices, it may be determined that the context information is updated. The first processor may obtain the latest first target context information from the cache space, and share the latest first target context information to other electronic devices.
[0165] Exemplarily, the first DCP task of the first processor obtains the context information sent by the signal source, processes the context information to obtain the target context information, and can update the target context information to the cache space. If the target context information updated to the cache space includes context data that is allowed to be distributed to other electronic devices, indicating that the context information has been updated, the second DCP task can obtain the latest first target context information from the cache space, and send the latest first target context information to the first communication module through the platform adaptation layer of CHRE, and the first communication module sends the latest first target context information. It should be noted that the first DCP task that processes the context information sent by the signal source and the second DCP task that obtains the latest first target context information from the cache space may not be the same DCP task. For example, the first DCP task that processes the context information sent by the signal source may be a health Nanoapp, a gyroscope Nanoapp, etc., and the second DCP task that obtains the latest first target context information from the cache space may be a BLENanoapp or a Wi-Fi Nanoapp, etc.
[0166] Optionally, different DCP tasks in the DCP can communicate with each other through the CHRE API. When the first DCP task obtains updated target context information and determines that the updated target context information includes context data that is allowed to be distributed to other electronic devices, the first DCP task can send an update message to the second DCP task, and the second DCP task can obtain the latest first target context information from the cache space based on the update message, thereby improving the collaboration and coordination between different DCP tasks and improving the processing efficiency of context information.
[0167] The third processor of the second electronic device can receive the latest first target context information sent by the first electronic device. Furthermore, the third processor can store the latest first target context information in a cache space so that the application running on the fourth processor of the second electronic device can obtain the latest first target context information from the cache space in a timely manner, thereby improving the accuracy and efficiency of business processing of the second electronic device.
[0168] It should be noted that the first processor of the first electronic device can send the latest first target context information each time a context update is detected, and the third processor of the second electronic device can store the latest first target context information in real time. The third processor does not need to wait for the application on the fourth processor to start running the corresponding business use case before obtaining the required first target context information from the first electronic device. When the application on the fourth processor starts running the corresponding business use case, it can directly obtain the latest first target context information from the cache space, thereby effectively reducing the delay for the upper-level application to obtain context information, improving the user experience, and providing the possibility for some delay- and power-sensitive applications to use context information for operation.
[0169] In an embodiment of the present application, the first electronic device can collect context information sent by each information source through a low-power first processor, and process the context information sent by each information source to obtain target context information that is easier to use, and then store the target context information in a cache space, so that the application layer application can easily obtain the required context information, ensuring the normal operation of the business, and the low-power first processor independent of the second processor performs operations such as collecting and processing context information, which can further reduce the power consumption of context information processing. Moreover, when performing context information interaction between different electronic devices, the first processor can directly obtain the first target context information from the cache space for sharing without going through the second processor, thereby realizing low-power context information interaction between different electronic devices.
[0170] For example, Figure 6C FIG. 1 is a schematic diagram of reducing latency of context information between different electronic devices in one embodiment. Figure 6C As shown, in the related technology, the second electronic device will only perform device discovery and interact with the user-selected device for context information when the business use case is started and needs to obtain context information. In the DCP processing flow of the embodiment of the present application, the first electronic device sends the first target context information to the second electronic device in advance before the business use case of the second electronic device is started. When the business use case is started, the latest first target context information is directly obtained from the cache space corresponding to the third processor without waiting for the first electronic device to send it, thereby reducing the delay in the business use case obtaining the required context information.
[0171] In some embodiments, the first processor may send a data packet carrying the first target context information through the first communication module. Furthermore, a communication protocol dedicated to context information interaction may be provided, and the communication protocol may be used to define the data format of the data packet carrying the first target context information. Figure 8As shown, the step of sending the first target context information by the first processor through the first communication module may include the following steps:
[0172] Step 802: The first processor generates a data packet according to first target context information; the data packet includes one or more context data and a data type corresponding to each context data.
[0173] Step 804: The first processor sends a data packet through the first communication module.
[0174] In some embodiments, the context information may include one or more categories, and each category of context information may include context data of one or more data types.
[0175] For example, Fig. 9 FIG. 1 is a structural diagram of context information in an embodiment. Fig. 9 As shown, context information may include core areas and extension areas, wherein the context information in the core area may be unified context information pre-defined by the platform side of the DCP, and the core area may include categories such as environmental information, device information, user information, and action information, and each category may include one or more context data. For example, environmental information may include air pressure data, environmental brightness data, environmental temperature data, etc.; device information may include Wi-Fi capabilities (such as supported Wi-Fi bands, working modes, etc.), Bluetooth capabilities (such as supported Bluetooth protocols, etc.), navigation capabilities (such as supported navigation systems, whether navigation functions are turned on, etc.), device status (such as screen off, screen off, low battery, etc.); user information may include health data, finger click data, account information, etc.; action information may include rotation data, acceleration data, etc. Further, the information sources of environmental information, device information, and action information may generally be sensors, and the information source of user information may be an application program at the application layer, etc., but is not limited thereto.
[0176] The extended domain may include public and non-public (private) customized context information. The context data included in the extended domain may be defined by the platform provider according to the requirements of the third-party application vendor.
[0177] It should be noted that the structure of context information is not limited to Fig. 9 The core areas and extended areas shown can also be expanded by third-party application vendors to expand the data type of context data, not limited to the DCP platform vendor's binding of the context information structure, thereby improving the flexibility of context information acquisition and management.
[0178] Furthermore, for context data of various data types, there may be corresponding DCP tasks responsible for data collection, processing and other operations. Optionally, context data of one data type may correspond to one DCP task, and for context data of each data type, there may be an independent DCP task to perform operations such as collection and processing, which can improve the independence of context information. Optionally, context data of multiple data types may correspond to one DCP task, and context data of different data types with high correlation may be placed in one DCP task for processing. For example, heart rate data and blood pressure data are highly correlated and are generally used to analyze the health status of users. Therefore, they can be processed through a health Nanoapp, which can improve the coupling between context data. It should be noted that corresponding Nanoapps can be developed according to actual business needs.
[0179] When the first processor needs to distribute context information to other electronic devices, the first processor may obtain the first target context information and generate a data packet based on the first target context information. The first target context information may include one or more context data, and the data packet may include the one or more context data and the data type corresponding to each context data. Exemplarily, the data type may be represented by a UUID (Universally Unique Identifier), and different data types correspond to different UUIDs, and the UUID may be composed of one or more of numbers, letters, and symbols.
[0180] Taking sending context information via BLE broadcast as an example, the BLE Nanoapp of the first processor obtains the first target context information, and encapsulates the first target context information into a BLE broadcast frame according to the agreed data format. The BLE broadcast frame may include each context data in the first target context information and the UUID of the data type corresponding to each context data.
[0181] By carrying the data type corresponding to each context data in the data packet, the second electronic device that receives the data packet can easily filter the required context data. The third processor of the second electronic device receives the data packet sent by the first electronic device through the second communication module, and can parse the data to obtain the first target context information. Furthermore, the third processor of the second electronic device can parse the received data packet according to the agreed data format to obtain the first target context information.
[0182] In some embodiments, the third processor may parse the data packet to obtain context data corresponding to each data type contained in the data packet. The third processor may filter out context data matching the target data type from the context data corresponding to each data type contained in the data packet according to the configured target data type. The filtered context data matching the target data type is the context data required by the second electronic device. The third processor may store the filtered context data matching the target data type.
[0183] The second electronic device may pre-configure the required target data type, indicating the data type corresponding to the context data that the second electronic device wants to obtain. After the third processor receives the data packet sent by the first electronic device, it may parse the data packet according to the agreed data format to obtain the various context data contained in the data packet and the data type corresponding to each context data. The third processor may filter out the context data that matches the target data type from the various context data obtained by parsing according to the pre-configured target data type, and may discard the context data that does not match the target data type.
[0184] For example, the data packet sent by the first electronic device includes four types of context data, and the corresponding UUIDs are (UUID1, UUID2, UUID3, and UUID4), and the second electronic device pre-configures the required target data type corresponding to UUID (UUID1, UUID2). The third processor can filter and obtain the context data whose UUIDs are UUID1 and UUID2 for the data type, and the context data whose UUIDs are UUID3 and UUID4 for the data type can be directly discarded.
[0185] Taking the sending of context information by BLE broadcast as an example, the BLE Nanoapp of the third processor can support the BLE Filter protocol (BLE filter protocol), through which the received BLE broadcast frame can be filtered, and the required context data can be filtered according to the pre-configured target data type. After receiving the BLE broadcast frame, the BLE Nanoapp can parse the BLE broadcast frame to obtain the various context data contained in the BLE broadcast frame and the UUID of the data type corresponding to each context data. The BLE Nanoapp can filter the parsed context data based on the pre-configured UUID of the target data type to obtain the required context data.
[0186] In the above implementation, the third processor of the second electronic device can filter the received context information according to actual needs to obtain the required context data, thereby improving the flexibility of context information interaction between different electronic devices.
[0187] In some embodiments, the data packet sent by the first processor of the first electronic device may further include a security identifier, which may be used to indicate a target encryption algorithm, and the target encryption algorithm may refer to an algorithm for encrypting the first target context information. After acquiring the first target context information, the first electronic device may use the target encryption algorithm to encrypt the first target context information, and generate a data packet based on the encrypted first target context information.
[0188] Optionally, the target encryption algorithm may include but is not limited to a symmetric encryption algorithm, an asymmetric encryption algorithm or a signature encryption algorithm, etc., and the security identifiers corresponding to different encryption algorithms may be different. Exemplarily, the security identifier may be represented by a security UUID, and the security UUIDs corresponding to different encryption algorithms are different. The security UUID may be composed of one or more of numbers, letters, and symbols.
[0189] After parsing the data packet, the third processor of the second electronic device obtains a security identifier and encrypted data, and the encrypted data may include the encrypted first target context information. The third processor may decrypt the encrypted data according to the target decryption algorithm corresponding to the security identifier to obtain the first target context information. The target decryption algorithm corresponding to the security identifier may refer to the decryption algorithm of the target encryption algorithm corresponding to the security identifier.
[0190] Taking the context information sent by BLE broadcast as an example, the BLE Nanoapp of the third processor can parse the BLE broadcast frame to obtain the security identifier and encrypted data, and decrypt the encrypted data according to the target decryption algorithm corresponding to the security identifier to obtain the first target context information. Furthermore, after decrypting and obtaining the first target context information, the BLE Nanoapp can also filter the context data contained in the first target context information based on the UUID of the pre-configured target data type to obtain the required context data.
[0191] In the above implementation, the first processor of the first electronic device may encrypt the sent first target context information, thereby improving the security of context information interaction between different electronic devices.
[0192] In some embodiments, after receiving a data packet sent by the first electronic device, the third processor of the second electronic device can determine whether the data packet belongs to the target information type. If the third processor determines that the data packet belongs to the target information type, the third processor can parse the data packet to obtain the first target context information.
[0193] The target information type can be used to indicate the type of data packet. Furthermore, the target information type can be used to indicate that the data packet is information used to interact with context information. The target information type can be related to the communication technology used to interact with context information. For example, if context information is sent by BLE broadcast, the target information type can be used to indicate that the data packet belongs to a target BEL broadcast event, which is an event used to transmit context information.
[0194] In this embodiment, the third processor can quickly filter out and process data packets carrying context information by identifying whether the data packet belongs to the target information type, thereby improving the efficiency of context information interaction between different electronic devices.
[0195] For example, Fig.10 This is a flow diagram of the first target context information in the DCP of the second electronic device in another embodiment. Taking the context information sent by BLE broadcasting as an example, the second Bluetooth module of the second electronic device receives the BLE broadcast frame sent by the first electronic device, and the second Bluetooth module sends the BLE broadcast frame to the platform adaptation layer of CHRE, and the platform adaptation layer of CHRE can distribute the BLE broadcast frame to BLE Nanoapp through the CHRE API. Furthermore, the platform adaptation layer of CHRE can send the BLE broadcast entity (BLE advEntity) related to CHRE to BLE Nanoapp, and the BLE broadcast entity related to CHRE can refer to the entity data related to CHRE in the BLE broadcast frame. BLE Nanoapp can determine the target information type corresponding to the BLE broadcast entity, and BLE Nanoapp can obtain the original BLE broadcast report information (adv report) from the BLE broadcast entity, and split the BLE broadcast report information to obtain the encrypted first target context information and verification data, which may include a security identifier and decryption information for decryption, etc. The BLE Nanoapp can decrypt the encrypted first target context information to obtain the first target context information, perform filtering and other processing on the first target context information, and then store the processed first target context information in the cache space.
[0196] Further, the BLE Nanoapp may split the BLE broadcast report information through the BLE broadcast report separator to obtain DCP data and verification data, the DCP data may include encrypted first target context information, the BLE Nanoapp may parse the DCP data through the DCP data parser to obtain encrypted first target context information, and the BLE Nanoapp may extract the security identifier, decryption information, etc. from the verification data through the verification data extractor. The BLE Nanoapp may decrypt the encrypted first target context information through the decryption algorithm library according to the target decryption algorithm corresponding to the security identifier to obtain the first target context information, and then filter or process the first target context information through the context parser to obtain the required context data, and store it in the cache space.
[0197] In some embodiments, the data packet carrying the first target context information sent by the first processor of the first electronic device may also include one or more of a protocol identifier, a load identifier, and a service identifier.
[0198] The protocol identifier is used to indicate the communication protocol corresponding to the data packet. Further, the communication protocol may be a private communication protocol, a communication protocol agreed upon for transmitting context information, and the communication protocol may be used to define the basic data format of the data packet.
[0199] The payload identifier is used to indicate the effective load corresponding to the data packet. The payload identifier can be used to define the meaning of each byte bit in the effective load part of the data packet, thereby further subdividing the protocol content.
[0200] The service identifier is used to indicate the context information distribution service.
[0201] By carrying information such as protocol identifier, load identifier, service identifier and data type in a data packet, the second electronic device that receives the data packet can more quickly identify the data packet as a data packet for context information interaction, thereby improving the efficiency and accuracy of context information interaction between different electronic devices.
[0202] In an embodiment of the present application, the first processor of the first electronic device can generate a data packet carrying the first target context information in accordance with an agreed data format and send the data packet. Through the agreed data format, the efficiency and accuracy of context information interaction between different electronic devices can be improved, and the second electronic device can be facilitated to flexibly screen the required context data.
[0203] In some embodiments, the first electronic device can implement bottom-up context information interaction through DCP. Fig.11 As shown, the above method may further include the following steps:
[0204] Step 1102: When the first processor obtains context information sent by one or more information sources, update information is sent to the second processor, where the update information is used to indicate that the context information is updated.
[0205] The first processor of the first electronic device can obtain context information sent by one or more information sources. Since the information source usually sends updated context information to the first processor when it detects that the context information is updated, when the first processor obtains the context information sent by one or more information sources, it indicates that the context information is updated. Then, the update information can be sent to the second processor. The update information can be used to indicate that the context information is updated. Further, the update information can be used to indicate that the target context information stored in the cache space of the first processor is updated.
[0206] In some embodiments, when the first processor obtains context information sent by one or more information sources, the first processor sends update information to the second processor based on the first reporting strategy.
[0207] Among them, the first reporting strategy can be used to define the rules for the first processor to report updated context information to the second processor. For example, the first reporting strategy can define the data type of context data of the application allowed to be reported to the second processor, and / or, can define the reporting frequency, reporting timing, etc. of various context data, but is not limited to this.
[0208] Exemplarily, the first reporting policy may define the data type of context data of the application program allowed to be reported to the second processor, for example, the application program allowed to report environment information, device information, etc. to the second processor may be defined. The first processor may send update information to the second processor when detecting that the context data of the application program allowed to be reported to the second processor is updated.
[0209] Exemplarily, the first reporting strategy can define the reporting frequency of various context data. For example, for data with high real-time requirements such as heart rate data and blood pressure data, the reporting frequency can be higher, thereby ensuring that the application on the second processor can obtain real-time context information. For example, for data with low real-time requirements such as ambient temperature, the reporting frequency can be lower to avoid unnecessary power consumption loss caused by frequent reporting.
[0210] In this implementation, the low-power first processor in the first electronic device can report the context information update event to the second processor according to the first reporting strategy, which can improve the flexibility of context information reporting.
[0211] In some embodiments, when the second processor is in a sleep state, the update information is further used to wake up the second processor.
[0212] When the second processor is in a dormant state, the first processor can continue to receive context information sent by each information source, process the context information sent by each information source, obtain target context information, and store the target context information in a cache space. The first processor can send update information to the second processor according to the first reporting strategy, and the update information can wake up the second processor, so that the target application running on the second processor can obtain the update information and obtain the required second target context information.
[0213] In the case where there is no updated context data that needs to be reported to the second processor, the first processor does not send update information, and the second processor may continue to be in the sleep state.
[0214] Exemplarily, each information source sends updated context information to the platform adaptation layer of CHRE, and the platform adaptation layer of CHRE sends the updated context information to the associated DCP task (i.e., the corresponding Nanoapp) through the CHRE API. The DCP task can process the received context information into easy-to-use target context information, and can store the processed context information in the cache space. The DCP task can send update information to the upper-layer DCP service based on the first reporting strategy. When the second processor is in a dormant state, the DCP task sends update information to the upper-layer DCP service to wake up the second processor, and the DCP service then distributes the update information to the corresponding target application in the application layer.
[0215] For example, Fig.12 FIG. 1 is a schematic diagram of reducing the frequency of waking up the main processor in one embodiment. Fig.12As shown, in the processing flow of the related technology, each time the sensor detects an update of the context information, it will send a context update event to the sensor hub, and each time the sensor hub receives the context update event, it will send a sensor event to the main processor. Therefore, each time the sensor detects an update of the context information, it will wake up the main processor, resulting in frequent wake-up of the main processor, causing unnecessary power consumption loss. In the DCP processing flow provided in the embodiment of the present application, each time the sensor detects an update of the context information, it will send a context update event to the sensor hub, and each time the sensor hub receives the context update event, it will send a CHRE event to the corresponding DCP task through the platform adaptation layer of CHRE. The DCP task can send update information to the main processor based on the first reporting strategy. By moving the processing of the context information down to the low-power first processor, the first processor only wakes up the main processor when necessary, which can reduce the frequency of the main processor being awakened. In addition, each wake-up process is only the duration of an interrupt, which can greatly reduce the cumulative duration of the main processor being awakened, thereby effectively reducing the power consumption of the first electronic device.
[0216] Step 1104: The target application running on the second processor obtains second target context information based on the update information.
[0217] When the first processor sends update information to the second processor, the target application running on the second processor may obtain the update information and obtain second target context information based on the update information. The second target context information may refer to context information required by the target application, and the target application may be an application running on the second processor that is allowed to obtain context information.
[0218] In the case where the first processor sends update information to the second processor, the first processor may distribute the update information to each target application. In some embodiments, the update information may include the data type corresponding to the updated context data. After the first processor sends the update information to the second processor, the second processor may determine an application group based on the data type corresponding to the updated context data and the application information corresponding to one or more applications. The application group may include one or more target applications for which the context data needs to be updated. The second processor may send update information to each target application in the application group.
[0219] Optionally, the application information may include context requirement information corresponding to the application and / or permission information corresponding to the application. The context requirement information corresponding to the application may be used to characterize the context information required by the application, and the context requirement information may include the data type of the context data required by the application.
[0220] The permission information corresponding to the application may include the permissions obtained by the application in the main operating system, or may include the application's permission to obtain context data of each data type. As an implementation, the context data of each data type may be mapped to each permission in the main operating system. For example, navigation-related context data may be mapped to positioning permissions in the main operating system, and Wi-Fi communication-related context data may be mapped to Wi-Fi network permissions in the main operating system, etc., but not limited thereto. When an application needs to obtain the required context data, it is only allowed to obtain the context data if it has the permission of the main operating system to which the context data is mapped, otherwise it will be refused to provide.
[0221] As another implementation, the permission information corresponding to the application may include the application's permission to obtain context data of each data type. Each application may directly configure the permission to obtain context data of each data type. The application is allowed to obtain the context data only if it has the permission to obtain the context data, otherwise the application will be denied access.
[0222] Optionally, each application installed on the application layer may register context requirement information (such as a context requirement list) and permission information (such as a permission list) with the DCP service. When the DCP service receives the update information sent by the DCP task, it may determine the target application that requires the updated context data and has the corresponding permission based on the data type corresponding to each updated context data included in the update information, as well as the context requirement information and permission information corresponding to each application, and obtain the application group. The DCP service may send the update information to each target application in the application group, so that each target application obtains the required updated context data based on the update information.
[0223] For example, Fig.13 FIG. 1 is a schematic diagram of the flow of context information in the DCP of the first electronic device in an embodiment. Fig.13As shown, the information source sends context information to the platform adaptation layer of CHRE, and the platform adaptation layer of CHRE distributes the context information to the corresponding DCP task through CHREAPI. The DCP task processes the context information, obtains the target context information, and stores the target context information in the cache space. The DCP task can send update information to the CHRE HAL based on the first reporting strategy, and the CHRE HAL sends the update information to the CHRE service, and the CHRE service sends the update information to the DCP service. The DCP service can determine the application group based on the context requirement list, permission list, etc. corresponding to each application, and distribute the update information to each application in the application group. After each application obtains the update information, it obtains the required second target context information from the cache space according to the update information.
[0224] In an embodiment of the present application, when the second processor receives update information, it can selectively distribute the update information to target applications that need to update context data and have corresponding permissions based on application information of each application, thereby improving the flexibility of the application in obtaining context information and improving information security.
[0225] As an implementation mode, after obtaining the update information, the target application running on the second processor can access the cache space corresponding to the first processor based on the update information to obtain the second target context information from the cache space. By directly accessing the cache space corresponding to the first processor by the application layer application to obtain the required second target context information, the efficiency of the application in obtaining context information can be improved.
[0226] As another optional implementation, the first processor may also directly transmit the second target context information required by the second processor to the target application running on the second processor, and the target application running on the second processor obtains the second target context information transmitted by the first processor based on the update information. Optionally, the update information may also include each updated context data, and the DCP task may send each updated context data to the DCP service. After determining the application group, the DCP service may distribute the updated context data to each target application in the application group.
[0227] In the above-mentioned implementation, the target application running on the second processor can accurately obtain the required second target context information based on the update information, thereby ensuring normal business processing. The target application can also perform corresponding operations or responses based on the second target context information, thereby improving the intelligence of the application.
[0228] In an embodiment of the present application, the first electronic device collects context information sent by one or more information sources through a low-power first processor, and performs operations such as collecting the context information on the first processor independent of the second processor, which can effectively reduce the power consumption of the first electronic device. The first processor can report update information to the second processor, so that the target application running on the second processor can obtain the required second target context information, thereby ensuring normal business processing of the target application.
[0229] In some embodiments, after the third processor of the second electronic device obtains the first target context information sent by the first electronic device, the third processor may send update information to the fourth processor based on the second reporting strategy, and the target application running on the fourth processor obtains the required first target context information based on the update information.
[0230] It should be noted that the manner in which the third processor of the second electronic device reports updated context information to the fourth processor may be similar to the manner in which the first processor of the first electronic device reports updated context information to the second processor in the above embodiment, and will not be repeated here.
[0231] like Fig.14 As shown, in one embodiment, an information sharing method is provided, which can be applied to the second electronic device mentioned above, and the method may include the following steps:
[0232] Step 1410: The third processor receives first target context information sent by the first electronic device through the second communication module.
[0233] Step 1420: The third processor stores the first target context information.
[0234] In some embodiments, the second communication module includes a second Bluetooth module, and step 1410 includes: the third processor receives the first target context information sent by the first electronic device through the second Bluetooth module based on the BLE communication technology; or,
[0235] The second communication module includes a second Wi-Fi module. Step 1410 includes: a third processor receives first target context information sent by a first electronic device through the second Wi-Fi module based on Wi-Fi communication technology.
[0236] In some embodiments, step 1410 includes: a third processor receives a data packet sent by a first electronic device through a second communication module; and when the third processor determines that the data packet belongs to a target information type, the third processor parses the data packet to obtain first target context information.
[0237] In some embodiments, the first target context information includes one or more context data, and the data packet includes the one or more context data and a data type corresponding to each context data;
[0238] The step of parsing the data packet to obtain the first target context information includes: the third processor parsing the data packet to obtain context data corresponding to each data type contained in the data packet; the third processor screening out the context data matching the target data type from the context data corresponding to each data type contained in the data packet according to the configured target data type;
[0239] Step 1420 includes: the third processor stores the context data that matches the target data type.
[0240] In some embodiments, the data packet also includes a security identifier, which is used to indicate a target encryption algorithm corresponding to the data packet; the step of parsing the data packet to obtain first target context information includes: a third processor parsing the data packet to obtain a security identifier and encrypted data; decrypting the encrypted data according to the target decryption algorithm corresponding to the security identifier to obtain the first target context information.
[0241] In some embodiments, the method further includes: the third processor sends update information to the fourth processor based on the second reporting strategy, where the update information is used to indicate that the context information has been updated; and the target application running on the fourth processor obtains the first target context information based on the update information.
[0242] In some embodiments, step 1420 includes: the third processor stores the first target context information in the cache space; the target application running on the fourth processor obtains the first target context information based on the update information, including: the target application running on the fourth processor accesses the cache space corresponding to the third processor based on the update information to obtain the first target context information from the cache space.
[0243] In some embodiments, when the fourth processor is in a sleep state, the update information is further used to wake up the fourth processor.
[0244] It should be noted that the description of the information sharing method applied to the second electronic device provided in the embodiment of the present application can refer to the relevant description of the information sharing method applied to the first electronic device provided in the above embodiments, and will not be repeated here.
[0245] In an embodiment of the present application, the second electronic device receives the first target context information shared by the first electronic device through a low-power third processor to collect the context information, which can effectively reduce the power consumption of the second electronic device, realize low-power context information interaction between different electronic devices, and improve the battery life of the electronic device.
[0246] like Fig.15 As shown, in one embodiment, an information processing method is provided, which can be applied to the first electronic device mentioned above, and the method may include the following steps:
[0247] Step 1510: The first processor obtains context information sent by one or more information sources.
[0248] Step 1520: The first processor sends update information to the second processor based on the context information, where the update information is used to indicate that the context information is updated.
[0249] Step 1530: The target application running on the second processor obtains second target context information based on the update information.
[0250] In some embodiments, the update information includes a data type corresponding to the updated context data; after step 1520, the method further includes: a second processor determines an application group based on the data type corresponding to the updated context data and application information corresponding to one or more applications, the application group including one or more target applications whose context data requires updating; the second processor sends the update information to each target application in the application group.
[0251] In some embodiments, the application information includes context requirement information corresponding to the application program and / or permission information corresponding to the application program.
[0252] In some embodiments, step 1520 includes: the first processor sends update information to the second processor according to the context information based on the first reporting strategy.
[0253] In some embodiments, after step 1510, the method further includes: the first processor processes the context information sent by one or more information sources to obtain target context information; and the first processor stores the target context information in a cache space.
[0254] In some embodiments, step 1530 includes: the target application running on the second processor accesses the cache space corresponding to the first processor based on the update information to obtain the second target context information from the cache space.
[0255] In some embodiments, when the second processor is in a sleep state, the update information is further used to wake up the second processor.
[0256] It should be noted that the description of the information processing method provided in the embodiment of the present application can refer to the relevant description of the information sharing method applied to the first electronic device provided in the above embodiments, and will not be repeated here.
[0257] In an embodiment of the present application, the first electronic device collects context information sent by one or more information sources through a low-power first processor, and performs operations such as collecting the context information on the first processor independent of the second processor, which can effectively reduce the power consumption of the first electronic device. The first processor can report update information to the second processor, so that the target application running on the second processor can obtain the required second target context information, thereby ensuring normal business processing of the target application.
[0258] like Fig.16 As shown, in one embodiment, an information sharing device 1600 is provided, which can be applied to the first electronic device mentioned above. The information sharing device 1600 may include a first acquisition module 1610 and a sending module 1620.
[0259] The first acquisition module 1610 is configured to acquire, through a first processor, first target context information corresponding to a first electronic device, where the first target context information is obtained by the first processor according to context information sent by one or more information sources.
[0260] The sending module 1620 is configured to use the first processor to send the first target context information through the first communication module.
[0261] In one embodiment, the first acquisition module 1610 is further configured to acquire, through the first processor, first target context information corresponding to the first electronic device from the cache space.
[0262] In one embodiment, the information sharing device 1600 further includes a processing module and a storage module.
[0263] The processing module is used to obtain the context information sent by one or more information sources through the first processor; and process the context information sent by the one or more information sources through the first processor to obtain target context information.
[0264] The storage module is used to store the target context information in the cache space through the first processor.
[0265] In one embodiment, the processing module is further configured to parse the context information sent by each information source based on the data format corresponding to each information source through the first processor to obtain the target context information.
[0266] In one embodiment, the first communication module includes a first Bluetooth module and a sending module, and is further configured to use the first processor to send the first target context information through the first Bluetooth module based on the BLE communication technology; or,
[0267] The first communication module includes a first Wi-Fi module and a sending module, and is further configured to use a first processor to send first target context information through the first Wi-Fi module based on Wi-Fi communication technology.
[0268] In one embodiment, the first target context information includes one or more context data; the sending module is also used to generate a data packet based on the first target context information through the first processor; the data packet includes one or more context data and the data type corresponding to each context data; and is used to use the first processor to send the data packet through the first communication module.
[0269] In one embodiment, the sending module is further used to encrypt the first target context information using a target encryption algorithm through the first processor, and generate a data packet based on the encrypted first target context information; the data packet also includes a security identifier, which is used to indicate the target encryption algorithm.
[0270] In one embodiment, the data packet also includes one or more of a protocol identifier, a load identifier and a service identifier. The protocol identifier is used to indicate the communication protocol corresponding to the data packet; the load identifier is used to indicate the effective load corresponding to the data packet; and the service identifier is used to indicate the context information distribution service.
[0271] In one embodiment, the first acquisition module 1610 is further configured to acquire, through the first processor, the latest first target context information corresponding to the first electronic device when the first processor detects that the context information is updated.
[0272] In one embodiment, the information sharing device 1600 further includes a reporting module and a third obtaining module.
[0273] A reporting module, configured to send update information to the second processor through the first processor when the first processor obtains context information sent by one or more information sources, wherein the update information is used to indicate that the context information is updated;
[0274] The third acquisition module is used to acquire the second target context information based on the update information through the target application running on the second processor.
[0275] In one embodiment, the update information includes a data type corresponding to the updated context data; the information sharing device 1600 further includes a group determination module and an update information distribution module.
[0276] The group determination module is used to determine an application group through a second processor according to a data type corresponding to the updated context data and application information corresponding to one or more applications, wherein the application group includes one or more target applications for which the context data needs to be updated.
[0277] The update information distribution module is used to send update information to each target application in the application group through the second processor.
[0278] In one embodiment, the reporting module is further configured to send update information to the second processor through the first processor based on the first reporting strategy when the first processor obtains context information sent by one or more information sources.
[0279] In one embodiment, the third acquisition module is also used to access the cache space corresponding to the first processor based on the update information through the target application running on the second processor to obtain the second target context information from the cache space; or, the target application running on the second processor obtains the second target context information transmitted by the first processor based on the update information.
[0280] In one embodiment, when the second processor is in a sleep state, the update information is further used to wake up the second processor.
[0281] In one embodiment, the information source includes one or more of a sensor in the first electronic device, an application running on the second processor, and other electronic devices.
[0282] In an embodiment of the present application, a first electronic device collects context information sent by one or more information sources through a low-power first processor, and shares first target context information corresponding to the first electronic device with a second electronic device through the low-power first processor. The sharing process does not require the second processor, which can effectively reduce the power consumption of the first electronic device, reduce the power consumption generated by the interaction of context information between different electronic devices, and improve the battery life of the electronic device.
[0283] like Fig.17 As shown, in one embodiment, an information sharing device 1700 is provided, which can be applied to the above-mentioned second electronic device. The information sharing device 1700 includes a receiving module 1710 and a storage module 1720.
[0284] The receiving module 1710 is configured to use the third processor to receive first target context information sent by the first electronic device through the second communication module.
[0285] The storage module 1720 is configured to store the first target context information through the third processor.
[0286] In one embodiment, the second communication module includes a second Bluetooth module, and the receiving module 1710 is further used to use the third processor to receive the first target context information sent by the first electronic device through the second Bluetooth module based on the BLE communication technology; or,
[0287] The second communication module includes a second Wi-Fi module and a receiving module 1710, and is further configured to use a third processor to receive the first target context information sent by the first electronic device through the second Wi-Fi module based on Wi-Fi communication technology.
[0288] In one embodiment, the receiving module 1710 includes a receiving unit and a parsing unit.
[0289] The receiving unit is used to use the third processor to receive the data packet sent by the first electronic device through the second communication module.
[0290] The parsing unit is used to parse the data packet through the third processor to obtain the first target context information when the third processor determines that the data packet belongs to the target information type.
[0291] In one embodiment, the first target context information includes one or more context data, and the data packet includes the one or more context data and the data type corresponding to each context data; the parsing unit is further used to parse the data packet through a third processor to obtain context data corresponding to each data type contained in the data packet; and the third processor filters out context data matching the target data type from the context data corresponding to each data type contained in the data packet according to the configured target data type.
[0292] The storage module 1720 is further configured to store the context data matching the target data type through the third processor.
[0293] In one embodiment, the data packet also includes a security identifier, which is used to indicate a target encryption algorithm corresponding to the data packet; the parsing unit is also used to parse the data packet through a third processor to obtain the security identifier and encrypted data; and decrypt the encrypted data according to the target decryption algorithm corresponding to the security identifier to obtain the first target context information.
[0294] In one embodiment, the information sharing device 1700 further includes a reporting module.
[0295] The reporting module is used to send update information to the fourth processor through the third processor based on the second reporting strategy, where the update information is used to indicate that the context information is updated; and obtain the first target context information based on the update information through the target application running on the fourth processor.
[0296] In one embodiment, the storage module 1720 is further configured to store the first target context information in the cache space through the third processor.
[0297] The reporting module is also used to access the cache space corresponding to the third processor based on the update information through the target application running on the fourth processor, so as to obtain the first target context information from the cache space.
[0298] In some embodiments, when the fourth processor is in a sleep state, the update information is further used to wake up the fourth processor.
[0299] In an embodiment of the present application, the second electronic device receives the first target context information shared by the first electronic device through a low-power third processor to collect the context information, which can effectively reduce the power consumption of the second electronic device, realize low-power context information interaction between different electronic devices, and improve the battery life of the electronic device.
[0300] like Fig.18 As shown, in one embodiment, an information processing device 1800 is provided, which can be applied to the first electronic device mentioned above. The information processing device 1800 includes a second acquisition module 1810 , a reporting module 1820 and a third acquisition module 1830 .
[0301] The second acquisition module 1810 is configured to acquire, through the first processor, context information sent by one or more information sources.
[0302] The reporting module 1820 is used to send update information to the second processor according to the context information through the first processor, where the update information is used to indicate that the context information is updated.
[0303] The third acquisition module 1830 is configured to acquire second target context information based on the update information through the target application running on the second processor.
[0304] In one embodiment, the update information includes a data type corresponding to the updated context data; the information processing device 1800 also includes a group determination module and an update information distribution module.
[0305] The group determination module is used to determine an application group through a second processor according to a data type corresponding to the updated context data and application information corresponding to one or more applications, wherein the application group includes one or more target applications for which the context data needs to be updated.
[0306] The update information distribution module is used to send update information to each target application in the application group through the second processor.
[0307] In one embodiment, the application information includes context requirement information corresponding to the application program and / or permission information corresponding to the application program.
[0308] In one embodiment, the reporting module 1820 is further configured to send the update information to the second processor according to the context information through the first processor based on the first reporting strategy.
[0309] In one embodiment, the information processing device 1800 further includes a processing module and a storage module.
[0310] The processing module is used to process the context information sent by one or more information sources through a first processor to obtain target context information.
[0311] The storage module is used to store the target context information in the cache space through the first processor.
[0312] In one embodiment, the third acquisition module 1830 is further configured to access the cache space corresponding to the first processor based on the update information through the target application running on the second processor, so as to acquire the second target context information from the cache space.
[0313] In one embodiment, when the second processor is in a sleep state, the update information is further used to wake up the second processor.
[0314] In an embodiment of the present application, the first electronic device collects context information sent by one or more information sources through a low-power first processor, and performs operations such as collecting the context information on the first processor independent of the second processor, which can effectively reduce the power consumption of the first electronic device. The first processor can report update information to the second processor, so that the target application running on the second processor can obtain the required second target context information, thereby ensuring normal business processing of the target application.
[0315] Fig.19 FIG. 1 is a structural block diagram of an electronic device in an embodiment. Fig.19As shown, the electronic device 1900 may include one or more of the following components: a processor 1910, a memory 1920 coupled to the processor 1910, and a transceiver unit 1930, wherein the memory 1920 may store one or more computer programs, and the one or more computer programs may be configured to be executed by one or more processors 1910, so that the electronic device 1900 implements the information sharing method applied to the first electronic device as described in the above embodiments.
[0316] The processor 1910 may include one or more processing cores. The processor 1910 uses various interfaces and lines to connect the various parts of the entire electronic device 1900, and executes various functions and processes data of the electronic device 1900 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1920, and calling data stored in the memory 1920. Optionally, the processor 1910 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 1910 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1910, but may be implemented separately through a communication chip.
[0317] The memory 1920 may include a random access memory (RAM) or a read-only memory (ROM). The memory 1920 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 1920 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area may also store data created by the electronic device 1900 during use, etc.
[0318] The transceiver unit 1930 may include but is not limited to a Bluetooth module, a Wi-Fi module, etc., and may be used to provide communication functions.
[0319] An embodiment of the present application discloses an electronic device, including a memory, a processor, and a transceiver unit. The memory stores a computer program. When the computer program is executed by the processor, the headphone device implements the information sharing method applied to a second electronic device as described in the above embodiments.
[0320] An embodiment of the present application discloses an electronic device, including a memory, a processor, and a transceiver unit. The memory stores a computer program. When the computer program is executed by the processor, the headphone device implements the information processing method described in the above embodiments.
[0321] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor in an electronic device, the electronic device implements the information sharing method applied to a first electronic device as described in the above embodiments.
[0322] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor in an electronic device, the electronic device implements the information sharing method applied to a second electronic device as described in the above embodiments.
[0323] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor in an electronic device, the electronic device implements the information processing method described in the above embodiments.
[0324] An embodiment of the present application discloses a computer program product, which includes a computer program. When the computer program can be executed by a processor in an electronic device, the electronic device implements the information sharing method applied to the first electronic device as described in the above embodiments.
[0325] An embodiment of the present application discloses a computer program product, which includes a computer program. When the computer program can be executed by a processor in an electronic device, the electronic device implements the information sharing method applied to a second electronic device as described in the above embodiments.
[0326] An embodiment of the present application discloses a computer program product, which includes a computer program. When the computer program can be executed by a processor in an electronic device, the electronic device implements the information processing method described in the above embodiments.
[0327] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a ROM, etc.
[0328] As used herein, any reference to memory, storage, database, or other medium may include nonvolatile and / or volatile memory. Suitable nonvolatile memory may include ROM, programmable ROM (Programmable ROM, PROM), erasable PROM (Erasable PROM, EPROM), electrically erasable PROM (Electrically Erasable PROM, EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache memory. By way of illustration and not limitation, RAM may be in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus direct RAM (RDRAM) and direct memory bus dynamic RAM (DRDRAM).
[0329] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application. It should be noted that "multiple" in the present application includes "two or more".
[0330] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0331] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0332] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0333] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0334] The above is a detailed introduction to an information sharing method and device, an information processing method and device, and related products disclosed in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An information sharing method, characterized in that: Applied to a first electronic device, the first electronic device includes a first processor, a second processor and a first communication module, and the power consumption of the first processor is less than the power consumption of the second processor; the method includes: The first processor acquires first target context information corresponding to the first electronic device, where the first target context information is obtained by the first processor according to context information sent by one or more information sources; The first processor sends the first target context information through the first communication module.
2. The method according to claim 1, characterized in that The first processor obtains first target context information corresponding to the first electronic device, including: The first processor obtains first target context information corresponding to the first electronic device from the cache space.
3. The method according to claim 2, characterized in that Before the first processor acquires the first target context information corresponding to the first electronic device from the cache space, the method further includes: The first processor obtains context information sent by one or more information sources; The first processor processes the context information sent by the one or more information sources to obtain target context information; The first processor stores the target context information in a cache space.
4. The method according to claim 3, characterized in that The first processor processes the context information sent by the one or more information sources to obtain target context information, including: The first processor parses the context information sent by each of the information sources based on a data format corresponding to each of the information sources to obtain target context information.
5. The method according to claim 1, characterized in that The first communication module includes a first Bluetooth module, and the first processor sends the first target context information through the first communication module, including: The first processor sends the first target context information through the first Bluetooth module based on Bluetooth low energy BLE communication technology; or The first communication module includes a first Wi-Fi module, and the first processor sends the first target context information through the first communication module, including: The first processor sends the first target context information through the first Wi-Fi module based on Wi-Fi communication technology.
6. The method according to any one of claims 1 to 5, characterized in that: The first target context information includes one or more context data; The first processor sends the first target context information through the first communication module, including: The first processor generates a data packet according to the first target context information; the data packet includes the one or more context data and a data type corresponding to each of the context data; The first processor sends the data packet through the first communication module.
7. The method according to claim 6, characterized in that The first processor generates a data packet according to the first target context information, including: The first processor uses a target encryption algorithm to encrypt the first target context information, and generates a data packet according to the encrypted first target context information; the data packet also includes a security identifier, and the security identifier is used to indicate the target encryption algorithm.
8. The method according to claim 6, characterized in that The data packet also includes one or more of a protocol identifier, a load identifier and a service identifier, wherein the protocol identifier is used to indicate the communication protocol corresponding to the data packet; the load identifier is used to indicate the effective load corresponding to the data packet; and the service identifier is used to indicate the context information distribution service.
9. The method according to claim 1, characterized in that: The first processor obtains first target context information corresponding to the first electronic device, including: When detecting that the context information is updated, the first processor obtains the latest first target context information corresponding to the first electronic device.
10. The method according to claim 1, characterized in that The method further comprises: When the first processor obtains context information sent by one or more information sources, sending update information to the second processor, where the update information is used to indicate that the context information is updated; The target application running on the second processor obtains second target context information based on the update information.
11. The method according to claim 10, characterized in that The update information includes a data type corresponding to the updated context data; after sending the update information to the second processor, the method further includes: The second processor determines an application group according to a data type corresponding to the updated context data and application information corresponding to one or more applications, wherein the application group includes one or more target applications that require the updated context data; The second processor sends the update information to each of the target application programs in the application group.
12. The method according to claim 10, characterized in that The sending update information to the second processor when the first processor obtains context information sent by one or more information sources includes: When the first processor obtains context information sent by one or more information sources, the first processor sends update information to the second processor based on a first reporting strategy.
13. The method according to claim 10, characterized in that The target application running on the second processor obtains second target context information based on the update information, including: The target application running on the second processor accesses the cache space corresponding to the first processor based on the update information to obtain the second target context information from the cache space; or The target application running on the second processor obtains the second target context information transmitted by the first processor based on the update information.
14. The method according to any one of claims 10 to 13, characterized in that: When the second processor is in a sleep state, the update information is further used to wake up the second processor.
15. The method according to any one of claims 1 to 5 and 7 to 13, characterized in that: The information source includes one or more of a sensor in the first electronic device, an application running on the second processor, and other electronic devices.
16. An information sharing method, characterized in that: Applied to a second electronic device, the second electronic device includes a third processor, a fourth processor and a second communication module, the power consumption of the third processor is less than the power consumption of the fourth processor; the method includes: The third processor receives the first target context information sent by the first electronic device through the second communication module; The third processor stores the first target context information.
17. The method according to claim 16, characterized in that The second communication module includes a second Bluetooth module, and the third processor receives the first target context information sent by the first electronic device through the second communication module, including: The third processor receives the first target context information sent by the first electronic device through the second Bluetooth module based on the BLE communication technology; or The second communication module includes a second Wi-Fi module, and the third processor receives the first target context information sent by the first electronic device through the second communication module, including: The third processor receives the first target context information sent by the first electronic device based on the Wi-Fi communication technology through the second Wi-Fi module.
18. The method according to claim 16, characterized in that The third processor receives, through the second communication module, first target context information sent by the first electronic device, including: The third processor receives the data packet sent by the first electronic device through the second communication module; When determining that the data packet belongs to the target information type, the third processor parses the data packet to obtain the first target context information.
19. The method according to claim 18, characterized in that The first target context information includes one or more context data, and the data packet includes the one or more context data and a data type corresponding to each of the context data; The parsing of the data packet to obtain the first target context information includes: The third processor parses the data packet to obtain context data corresponding to each data type included in the data packet; The third processor filters out context data matching the target data type from the context data corresponding to each data type included in the data packet according to the configured target data type; The third processor stores the first target context information, including: The third processor stores the context data matching the target data type.
20. The method according to claim 18, characterized in that The data packet also includes a security identifier, where the security identifier is used to indicate a target encryption algorithm corresponding to the data packet; and the parsing of the data packet to obtain the first target context information includes: Parsing the data packet to obtain the security identifier and encrypted data; The encrypted data is decrypted according to a target decryption algorithm corresponding to the security identifier to obtain the first target context information.
21. The method according to any one of claims 16 to 20, characterized in that: The method further comprises: The third processor sends update information to the fourth processor based on the second reporting strategy, where the update information is used to indicate that the context information is updated; The target application running on the fourth processor obtains the first target context information based on the update information.
22. The method according to claim 21, characterized in that The third processor stores the first target context information, including: The third processor stores the first target context information in a cache space; The target application running on the fourth processor acquires the first target context information based on the update information, including: The target application running on the fourth processor accesses the cache space corresponding to the third processor based on the update information to obtain the first target context information from the cache space.
23. The method according to claim 21, characterized in that When the fourth processor is in a sleep state, the update information is further used to wake up the fourth processor.
24. An information processing method, characterized in that: Applied to a first electronic device, the first electronic device includes a first processor and a second processor, and the power consumption of the first processor is less than the power consumption of the second processor; the method includes: The first processor obtains context information sent by one or more information sources; The first processor sends update information to the second processor according to the context information, where the update information is used to indicate that the context information is updated; The target application running on the second processor obtains second target context information based on the update information.
25. The method according to claim 24, characterized in that The update information includes a data type corresponding to the updated context data; after sending the update information to the second processor, the method further includes: The second processor determines an application group according to a data type corresponding to the updated context data and application information corresponding to one or more applications, wherein the application group includes one or more target applications that require the updated context data; The second processor sends the update information to each of the target application programs in the application group.
26. The method according to claim 25, characterized in that The application information includes context requirement information corresponding to the application program and / or permission information corresponding to the application program.
27. The method according to claim 24, characterized in that The first processor sends update information to the second processor according to the context information, including: The first processor sends update information to the second processor based on a first reporting strategy and according to the context information.
28. The method according to claim 24, characterized in that After the first processor obtains the context information sent by one or more information sources, the method further includes: The first processor processes the context information sent by the one or more information sources to obtain target context information; The first processor stores the target context information in a cache space.
29. The method according to claim 28, characterized in that The target application running on the second processor obtains second target context information based on the update information, including: The target application running on the second processor accesses the cache space corresponding to the first processor based on the update information to obtain second target context information from the cache space.
30. The method according to any one of claims 24 to 29, characterized in that: When the second processor is in a sleep state, the update information is further used to wake up the second processor.
31. An information sharing device, characterized in that: Applied to a first electronic device, the first electronic device includes a first processor, a second processor and a first communication module, the power consumption of the first processor is less than the power consumption of the second processor; the device includes: A first acquisition module, configured to acquire, through the first processor, first target context information corresponding to the first electronic device, where the first target context information is obtained by the first processor according to context information sent by one or more information sources; A sending module is used to use the first processor to send the first target context information through the first communication module.
32. An information sharing device, characterized in that: Applied to a second electronic device, the second electronic device includes a third processor, a fourth processor and a second communication module, the power consumption of the third processor is less than the power consumption of the fourth processor; the device includes: a receiving module, configured to use the third processor to receive first target context information sent by a first electronic device through the second communication module; A storage module is used to store the first target context information through the third processor.
33. An information processing device, characterized in that: Applied to a first electronic device, the first electronic device includes a first processor and a second processor, and the power consumption of the first processor is less than the power consumption of the second processor; the device includes: A second acquisition module, configured to acquire, through the first processor, context information sent by one or more information sources; a reporting module, configured to send update information to the second processor through the first processor according to the context information, wherein the update information is used to indicate that the context information is updated; A third acquisition module is configured to acquire second target context information based on the update information through a target application running on the second processor.
34. An electronic device, characterized in that: The electronic device comprises a memory, a processor and a transceiver unit, wherein the memory stores a computer program, and when the computer program is executed by the processor, the electronic device implements the method according to any one of claims 1 to 15, 16 to 23 or 24 to 30.
35. A computer program product, characterized in that The method comprises a computer program, and when the computer program is executed by a processor in an electronic device, the electronic device implements the method according to any one of claims 1 to 15, 16 to 23, or 24 to 30.