WO2023040584A1 - 设备数据的处理方法、装置、电子设备以及存储介质 - Google Patents

设备数据的处理方法、装置、电子设备以及存储介质 Download PDF

Info

Publication number
WO2023040584A1
WO2023040584A1 PCT/CN2022/113728 CN2022113728W WO2023040584A1 WO 2023040584 A1 WO2023040584 A1 WO 2023040584A1 CN 2022113728 W CN2022113728 W CN 2022113728W WO 2023040584 A1 WO2023040584 A1 WO 2023040584A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
electronic device
application
center
software development
Prior art date
Application number
PCT/CN2022/113728
Other languages
English (en)
French (fr)
Inventor
凌征其
Original Assignee
杭州逗酷软件科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 杭州逗酷软件科技有限公司 filed Critical 杭州逗酷软件科技有限公司
Publication of WO2023040584A1 publication Critical patent/WO2023040584A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores

Definitions

  • the present application relates to the technical field of data processing, and more specifically, to a device data processing method, device, electronic device, and storage medium.
  • An electronic device can obtain and display device data of other devices through its device center.
  • the present application proposes a device data processing method, device, electronic device, and storage medium to solve the above problems.
  • the embodiment of the present application provides a device data processing method, which is applied to the device application of the first electronic device, the device application is integrated with a software development kit, and the software development kit is packaged with a content provider , the method includes: when the device data of the second electronic device associated with the device application changes, establishing an inter-process communication between the software development kit and the device center of the first electronic device; through the process Sending a data change notification to the device center through inter-communication to instruct the device center to query the changed device data of the second electronic device from the content provider.
  • the embodiment of the present application provides a device data processing method, which is applied to the device center of the first electronic device, and the first electronic device also includes a device application, and the device application is integrated with a software development toolkit,
  • the software development kit is packaged with a content provider, and the method includes: receiving a data change notification sent by the device application through inter-process communication, wherein the inter-process communication is performed by the device application on an associated second electronic device.
  • the device data of the device changes, it is established for the software development kit and the device center; in response to the data change notification, query the changed device data of the second electronic device from the content provider.
  • the embodiment of the present application provides a device data processing device, which is applied to the device application of the first electronic device, the device application is integrated with a software development kit, and the software development kit is packaged with a content provider
  • the apparatus includes: an inter-process communication establishing module, configured to establish a communication between the software development kit and the device center of the first electronic device when the device data of the second electronic device associated with the device application changes Inter-process communication; a notification sending module, configured to send a data change notification to the device center through the inter-process communication, to instruct the device center to query the changed device data of the second electronic device from the content provider .
  • an embodiment of the present application provides a device data processing apparatus, which is applied to a device center of a first electronic device, where the first electronic device further includes a device application, and the device application is integrated with a software development kit,
  • the software development kit is packaged with a content provider
  • the device includes: a notification receiving module, configured to receive a data change notification sent by the device application through inter-process communication, wherein the inter-process communication is provided by the device application
  • the device data of the associated second electronic device changes, it is established for the software development kit and the device center; a device data query module, configured to query from the content provider in response to the data change notification The changed device data of the second electronic device.
  • the embodiment of the present application provides an electronic device, including a memory and a processor, the memory is coupled to the processor, and the memory stores instructions, which are executed when the instructions are executed by the processor.
  • the processor executes the above method.
  • the embodiment of the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, and the program code can be invoked by a processor to execute the above method.
  • FIG. 1 shows a block diagram of an electronic device used to execute a device data processing method according to an embodiment of the present application in an embodiment of the present application;
  • FIG. 2 shows a block diagram of an operating system of an electronic device provided by an embodiment of the present application
  • FIG. 3 shows a sequence diagram of a method for processing device data provided by an embodiment of the present application
  • FIG. 4 shows a schematic diagram of an electronic device provided by an embodiment of the present application
  • FIG. 5 shows a schematic diagram of communication between a first electronic device and a second electronic device provided by an embodiment of the present application
  • FIG. 6 shows a schematic flowchart of a method for processing device data provided by an embodiment of the present application
  • FIG. 7 shows a schematic flowchart of a method for processing device data provided by an embodiment of the present application
  • FIG. 8 shows a schematic flowchart of a method for processing device data provided by an embodiment of the present application
  • FIG. 9 shows a schematic flowchart of a method for processing device data provided by an embodiment of the present application.
  • FIG. 10 shows a schematic flowchart of a method for processing device data provided by an embodiment of the present application
  • Fig. 11 shows a schematic flowchart of a method for processing device data provided by an embodiment of the present application
  • Fig. 12 shows a block diagram of a device data processing device provided by an embodiment of the present application.
  • Fig. 13 shows a block diagram of a device data processing device provided by an embodiment of the present application
  • Fig. 14 shows a storage unit for storing or carrying program codes for implementing the device data processing method according to the embodiment of the present application according to the embodiment of the present application.
  • the electronic device can query the device data of other devices provided by the content provider through its device center, monitor the data change of the content provider, and synchronize to the changed device data of other devices.
  • the device center of the electronic device is not a keep-alive process (that is, it may be killed by the system at any time) or when the device center is not running in the background of the electronic device, only after the device center is started can it actively query other devices provided by the content provider Device data, resulting in the inability to monitor the device data changes of other devices in real time, and cannot synchronize the device data of other devices in real time after changes. In this way, the update of device data will be delayed, and some related services related to device linkage cannot be undertaken, resulting in poor user experience.
  • the inventor found after long-term research, and proposed the device data processing method, device, electronic device and storage medium provided by the embodiment of the present application, by establishing a process between applications when the device data changes Communication makes data interoperability more reliable, data transmission more timely, and system performance more stable.
  • the specific processing method of device data will be described in detail in the subsequent embodiments.
  • FIG. 1 shows a structural block diagram of an electronic device (first electronic device) 100 provided by an embodiment of the present application.
  • the electronic device 100 may be an electronic device capable of running application programs, such as a smart phone, a tablet computer, and an e-book.
  • the electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, a touch display 130, and one or more application programs, wherein one or more application programs may be stored in the memory 120 and It is configured to be executed by one or more processors 110, and one or more programs are configured to execute the methods described in the foregoing method embodiments.
  • the processor 110 may include one or more processing cores.
  • the processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes or executes instructions, programs, code sets or instruction sets stored in the memory 120, and calls data stored in the memory 120 to execute Various functions of the electronic device 100 and processing data.
  • the processor 110 may adopt at least one of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). implemented in the form of hardware.
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 110 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), a modem, and the like.
  • CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • the CPU mainly handles the operating system, user interface and application programs, etc.
  • the GPU is used to render and draw the content to be displayed
  • the modem is used to handle wireless communication. It can be understood that, the above-mentioned modem may not be integrated into the processor 110, but may be realized by a communication chip alone.
  • the memory 120 may include random access memory (Random Access Memory, RAM), and may also include read-only memory (Read-Only Memory).
  • the memory 120 may be used to store instructions, programs, codes, sets of codes, or sets of instructions.
  • the memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system and instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.) , instructions for implementing the following method embodiments, and the like.
  • the storage data area can also store data created during use of the electronic device 100 (such as phonebook, audio and video data, chat record data) and the like.
  • the touch display screen 130 is used to display information input by the user, information provided to the user, and various graphical user interfaces of the electronic device 100. These graphical user interfaces can be composed of graphics, text, icons, numbers, videos, and any combination thereof In one example, the touch display screen 130 may be a liquid crystal display (Liquid Crystal Display, LCD) or an organic light-emitting diode (Organic Light-Emitting Diode, OLED), which is not limited here.
  • LCD Liquid Crystal Display
  • OLED Organic Light-Emitting Diode
  • the Linux kernel layer 220 provides underlying drivers for various hardware of the electronic device 100, such as display drivers, audio drivers, camera drivers, Bluetooth drivers, Wi-Fi drivers, and power management.
  • the system runtime layer 240 provides main feature support for the Android system through some C/C++ libraries.
  • the SQLite library provides database support
  • the OpenGL/ES library provides 3D drawing support
  • the Webkit library provides browser kernel support.
  • An Android Runtime library (Android Runtime) is also provided in the system runtime layer 240, which mainly provides some core libraries and can allow developers to use the Java language to write Android applications.
  • the application framework layer 260 provides various APIs that may be used when building applications. Developers can also use these APIs to build their own applications, such as activity management, window management, view management, notification management, content providers, Package management, call management, resource management, location management.
  • FIG. 3 shows a sequence diagram of a method for processing device data provided by an embodiment of the present application.
  • This method is used to establish inter-process communication across applications when device data changes, so that data interoperability is more reliable, data transmission is more timely, and system performance is more stable.
  • the device data processing method is applied to the first electronic device 100 as shown in FIG. 1 , the first electronic device includes a device application and a device center, and the device application is integrated with a software development kit.
  • the SDK packages a content provider.
  • the following will take the electronic device (the first electronic device) as an example to illustrate the specific process of this embodiment.
  • the electronic device used in this embodiment may include smart phones, tablet computers, wearable electronic devices, etc. It is not limited here.
  • the process shown in Figure 3 will be described in detail below, and the method for processing device data may include the following steps:
  • Step S110 When the device data of the second electronic device associated with the device application changes, the device application establishes inter-process communication between the software development kit and the device center of the first electronic device.
  • FIG. 4 shows a schematic diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device may include a device application and a device center, the device application is integrated with a software development kit (software development kit, SDK), and the software development kit is packaged with a content provider.
  • a software development kit software development kit, SDK
  • the content provider is a standardized data pipeline.
  • the device application is responsible for the most direct interaction with the associated second electronic device.
  • the device application is responsible for providing device data, integrating software development kits, and communicating with the device center.
  • the software development kit is a development kit that provides access to device applications.
  • the software development kit is integrated in the device application, provides a content provider for device data, and provides a process communication interface to establish inter-process communication with the device center (such as binder connect).
  • the device center is a platform center that manages all second electronic devices and connects multiple device applications.
  • the device center serves as a unified device management center to collect device data of all second electronic devices that are currently connected, and uses the device management module as the core. Responsible for providing the device data of each second electronic device to the outside.
  • the device application since the content provider is encapsulated in the software development kit, and the device application is integrated with the software development kit, the device application only needs to access the calling interface of the software development kit.
  • the device application provides the software development toolkit with the device data of the second electronic device, the software development toolkit stores the device data in the content provider, and provides the device data to the device center.
  • the device application may be installed on the first electronic device and associated with one or more second electronic devices; or, the device application may exist on the first electronic device in the form of a quick application , and be associated with one or more second electronic devices.
  • the second electronic device may be an earphone 200 , and the device is associated with the earphone 200 .
  • associating the device application with the second electronic device may include: the device application login account is consistent with the second electronic device login account, or the device application login account is associated with the second electronic device login account.
  • the device application may be a wireless earphone application associated with the wireless earphone; when the second electronic device is a smart watch or a smart bracelet, the device application may be Health applications associated with the smartwatch and smartband.
  • the device application can monitor the device data of the associated second electronic device, and when it detects that the device data of the second electronic device changes, an inter-process communication between the software development kit and the device center can be established .
  • the device application communicates directly with the associated second electronic device, that is, the device application can obtain the change of the device data of the second electronic device. Therefore, when the device application obtains the device data of the second electronic device, When changes, you can establish inter-process communication between the SDK and Device Center.
  • the device data may include device display data, device performance data, device configuration data, device status data, etc., which are not limited herein.
  • a binder connection between the software development kit and the device center can be established through the Android interface definition language (AIDL) to build the software development kit Interprocess communication with Device Center.
  • AIDL Android interface definition language
  • Step S120 the device application sends a data change notification to the device center through the inter-process communication.
  • the device application after the device application establishes the inter-process communication between the software development kit and the device center, it can send a data change notification to the device center through the inter-process communication (such as a binder connection), so that the device center can know in real time Changes in device data of the second electronic device.
  • the inter-process communication such as a binder connection
  • the data change notification sent by the device application to the device center may only have a notification function.
  • the data change notification may be used to notify the device center that the device data of the second electronic device has changed, but the device center will not be notified of the changed device data or the changed device data. Based on this, the device center can only know that the device data of the second electronic device has changed based on the data change notification.
  • the data change notification sent by the device application to the device center may have the function of notifying specific change information.
  • the data change notification may be used to notify the device center that the device data of the second electronic device has changed, and notify the device center of the changed device data, or even notify the device center of the changed device data.
  • the device center can know that the device data of the second electronic device has changed, and know the changed device data of the second electronic device, for example, it can know that the power data of the second electronic device has changed, and know
  • the change of the connection information of the second electronic device, the change of the control switch information of the second electronic device and the like are not limited herein.
  • Step S130 the device center queries the changed device data of the second electronic device from the content provider.
  • the device center may query the changed device data of the second electronic device from the content provider encapsulated in the software development kit in response to the device change notification, Therefore, the real-time acquisition of the changed device data is ensured, so as to improve the effect of device linkage (for example, audio linkage).
  • device linkage for example, audio linkage
  • the core process of the device center includes a device management module. Then, after receiving the data change notification sent by the device application, the device center can respond to the device change notification and query the changed device data of the second electronic device from the content provider encapsulated in the software development kit through the device management module.
  • the first electronic device is a smart phone and the second electronic device is a smart watch, and the smart phone is connected to the smart watch and the smart earphone respectively.
  • the smart phone includes a device application associated with the smart watch, and when the smart watch receives an incoming call, it can be determined that the device data of the smart watch has changed.
  • the device application can establish inter-process communication between the software development kit and the device center of the smartphone, and send a device data change notification to the device center.
  • the device center obtains the incoming call data of the smart watch from the content provider encapsulated in the soft development kit.
  • the smart phone can control the smart earphone to connect to the smart watch, so as to answer the incoming call of the smart watch through the smart earphone.
  • the first electronic device is a smart watch and the second electronic device is a smart phone, and the smart watch is connected to the smart phone and the smart earphone respectively.
  • the smart watch includes a device application associated with the smartphone, and when the smartphone receives an incoming call, it can be determined that the device data of the smartphone has changed.
  • the device application can establish inter-process communication between the software development kit and the device center of the smart watch, and send a device data change notification to the device center.
  • the device center obtains the incoming call data of the smart phone from the content provider encapsulated in the soft development kit.
  • the smart watch can control the smart earphone to connect to the smart phone, so as to answer the smart phone's incoming call through the smart earphone.
  • the device application when the device data of the second electronic device associated with the device application of the first electronic device changes, the device application establishes the integrated software development kit and the first electronic device's The inter-process communication of the device center, the device application sends a data change notification to the device center through the inter-process communication, and the device center queries the changed device data of the second electronic device from the content provider encapsulated in the software development kit, so that the When data changes, inter-process communication across applications is established, making data interoperability more reliable, data transmission more timely, and system performance more stable.
  • FIG. 6 shows a schematic flowchart of a method for processing device data provided by an embodiment of the present application.
  • This method is used to establish inter-process communication across applications when device data changes, so that data interoperability is more reliable, data transmission is more timely, and system performance is more stable.
  • the device data processing method is applied to the device data processing device 200 shown in Figure 12 and the electronic device (first electronic device) 100 ( Figure 1) equipped with the device data processing device 300 A device application, the device application is integrated with a software development kit, and the software development kit is packaged with a content provider.
  • the process shown in Figure 6 will be described in detail below, and the method for processing device data may include the following steps:
  • Step S210 When the device data of the second electronic device associated with the device application changes, establish inter-process communication between the software development kit and the device center of the first electronic device.
  • Step S220 sending a data change notification to the device center through the inter-process communication, instructing the device center to query the changed device data of the second electronic device from the content provider.
  • step S210-step S220 please refer to step S110-step S130, which will not be repeated here.
  • the integrated software development kit and the device center of the first electronic device are established The inter-process communication through which the data change notification is sent to the device center to instruct the device center to query the changed device data of the second electronic device from the content provider encapsulated in the software development kit, so that the When changes occur, inter-process communication across applications is established, making data interoperability more reliable, data transmission more timely, and system performance more stable.
  • FIG. 7 shows a schematic flowchart of a method for processing device data provided by an embodiment of the present application.
  • the method is applied to the device application of the above-mentioned first electronic device, the device application is integrated with a software development kit, and the software development kit is packaged with a content provider.
  • the process shown in FIG. 7 will be described in detail below, and the method for processing device data may include the following steps:
  • Step S310 When the device data of the second electronic device associated with the device application changes, acquire the changed device data.
  • the device application can monitor the device data of the associated second electronic device, and when it is detected that the device data of the second electronic device changes, the changed device data can be acquired. Wherein, since the device application communicates directly with the second electronic device, the device application can directly acquire the device data changed by the second electronic device.
  • Step S320 When the changed device data includes preset key data, establish inter-process communication between the software development kit and the device center.
  • the device application of the first electronic device may be preset with key data as preset key data, and the preset key data is used as a basis for judging the changed device data of the second electronic device. Therefore, in this embodiment, when the changed device data of the second electronic device is obtained, the changed device data can be compared with the preset key data to determine whether the changed device data includes the preset key data. key data.
  • the changed device data includes preset key data
  • the changed device data does not include the preset key data
  • the device management module in its core process can actively query the content provider packaged in the software development kit for device application integration to obtain the changed device data of the second electronic device.
  • the device center can be started, and the device management module in the core process of the device center can actively query the content provider encapsulated in the software development kit integrated with the device application,
  • the changed device data of the second electronic device is obtained.
  • the device data display event may include a display event of a target card corresponding to a device application of the negative one screen of the first electronic device, or a display event of a target card corresponding to the device application of the device center of the first electronic device.
  • the target card corresponding to the device application on the negative screen of the first electronic device enters the display state (the target card is switched from invisible to visible state), or, when the target card corresponding to the device application in the device center of the first electronic device
  • the UI layer of the device center can read the second electronic device through inter-process communication.
  • the device data request after the device change is sent to the device management module of the core layer of the device center. Based on the request, the device management module queries the content provider encapsulated by the software development kit integrated with the device application, and obtains the changed device of the second electronic device. data.
  • the preset key data includes device connection data as an example for illustration.
  • the device data changed by the second electronic device is device connection data (such as establishing a connection between the second electronic device and the third device, or disconnecting the second electronic device from the third electronic device)
  • the device data changed by the device includes preset key data, and the inter-process communication between the software development kit and the device center can be established.
  • the device data changed by the second electronic device is not connection data (for example, the display data of the second electronic device changes, such as the display color of the desktop changes, the background picture of the desktop changes, etc.), then it can be determined that the second electronic device The changed device data does not include preset key data, and the inter-process communication between the software development kit and the device center may not be established.
  • connection data for example, the display data of the second electronic device changes, such as the display color of the desktop changes, the background picture of the desktop changes, etc.
  • Step S330 sending a data change notification to the device center through the inter-process communication, instructing the device center to query the changed device data of the second electronic device from the content provider.
  • step S330 please refer to step S120-step S130, which will not be repeated here.
  • the device data processing method when the device data of the second electronic device associated with the device application changes, the changed device data is obtained, and when the changed device data includes preset key data, the software is established.
  • the inter-process communication between the development kit and the device center sends a data change notification to the device center through the inter-process communication to instruct the device center to query the changed device data of the second electronic device from the content provider.
  • this embodiment also establishes inter-process communication between applications when key device data changes, so that the interoperability of key data is more reliable and the transmission is more timely. System performance is more stable.
  • FIG. 8 shows a schematic flowchart of a method for processing device data provided by an embodiment of the present application.
  • the method is applied to the device application of the above-mentioned first electronic device, the device application is integrated with a software development kit, and the software development kit is packaged with a content provider.
  • the device data includes device status.
  • the process shown in FIG. 8 will be described in detail below, and the method for processing device data may include the following steps:
  • Step S410 When the device state of the second electronic device associated with the device application changes, establish inter-process communication between the software development kit and the device center.
  • the device data includes device status.
  • the device status may include power status information, connection status information, configuration status information, device addition status, device removal status, device update status, and the like.
  • the electronic status information may be used to characterize the remaining power of the second electronic device.
  • the connection status information may be used to characterize the connection between the second electronic device and other electronic devices, such as establishing a connection with the third electronic device, disconnecting from the third electronic device, and so on.
  • the configuration state information may be used to characterize the function switch status of the second electronic device, for example, the noise reduction switch of the second electronic device is turned on, the noise reduction switch of the second electronic device is turned off, and so on.
  • the device addition status may be used to characterize the addition of a second electronic device to, for example, an intelligent system.
  • the device removal status may be used to characterize the removal of the second electronic device from, for example, the smart system.
  • the device update status may be used to represent that the second electronic device is being updated in, for example, a smart system.
  • the change of the device status of the second electronic device will directly affect the device linkage between the second electronic device and other electronic devices. It can be considered that when the device state of the second electronic device changes, it needs to be notified in time to the device center for synchronization. Therefore, when the device state of the second electronic device associated with the device application changes, an inter-process communication between the software development kit and the device center can be established.
  • Step S420 sending a data change notification to the device center through the inter-process communication, instructing the device center to query the changed device data of the second electronic device from the content provider.
  • step S420 please refer to step S120-step S130, which will not be repeated here.
  • the device data processing method provided by an embodiment of the present application, when the device status of the second electronic device associated with the device application changes, an inter-process communication between the software development kit and the device center is established, and a data change notification is sent through the inter-process communication to the device center to instruct the device center to query the changed device data of the second electronic device from the content provider.
  • this embodiment also establishes inter-process communication across applications when the device status changes, so that the reliability of the device status intercommunication is higher, the transmission is more timely, and the system performance is improved. more stable.
  • FIG. 9 shows a schematic flowchart of a method for processing device data provided by an embodiment of the present application.
  • This method is used to establish inter-process communication across applications when device data changes, so that data interoperability is more reliable, data transmission is more timely, and system performance is more stable.
  • the device data processing method is applied to the device data processing device 400 shown in Figure 13 and the electronic device (first electronic device) 100 ( Figure 1) equipped with the device data processing device 400
  • the first electronic device further includes a device application, the device application is integrated with a software development kit, and the software development kit is packaged with a content provider.
  • the process shown in FIG. 9 will be described in detail below, and the method for processing device data may include the following steps:
  • Step S510 Receive the data change notification sent by the device application through inter-process communication, wherein the inter-process communication is for the software development tool when the device data of the associated second electronic device is changed by the device application package and the Device Center build.
  • Step S520 In response to the data change notification, query the changed device data of the second electronic device from the content provider.
  • step S510-step S520 please refer to step S110-step S130, which will not be repeated here.
  • the device data processing method provided by an embodiment of the present application receives the data change notification sent by the device application through inter-process communication, wherein the inter-process communication is used by the device application to send the data change notification to the software when the device data of the associated second electronic device changes.
  • the development toolkit and the device center are established, and in response to the device data change notification, query the device data of the second electronic device after the change from the content provider, so that when the device data changes, the cross-application inter-process communication is established, so that the data The reliability of intercommunication is higher, the data transmission is more timely, and the system performance is more stable.
  • FIG. 10 shows a schematic flowchart of a method for processing device data provided by an embodiment of the present application.
  • the method is applied to the device center of the above-mentioned first electronic device, and the first electronic device further includes a device application, the device application is integrated with a software development kit, and the software development kit is packaged with a content provider.
  • the process shown in Figure 10 will be described in detail below, and the method for processing device data may include the following steps:
  • Step S610 Receive the data change notification sent by the device application through inter-process communication, wherein the inter-process communication is for the software development tool when the device data of the associated second electronic device is changed by the device application package and the Device Center build.
  • Step S620 In response to the data change notification, query the changed device data of the second electronic device from the content provider.
  • step S610-step S620 please refer to step S110-step S130, which will not be repeated here.
  • Step S630 When the changed device data of the second electronic device is found, cache the changed device data locally on the first electronic device.
  • the device center of the first electronic device can query the changed device data of the second electronic device from the content provider, and when the changed device data of the second electronic device is found, the changed device data can be The device data is cached locally on the first electronic device.
  • the changed device data of the second electronic device may be queried, the locally cached device data of the first electronic device may be deleted, and the changed device data may be cached locally of the first electronic device.
  • the changed device data may overwrite the device data originally cached locally in the first electronic device.
  • Step S640 In response to the first device data display event, obtain the changed device data locally from the first electronic device for display.
  • the device center after the device center caches the changed device data of the second electronic device locally on the first electronic device, it can monitor device data display events.
  • the changed device data may be acquired locally from the first electronic device and displayed in response to the first device data display event. Based on this, when the first electronic device monitors the first device data display event, it can quickly obtain and display the changed device data, thereby improving the efficiency of obtaining and displaying the changed device data.
  • the device center can monitor device data display events.
  • the device data of the second electronic device may be queried from the content provider for display in response to the second device data display event.
  • the second device data display event may include a display event of a target card corresponding to the device application in the device center of the first electronic device.
  • the target card corresponding to the device application in the device center of the first electronic device enters the display state (the target card switches from invisible to visible), it will actively obtain the device data of the second electronic device.
  • the device center can use its The device management module of the core service actively inquires the content provider in the soft development kit to obtain and display the device data of the second electronic device.
  • the device data can be model-mapped as needed, and transformed into model data available to the application layer of the device center, so that it can be used for Driving higher-level services, for example, can be used to drive the display service of the target card, or can be used to drive the linkage service between devices, etc., which is not limited here.
  • the first electronic device may perform domain modeling for the device business of the second electronic device in advance, wherein the second electronic device may be considered when performing domain modeling The device data and business logic included.
  • the built model can be shown in the table below:
  • deviceld represents the unique identifier of the device
  • macAddress represents the mac address of the device, mainly for Bluetooth devices
  • name represents the device name and device alias
  • feature represents the characteristics of the device, and different devices may have different characteristics
  • protocol represents the device connection protocol
  • status Indicates the device status data, such as power data, connection status data, etc.
  • type indicates the device type, which is used to distinguish each device type.
  • the model can be stored.
  • the device data in the device model needs to be persisted and provided externally. Therefore, it is necessary to register the content provider in the software development kit of the device application, and the device center will uniformly scan the content related to the device provider.
  • the first device data display event and the second device data display event may be the same device data display event, for example, the first device data display event and the second device data display event may include minus one
  • the first electronic device will actively acquire the second The device data of the electronic device (including the changed device data)
  • the device center can directly obtain the changed device data of the second electronic device locally from the first electronic device, or obtain the changed device data of the second electronic device from the content provider.
  • Device data and then notify the target card to refresh the display device (including the changed device data).
  • the device data processing method provided by an embodiment of the present application receives the data change notification sent by the device application through inter-process communication, wherein the inter-process communication is used by the device application to send the data change notification to the software when the device data of the associated second electronic device changes.
  • the development toolkit and the device center are established, and in response to the data change notification, query the changed device data of the second electronic device from the content provider, and cache the changed device data when the changed device data of the second electronic device is queried To the local of the first electronic device, in response to the device data display event, obtain the changed device data from the local of the first electronic device for display.
  • this embodiment also obtains the local location where the changed device data is stored when the device data changes, and directly obtains the changed device data locally when displaying the device data is required. The latest device data is displayed, thereby improving the efficiency of device data acquisition and display.
  • FIG. 11 shows a schematic flowchart of a method for processing device data provided by an embodiment of the present application.
  • the method is applied to the device center of the above-mentioned first electronic device, and the first electronic device further includes a device application, the device application is integrated with a software development kit, and the software development kit is packaged with a content provider.
  • the process shown in Figure 11 will be described in detail below, and the method for processing device data may include the following steps:
  • Step S710 When the configuration information of the content provider is found, parse the configuration information to obtain a parsing result, wherein the configuration information includes device data of the second electronic device configured by the device application.
  • the basic device data of the second electronic device is configured by the device application, and is used for querying the content provider for the device center to establish communication.
  • the content provider can be described by its configuration file, wherein the configuration file of the content provider can include the device data of the second electronic device configured by the device application, for example, it can include basic device data, such as preview default image, version number, supported type, supported card style, etc.
  • the device center can search the configuration information of the content provider according to a unified action, and when the configuration information of the content provider is found, it can parse the configuration file to obtain the parsing result.
  • Step S720 Based on the parsing result, establish a query channel for querying device data from the content provider.
  • the device center after the device center obtains the parsing result, it can establish a device query channel based on the parsing result, that is, establish a query channel for querying device data from a content provider.
  • Step S730 Receive the data change notification sent by the device application through inter-process communication, wherein the inter-process communication is for the software development tool when the device data of the associated second electronic device is changed by the device application package and the Device Center build.
  • Step S740 In response to the data change notification, query the changed device data of the second electronic device from the content provider.
  • step S730-step S740 please refer to step S110-step S130, which will not be repeated here.
  • the device center when the device center finds the configuration information of the content provider, it analyzes the configuration information to obtain the analysis result, and based on the analysis result, establishes a query to query the device data from the content provider
  • the channel receives the data change notification sent by the device application through inter-process communication, wherein the inter-process communication is established by the device application for the software development kit and the device center when the device data of the associated second electronic device changes, and responds to the device
  • the data change notification is to query the changed device data of the second electronic device from the content provider.
  • this embodiment also establishes a query channel according to the configuration information of the content provider to ensure the success rate of device data query.
  • FIG. 12 shows a block diagram of a device data processing apparatus provided by an embodiment of the present application.
  • the device data processing apparatus 300 is applied to the device application of the above-mentioned first electronic device, the device application is integrated with a software development kit, and the software development kit is packaged with a content provider. The following will describe the block diagram shown in FIG. 12.
  • the device data processing apparatus 300 includes: an inter-process communication establishing module 310 and a notification sending module 320, wherein:
  • the inter-process communication establishment module 310 is configured to establish inter-process communication between the software development kit and the device center of the first electronic device when the device data of the second electronic device associated with the device application changes.
  • inter-process communication establishing module 310 includes: a binder connection establishing submodule, wherein:
  • the binder connection establishment sub-module is used to establish the binder connection between the software development kit and the device center through the Android interface definition language, so as to construct the inter-process communication between the software development kit and the device center.
  • inter-process communication establishment module 310 includes: a device data acquisition sub-module and a first inter-process communication establishment sub-module, wherein:
  • the device data obtaining submodule is configured to obtain the changed device data when the device data of the second electronic device associated with the device application changes.
  • the first inter-process communication establishment sub-module is used for establishing inter-process communication between the software development kit and the equipment center when the changed equipment data includes preset key data.
  • the device data includes device status
  • the inter-process communication establishment module 310 includes: a second inter-process communication establishment sub-module, wherein:
  • the second inter-process communication establishing submodule is configured to establish inter-process communication between the software development kit and the device center when the device state of the second electronic device associated with the device application changes.
  • the notification sending module 320 is configured to send a data change notification to the device center through the inter-process communication, so as to instruct the device center to query the changed device data of the second electronic device from the content provider.
  • FIG. 13 shows a block diagram of a device data processing apparatus provided by an embodiment of the present application.
  • the device data processing apparatus 400 is applied to the device center of the above-mentioned first electronic device.
  • the first electronic device also includes a device application, the device application is integrated with a software development kit, and the software development kit is packaged with a content provider.
  • the device data processing apparatus 400 includes: a notification receiving module 410 and a device data query module 420, wherein:
  • the notification receiving module 410 is configured to receive a data change notification sent by the device application through inter-process communication, wherein the inter-process communication is used by the device application when the device data of the associated second electronic device changes, for the The SDK and the Device Center are set up.
  • the device data query module 420 is configured to query the changed device data of the second electronic device from the content provider in response to the data change notification.
  • the device data processing apparatus 400 also includes: a device data cache module and a device data display module, wherein:
  • a device data caching module configured to cache the changed device data locally on the first electronic device when the changed device data of the second electronic device is queried.
  • the device data display module is configured to, in response to a first device data display event, obtain the changed device data locally from the first electronic device for display.
  • the device data processing apparatus 400 also includes:
  • a parsing result obtaining module configured to parse the configuration information to obtain a parsing result when the configuration information of the content provider is found, wherein the configuration information includes the second electronic device configured by the device application device data.
  • a query channel establishment module configured to establish a query channel for querying device data from the content provider based on the parsing result.
  • the device data processing apparatus 400 also includes: a device data query module, wherein:
  • a device data query module configured to query the device data of the second electronic device from the content provider for display in response to the second device data display event.
  • the coupling between the modules may be electrical, mechanical or other forms of coupling.
  • each functional module in each embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules.
  • FIG. 14 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
  • Program codes are stored in the computer-readable medium 500, and the program codes can be invoked by a processor to execute the methods described in the foregoing method embodiments.
  • the computer readable storage medium 500 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the computer-readable storage medium 500 includes a non-transitory computer-readable storage medium (non-transitory computer-readable storage medium).
  • the computer-readable storage medium 500 has a storage space for program code 510 for executing any method steps in the above methods. These program codes can be read from or written into one or more computer program products.
  • Program code 510 may, for example, be compressed in a suitable form.
  • the device application when the device data of the second electronic device associated with the device application of the first electronic device changes, the device application establishes the The inter-process communication between the integrated software development kit and the device center of the first electronic device, the device application sends a data change notification to the device center through the inter-process communication, and the device center queries the second from the content provider encapsulated by the software development kit
  • the device data after the electronic device changes, so that when the device data changes, the inter-process communication between applications is established, so that the reliability of data intercommunication is higher, the data transmission is more timely, and the system performance is more stable.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Stored Programmes (AREA)

Abstract

本申请公开了一种设备数据的处理方法、装置、电子设备以及存储介质,涉及数据处理技术领域。该方法包括:当第一电子设备的设备应用关联的第二电子设备的设备数据发生变化时,设备应用建立所集成的软件开发工具包和第一电子设备的设备中心的进程间通信,设备应用通过该进程间通信发送数据变化通知至设备中心,设备中心从软件开发工具包所封装的内容提供者查询第二电子设备变化后的设备数据。本申请通过在设备数据发生变化时,建立跨应用间的进程间通信,使得数据互通上可靠性更高,数据传输更及时,系统性能更加稳定。

Description

设备数据的处理方法、装置、电子设备以及存储介质
相关申请的交叉引用
本申请要求于2021年09月15日提交的申请号为CN202111081211.9的中国申请的优先权,其在此出于所有目的通过引用将其全部内容并入本文。
技术领域
本申请涉及数据处理技术领域,更具体地,涉及一种设备数据的处理方法、装置、电子设备以及存储介质。
背景技术
随着科学技术的发展,电子设备的使用越来越广泛,功能越来越多,已经成为人们日常生活中的必备之一。电子设备可以通过其设备中心获取并展示其他设备的设备数据。
发明内容
鉴于上述问题,本申请提出了一种设备数据的处理方法、装置、电子设备以及存储介质,以解决上述问题。
第一方面,本申请实施例提供了一种设备数据的处理方法,应用于第一电子设备的设备应用,所述设备应用集成有软件开发工具包,所述软件开发工具包封装有内容提供者,所述方法包括:当所述设备应用关联的第二电子设备的设备数据发生变化时,建立所述软件开发工具包和所述第一电子设备的设备中心的进程间通信;通过所述进程间通信发送数据变化通知至所述设备中心,以指示所述设备中心从所述内容提供者查询所述第二电子设备变化后的设备数据。
第二方面,本申请实施例提供了一种设备数据的处理方法,应用于第一电子设备的设备中心,所述第一电子设备还包括设备应用,所述设备应用集成有软件开发工具包,所述软件开发工具包封装有内容提供者,所述方法包括:接收所述设备应用通过进程间通信发送的数据变化通知,其中,所述进程间通信由所述设备应用在关联的第二电子设备的设备数据发生变化时,针对所述软件开发工具包和所述设备中心建立;响应于所述数据变化通知,从所述内容提供者查询所述第二电子设备变化后的设备数据。
第三方面,本申请实施例提供了一种设备数据的处理装置,应用于第一电子设备的设备应用,所述设备应用集成有软件开发工具包,所述软件开发工具包封装有内容提供者,所述装置包括:进程间通信建立模块,用于当所述设备应用关联的第二电子设备的设备数据发生变化时,建立所述软件开发工具包和所述第一电子设备的设备中心的进程间通信;通知发送模块,用于通过所述进程间通信发送数据变化通知至所述设备中心,以指示所述设备中心从所述内容提供者查询所述第二电子设备变化后的设备数据。
第四方面,本申请实施例提供了一种设备数据的处理装置,应用于第一电子设备的设备中心,所述第一电子设备还包括设备应用,所述设备应用集成有软件开发工具包,所述软件开发工具包封装有内容提供者,所述装置包括:通知接收模块,用于接收所述设备应用通过进程间通信发送的数据变化通知,其中,所述进程间通信由所述设备应用在关联的第二电子设备的设备数据发生变化时,针对所述软件开发工具包和所述设备中心建立;设备数据查询模块,用于响应于所述数据变化通知,从所述内容提供者查询所述第二电子设备变化后的设备数据。
第五方面,本申请实施例提供了一种电子设备,包括存储器和处理器,所述存储器耦接到所述处理器,所述存储器存储指令,当所述指令由所述处理器执行时所述处理器执行上述方法。
第六方面,本申请实施例提供了一种计算机可读取存储介质,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行上述方法。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1示出了本申请实施例用于执行根据本申请实施例的设备数据的处理方法的电子设备的框图;
图2示出了本申请实施例提供的电子设备的操作系统的框图;
图3示出了本申请一实施例提供的设备数据的处理方法的时序图;
图4示出了本申请实施例提供的电子设备的示意图;
图5示出了本申请实施例提供的第一电子设备和第二电子设备通信的示意图;
图6示出了本申请一实施例提供的设备数据的处理方法的流程示意图;
图7示出了本申请一实施例提供的设备数据的处理方法的流程示意图;
图8示出了本申请一实施例提供的设备数据的处理方法的流程示意图;
图9示出了本申请一实施例提供的设备数据的处理方法的流程示意图;
图10示出了本申请一实施例提供的设备数据的处理方法的流程示意图;
图11示出了本申请一实施例提供的设备数据的处理方法的流程示意图;
图12示出了本申请一实施例提供的设备数据的处理装置的模块框图;
图13示出了本申请一实施例提供的设备数据的处理装置的模块框图;
图14示出了本申请实施例的用于保存或者携带实现根据本申请实施例的设备数据的处理方法的程序代码的存储单元。
具体实施方式
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
其中,电子设备可以通过其设备中心查询内容提供者提供的其他设备的设备数据,并监听内容提供者的数据变化,同步到其他设备变化后的设备数据。当电子设备的设备中心不是保活进程时(即随时可能被系统杀死)或者当设备中心不在电子设备的后台运行时,只有当设备中心启动后,才能主动查询内容提供者提供的其他设备的设备数据,导致无法实时监听到其他设备的设备数据变化,无法实时同步到其他设备变化后的设备数据。这样,会造成设备数据的更新延迟,且无法承担一些设备联动的相关业务,用户体验较差。
针对上述问题,发明人经过长期的研究发现,并提出了本申请实施例提供的设备数据的处理方法、装置、电子设备以及存储介质,通过在设备数据发生变化时,建立跨应用间的进程间通信,使得数据互通上可靠性更高,数据传输更及时,系统性能更加稳定。其中,具体的设备数据的处理方法在后续的实施例中进行详细的说明。
请参阅图1,其示出了本申请实施例提供的一种电子设备(第一电子设备)100的结构框图。该电子设备100可以是智能手机、平板电脑、电子书等能够运行应用程序的电子设备。本申请中的电子设备100可以包括一个或多个如下部件:处理器110、存储器120、触摸显示屏130以及一个或多个应用程序,其中一个或多个应用程序可以被存储在存储器120中并被配置为由一个或多个处理器110执行,一个或多个程序配置用于执行如前述方法实施例所描述的方法。
其中,处理器110可以包括一个或者多个处理核。处理器110利用各种接口和线路连接整个电子设备100内的各个部分,通过运行或执行存储在存储器120内的指令、程序、代码集或指令集,以及调用存储在存储器120内的数据,执行电子设备100的各种功能和处理数据。可选地,处理器110可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器110可集 成中央处理器(Central Processing Unit,CPU)、图形处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责待显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器110中,单独通过一块通信芯片进行实现。
存储器120可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器120可用于存储指令、程序、代码、代码集或指令集。存储器120可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储电子设备100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。
触摸显示屏130用于显示由用户输入的信息、提供给用户的信息以及所述电子设备100的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、数字、视频和其任意组合来构成,在一个实例中,该触摸显示屏130可以为液晶显示器(Liquid Crystal Display,LCD),也可以为有机发光二极管(Organic Light-Emitting Diode,OLED),在此不做限定。
以电子设备100的操作系统为安卓(Android)系统为例,存储器120中存储的程序和数据如图2所示,存储器120中存储有Linux内核层220、系统运行库层240、应用框架层260和应用层280。Linux内核层220为电子设备100的各种硬件提供了底层的驱动,如显示驱动、音频驱动、摄像头驱动、蓝牙驱动、Wi-Fi驱动、电源管理等。系统运行库层240通过一些C/C++库来为Android系统提供了主要的特性支持。如SQLite库提供了数据库的支持,OpenGL/ES库提供了3D绘图的支持,Webkit库提供了浏览器内核的支持等。在系统运行库层240中还提供有安卓运行时库(Android Runtime),它主要提供了一些核心库,能够允许开发者使用Java语言来编写Android应用。应用框架层260提供了构建应用程序时可能用到的各种API,开发者也可以通过使用这些API来构建自己的应用程序,比如活动管理、窗口管理、视图管理、通知管理、内容提供者、包管理、通话管理、资源管理、定位管理。应用层280中运行有至少一个应用程序,这些应用程序可以是操作系统自带的联系人程序、短信程序、时钟程序、相机应用等;可以是第三方开发者所开发的应用程序,比如即时通信程序、相片美化程序等;也可以是与其他设备关联的应用程序,如健康应用程序。
请参阅图3,图3示出了本申请一实施例提供的设备数据的处理方法的时序图。该方法用于通过在设备数据发生变化时,建立跨应用间的进程间通信,使得数据互通上可靠性更高,数据传输更及时,系统性能更加稳定。在本申请一实施例中,该设备数据的处理方法应用于如图1所示的第一电子设备100,该第一电子设备包括设备应用和设备中心,该设备应用集成有软件开发工具包,软件开发工具包封装有内容提供者。下面将以电子设备(第一电子设备)为例,说明本实施例的具体流程,当然,可以理解的,本实施例所应用的电子设备可以包括智能手机、平板电脑、穿戴式电子设备等,在此不做限定。下面将针对图3所示的流程进行详细的阐述,所述设备数据的处理方法可以包括以下步骤:
步骤S110:当所述设备应用关联的第二电子设备的设备数据发生变化时,所述设备应用建立所述软件开发工具包和所述第一电子设备的设备中心的进程间通信。
请参阅图4,图4示出了本申请实施例提供的电子设备的示意图。如图4所示,电子设备(第一电子设备)可以包括设备应用和设备中心,该设备应用集成有软件开发工具包(software development kit,SDK),软件开发工具包封装有内容提供者。
其中,内容提供者作为安卓(Android)的基本组件之一,是一个标准化的数据管道。设备应用作为第二电子设备的直接业务方,负责与关联的第二电子设备最直接的交互, 例如,该设备应用负责提供设备数据,集成软件开发工具包以及与设备中心进行通信。软件开发工具包为提供给设备应用接入的开发工具包,例如,软件开发工具包集成在设备应用中,提供设备数据的内容提供者,提供进程通信接口与设备中心建立进程间通信(如binder连接)。设备中心为管理所有第二电子设备的平台中心,对接多个设备应用,例如,设备中心作为统一的设备管理中心收集当前接入的所有第二电子设备的设备数据,通过设备管理模块为核心,对外负责提供各个第二电子设备的设备数据。
在本实施例中,由于软件开发工具包内封装有内容提供者,而设备应用集成有软件开发工具包,因此,设备应用只需要接入软件开发工具包调用接口即可。作为一种可实施的方式,设备应用为软件开发工具包提供了第二电子设备的设备数据,由软件开发工具包存储到内容提供者,并对设备中心提供设备数据。
在本申请一实施例中,该设备应用可以安装于该第一电子设备,并与一个或多个第二电子设备关联;或者,该设备应用可以以快应用的形式存在于该第一电子设备,并与一个或多个第二电子设备关联,如图5所示,第二电子设备可以为耳机200,设备应用于耳机200关联。其中,设备应用与第二电子设备关联可以包括:设备应用登录的账号与第二电子设备登录的账号一致,或者,设备应用登录的账号与第二电子设备登录的账号关联。例如,当该第二电子设备为无线耳机时,则该设备应用可以为与该无线耳机关联的无线耳机应用;当该第二电子设备为智能手表或智能手环时,则该设备应用可以为与该智能手表和智能手环关联的健康应用。
在本实施例中,设备应用可以对关联的第二电子设备的设备数据进行监测,当监测到第二电子设备的设备数据发生变化时,则可以建立软件开发工具包与设备中心的进程间通信。其中,设备应用与关联的第二电子设是直接进行通信的,即,设备应用可获取到第二电子设备的设备数据的变化情况,因此,当设备应用获取到第二电子设备的设备数据发生变化时,则可以建立软件开发工具包与设备中心的进程间通信。
作为一种可实施的方式,该设备数据可以包括设备显示数据、设备性能数据、设备配置数据、设备状态数据等,在此不做限定。
在一些实施方式中,当设备应用关联的设备数据发生变化时,则可以通过安卓接口定义语言(android interface definition language,AIDL)建立软件开发工具包和设备中心的binder连接,以构建软件开发工具包和设备中心的进程间通信。
步骤S120:所述设备应用通过所述进程间通信发送数据变化通知至所述设备中心。
在一些实施方式中,设备应用在建立软件开发工具包和设备中心的进程间通信后,则可以通过该进程间通信(如binder连接)发送数据变化通知至设备中心,以使得设备中心可以实时知晓第二电子设备的设备数据的变化情况。基于上述步骤可以知道,本实施例通过建立跨应用的设备数据传递通道,将设备中心的业务置于更外层,由设备应用或连接管理框架进行设备数据的驱动,可以避免即使设备中心业务进程不常驻,也能够给设备中心业务层提供稳定、可靠的设备数据。
作为一种方式,设备应用发送至设备中心的数据变化通知可以仅具有通知的功能。例如,该数据变化通知可以用于通知设备中心该第二电子设备的设备数据发生变化,但不会通知该设备中心所变化的设备数据以及不会通知该设备中心变化后的设备数据。基于此,该设备中心基于该数据变化通知仅可以获知第二电子设备的设备数据发生变化。
作为另一种方式,设备应用发送至设备中心的数据变化通知可以具有通知具体变化信息的功能。例如,该数据变化通知可以用于通知设备中心该第二电子设备的设备数据发生变化,且通知该设备中心所变化的设备数据,甚至通知该设备中心变化后的设备数据。基于此,该设备中心基于该数据变化通知可以获知第二电子设备的设备数据发生变化,以及获知第二电子设备所变化的设备数据,例如,可以获知第二电子设备的电量数据发生变化,获知第二电子设备的连接信息发生变化、获知第二电子设备的控制开关信息发生变化等,在此不做限定。
步骤S130:所述设备中心从所述内容提供者查询所述第二电子设备变化后的设备数据。
在本实施例中,设备中心在接收到设备应用发送的数据变化通知后,可以响应于该设备变化通知,从软件开发工具包封装的内容提供者查询该第二电子设备变化后的设备数据,从而确保对变化后的设备数据的实时获取,以提升设备联动(例如音频联动)的效果。
在一些实施方式中,设备中心的核心进程包括设备管理模块。则设备中心在接收到设备应用发送的数据变化通知后,可以响应于该设备变化通知,通过该设备管理模块从软件开发工具包封装的内容提供者查询该第二电子设备变化后的设备数据。
在本申请一实施例中,假设第一电子设备为智能手机、第二电子设为智能手表,智能手机分别与智能手表和智能耳机连接。智能手机包括与智能手表关联的设备应用,当智能手表接收到来电时,可以确定该智能手表的设备数据发生变化。设备应用可以建立软件开发工具包和智能手机的设备中心的进程间通信,并发送设备数据变化通知给设备中心。设备中心响应于该数据变化通知,从软开开发工具包封装的内容提供者获取到该智能手表的来电数据。基于该来电数据,智能手机可以控制智能耳机连接到智能手表,以通过该智能耳机接听该智能手表的来电。
在本申请另一实施例中,假设第一电子设备为智能手表、第二电子设备为智能手机,智能手表分别与智能手机和智能耳机连接。智能手表包括与智能手机关联的设备应用,当智能手机接收到来电时,可以确定该智能手机的设备数据发生变化。设备应用可以建立软件开发工具包和智能手表的设备中心的进程间通信,并发送设备数据变化通知给设备中心。设备中心响应于该数据变化通知,从软开开发工具包封装的内容提供者获取到该智能手机的来电数据。基于该来电数据,智能手表可以控制智能耳机连接到智能手机,以通过该智能耳机接听该智能手机的来电。
本申请一实施例提供的设备数据的处理方法,当第一电子设备的设备应用关联的第二电子设备的设备数据发生变化时,设备应用建立所集成的软件开发工具包和第一电子设备的设备中心的进程间通信,设备应用通过该进程间通信发送数据变化通知至设备中心,设备中心从软件开发工具包所封装的内容提供者查询第二电子设备变化后的设备数据,从而通过在设备数据发生变化时,建立跨应用间的进程间通信,使得数据互通上可靠性更高,数据传输更及时,系统性能更加稳定。
请参阅图6,图6示出了本申请一实施例提供的设备数据的处理方法的流程示意图。该方法用于通过在设备数据发生变化时,建立跨应用间的进程间通信,使得数据互通上可靠性更高,数据传输更及时,系统性能更加稳定。在本申请一实施例中,该设备数据的处理方法应用于如图12所示的设备数据的处理装置200以及配置有设备数据处理装置300的电子设备(第一电子设备)100(图1)的设备应用,该设备应用集成有软件开发工具包,软件开发工具包封装有内容提供者。下面将针对图6所示的流程进行详细的阐述,所述设备数据的处理方法可以包括以下步骤:
步骤S210:当所述设备应用关联的第二电子设备的设备数据发生变化时,建立所述软件开发工具包和所述第一电子设备的设备中心的进程间通信。
步骤S220:通过所述进程间通信发送数据变化通知至所述设备中心,以指示所述设备中心从所述内容提供者查询所述第二电子设备变化后的设备数据。
其中,步骤S210-步骤S220的具体描述请参阅步骤S110-步骤S130,在此不再赘述。
本申请一实施例提供的设备数据的处理方法,当第一电子设备的设备应用关联的第二电子设备的设备数据发生变化时,建立所集成的软件开发工具包和第一电子设备的设备中心的进程间通信,通过该进程间通信发送数据变化通知至设备中心,以指示设备中心从软件开发工具包所封装的内容提供者查询第二电子设备变化后的设备数据,从而通过在设备数据发生变化时,建立跨应用间的进程间通信,使得数据互通上可靠性更高, 数据传输更及时,系统性能更加稳定。
请参阅图7,图7示出了本申请一实施例提供的设备数据的处理方法的流程示意图。该方法应用于上述第一电子设备的设备应用,设备应用集成有软件开发工具包,软件开发工具包封装有内容提供者。下面将针对图7所示的流程进行详细的阐述,所述设备数据的处理方法可以包括以下步骤:
步骤S310:当所述设备应用关联的第二电子设备的设备数据发生变化时,获取所变化的设备数据。
在本实施例中,设备应用可以对关联的第二电子设备的设备数据进行监测,当监测到第二电子设备的设备数据发生变化时,则可以获取所变化的设备数据。其中,由于设备应用和第二电子设备直接进行通信,因此,设备应用可以直接获取第二电子设备所变化的设备数据。
步骤S320:当所述所变化的设备数据包括预设关键数据时,建立所述软件开发工具包和所述设备中心的进程间通信。
在一些实施方式中,第一电子设备的设备应用可以预先设置有关键数据,作为预设关键数据,该预设关键数据用于作为第二电子设备所变化的设备数据的判断依据。因此,在本实施例中,在获取到第二电子设备所变化的设备数据时,可以将所变化的设备数据与预设关键数据进行比较,以判断该所变化的设备数据中是否包括预设关键数据。
其中,当判定该所变化的设备数据中包括预设关键数据时,则可以确定该第二电子设备的设备数据的变化较为重要,需要及时的通知到设备中心进行同步,则可以建立软件开发工具包和设备中心的进程间通信。
其中,当判定该所变化的设备数据中不包括预设关键数据时,则可以确定该第二电子设备的设备数据的变化不重要,不需要及时的通知到设备中心进行同步,则可以不建立软件开发工具包和设备中心的进程间通信,而由设备中心启动后,自动在软件开发工具包封装的内容提供者进行变化后的设备数据的查询和同步。
例如,可以在设备中心启动时,通过其核心进程中的设备管理模块主动查询设备应用集成的软件开发工具包封装的内容提供者,获得第二电子设备变化后的设备数据。作为一种方式,当第一电子设备监听到设备数据显示事件时,可以启动设备中心,通过设备中心的核心进程中的设备管理模块主动查询设备应用集成的软件开发工具包封装的内容提供者,获得第二电子设备变化后的设备数据。其中,设备数据显示事件可以包括第一电子设备的负一屏的与设备应用对应的目标卡片显示事件,或者,第一电子设备的设备中心的与设备应用对应的目标卡片显示事件。即,当第一电子设备的负一屏的与设备应用对应的目标卡片进入展示状态(目标卡片由不可见切换到可见状态),或者,当第一电子设备的设备中心的与设备应用对应的目标卡片进入展示状态(目标卡片由不可见切换到可见状态)时,会主动获取第二电子设备变化后的设备数据,因此,设备中心的UI层可以通过进程间通信,将读取第二电子设备变化后的设备数据的请求发送给设备中心的核心层的设备管理模块,设备管理模块基于该请求查询设备应用集成的软件开发工具包封装的内容提供者,获得第二电子设备变化后的设备数据。
在本申请一实施例中,以预设关键数据包括设备连接数据为例进行说明。当第二电子设备所变化的设备数据为设备连接数据(如第二电子设备与第三设备建立连接、或者,第二电子设备与第三电子设备断开连接)时,则可以确定第二电子设备所变化的设备数据包括预设关键数据,可以建立软件开发工具包和设备中心的进程间通信。当第二电子设备所变化的设备数据不是连接数据(如第二电子设备的显示数据发生变化,例如桌面的显示颜色发生变化、桌面的背景图片发生变化等)时,则可以确定第二电子设备所变化的设备数据不包括预设关键数据,可以不建立软件开发工具包和设备中心的进程间通信。
步骤S330:通过所述进程间通信发送数据变化通知至所述设备中心,以指示所述设备中心从所述内容提供者查询所述第二电子设备变化后的设备数据。
其中,步骤S330的具体描述请参阅步骤S120-步骤S130,在此不再赘述。
本申请一实施例提供的设备数据的处理方法,当设备应用关联的第二电子设备的设备数据发生变化时,获取所变化的设备数据,当所变化的设备数据包括预设关键数据时,建立软件开发工具包和设备中心的进程间通信,通过进程间通信发送数据变化通知至设备中心,以指示设备中心从内容提供者查询第二电子设备变化后的设备数据。相较于图2所示的设备数据的处理方法,本实施例还在关键的设备数据发生变化时,建立跨应用间的进程间通信,使得关键数据互通上可靠性更高,传输更及时,系统性能更加稳定。
请参阅图8,图8示出了本申请一实施例提供的设备数据的处理方法的流程示意图。该方法应用于上述第一电子设备的设备应用,设备应用集成有软件开发工具包,软件开发工具包封装有内容提供者。于本实施例中,设备数据包括设备状态。下面将针对图8所示的流程进行详细的阐述,所述设备数据的处理方法可以包括以下步骤:
步骤S410:当所述设备应用关联的第二电子设备的设备状态发生变化时,建立所述软件开发工具包和所述设备中心的进程间通信。
在本实施例中,设备数据包括设备状态。其中,设备状态可以包括电量状态信息、连接状态信息、配置状态信息、设备添加状态、设备移除状态、设备更新状态等。其中,电子状态信息可以用于表征第二电子设备的剩余电量。连接状态信息可以用于表征第二电子设备与其他电子设备的连接情况,如与第三电子设备建立连接,与第三电子设备断开连接等。配置状态信息可以用于表征第二电子设备的功能开关情况,如第二电子设备的降噪开关打开,第二电子设备的降噪开关关闭等。设备添加状态可以用于表征第二电子设备添加至如智能系统中。设备移除状态可以用于表征第二电子设备从如智能系统中移除。设备更新状态可以用于表征第二电子设备在如智能系统中更新。
其中,第二电子设备的设备状态的变化,会直接影响第二电子设备与其他电子设备之间的设备联动。可以认为第二电子设备的设备状态发生变化时,需要及时的通知到设备中心进行同步。因此,当设备应用关联的第二电子设备的设备状态发生变化时,则可以建立软件开发工具包和设备中心的进程间通信。
步骤S420:通过所述进程间通信发送数据变化通知至所述设备中心,以指示所述设备中心从所述内容提供者查询所述第二电子设备变化后的设备数据。
其中,步骤S420的具体描述请参阅步骤S120-步骤S130,在此不再赘述。
本申请一实施例提供的设备数据的处理方法,当设备应用关联的第二电子设备的设备状态发生变化时,建立软件开发工具包和设备中心的进程间通信,通过进程间通信发送数据变化通知至设备中心,以指示设备中心从内容提供者查询第二电子设备变化后的设备数据。相较于图2所示的设备数据的处理方法,本实施例还在设备状态发生变化时,建立跨应用间的进程间通信,使得设备状态互通上可靠性更高,传输更及时,系统性能更加稳定。
请参阅图9,图9示出了本申请一实施例提供的设备数据的处理方法的流程示意图。该方法用于通过在设备数据发生变化时,建立跨应用间的进程间通信,使得数据互通上可靠性更高,数据传输更及时,系统性能更加稳定。在本申请一实施例中,该设备数据的处理方法应用于如图13所示的设备数据的处理装置400以及配置有设备数据处理装置400的电子设备(第一电子设备)100(图1)的设备中心,该第一电子设备还包括设备应用,该设备应用集成有软件开发工具包,软件开发工具包封装有内容提供者。下面将针对图9所示的流程进行详细的阐述,所述设备数据的处理方法可以包括以下步骤:
步骤S510:接收所述设备应用通过进程间通信发送的数据变化通知,其中,所述进程间通信由所述设备应用在关联的第二电子设备的设备数据发生变化时,针对所述软件开发工具包和所述设备中心建立。
步骤S520:响应于所述数据变化通知,从所述内容提供者查询所述第二电子设备变化后的设备数据。
其中,步骤S510-步骤S520的具体描述请参阅步骤S110-步骤S130,在此不再赘述。
本申请一实施例提供的设备数据的处理方法,接收设备应用通过进程间通信发送的数据变化通知,其中,进程间通信由设备应用在关联的第二电子设备的设备数据发生变化时,针对软件开发工具包和设备中心建立,响应于设备数据变化通知,从内容提供者查询第二电子设备变化后的设备数据,从而通过在设备数据发生变化时,建立跨应用间的进程间通信,使得数据互通上可靠性更高,数据传输更及时,系统性能更加稳定。
请参阅图10,图10示出了本申请一实施例提供的设备数据的处理方法的流程示意图。该方法应用于上述第一电子设备的设备中心,第一电子设备还包括设备应用,该设备应用集成有软件开发工具包,软件开发工具包封装有内容提供者。下面将针对图10所示的流程进行详细的阐述,所述设备数据的处理方法可以包括以下步骤:
步骤S610:接收所述设备应用通过进程间通信发送的数据变化通知,其中,所述进程间通信由所述设备应用在关联的第二电子设备的设备数据发生变化时,针对所述软件开发工具包和所述设备中心建立。
步骤S620:响应于所述数据变化通知,从所述内容提供者查询所述第二电子设备变化后的设备数据。
其中,步骤S610-步骤S620的具体描述请参阅步骤S110-步骤S130,在此不再赘述。
步骤S630:当查询到所述第二电子设备变化后的设备数据时,将所述变化后的设备数据缓存到所述第一电子设备的本地。
在一些实施方式中,第一电子设备的设备中心可以从内容提供者查询第二电子设备变化后的设备数据,当查询到该第二电子设备变化后的设备数据时,可以将该变化后的设备数据缓存到第一电子设备的本地。作为一种方式,当查询到第二电子设备变化后的设备数据时,可以将第一电子设备的本地原本缓存的设备数据删除,并在第一电子设备的本地缓存该变化后的设备数据。作为又一种方式,当查询到第二电子设备变化后的设备数据时,可以将变化后的设备数据覆盖原本在第一电子设备的本地缓存的设备数据。
步骤S640:响应于第一设备数据显示事件,从所述第一电子设备的本地获取所述变化后的设备数据进行显示。
在本实施例中,设备中心在将第二电子设备变化后的设备数据缓存到第一电子设备的本地后,可以进行设备数据显示事件的监听。当监听到第一设备数据显示事件时,则可以响应于该第一设备数据显示事件,从第一电子设备的本地获取该变化后的设备数据并显示。基于此,第一电子设备在监听到第一设备数据显示事件时,可以快速获取并展示变化后的设备数据,从而可以提升变化后的设备数据的获取和展示效率。
在一些实施方式中,设备中心可以进行设备数据显示事件的监听。当监听到第二设备数据显示事件时,则可以响应于该第二设备数据显示事件,从内容提供者查询第二电子设备的设备数据进行显示。其中,可以知道的,如果第二电子设备的设备数据与上一次查询时保持不变,则从内容提供者查询到的第二电子设备的设备数据与之前查询到的设备数据一致,如果第二电子设备的设备数据发生变化时,则从内容提供者查询到的第二电子设备的设备数据为变化后的设备数据。作为一种方式,第二设备数据显示事件可以包括第一电子设备的设备中心的与设备应用对应的目标卡片显示事件。当第一电子设备的设备中心的与设备应用对应的目标卡片进入展示状态(目标卡片由不可见切换到可见状态)时,会主动获取第二电子设备的设备数据,例如,设备中心可以通过其核心服务的设备管理模块主动查询软开开发工具包内的内容提供者,以获得第二电子设备的设备数据并显示。
在一些实施方式中,设备数据在从软件开发工具包封装的内容提供者流向设备中心后,可以根据需要对设备数据进行模型映射,转化为设备中心的应用层可用的模型数据,从而可以用于驱动更上层的业务,例如,可以用于驱动目标卡片的显示业务,或者,可以用于驱动设备之间的联动业务等,在此不做限定。
在本申请一实施例中,为了实现对设备数据进行模型映射,第一电子设备可以预先针对第二电子设备的设备业务进行领域建模,其中,在进行领域建模时可以考虑第二电子设备的 设备数据以及包含的业务逻辑。作为一种方式,所建立的模型可以如下表所示:
deviceld
macAddress
name
feature
protocol
status
type
……
其中,deviceld表示设备的唯一标识;macAddress表示设备的mac地址,主要针对蓝牙设备;name表示设备名称、设备别名;feature表示设备特性,不同设备可能有不同的特性区分;protocol表示设备连接协议;status表示设备状态数据,如电量数据、连接状态数据等;type表示设备类型,用于区分各个设备类型。
在一些实施方式中,在设备模型建立完成后,可以存储该模型。于本实施例中,设备模型中的设备数据需要进行持久化,并对外提供设备数据,因此,需要在设备应用的软件开发工具包中注册内容提供者,由设备中心统一扫描与设备相关的内容提供者。
作为一种方式,第一设备数据显示事件和第二设备数据显示事件可以是相同的设备数据显示事件,例如第一设备数据显示事件和第二设备数据显示事件可以包括第一电子设备的负一屏的与设备应用对应的目标卡片显示事件,当第一电子设备的负一屏的与设备应用对应的目标卡片进入展示状态(目标卡片由不可见切换到可见状态)时,会主动获取第二电子设备设备数据(包括变化后的设备数据),因此,设备中心可以直接从第一电子设备的本地获取该第二电子设备变化后的设备数据,或者从内容提供者获取该第二电子设备的设备数据,进而通知到目标卡片刷新显示设备(包括变化后的设备数据)。
本申请一实施例提供的设备数据的处理方法,接收设备应用通过进程间通信发送的数据变化通知,其中,进程间通信由设备应用在关联的第二电子设备的设备数据发生变化时,针对软件开发工具包和设备中心建立,响应于数据变化通知,从内容提供者查询第二电子设备变化后的设备数据,当查询到第二电子设备变化后的设备数据时,将变化后的设备数据缓存到第一电子设备的本地,响应于设备数据显示事件,从第一电子设备的本地获取变化后的设备数据进行显示。相较于图9所示的设备数据的处理方法,本实施例还在设备数据发生变化时,获取变化后的设备数据存储的本地,并在需要进行设备数据的显示时,直接从本地获取变化后的设备数据进行显示,从而提升设备数据的获取和显示效率。
请参阅图11,图11示出了本申请一实施例提供的设备数据的处理方法的流程示意图。该方法应用于上述第一电子设备的设备中心,第一电子设备还包括设备应用,该设备应用集成有软件开发工具包,软件开发工具包封装有内容提供者。下面将针对图11所示的流程进行详细的阐述,所述设备数据的处理方法可以包括以下步骤:
步骤S710:当查找到所述内容提供者的配置信息时,对所述配置信息进行解析获得解析结果,其中,所述配置信息包括所述设备应用配置的所述第二电子设备的设备数据。
在本实施例中,对于第二电子设备的基础设备数据交由设备应用进行配置,用于设备中心建立通信的内容提供者的查询。其中,内容提供者可以通过其配置文件进行描述,其中,该内容提供者的配置文件可以包括设备应用配置的第二电子设备的设备数据,例如可以包括基本的设备数据,如预览默认图、版本号、支持类型、支持卡片样式等。
在一些实施方式中,设备中心可以根据统一的action进行内容提供者的配置信息的查找,当查找到内容提供者的配置信息时,则可以对配置文件进行解析,获得解析结果。
步骤S720:基于所述解析结果,建立从所述内容提供者查询设备数据的查询通道。
在一些实施方式中,设备中心在获得该解析结果后,可以基于该解析结果,建立设备查 询通道,即,建立从内容提供者查询设备数据的查询通道。
步骤S730:接收所述设备应用通过进程间通信发送的数据变化通知,其中,所述进程间通信由所述设备应用在关联的第二电子设备的设备数据发生变化时,针对所述软件开发工具包和所述设备中心建立。
步骤S740:响应于所述数据变化通知,从所述内容提供者查询所述第二电子设备变化后的设备数据。
其中,步骤S730-步骤S740的具体描述请参阅步骤S110-步骤S130,在此不再赘述。
本申请一实施例提供的设备数据的处理方法,设备中心在查找到内容提供者的配置信息时,对配置信息进行解析获得解析结果,基于该解析结果,建立从内容提供者查询设备数据的查询通道,接收设备应用通过进程间通信发送的数据变化通知,其中,进程间通信由设备应用在关联的第二电子设备的设备数据发生变化时,针对软件开发工具包和设备中心建立,响应于设备数据变化通知,从内容提供者查询第二电子设备变化后的设备数据。相较于图9所示的设备数据的处理方法,本实施例还根据内容提供者的配置信息建立查询通道,保证设备数据查询的成功率。
请参阅图12,图12示出了本申请一实施例提供的设备数据的处理装置的模块框图。该设备数据的处理装置300应用于上述第一电子设备的设备应用,该设备应用集成有软件开发工具包,软件开发工具包封装有内容提供者。下面将针对图12所示的框图进行阐述,所述设备数据的处理装置300包括:进程间通信建立模块310和通知发送模块320,其中:
进程间通信建立模块310,用于当所述设备应用关联的第二电子设备的设备数据发生变化时,建立所述软件开发工具包和所述第一电子设备的设备中心的进程间通信。
进一步地,所述进程间通信建立模块310包括:binder连接建立子模块,其中:
Binder连接建立子模块,用于通过安卓接口定义语言建立所述软件开发工具包和所述设备中心的binder连接,以构建所述软件开发工具包和所述设备中心的进程间通信。
进一步地,所述进程间通信建立模块310包括:设备数据获取子模块和第一进程间通信建立子模块,其中:
设备数据获取子模块,用于当所述设备应用关联的第二电子设备的设备数据发生变化时,获取所变化的设备数据。
第一进程间通信建立子模块,用于当所述所变化的设备数据包括预设关键数据时,建立所述软件开发工具包和所述设备中心的进程间通信。
进一步地,所述设备数据包括设备状态,所述进程间通信建立模块310包括:第二进程间通信建立子模块,其中:
第二进程间通信建立子模块,用于当所述设备应用关联的第二电子设备的设备状态发生变化时,建立所述软件开发工具包和所述设备中心的进程间通信。
通知发送模块320,用于通过所述进程间通信发送数据变化通知至所述设备中心,以指示所述设备中心从所述内容提供者查询所述第二电子设备变化后的设备数据。
请参阅图13,图13示出了本申请一实施例提供的设备数据的处理装置的模块框图。该设备数据的处理装置400应用于上述第一电子设备的设备中心,该第一电子设备还包括设备应用,该设备应用集成有软件开发工具包,软件开发工具包封装有内容提供者。下面将针对图13所示的框图进行阐述,所述设备数据的处理装置400包括:通知接收模块410和设备数据查询模块420,其中:
通知接收模块410,用于接收所述设备应用通过进程间通信发送的数据变化通知,其中,所述进程间通信由所述设备应用在关联的第二电子设备的设备数据发生变化时,针对所述软件开发工具包和所述设备中心建立。
设备数据查询模块420,用于响应于所述数据变化通知,从所述内容提供者查询所述第二电子设备变化后的设备数据。
进一步地,所述设备数据的处理装置400还包括:设备数据缓存模块和设备数据显示模块,其中:
设备数据缓存模块,用于当查询到所述第二电子设备变化后的设备数据时,将所述变化后的设备数据缓存到所述第一电子设备的本地。
设备数据显示模块,用于响应于第一设备数据显示事件,从所述第一电子设备的本地获取所述变化后的设备数据进行显示。
进一步地,所述设备数据的处理装置400还包括:
解析结果获得模块,用于当查找到所述内容提供者的配置信息时,对所述配置信息进行解析获得解析结果,其中,所述配置信息包括所述设备应用配置的所述第二电子设备的设备数据。
查询通道建立模块,用于基于所述解析结果,建立从所述内容提供者查询设备数据的查询通道。
进一步地,所述设备数据的处理装置400还包括:设备数据查询模块,其中:
设备数据查询模块,用于响应于第二设备数据显示事件,从所述内容提供者查询所述第二电子设备的设备数据进行显示。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
请参阅图14,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质500中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。
计算机可读存储介质500可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质500包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质500具有执行上述方法中的任何方法步骤的程序代码510的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码510可以例如以适当形式进行压缩。
综上所述,本申请实施例提供的设备数据的处理方法、装置、电子设备以及存储介质,当第一电子设备的设备应用关联的第二电子设备的设备数据发生变化时,设备应用建立所集成的软件开发工具包和第一电子设备的设备中心的进程间通信,设备应用通过该进程间通信发送数据变化通知至设备中心,设备中心从软件开发工具包所封装的内容提供者查询第二电子设备变化后的设备数据,从而通过在设备数据发生变化时,建立跨应用间的进程间通信,使得数据互通上可靠性更高,数据传输更及时,系统性能更加稳定。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (20)

  1. 一种设备数据的处理方法,其特征在于,应用于第一电子设备的设备应用,所述设备应用集成有软件开发工具包,所述软件开发工具包封装有内容提供者,所述方法包括:
    当所述设备应用关联的第二电子设备的设备数据发生变化时,建立所述软件开发工具包和所述第一电子设备的设备中心的进程间通信;
    通过所述进程间通信发送数据变化通知至所述设备中心,以指示所述设备中心从所述内容提供者查询所述第二电子设备变化后的设备数据。
  2. 根据权利要求1所述的方法,其特征在于,所述建立所述软件开发工具包和所述第一电子设备的设备中心的进程间通信,包括:
    通过安卓接口定义语言建立所述软件开发工具包和所述设备中心的binder连接,以构建所述软件开发工具包和所述设备中心的进程间通信。
  3. 根据权利要求1所述的方法,其特征在于,所述当所述设备应用关联的第二电子设备的设备数据发生变化时,建立所述软件开发工具包和所述第一电子设备的设备中心的进程间通信,包括:
    当所述设备应用关联的第二电子设备的设备数据发生变化时,获取所变化的设备数据;
    当所述所变化的设备数据包括预设关键数据时,建立所述软件开发工具包和所述设备中心的进程间通信。
  4. 根据权利要求1所述的方法,其特征在于,所述设备数据包括设备状态,所述当所述设备应用关联的第二电子设备的设备数据发生变化时,建立所述软件开发工具包和所述第一电子设备的设备中心的进程间通信,包括:
    当所述设备应用关联的第二电子设备的设备状态发生变化时,建立所述软件开发工具包和所述设备中心的进程间通信。
  5. 根据权利要求4所述的方法,其特征在于,所述设备状态包括电量状态信息、连接状态信息、配置状态信息、设备添加状态信息、设备移动状态信息以及设备更新状态信息中的一种或几种的组合。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述设备应用安装于所述第一电子设备,或者,所述设备应用以快应用的形式存在于所述第一电子设备。
  7. 根据权利要求1-5任一项所述的方法,其特征在于,所述设备应用与所述第二电子设备关联,包括:
    所述设备应用登录的账号与所述第二电子设备登录的账号一致;或者
    所述设备应用登录的账号与所述第二电子设备登录的账号关联。
  8. 根据权利要求1-5任一项所述的方法,其特征在于,所述设备数据包括设备显示数据、设备性能数据、设备配置数据以及设备状态数据中的一种或几种的组合。
  9. 一种设备数据的处理方法,其特征在于,应用于第一电子设备的设备中心,所述第一电子设备还包括设备应用,所述设备应用集成有软件开发工具包,所述软件开发工具包封装有内容提供者,所述方法包括:
    接收所述设备应用通过进程间通信发送的数据变化通知,其中,所述进程间通信由所述设备应用在关联的第二电子设备的设备数据发生变化时,针对所述软件开发工具包和所述设备中心建立;
    响应于所述数据变化通知,从所述内容提供者查询所述第二电子设备变化后的设备数据。
  10. 根据权利要求9所述的方法,其特征在于,在所述响应于所述数据变化通知,从所述内容提供者查询所述第二电子设备变化后的设备数据之后,还包括:
    当查询到所述第二电子设备变化后的设备数据时,将所述变化后的设备数据缓存到所述第一电子设备的本地;
    响应于第一设备数据显示事件,从所述第一电子设备的本地获取所述变化后的设备数据进行显示。
  11. 根据权利要求10所述的方法,其特征在于,所述方法还包括:
    响应于第二设备数据显示事件,从所述内容提供者查询所述第二电子设备的设备数据进行显示。
  12. 根据权利要求11所述的方法,其特征在于,所述第一设备数据显示事件和所述第二设备数据显示事件,包括:
    所述第一电子设备的负一屏的目标卡片显示事件;或者
    所述设备中心的首页的目标卡片显示事件,其中,所述目标卡片与所述设备应用对应。
  13. 根据权利要求10所述的方法,其特征在于,所述当查询到所述第二电子设备变化后的设备数据时,将所述变化后的设备数据缓存到所述第一电子设备的本地,包括:
    当查询到所述第二电子设备变化后的设备数据时,将所述第一电子设备的本地缓存的设备数据删除,并将所述变化后的设备数据缓存到所述第一电子设备的本地。
  14. 根据权利要求10所述的方法,其特征在于,所述当查询到所述第二电子设备变化后的设备数据时,将所述变化后的设备数据缓存到所述第一电子设备的本地,包括:
    当查询到所述第二电子设备变化后的设备数据时,将所述变化后的设备数据覆盖在所述第一电子设备的本地缓存的设备数据。
  15. 根据权利要求9-14任一项所述的方法,其特征在于,在所述接收所述设备应用通过进程间通信发送的数据变化通知之前,还包括:
    当查找到所述内容提供者的配置信息时,对所述配置信息进行解析获得解析结果,其中,所述配置信息包括所述设备应用配置的所述第二电子设备的设备数据;
    基于所述解析结果,建立从所述内容提供者查询设备数据的查询通道。
  16. 一种设备数据的处理方法,其特征在于,应用于第一电子设备,所述第一电子设备包括设备应用和设备中心,所述设备应用集成有软件开发工具包,所述软件开发工具包封装有内容提供者,所述方法包括:
    当所述设备应用关联的第二电子设备的设备数据发生变化时,所述设备应用建立所述软件开发工具包和所述设备中心的进程间通信;
    所述设备应用通过所述进程间通信发送数据变化通知至所述设备中心;
    所述设备中心从所述内容提供者查询所述第二电子设备变化后的设备数据。
  17. 一种设备数据的处理装置,其特征在于,应用于第一电子设备的设备应用,所述设备应用集成有软件开发工具包,所述软件开发工具包封装有内容提供者,所述装置包括:
    进程间通信建立模块,用于当所述设备应用关联的第二电子设备的设备数据发生变化时,建立所述软件开发工具包和所述第一电子设备的设备中心的进程间通信;
    通知发送模块,用于通过所述进程间通信发送数据变化通知至所述设备中心,以指示所述设备中心从所述内容提供者查询所述第二电子设备变化后的设备数据。
  18. 一种设备数据的处理装置,其特征在于,应用于第一电子设备的设备中心,所述第一电子设备还包括设备应用,所述设备应用集成有软件开发工具包,所述软件开发工具包封装有内容提供者,所述装置包括:
    通知接收模块,用于接收所述设备应用通过进程间通信发送的数据变化通知,其中,所述进程间通信由所述设备应用在关联的第二电子设备的设备数据发生变化时,针对所述软件开发工具包和所述设备中心建立;
    设备数据查询模块,用于响应于所述数据变化通知,从所述内容提供者查询所述第二电子设备变化后的设备数据。
  19. 一种电子设备,其特征在于,包括存储器和处理器,所述存储器耦接到所述处理器,所述存储器存储指令,当所述指令由所述处理器执行时所述处理器执行如权利要求1-8任一项或如权利要求9-15任一项所述的方法。
  20. 一种计算机可读取存储介质,其特征在于,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行如权利要求1-8任一项或如权利要求9-15任一项所述的方法。
PCT/CN2022/113728 2021-09-15 2022-08-19 设备数据的处理方法、装置、电子设备以及存储介质 WO2023040584A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111081211.9A CN113849321A (zh) 2021-09-15 2021-09-15 设备数据的处理方法、装置、电子设备以及存储介质
CN202111081211.9 2021-09-15

Publications (1)

Publication Number Publication Date
WO2023040584A1 true WO2023040584A1 (zh) 2023-03-23

Family

ID=78974034

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/113728 WO2023040584A1 (zh) 2021-09-15 2022-08-19 设备数据的处理方法、装置、电子设备以及存储介质

Country Status (2)

Country Link
CN (1) CN113849321A (zh)
WO (1) WO2023040584A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113849321A (zh) * 2021-09-15 2021-12-28 杭州逗酷软件科技有限公司 设备数据的处理方法、装置、电子设备以及存储介质
CN117676518A (zh) * 2022-08-31 2024-03-08 华为技术有限公司 一种卡片跨设备交互方法及电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104049983A (zh) * 2013-03-11 2014-09-17 联想(北京)有限公司 一种提示信息更新方法、装置和电子设备
US20160004575A1 (en) * 2014-07-02 2016-01-07 Ryan Fink Methods and systems for multiple access to a single hardware data stream
CN112667301A (zh) * 2020-12-31 2021-04-16 智车优行科技(北京)有限公司 车载操作系统的扩展坞实现方法和系统、电子设备
CN113032207A (zh) * 2021-03-02 2021-06-25 广州虎牙科技有限公司 应用进程的监控方法、装置、电子设备及存储介质
CN113849321A (zh) * 2021-09-15 2021-12-28 杭州逗酷软件科技有限公司 设备数据的处理方法、装置、电子设备以及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104049983A (zh) * 2013-03-11 2014-09-17 联想(北京)有限公司 一种提示信息更新方法、装置和电子设备
US20160004575A1 (en) * 2014-07-02 2016-01-07 Ryan Fink Methods and systems for multiple access to a single hardware data stream
CN112667301A (zh) * 2020-12-31 2021-04-16 智车优行科技(北京)有限公司 车载操作系统的扩展坞实现方法和系统、电子设备
CN113032207A (zh) * 2021-03-02 2021-06-25 广州虎牙科技有限公司 应用进程的监控方法、装置、电子设备及存储介质
CN113849321A (zh) * 2021-09-15 2021-12-28 杭州逗酷软件科技有限公司 设备数据的处理方法、装置、电子设备以及存储介质

Also Published As

Publication number Publication date
CN113849321A (zh) 2021-12-28

Similar Documents

Publication Publication Date Title
WO2023040584A1 (zh) 设备数据的处理方法、装置、电子设备以及存储介质
AU2019233201B2 (en) Resource configuration method and apparatus, terminal, and storage medium
WO2018188289A1 (zh) 信息显示方法、装置及终端
CA3101813C (en) Application function implementation method and electronic device
CN109542614B (zh) 资源配置方法、装置、终端及存储介质
WO2019114185A1 (zh) 一种app远程控制方法及相关设备
WO2019228340A1 (zh) 程序优化方法、装置、终端及存储介质
WO2019047189A1 (zh) 消息显示方法、装置及终端
CN112260853B (zh) 容灾切换方法、装置、存储介质及电子设备
CN106658064B (zh) 虚拟礼物展示方法及装置
JP7100154B6 (ja) プロセッサコアのスケジューリング方法、装置、端末及び記憶媒体
WO2022127661A1 (zh) 应用共享方法、电子设备和存储介质
CN113313804B (zh) 一种图像渲染方法、装置、电子设备和存储介质
CN113613064B (zh) 视频处理方法、装置、存储介质及终端
US20210216177A1 (en) Navigation bar controlling method and terminal
WO2021082931A1 (zh) 消息的显示方法及终端设备
CN116089056A (zh) 用于图像绘制的方法及相关装置
US20230409355A1 (en) Method for displaying application interface, device, and storage medium
WO2019047184A1 (zh) 信息显示方法、装置及终端
CN118312118A (zh) 一种增强的屏幕共享方法和系统、电子设备
CN110309454B (zh) 一种界面显示方法、装置、设备及存储介质
WO2022213743A1 (zh) 用户界面的显示方法、装置、设备及存储介质
CN112818143B (zh) 一种页面展示方法、装置、电子设备及存储介质
CN113886070A (zh) 设备信息管理方法、装置、设备及计算机可读存储介质
US20150019645A1 (en) Method and system for application message alerting

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22868958

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE