WO2022135214A1 - 分布式实现方法、分布式系统、可读介质及电子设备 - Google Patents

分布式实现方法、分布式系统、可读介质及电子设备 Download PDF

Info

Publication number
WO2022135214A1
WO2022135214A1 PCT/CN2021/137514 CN2021137514W WO2022135214A1 WO 2022135214 A1 WO2022135214 A1 WO 2022135214A1 CN 2021137514 W CN2021137514 W CN 2021137514W WO 2022135214 A1 WO2022135214 A1 WO 2022135214A1
Authority
WO
WIPO (PCT)
Prior art keywords
capability
electronic device
distributed
application
component
Prior art date
Application number
PCT/CN2021/137514
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 WO2022135214A1 publication Critical patent/WO2022135214A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • 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/48Program initiating; Program switching, e.g. by interrupt
    • 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/04Network management architectures or arrangements
    • H04L41/042Network management architectures or arrangements comprising distributed management centres cooperatively managing the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Definitions

  • the present invention relates to the field of Internet technologies, in particular to a distributed implementation method, a distributed system, a readable medium and an electronic device.
  • the distributed implementation mode can focus on the advantages and disadvantages of various electronic devices to realize a certain function based on the advantages and disadvantages of various electronic devices. Acquisition; for another example, in a man-machine dialogue, among multiple electronic devices, the electronic device with the best sound pickup performance is used to collect the user's voice.
  • the same distributed application 400 is installed on the electronic device A, the electronic device B, and the electronic device C.
  • the distributed application 400 is instant messaging software. If device A uses the instant messaging software 400 to play music, it needs to be downloaded from the electronic device A, In B and C, a device with better playback capability is determined to play music, then the configuration parameters of the playback capability components of the electronic devices A-C need to be sent to the cloud server 200 in advance or the master device selected from the electronic devices A-C (for example, it can be Electronic device B) performs analysis and processing, and then, device A obtains the result of comparison and analysis of the playback capabilities of the above-mentioned electronic devices A-C by the cloud server 200 or main device B, and selects a suitable electronic device (for example, electronic device C) according to the analysis result to execute Music playback task.
  • a suitable electronic device for example, electronic device C
  • a server or a selected master device needs to be used for distributed scheduling, and the scheduling strategies of different distributed applications are generally different.
  • the scheduling strategies of different distributed applications are generally different.
  • it is easy to cause decision errors.
  • a distributed application needs to make decisions and scheduling based on a certain capability advantage of different electronic devices, it may cause the decision-making process. An inaccurate judgment of a certain capability of an electronic device leads to wrong decision-making and the inability to accurately schedule the use of an electronic device with a better capability, which ultimately results in a poor user experience.
  • the embodiments of the present application provide a distributed implementation method, a distributed system, a readable medium, and an electronic device.
  • the various capability components or capabilities of the device are classified, which reduces the dependence of distributed scheduling on different applications.
  • an embodiment of the present application provides a distributed implementation method of an application, which is applied to a distributed system including multiple electronic devices.
  • the method includes: a first electronic device in the distributed system includes multiple applications , wherein a first application in the multiple applications invokes a first capability, and the first electronic device uses a distributed scheduling module independent of the multiple applications based on the first capabilities of the multiple electronic devices performance parameters of a component, at least one electronic device is selected from the plurality of electronic devices to provide the first capability for a first application on the first electronic device; wherein the first capability component is for implementing the first capability A capability component.
  • the distributed scheduling module is implemented independently of the application on the electronic device, and the electronic device decides how to perform the distributed scheduling, regardless of the application.
  • the first application may be a third-party application or a system application of the electronic device.
  • a capability component refers to a component capable of realizing various capabilities of an electronic device, for example, a camera has a shooting capability, a CPU has a computing capability, a microphone has a sound pickup capability, and the like.
  • the multiple electronic devices in the distributed system may include mobile phones and smart speakers, and the first electronic device may be a mobile phone.
  • the first application is a music application
  • the first capability may be playback capability
  • the first capability component is capable of playing Capable components such as power amplifier components.
  • the distributed scheduling module on the mobile phone adopts a unified grading standard to obtain a mobile phone with a playback capability level of 5, a smart speaker with a playback capability level of 6, and a smart speaker with a higher playback capability level.
  • the distributed scheduling module above will select smart speakers to provide playback capabilities for music applications.
  • the operating system of the first electronic device is an Android operating system, and the multiple applications are located in the application layer of the first electronic device, and the distributed scheduling module located in the framework layer or hardware abstraction layer of the first electronic device; or the operating system of the first electronic device is Hongmeng OS, and the multiple applications are located in the application layer of the first electronic device, the distribution The scheduling module is located in the framework layer or system service layer of the first electronic device; or the operating system of the first electronic device is the iOS operating system, and the multiple applications are located in the touchable layer of the first electronic device , the distributed scheduling module is located at the media layer or the core service layer of the first electronic device.
  • the distributed scheduling module for implementing distributed scheduling and the application of the electronic device can be set at different software layers, that is, the distributed scheduling module is independent of each application.
  • the distributed scheduling module is located at the framework layer or hardware abstraction layer, and the application is located at the application layer.
  • the distributed scheduling module may include: a capability grading module for grading the capabilities implemented by each capability component using a unified grading standard, and a capability grading module for selecting the most suitable application from multiple electronic devices
  • a distributed scheduling decision module for electronic devices with required capabilities a distributed device management module for managing the performance parameters of each capability component of each electronic device, and a distributed task decision module for responding to the invocation instruction of the selected electronic device.
  • the distributed scheduling module may further include a distributed soft bus for collecting performance parameters of each capability component of each electronic device in the distributed system.
  • the performance parameters include static performance parameters
  • the above-mentioned method further includes: the distributed scheduling module of the first electronic device selects multiple The electronic device acquires static performance parameters of the first capability component of each electronic device, and classifies the first capability component of each electronic device based on the acquired static performance parameters of the first capability component, to obtain the first capability of each electronic device level; wherein the plurality of electronic devices includes the first electronic device.
  • static performance parameters refer to the performance parameters that the capability components of electronic equipment have stably over a long period of time.
  • the sensor type, aperture, number of cameras, and number of optical zoom segments are static performance parameters
  • the photos taken by the camera are static performance parameters.
  • the storage location does not belong to the static performance parameters of the camera.
  • the device static information of multiple electronic devices in the distributed system refers to the static performance parameters of each capability component on each electronic device.
  • the performance parameter further includes a dynamic performance parameter; and the above-mentioned method further includes: the distributed scheduling module of the first electronic device selects the data from the plurality of Selecting at least one electronic device among the electronic devices to provide a first capability for the first application: the distributed scheduling module of the first electronic device is based on the first capability level of each electronic device and the first capability level of each electronic device The dynamic performance parameter of the first capability component, at least one electronic device is selected from the plurality of electronic devices to provide the first capability for the first application.
  • the distributed scheduling module is based on both the static performance parameters and dynamic performance parameters of each electronic device capability component, where the dynamic performance parameter refers to the capability component of the electronic device at a certain time.
  • the state parameter of for example, for a camera, the dynamic performance parameter may refer to the state parameter that the called camera is being occupied by the video calling application when it is called by the camera application.
  • the device dynamic information of multiple electronic devices in the distributed system includes dynamic performance parameters of each capability component on each electronic device.
  • the distributed scheduling module on the mobile phone needs to comprehensively consider the device dynamic information of electronic devices such as mobile phones and smart speakers when selecting electronic devices that provide playback capabilities for music applications ( That is, dynamic performance parameters), if the device dynamic information of the smart speaker indicates that its power is insufficient, even if the playback capability level of the smart speaker is higher, considering the playback duration, the distributed scheduling module will select a mobile phone with more sufficient power as music The app's playback device.
  • the first capability includes at least one of the following: computing capability, sound pickup capability, security capability, display capability, playback capability, photographing capability, and storage capability.
  • the capabilities of the electronic devices in the distributed system that need to be invoked are also different.
  • the first capability required by a music application running on the mobile phone is playback capability
  • the first capability required by a video application running on the mobile phone may be display capability
  • the first capability required by a camera application running on the mobile phone may be taking pictures ability etc.
  • the first capability required by the navigation application running on the mobile phone in the process of planning the user's route may be computing power, and when the user starts the in-vehicle computer and is about to enter the driving state, the first capability required by the navigation application running on the mobile phone is the computing power.
  • the capability may be the display capability. In this case, it may be preferable to use the on-board computer screen with a larger screen size and easy viewing as the display device.
  • the method further includes: the static performance parameter includes a configuration parameter of the first capability component, and in the case that the first capability is a computing capability, the The first capability component includes at least one of a central processing unit, a graphics processor, and an image signal processor, wherein the configuration parameters of the first capability component include at least one of processor architecture, number of cores, and random access memory space.
  • the configuration parameters of the first capability component include at least one of the configuration and quantity of microphones, the model and quantity of the speech recognition chip; when the first capability is In the case of security capability, the configuration parameters of the first capability component include trusted execution environment parameters; in the case where the first capability is display capability, the configuration parameters of the first capability component include display screen resolution, At least one of frequency, power, and screen size; when the first capability is playback capability, the configuration parameters of the first capability component include frequency response range, signal-to-noise ratio, and separation of the power amplifier.
  • the configuration parameters of the first capability component include at least one of sensor type, aperture, number of cameras, and number of optical zoom segments; in the first capability
  • the configuration parameter of the first capability component includes at least one of the type, quantity and capacity space of the read-only memory.
  • configuration parameters on which the capability component classification of the electronic device is based are not limited to the configuration parameters of each capability component corresponding to each capability listed above.
  • the dynamic performance parameter includes at least one of the following parameters: a currently invoked state parameter of the first capability component; a currently available resource of the first capability component parameter; the remaining power parameter of the electronic device to which the first capability component belongs.
  • the dynamic performance parameters on which the distributed scheduling module performs distributed scheduling include dynamic performance parameters of capability components and dynamic performance parameters of electronic devices.
  • the device dynamic information that is, the dynamic performance parameters of electronic devices such as mobile phones, smart speakers, and portable computers in the distributed system affects the decision selection result of the distributed task decision module to a certain extent.
  • the distributed task decision module When the CPU on the portable computer (with the highest CPU computing power level) selected by the distributed task decision module is currently in the called state, or when the available resources are insufficient (for example, the CPU is running at full load), or the current remaining power of the portable computer When it is insufficient, the distributed task decision module will select the CPU of a mobile phone with a lower CPU computing power level to provide CPU computing power.
  • the plurality of electronic devices in the distributed system all have the distributed scheduling module.
  • Each distributed scheduling module in the plurality of electronic devices has the same grading standard for the same capability component on each electronic device.
  • Each distributed scheduling module in the plurality of electronic devices has the same distributed scheduling strategy for the same capability component on each electronic device, wherein the distributed scheduling strategy is that the first electronic device selects from the plurality of electronic devices.
  • a policy for at least one electronic device to provide the first capability to a first application on the first electronic device is selected.
  • electronic devices such as mobile phones, smart speakers, and portable computers in the distributed system all have distributed scheduling modules.
  • the distributed scheduling module on each electronic device has unified grading standards for the same capability components on each electronic device, and the distributed scheduling strategy used in scheduling decisions is also the same. Therefore, for music applications running on electronic devices such as mobile phones, The results of scheduling decisions for electronic devices such as mobile phones, smart speakers, and portable computers in the distributed system are the same.
  • the above method further includes: the distributed scheduling module of the first electronic device acquires the static performance parameters of the first capability components of each electronic device from the plurality of electronic devices, and sharing the acquired static performance parameters with a second electronic device among the plurality of electronic devices.
  • the mobile phone among multiple electronic devices such as mobile phones, smart speakers, and portable computers in the distributed system, only the mobile phone has a distributed scheduling module, and the mobile phone can transfer the mobile phone,
  • the device static information ie, static performance parameters
  • the device static information ie, static performance parameters of multiple electronic devices such as smart speakers and portable computers is shared with other electronic devices such as smart speakers and portable computers in the distributed system.
  • the above-mentioned method further includes: the distributed scheduling module of the first electronic device acquires the first capability component of each electronic device from a plurality of electronic devices in the distributed system static performance parameters, and grade the first capability components of each electronic device based on the acquired static performance parameters of the first capability component to obtain the first capability level of each electronic device; the first electronic device reports to the multiple The obtained first capability level of each electronic device is shared by the second electronic device in the plurality of electronic devices.
  • the mobile phone among multiple electronic devices such as mobile phones, smart speakers, and portable computers in the distributed system, only the mobile phone has a distributed scheduling module, and the mobile phone can obtain the mobile phone, smart speakers through the distributed scheduling module.
  • equipment static information i.e., static performance parameters
  • the mobile phone classify the capability of each capability component on each electronic device to obtain the capability corresponding to each capability component on each electronic device grade.
  • the mobile phone then shares the obtained capability level corresponding to each capability component on each electronic device, such as the mobile phone, smart speakers, and portable computers, to other electronic devices such as smart speakers and portable computers in the distributed system.
  • an embodiment of the present application provides an application distributed system, the system includes multiple electronic devices, and a first electronic device in the multiple electronic devices includes multiple applications, wherein the first electronic device The device is configured to, when the first application of the first electronic device invokes the first capability, use a distributed scheduling module on the first electronic device that is independent of the multiple applications, and based on the first capability of the multiple electronic devices A performance parameter of a capability component, at least one electronic device is selected from the plurality of electronic devices to provide the first capability for a first application on the first electronic device; wherein the first capability component is for implementing the Describe the components of the first capability.
  • the distributed scheduling module is implemented independently of the application on the electronic device, and the electronic device decides how to perform the distributed scheduling, regardless of the application.
  • the first application may be a third-party application or a system application of the electronic device.
  • a capability component refers to a component capable of realizing various capabilities of an electronic device, such as a camera having shooting capability, a CPU having computing capability, and a microphone having sound pickup capability, etc.
  • the operating system of the first electronic device is an Android operating system
  • the multiple applications are located in the application layer of the first electronic device
  • the The distributed scheduling module is located at the framework layer or hardware abstraction layer of the first electronic device; or the operating system of the first electronic device is Hongmeng OS, and the multiple applications are located at the application layer of the first electronic device , the distributed scheduling module is located in the framework layer or the system service layer of the first electronic device; or the operating system of the first electronic device is the iOS operating system, and the multiple applications are located in the first electronic device
  • the touchable layer of the first electronic device, the distributed scheduling module is located in the media layer or the core service layer of the first electronic device.
  • the distributed scheduling module for implementing distributed scheduling and the application of the electronic device can be set at different software layers, that is, the distributed scheduling module exists independently of each application.
  • the distributed scheduling module is located at the framework layer or hardware abstraction layer, and the application is located at the application layer.
  • the performance parameters include static performance parameters; and the distributed scheduling module of the first electronic device is configured to Each electronic device acquires the static performance parameters of the first capability component of each electronic device, and classifies the first capability component of each electronic device based on the acquired static performance parameters of the first capability component, and obtains the first capability component of each electronic device.
  • a capability level wherein the plurality of electronic devices includes the first electronic device.
  • static performance parameters refer to the performance parameters that the capability components of electronic equipment have stably over a long period of time.
  • the sensor type, aperture, number of cameras, and number of optical zoom segments are static performance parameters
  • the photos taken by the camera are static performance parameters.
  • the storage location does not belong to the static performance parameters of the camera.
  • the performance parameter further includes a dynamic performance parameter; and the distributed scheduling module of the first electronic device is configured to At least one electronic device is selected from among the electronic devices to provide the first capability for the first application: the distributed scheduling module of the first electronic device is based on the first capability level of the electronic devices and all the electronic devices.
  • the dynamic performance parameter of the first capability component is selected, and at least one electronic device is selected from the plurality of electronic devices to provide the first capability for the first application.
  • the distributed scheduling module is based on both the static performance parameters and dynamic performance parameters of each electronic device capability component, where the dynamic performance parameter refers to the capability component of the electronic device at a certain time.
  • the state parameter of for example, for a camera, the dynamic performance parameter may refer to the state parameter that the called camera is being occupied by the video calling application when it is called by the camera application.
  • the first capability includes at least one of: computing capability, sound pickup capability, security capability, display capability, playback capability, photographing capability, and storage capability .
  • the static performance parameter includes a configuration parameter of the first capability component, and if the first capability is a computing capability, the first capability A capability component includes at least one of a central processing unit, a graphics processor, and an image signal processor; wherein, the configuration parameters of the first capability component include at least one of processor architecture, number of cores, and random access memory space ;
  • the configuration parameters of the first capability component include at least one of the microphone configuration and quantity, the model and quantity of the speech recognition chip; when the first capability is a safety
  • the configuration parameters of the first capability component include trusted execution environment parameters; in the case where the first capability is display capability, the configuration parameters of the first capability component include display screen resolution, frequency at least one of , power, and screen size; when the first capability is playback capability, the configuration parameters of the first capability component include at least one of the frequency response range, signal-to-noise ratio, and separation of the power amplifier Item;
  • configuration parameters on which the capability component classification of the electronic device is based are not limited to the configuration parameters of each capability component corresponding to each capability listed above.
  • the dynamic performance parameter includes at least one of the following parameters: a current called state parameter of the first capability component; the first capability component parameters of the currently available resources; parameters of the remaining power of the electronic device to which the first capability component belongs.
  • the plurality of electronic devices in the distributed system all have the distributed scheduling module.
  • Each distributed scheduling module in the plurality of electronic devices has the same grading standard for the same capability component on each electronic device.
  • Each distributed scheduling module in the plurality of electronic devices has the same distributed scheduling strategy for the same capability component on each electronic device, wherein the distributed scheduling strategy is that the first electronic device selects from the plurality of electronic devices.
  • a policy for at least one electronic device to provide the first capability to a first application on the first electronic device is selected.
  • electronic devices such as mobile phones, smart speakers, and portable computers in the distributed system all have distributed scheduling modules.
  • the distributed scheduling module on each electronic device has unified grading standards for the same capability components on each electronic device, and the distributed scheduling strategy used in scheduling decisions is also the same. Therefore, for music applications running on electronic devices such as mobile phones, The results of scheduling decisions for electronic devices such as mobile phones, smart speakers, and portable computers in the distributed system are the same.
  • the distributed scheduling module of the first electronic device is further configured to acquire the static performance of the first capability component of each electronic device from the plurality of electronic devices parameters, and share the acquired static performance parameters with the second electronic device in the plurality of electronic devices.
  • the mobile phone among multiple electronic devices such as mobile phones, smart speakers, and portable computers in the distributed system, only the mobile phone has a distributed scheduling module, and the mobile phone can transfer the mobile phone,
  • the device static information ie, static performance parameters
  • the device static information ie, static performance parameters of multiple electronic devices such as smart speakers and portable computers is shared with other electronic devices such as smart speakers and portable computers in the distributed system.
  • the distributed scheduling module of the first electronic device is further configured to acquire the static performance of the first capability component of each electronic device from the plurality of electronic devices parameters, and grade the first capability components of each electronic device based on the acquired static performance parameters of the first capability component, so as to obtain the first capability level of each electronic device, and the first electronic device is also used to provide information to all electronic devices.
  • the obtained first capability level of each electronic device is shared by the second electronic device in the plurality of electronic devices.
  • the mobile phone among multiple electronic devices such as mobile phones, smart speakers, and portable computers in the distributed system, only the mobile phone has a distributed scheduling module, and the mobile phone can obtain the mobile phone, smart speakers through the distributed scheduling module.
  • equipment static information i.e., static performance parameters
  • the mobile phone classify the capability of each capability component on each electronic device to obtain the capability corresponding to each capability component on each electronic device grade.
  • the mobile phone then shares the obtained capability level corresponding to each capability component on each electronic device, such as the mobile phone, smart speakers, and portable computers, to other electronic devices such as smart speakers and portable computers in the distributed system.
  • an embodiment of the present application provides a computer-readable storage medium, where instructions are stored on the storage medium, and when the instructions are executed on a computer, the computer executes the distributed implementation method of the above application.
  • an embodiment of the present application provides an electronic device, the electronic device includes: one or more processors; one or more memories; wherein the one or more memories store one or more programs, When the one or more programs are executed by the one or more processors, the electronic device is caused to execute the distributed implementation method of the above application.
  • an embodiment of the present application provides a computer program product, including a computer program/instruction, when the computer program/instruction is executed by a processor, a distributed implementation method of the above application is implemented.
  • FIG. 1 is a schematic diagram of a distributed implementation scenario applied in the prior art.
  • FIG. 2 shows a schematic diagram of a scenario in which multiple electronic devices form a virtual hyperterminal according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a system block diagram of a distributed operating system 300 applied on an electronic device according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of capability components included in the capability framework in the distributed system provided by the embodiment of the present application.
  • FIG. 5 shows a schematic diagram of some capability levels and a distributed decision-making process in a unified grading standard based on configuration parameters of capability components of electronic devices in a distributed system according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a distributed implementation scenario of a navigation application according to Embodiment 1 of the present application.
  • FIG. 7 is a schematic flowchart of a distributed implementation method of a navigation application according to Embodiment 1 of the present application.
  • FIG. 8 is a schematic diagram of a reminder interface for interacting with a user according to an embodiment of the present application.
  • FIG. 9 shows a schematic diagram of a distributed implementation scenario of a voice assistant application and a music application according to Embodiment 2 of the present application.
  • FIG. 10 is a schematic flowchart of a distributed implementation method for a voice assistant application and a music application according to Embodiment 2 of the present application.
  • FIG. 11 shows a schematic diagram of a distributed implementation scenario of a photographing application according to Embodiment 3 of the present application.
  • FIG. 12 is a schematic flowchart of a distributed implementation method of a photographing application according to Embodiment 3 of the present application.
  • FIG. 13 is a schematic diagram showing a decision-making process of a distributed implementation of a photographing application according to Embodiment 3 of the present application.
  • FIG. 14 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present application.
  • the present application provides a distributed implementation method of an application.
  • a distributed system such as a virtual hyperterminal
  • the operation installed on each electronic device There is an application-independent distributed scheduling module in the system.
  • the distributed scheduling module can classify each capability component or capability of each electronic device according to a unified capability classification standard, which reduces the dependence of distributed scheduling on different applications.
  • the distributed scheduling module can select the best electronic device for the application to realize the capability required by the application according to a unified scheduling policy.
  • the capability grading standards are unified, and there is no misjudgment of decision-making due to different capability grading standards for different electronic devices.
  • the electronic device decides how to perform distributed scheduling. It has nothing to do with the application.
  • the scheduling strategy of each electronic device is consistent and implemented by the operating system. equipment, thereby avoiding the problem that different applications have different scheduling strategies in the prior art, and decision errors are prone to occur during interaction between applications.
  • the distributed capability grading and distributed scheduling of the present application are both implemented by the operating system of the electronic device, for some applications that do not have distributed functions themselves, the distributed functions can also be implemented by relying on the operating system of the electronic device.
  • the technical solution of the present application will be described by taking a distributed system composed of multiple electronic devices—virtual hyperterminal as an example.
  • FIG. 2 shows a schematic diagram of a scenario in which multiple electronic devices form a virtual hyperterminal according to an embodiment of the present application.
  • a virtual hyperterminal 1000 is composed of a plurality of electronic devices 100 (eg, electronic devices 100-1 to 100-n).
  • the electronic devices in the virtual hyperterminal 1000 can be regarded as a whole, that is, an application running on any electronic device among the electronic devices 100-1 to 100-n can call the virtual hyperterminal to implement a certain function.
  • Relevant resources of one or more electronic devices in 1000 that are suitable for performing the function. Since each electronic device in the virtual hyperterminal 1000 is provided with the same module for realizing distributed invocation, each electronic device follows the same capability classification standard and distributed scheduling strategy.
  • the modules called by the method are all set in the non-application layer (such as the framework layer or the system service layer) of the operating system of each electronic device, so when each application (including system application and third-party application) on the electronic device needs to implement a certain function, it is not necessary to Participate in the collection of performance parameters of each device, the grading of various capabilities of electronic devices, and the decision-making of distributed invocation, just send the functions to be implemented to the module that implements distributed invocation. That is, in the technical solution of the present application, the realization of each application on each electronic device that constitutes the virtual hyperterminal 1000 is not restricted by the application type and device type, effectively avoiding the distributed decision-making errors described above, and greatly improving the performance of the application. Efficiency of distributed decision making.
  • the modules that implement distributed calls on the electronic device 100-1 are pre-based on a unified The capability classification standard classifies the playback capabilities of other electronic devices in the virtual hyperterminal 1000, so the music APP of the electronic device 100-1 sends the demand for music playback to the electronic device 100-1 that implements distributed calls
  • the module decides the electronic device that is most suitable for realizing the music playback function based on the existing distributed calling strategy. For example, the electronic device 100-3 is selected.
  • the device is a smart speaker.
  • the above electronic device 100 includes but is not limited to laptop computers, desktop computers, tablet computers, smart speakers, mobile phones, wearable devices, head-mounted displays, large-screen display devices (including large-screen TVs, large-screen displays, etc. ), in-vehicle computers, in-vehicle voice navigation and other in-vehicle intelligent systems, as well as intelligent robots, portable music players, reader devices, and other electronic devices capable of accessing a network with one or more processors embedded or coupled therein. For example, in the scenario shown in FIG.
  • the electronic devices 100-1 to 100-n may include a portable computer 100-1, a vehicle-mounted computer 100-2, a smart speaker 100-3, a mobile phone 100-4, an electronic screen 100-5, etc.
  • the multi-electronic device scenario to which the technical solution of the present application is applicable may include any number of electronic devices, and is not limited to the five in the above example.
  • a distributed operating system is installed on at least one electronic device in the virtual hyperterminal 1000, and the distributed operating system has the above-mentioned distributed scheduling module, which can classify various capabilities of each electronic device according to a unified capability classification standard.
  • the distributed scheduling module can classify various capabilities of each electronic device according to a unified capability classification standard.
  • an application invokes a certain capability, it can select the best electronic device for realizing the required capability for the application according to a unified scheduling strategy for each electronic device.
  • the distributed decision-making and dispatching center of the virtual hyperterminal 1000 can be any electronic device with a distributed operating system installed in the virtual hyperterminal 1000.
  • the following embodiments mainly use the mobile phone 100- 4 is described as an example of a distributed decision scheduling center.
  • the distributed operating system will be described in detail below with reference to FIG. 3 .
  • the operating system installed on the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiment of the present invention of the electronic device 100 uses a distributed operating system with a layered architecture as an illustrative example, which is not limited herein.
  • FIG. 3 shows an exemplary system block diagram of a distributed operating system 300 installed on the electronic device 100 .
  • the electronic devices 100 are interconnected through an underlying network.
  • the underlying network includes but is not limited to distributed soft bus, wireless fidelity (Wireless-Fidelity, WIFI), wireless local area network (Wireless Local Area Network, WLAN), Bluetooth (Bluetooth, BT), Near Field Communication (Near Field Communication) , NFC), etc., which are not limited here.
  • each electronic device 100 is subject to unified authorization and authentication by the user, that is, the electronic devices 100 are mutually trusted devices.
  • each electronic device 100 can perform PIN code authentication, face recognition authentication, fingerprint authentication, voice
  • the unified authorization and authentication are completed through tattoo authentication, etc., and there are no restrictions here.
  • the distributed operating system 300 installed on each electronic device 100 adopts a layered architecture.
  • the layered architecture divides the distributed operating system 300 into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the distributed operating system 300 is divided into four layers, which are an application layer 310 , an application framework layer 320 , a system service layer 330 and a kernel layer 340 from top to bottom.
  • the distributed operating system 300 may also be divided into other numbers of hierarchical structures, which are not limited herein.
  • the application layer 310 may include a series of application programs such as a system application 311, an extension application 312 (or a third-party application).
  • the distributed implementation method of the application provided by this application is applicable to the capability invocation of each application (including the system application 311 and the extended application 312 ) in the application layer 310 .
  • System applications 311 include desktop, settings, cameras, wireless local area network (Wireless Local Area Networks, WLAN), Bluetooth, navigation, etc.; extended applications 312 include photo applications (such as Meipai, Jimeng, etc.), navigation applications (such as AutoNavi Maps, Software applications developed by third parties such as Baidu Maps, etc.), music applications (such as Kugou Music, NetEase Cloud Music, etc.).
  • the application framework layer 320 provides a multilingual framework for the application layer 310, including an interface (User Interface, UI) framework 321, a user program framework 322 and a capability framework 323, as well as a multilingual framework application programming interface (application programming interface, API) and various Framework API for programming languages.
  • UI User Interface
  • API application programming interface
  • the application framework layer 320 includes some predefined functions.
  • the UI framework 321 includes a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc., which will not be repeated here.
  • the user program framework 322 and the capability framework 323 are multilingual frameworks provided by the application framework layer for the application program, for example, the capability level of each capability component required by the application is provided for the application program, that is, these capability components are used to realize various applications of the application layer. Program function. As shown in FIG.
  • the capability framework 323 may include, but is not limited to, computing capabilities (which may include CPU computing power, Graphics Processing Unit (GPU) computing power, Image Signal Processor (ISP) computing power, etc.), sound pickup capability (which may include microphone pickup capability, voice recognition capability, etc.), security capability in equipment security protection (which may include trusted operating environment security level, etc.), display capability (which may include screen resolution, screen size, etc.), playback capability (including amplification capability, stereo effect capability, etc., and storage capability (which may include device memory capability, random access memory (RAM) capability, etc.), etc., which are not limited here. .
  • computing capabilities which may include CPU computing power, Graphics Processing Unit (GPU) computing power, Image Signal Processor (ISP) computing power, etc.
  • sound pickup capability which may include microphone pickup capability, voice recognition capability, etc.
  • security capability in equipment security protection which may include trusted operating environment security level, etc.
  • display capability which may include screen resolution, screen size, etc.
  • playback capability including amplification capability, stereo effect capability, etc
  • the system service layer 330 is the core of the distributed operating system 300 , and the system service layer 330 provides services to the application programs in the application layer 310 through the application framework layer 320 .
  • the system service layer 330 includes a distributed device management module 331 , a capability classification module 332 , a distributed task decision module 333 , a virtual device management module 334 and a distributed soft bus 335 .
  • the distributed device management module 331 is used for device static information such as configuration parameters of each capability component of each electronic device 100 interconnected through the underlying network, as well as device dynamic information such as current operation and use status data of each capability component of each electronic device 100 Information is centrally managed. As described above, the device static information and device dynamic information centrally managed by the distributed device management module 331 are collected based on the underlying network (eg, the distributed soft bus 335 ).
  • the capability classification module 332 is configured to use a unified capability classification standard to classify capability of each capability component of each electronic device 100 .
  • a unified capability classification standard In the unified grading standard, several grades are set for each capability, wherein each grade corresponds to a range of configuration parameters of the capability component. Therefore, under the unified grading standard, each capability component of each electronic device 100 can obtain a corresponding capability level based on its configuration parameters.
  • the unified grading standard is beneficial to uniformly describe the capability level of each capability component between different electronic devices, and provides a decision basis for the distributed task decision module 333 to make quick decisions.
  • the classification standard of CPU computing power there are 18 capability levels in the classification standard of CPU computing power.
  • the CPU configuration parameters based on the mobile phone 100-4, the portable computer 100-1 and the electronic screen 100-5 pass through the capability classification module 332, respectively.
  • the unified grading standard in the three CPU computing power components can be obtained.
  • the unified grading standard shown in Fig. 5 and the decision scheduling process based on the grading standard will be introduced in detail below, and will not be repeated here.
  • the distributed task decision module 333 is used to respond to the task requirements of the application, and screen the corresponding capability components based on the task requirements of the application, and compare and analyze the capability levels of the selected capability components. 100 device dynamic information to make a decision, and finally decide to select a capability component with a better capability level and no other applications occupied, after that, the distributed task decision module 333 sends a call to the capability component to the electronic device 100 to which the selected capability component belongs instruction, the electronic device 100 runs the capability component to execute the relevant application task after receiving the calling instruction.
  • the virtual device management module 334 is configured to respond to the calling instruction sent by the distributed task decision module 333, and run the called capability component on the electronic device 100 to which it belongs to execute the task of the above application.
  • the distributed soft bus 335 is used to collect device static information such as configuration parameters of each capability component of each electronic device 100, and device dynamic information of each electronic device 100, including the current operation and use of each capability component status data, etc. Among them, for the understanding of the functions of the distributed soft bus 335, reference may be made to the computer hardware bus.
  • the distributed soft bus 335 is connected to 1+8+N devices (1 is a mobile phone; 8 is a car, a speaker, a headset, a watch, a wristband, a tablet, a large screen, a personal computer (PC), an augmented reality (Augmented Reality, AR), Virtual Reality (Virtual Reality, VR); N generally refers to an "invisible" bus between other Internet of Things (Internet of Things, IOT) devices), which has automatic discovery, instant connection and use , Ad-hoc network (heterogeneous network networking), high bandwidth, low delay, high reliability. That is to say, through the distributed soft bus technology, the electronic devices 100 can not only share all data, but also realize instant interconnection with any device in the same local area network or connected to them through Bluetooth. In addition, the distributed soft bus 335 can also share files between heterogeneous networks such as Bluetooth and Wireless-Fidelity (WIFI) (for example, receiving files through Bluetooth on the one hand, and transferring files through WIFI on the other hand).
  • WIFI Wireless-Fide
  • the UI framework 321, the user program framework 322, and the capability framework 323 in the application framework layer 320 and the distributed device management module 331, the capability classification module 332, the distributed device management module 331, the capability classification module 332, the distribution The distributed task decision module 333 , the virtual device management module 334 and the distributed soft bus 335 may together constitute a system basic capability subsystem set, which is not limited here.
  • Kernel layer 340 is the layer between hardware and software.
  • the kernel layer of the distributed operating system 300 includes: a kernel subsystem 341 and a driver subsystem 342 .
  • the kernel subsystem 341 can adopt a multi-kernel design between the distributed operating system 300, so the kernel subsystem 341 supports selecting an appropriate OS kernel for different resource-constrained devices.
  • the Kernel Abstract Layer (KAL) on the kernel subsystem 341 provides basic kernel capabilities to the upper layer by shielding the multi-kernel differences, including process/thread management, memory management, file system, network management, and peripheral management.
  • the drive framework (HDF) of the drive subsystem 342 of the distributed operating system 300 is the open foundation of the hardware ecology of the distributed system, and provides a unified peripheral access capability and a drive development and management framework.
  • the kernel layer 340 at least includes a display driver, a camera driver, an audio driver, and a sensor driver.
  • the electronic devices 100 constituting the virtual hyperterminal 1000 include a portable computer 100-1, an in-vehicle computer 100-2, a smart speaker 100-3, a mobile phone 100-4, and an electronic screen 100-5, wherein,
  • the above-mentioned distributed operating system 300 is installed on the above-mentioned electronic device 100 .
  • the unified grading standard adopted by the capability grading module 332 in the distributed operating system 300 may be classified according to different capability components and graded for each type of capability components, or may be classified according to different capability types and each type of The capability components under the capability type are classified into a unified level, which is not limited here.
  • At least one of the electronic devices 100 constituting the virtual hyperterminal 1000 is installed with the above-mentioned distributed operating system 300, and the electronic device 100 with the distributed operating system 300 installed is used as the virtual hyperterminal 1000
  • the distributed decision-making and scheduling center in the system completes the distributed implementation of the application.
  • the device static information (such as capability component configuration parameters) of the electronic device 100 may include but not limited to CPU configuration parameters (such as CPU architecture, number of cores, random access memory (Random Access Memory, RAM) space size) etc.), storage configuration parameters (such as Read Only Memory (ROM) space size, etc.), security configuration parameters (such as whether there is a Trusted Execution Environment (Trusted Execution Environment, TEE), etc.), playback configuration parameters (such as frequency response range, signal-to-noise ratio, resolution, etc.) and display configuration parameters (such as display screen resolution, screen size, etc.).
  • CPU configuration parameters such as CPU architecture, number of cores, random access memory (Random Access Memory, RAM) space size
  • storage configuration parameters such as Read Only Memory (ROM) space size, etc.
  • security configuration parameters such as whether there is a Trusted Execution Environment (Trusted Execution Environment, TEE), etc.
  • playback configuration parameters such as frequency response range, signal-to-noise ratio, resolution, etc.
  • the unified grading standard adopted by the capability grading module 332 in the distributed operating system 300 may include, but is not limited to: CPU computing power level 0-18, storage capability level 0-12, security capability level 0-8 level, level 0-23 playback ability level, and level 0-15 display ability level, etc. It can be understood that the configuration parameters of the capability component of the electronic device 100 above determine the capability level of the capability component. For the same capability component, the higher the configuration parameter, the higher the corresponding capability level.
  • CPU configuration parameters including CPU architecture, number of cores, frequency, cache memory, etc. determine the CPU computing power level
  • security configuration parameters including operating system version, whether it has TEE, supports hardware or software key algorithm, whether there is Anti-physical attack methods, etc.
  • display configuration parameters including display screen resolution, frequency, power, screen size, etc.
  • the capability level can be set according to the configuration parameter range of each capability component, wherein each capability level corresponds to a configuration parameter range; the capability level can also be set according to the comprehensive performance scoring range of each capability component, in which each capability level corresponds to a range of configuration parameters. Each ability level corresponds to a comprehensive performance score range.
  • the capability level settings of each capability component can be set in sequence in the order of natural numbers (for example, the capability levels are 1, 2, 3, 4, 5, 6, etc.) When setting the capability level, some capability levels are reserved and jump to a higher level.
  • the reserved part of the capability level is mainly to consider the situation that there may be a large gap in the configuration parameters of the capability component configuration parameters sampled when the capability level is set. It is objectively impossible for the parameters to cover the configuration parameters of the capability component of all electronic devices, so some capability levels are reserved to supplement capability levels corresponding to the range of configuration parameters that are not currently collected. For example, as shown in FIG. 5 , the capability levels corresponding to the security capabilities may be 1, 5, 6, 7, 8, etc., and 2, 3, and 4 are reserved in the middle.
  • the capability level setting of each capability component in the unified classification standard is not limited here.
  • the display capability can be set to 15 levels from small to large screen size.
  • Grade 1 5 inches to 10 inches is grade 2
  • 10 inches to 15 inches is grade 3
  • so on 45 inches to 50 inches is grade 10
  • 70 to 75 inches is grade 15.
  • Set the capability level according to the comprehensive performance scoring range of each capability component For example, setting the capability level for the CPU computing power can be done by comprehensively scoring the CPU computing power (for example, by running the multi-threaded running score of the CPU through the benchmarking software to obtain the comprehensive CPU score) , and then set 18 capability levels for CPU computing power based on the comprehensive score of CPU computing power.
  • the CPU comprehensive score is 0 level below 5000 points, 1 level within the range of (5000, 10000), and (10000, Within the range of 15000), it is level 2, within the range of (15000, 20000) is level 3, and so on, to get 18 levels of CPU computing power classification.
  • the display capability level can be adaptively expanded by one or more levels.
  • each capability component of each electronic device 100 may be marked with a corresponding capability level mark for use in distributed task decision-making in the distributed operating system 300
  • Module 331 serves as a decision basis.
  • the distributed task decision module 331 decides and selects, on the one hand, it depends on the capability level of each capability component, and on the other hand, it also depends on the device dynamic information of each electronic device 100, mainly including the current occupancy status information of each capability component.
  • the capability levels corresponding to each capability component of each electronic device 100 are respectively: portable computer 100-1 (CPU computing power level 7, GPU computing power level 7, sound pickup capability level 4, photographing capability level 5, storage capability level 6) , security capability level 5, playback capability level 5, display capability level 3); vehicle computer 100-2 (CPU computing power level 5, GPU computing power level 2, sound pickup capability level 4, camera capability level 0, storage capability level 3 , security capability level 0, playback capability level 5, display capability level 3); smart speakers 100-3 (CPU computing power level 2, GPU computing power level 0, sound pickup capability level 6, camera capability level 0, storage capability level 3 , security capability level 0, playback capability level 6, display capability level 0); mobile phone 100-4 (CPU computing power level 6, GPU computing power level 6, sound pickup capability level 6, camera capability level 7, storage capability level 5, Level 5 security capability, level 5 playback capability, level 2 display capability); electronic screen 100-5 (level 4 CPU computing power, level 4 GPU computing power, level 3 sound pickup capability, level 3 camera capability, level 3 storage capability, Security capability level 0, playback capability level 4, display capability level 10).
  • portable computer 100-1 CPU
  • the distributed task decision module 331 can quickly decide and select a better capability component based on the capability levels of the above capability components and the task requirements of the application. For example, when the application requires large computing power, and the laptop computer 100-1 in the virtual hyperterminal 1000 has the highest CPU computing power and GPU computing instance level, the distributed task decision module 331 will preferably select the portable computer 100-1 first.
  • the CPU of 1 one of the computing power components
  • the display capability level of the electronic screen 100-5 in the virtual hyperterminal 1000 is the highest, and the distributed task decision module 331 will preferentially select the electronic screen 100.
  • the display screen (display capability part) of -5 performs display tasks.
  • this embodiment will introduce the distributed implementation method of the application of the present application through the distributed implementation scenario of the navigation application.
  • FIG. 6 shows a distributed implementation scenario of a navigation application.
  • the electronic devices 100 constituting the virtual hyperterminal 1000 include an on-board computer 100-2 and a mobile phone 100-4.
  • the distributed operating system 300 is installed on the mobile phone 100-2 and the mobile phone 100-4, and the two have completed the authorization and authentication of the same user and are mutually trusted devices, and the navigation application is running on the mobile phone 100-4.
  • the mobile phone 100-4 can decide to select the most suitable display capability component based on the task requirements of the running navigation application, which is the in-vehicle computer 100-2. and call the display screen of the on-board computer 100-2 to perform the task of displaying the navigation interface of the navigation application, so that the user can better use the functions of the navigation application while the car is driving. will start running on its own.
  • the mobile phone 100-4 is used as the decision-making and scheduling center in the virtual hyperterminal 1000 to perform decision-making and scheduling as an example for description.
  • the illustrated process takes the mobile phone 100-4 as the main body of implementation.
  • the distributed implementation method based on the application of the above-mentioned distributed operating system 300 includes the following steps:
  • the mobile phone 100-4 collects device static information and device dynamic information such as configuration parameters of each capability component of each electronic device 100 for centralized management.
  • the mobile phone 100-4 can collect the configuration parameters of each capability component of the in-vehicle computer 100-2 through the distributed soft bus 335 (for example, the architecture of the CPU, the number of cores in the computing capability component of the in-vehicle computer 100-2 , cache memory and other configuration parameters; the screen size, frequency, resolution and other configuration parameters of the display screen in the display capability component of the on-board computer 100-2, refer to FIG. 5 and related descriptions), the distributed operating system 300 of the mobile phone 100-4
  • the distributed device management module 331 in the device centrally manages the collected capability component configuration parameters, wherein the centralized management capability component configuration parameters also include the capability component configuration parameters of the mobile phone 100-4 itself.
  • the mobile phone 100-4 can collect the device dynamic information of itself and the on-board computer 100-2 through the distributed soft bus 335, including but not limited to the power information of itself and the on-board computer 100-2, the running application information and the running The running information of the capability components currently occupied by the application in the .
  • the in-vehicle computer 100-2 is connected to the power supply circuit in the car to supply power, so the in-vehicle computer 100-2 can always maintain a state of sufficient power.
  • the in-vehicle computer 100-2 installed with the distributed operating system 300 can also perform this step 701 as the virtual hyperterminal 1000, which is not limited herein.
  • the mobile phone 100-4 uses a unified classification standard to perform capability classification on each capability component of each electronic device 100 to determine the capability level of each capability component.
  • the capability classification module 332 in the distributed operating system 300 of the mobile phone 100-4 can obtain the capability level of each capability component by referring to the unified classification standard for the configuration parameters of each capability component.
  • the capability levels of the mobile phone 100-4 that can obtain part of the capability components of itself and the in-vehicle computer 100-2 are: the in-vehicle computer 100-2 (CPU computing power level 5, storage capability level 3, playback capability level 5) mobile phone 100-4 (CPU computing power level 6, storage capability level 5, playback capability level 5, display capability level 2), mobile phone 100-4 can mark each capability component that has completed capability classification. The corresponding ability level will not be repeated here.
  • the mobile phone 100-4 can also directly obtain the capability level of each capability component whose capability components have been marked in the electronic device 100 also installed with the distributed operating system 300, which is not limited here.
  • the in-vehicle computer 100 - 2 installed with the distributed operating system 300 can also perform this step 702 as the virtual hyperterminal 1000 , which is not limited here.
  • the mobile phone 100-4 decides to select the currently most suitable capability component for calling based on the task requirements of the navigation application, the capability level of the relevant capability components and the dynamic information of the device. Specifically, the distributed task decision module 333 of the distributed operating system 300 of the mobile phone 100-4 selects the capability components based on the task requirements of the navigation application, then compares the capability levels of the selected capability components, and selects the capability with the highest capability level The component performs the navigation application task, and the distributed task decision module 333 will synthesize the dynamic information of the device (such as power information, CPU operation information, etc.) to determine whether the selected capability components are currently available, and finally decide to select the currently most suitable capability components (such as , select the CPU computing power component of the mobile phone 100-4 to execute the computing task of the navigation application, select the display capability component of the on-board computer 100-2 to execute the navigation application interface display), and issue a calling instruction to the electronic device 100 to which the corresponding capability component belongs to Invoke the corresponding capability component to execute the application task.
  • the process of the above-mentioned distributed task decision-making module 333 deciding to select the capability component that is currently most suitable for implementing the application does not affect the execution of the application program, or the application's effect on the distributed task decision-making module 333 in the distributed operating system 300.
  • the decision-making process is insensitive.
  • the task requirements of the navigation application include requirements in terms of computing capability and display capability.
  • the CPU computing power level of the mobile phone 100-4 is higher than that of the on-board computer 100-2. Therefore, when the CPU of the mobile phone 100-4 is running normally (or not running at full load), the distributed task decision module 333 decides to select the CPU computing power component of the mobile phone 100-4 to execute the computing task of the navigation application; similarly, as above
  • the display capability level of the in-vehicle computer 100-2 is higher than that of the mobile phone 100-4, and the in-vehicle computer 100-2 may contain additional information dedicated to the in-vehicle scene.
  • the distributed task decision module 333 prefers the in-vehicle
  • the display capability component of the computer 100-2 performs the task of displaying the navigation application interface. It can be understood that the task requirements of the navigation application may also include requirements in terms of playback capability. Therefore, the distributed task decision module 333 can also select and call the in-vehicle audio controlled and dispatched by the in-vehicle computer 100-2 based on the capability level of the playback capability to play the navigation. Voice is not limited here.
  • the electronic device 100 to which the selected capability component belongs responds to the call from the mobile phone 100-4, and runs the selected capability component to execute the corresponding application task.
  • the electronic device 100 is provided with a virtual device management module 334 capable of responding to a calling instruction.
  • the virtual device management module 334 can respond to the calling instruction and control the Run the called capability component.
  • the distributed task decision module 333 selects the CPU computing power component of the mobile phone 100-4 to perform the computing task of the navigation application, and selects the display capability component of the in-vehicle computer 100-2 to perform the navigation application interface display task . Therefore, the virtual device management module 334 of the mobile phone 100-4 responds to the calling instruction issued by the distributed task decision module 333 to the mobile phone 100-4, and controls the CPU running the mobile phone 100-4 to execute the computing task of the navigation application; The virtual device management module 334 responds to the calling instruction sent by the distributed task decision module 333 to the in-vehicle computer 100-2, and controls the display capability component running the in-vehicle computer 100-2 to perform the interface display task of the navigation application.
  • the mobile phone 100-4 can still be used for the distributed operating system 300. 4. Perform the above steps 701-703 as the decision-making and scheduling center in the virtual hyperterminal 1000, and the in-vehicle computer 100-2 has the virtual device management module 334 that can respond to the calling command and can respond to the distributed task decision-making module 333 of the mobile phone 100-4. The invocation of its capability components (that is, the process of the above step 704 ) finally completes the distributed implementation of the navigation application, which is not limited here.
  • the mobile phone 100-4 when the mobile phone 100-4 decides to select the currently most suitable display capability component is the display capability component of the on-board computer 100-2, the mobile phone 100-4 can use the mobile phone 100
  • the display interface of -4 reminds the user to confirm whether to convert the navigation application interface to the in-vehicle computer 100-2 for display (as shown in Figure 8), and when the user confirms the conversion, the navigation application interface is converted to the in-vehicle computer 100- 2 is displayed.
  • the display content on the display interface of the above-mentioned mobile phone 100-4 may refer to that shown in FIG. 8, and may also be set to other content, which is not limited herein.
  • this embodiment introduces the distributed implementation method of the application of the present application through the distributed implementation scenario of the voice assistant application and the music application.
  • FIG. 9 shows a distributed implementation scenario of a voice assistant application and a music application.
  • the electronic device 100 constituting the virtual hyperterminal 1000 includes a smart speaker 100-3, a mobile phone 100-4 and The electronic screen 100-5, wherein the smart speaker 100-3, the mobile phone 100-4 and the electronic screen 100-5 are installed with the distributed operating system 300, and the three are mutually trusted devices authenticated by the same user.
  • the mobile phone 100-4 is used as the decision-making and scheduling center in the virtual hyperterminal 1000 to perform decision-making and scheduling, so as to complete the distributed implementation of the voice assistant application and the music application.
  • the distributed implementation method of the voice assistant application and the music application in this embodiment includes the following steps:
  • Steps 1001-1002 are the same as 701-702 in the first embodiment, and are not repeated here.
  • the mobile phone 100-4 can obtain the capability level of each capability component of each electronic device 100, for example, including: smart speaker 100-3 (sound pickup capability level 6, storage capability level 3) level, playback capability level 6, display capability level 0), mobile phone 100-4 (sound pickup capability level 6, storage capability level 5, playback capability level 5, display capability level 2); electronic screen 100-5 (sound pickup capability level 3) level, storage capability level 3, playback capability level 4, display capability level 10).
  • the sound pickup capability of the smart speaker 100-4 is the same as the sound pickup capability of the mobile phone 100-4.
  • the mobile phone 100-4 Based on the task requirements of the voice assistant application and the music application, as well as the capability level and device dynamic information of the relevant capability components, the mobile phone 100-4 decides to select the most suitable capability component for invocation.
  • the distributed task decision module 333 of the distributed operating system 300 of the mobile phone 100-4 selects capability components (eg, voice pickup capability components, etc.) based on the task requirements of the voice assistant application, and conducts an evaluation on the capability level of the filtered capability components. Compare, select the capability component with the highest capability level; at the same time, the distributed task decision module 333 integrates the device dynamic information of the smart speaker 100-3, the mobile phone 100-4 and the electronic screen 100-5 (for example, the pickup distance information, CPU operation information etc.) determine whether the selected capability components are currently available, and finally decide to select the currently most suitable capability components to perform the voice assistant application task.
  • capability components eg, voice pickup capability components, etc.
  • the distributed task decision module 333 integrates the device dynamic information of the smart speaker 100-3, the mobile phone 100-4 and the electronic screen 100-5 (for example, the pickup distance information, CPU operation information etc.) determine whether the selected capability components are currently available, and finally decide to select the currently most suitable capability components to perform the voice assistant application task.
  • the distributed task decision module 333 is in the process of comparing the capability levels of the sound pickup capability components of the smart speaker 100-3, the mobile phone 100-4, and the electronic screen 100-5. , for example, when the obtained comparison result is that the sound pickup capability components of the smart speaker 100-3 and the mobile phone 100-4 have the same capability level (the pickup capability is both level 6), then the distributed task decision module 333 of the mobile phone 100-4 When making a decision, the selection can be made based on the pickup distance information in the dynamic information of the device. As an example, as shown in FIG.
  • the mobile phone 100-4 and the electronic screen 100-5 are all “Xiaoyi Xiaoyi”, when the user speaks the wake-up word
  • the pickup distance information included in the device dynamic information of each electronic device 100 collected by the mobile phone 100-4 is, for example, the distance between the mobile phone 100-4 and the user is about 0.3m, and the distance between the electronic screen 100-5 The user is about 1.5m away, and the smart speaker 100-3 is about 3m away from the user.
  • the distributed task decision module 333 of the mobile phone 100-4 selects the mobile phone 100-4 closest to the user as the answering device when making decisions.
  • the sound pickup distance information included in the device dynamic information of each electronic device 100 can be detected by sensing devices such as a distance sensor and a sound sensor, and details are not described herein again.
  • the mobile phone 100-4 After the mobile phone 100-4 replies with a response word (for example, the response word can be set as "I'm here, please speak"), the user speaks a voice command of "play music".
  • the mobile phone 100-4 opens the music application after receiving the user's voice command, and at the same time, the distributed task decision module 333 of the mobile phone 100-4 can screen the capability components (such as playback capability components, etc.) The capability level of the capability components is compared, and the capability component with the highest capability level is selected; at the same time, the distributed task decision module 333 integrates the device dynamic information of the smart speaker 100-3, the mobile phone 100-4 and the electronic screen 100-5 (such as playing (capacity current occupancy information, CPU operation information, etc.) to determine whether the filtered capability components are currently available, and finally decide to select the currently most suitable capability component to perform the audio playback task of the music application.
  • the capability components such as playback capability components, etc.
  • the distributed task decision module 333 when the distributed task decision module 333 compares the capability levels of the playback capability components of the smart speaker 100-3, the mobile phone 100-4 and the electronic screen 100-5, the distributed task decision module 333 takes priority Select the playback capability component of the smart speaker 100-3 with the highest playback capability level to perform the audio playback task. At the same time, the decision of the distributed task decision module 333 also needs to take into account the influence of the dynamic information of the device.
  • the distributed task decision module 333 can still select the playback capability component of the smart speaker 100-3 to perform the audio playback task, which is not limited here.
  • the smart speaker 100-3 is close to the user, and the smart speaker 100-3 can also be selected as the answering device.
  • the smart speaker 100-3 can be used as the answering device.
  • the virtual hyperterminal 1000 performs decision scheduling to meet the user's requirements for using other applications, which is not limited here.
  • Step 1004 is the same as step 704 in the above-mentioned first embodiment, and is not repeated here.
  • the distributed operating system 300 is installed on the mobile phone 100-4, but neither the smart speaker 100-3 nor the electronic screen 100-5 is installed.
  • the mobile phone 100-4 can still be used as the virtual hyperterminal 1000 to perform the above steps 1001-1003, while the smart speaker 100-3 and the electronic screen 100-5 have the virtual device management module 334 that can respond to the calling instruction, namely
  • the distributed implementation of the navigation application can be finally completed in response to the invocation of its capability components by the distributed task decision module 333 of the mobile phone 100-4 (ie, the process of the above step 1004), which is not limited here.
  • this embodiment introduces the distributed implementation method of the application of the present application through the distributed implementation scenario of the photographing application.
  • FIG. 11 shows a distributed implementation scenario of a photographing application.
  • the electronic device 100 constituting the virtual hyperterminal 1000 includes a portable computer 100 - 1 , a mobile phone 100 - 4 and an electronic screen 100 -5.
  • the distributed operating system 300 is installed on the portable computer 100-1, the mobile phone 100-4 and the electronic screen 100-5, and the three are mutually trusted devices authenticated by the same user.
  • the mobile phone 100-4 is used as the decision-making and scheduling center in the virtual hyperterminal 1000 to perform decision-making and scheduling, so as to complete the distributed implementation process of the photographing application.
  • the distributed implementation method of the photographing application in this embodiment includes the following steps:
  • Steps 1201-1202 are the same as 701-702 in the first embodiment, and are not repeated here.
  • the mobile phone 100-4 can obtain the capability level of each capability component of each electronic device 100, for example, including: portable computer 100-1 (GPU computing power level 7, storage capability 6 Level 5, Security Level 5, Photo Capability Level 5, Display Ability Level 3), mobile phone 100-4 (GPU computing power level 6, storage capability level 5, security capability level 5, camera capability level 7, display capability level 2), Electronic screen 100-5 (GPU computing power level 4, storage capability level 3, security capability level 0, camera capability level 3, display capability level 10).
  • the security capability component of the portable computer 100-1 has the same capability level as the security capability component of the mobile phone 100-4.
  • the mobile phone 100-4 decides to select the currently most suitable capability component for invocation based on the task requirements of the photographing application, the capability level and device dynamic information of the relevant capability components.
  • the task requirements of the distributed task decision module 333 of the distributed operating system 300 of the mobile phone 100-4 in terms of photographing, photo post-processing, photo browsing, and photo storage of the photographing application, screening capability components (such as photographing capability components, image processing capability components, display capability components, storage capability components, and security capability components, etc.), and compare the capability levels of the screened capability components to select the capability component with the highest capability level; at the same time, the distributed task decision module 333 integrates portable The device dynamic information (such as capability component occupancy information, CPU operation information, etc.) of the computer 100-1, the mobile phone 100-4 and the electronic screen 100-5 determines whether the selected capability components are currently available, and finally decides to select the most suitable capability components Perform photo-taking tasks, photo post-processing tasks, photo browsing tasks, and photo storage tasks of the photo-taking application.
  • screening capability components such as photographing capability components, image processing capability components, display capability components, storage capability components, and security capability components, etc.
  • FIG. 13 shows a schematic diagram of the decision-making process in the distributed implementation process of the photographing application in this implementation.
  • the photographing capability of the distributed task decision module 333 for the portable computer 100-1, the mobile phone 100-4 and the electronic screen 100-5 When comparing the capability levels of the components (such as cameras), it is preferable that the camera capability components of the mobile phone 100-4 with the highest camera capability level perform the photographing task of the photographing process (wherein, the comparison results of the capability levels of the photographic capability components of each electronic device 100 are: mobile phone 100-4>portable computer 100-1>electronic screen 100-5).
  • the distributed task decision module 333 should also integrate the equipment dynamic information such as the positions and camera angles of each electronic device 100. For example, if the distributed task The decision-making module 333 determines that the camera of the portable computer 100-1 can capture a more complete picture and a better light angle, and can also select the camera of the portable computer 100-1 to perform the photographing task of the photographing process.
  • the mobile phone 100-4 can remind the user to choose whether to use the mobile phone 100-4 to take pictures, or to choose to take pictures with the portable computer 100-1, so that the user can choose a suitable camera application to execute according to his needs. equipment, which is not limited here.
  • the reminder interface of the above-mentioned mobile phone 100-4 can be referred to as shown in FIG. 8, and will not be repeated here.
  • the distributed task decision module 333 determines all When comparing the capability levels of components with image processing capabilities (eg, GPU computing power), it is preferable that the portable computer 100-1 with the highest GPU computing power level performs the computing task of the photo post-processing process (wherein, the GPU computing power levels of the electronic devices 100 are compared The result is: portable computer 100-1>mobile phone 100-4>electronic screen 100-5), so as to achieve more efficient completion of post-processing processes such as retouching and beautification of the captured photos.
  • image processing capabilities eg, GPU computing power
  • the distributed task decision module 333 should also integrate the device dynamic information (such as GPU computing power occupancy information, etc.) of each electronic device 100.
  • the portable computer 100-1 is performing other image processing tasks, while the mobile phone 100-
  • the distributed task decision module 333 preferably performs the computing task of the photo post-processing process on the mobile phone 100-4 whose GPU computing power level is lower than that of the portable computer 100-1 when making a decision.
  • the distributed task decision module 333 displays the portable computer 100-1, the mobile phone 100-4 and the electronic screen 100-5
  • the electronic screen 100-5 with the highest display capability level performs the display task of the photo browsing process (wherein, the comparison result of the display capability level of each electronic device 100 is: electronic screen 100-5 > portable computer 100-1>mobile phone 100-4), presenting the current optimal visual experience for the user.
  • the distributed task decision module 333 should also integrate the device dynamic information of each electronic device 100 (eg, GPU computing power occupancy information, etc.), for example, if the electronic screen 100-5 is performing the When 100-1 does not perform the display task at this time, the distributed task decision module 333 preferably performs the display task of the photo browsing process when the portable computer 100-1 with a display capability level lower than the electronic screen 100-5 performs the decision.
  • the device dynamic information of each electronic device 100 eg, GPU computing power occupancy information, etc.
  • the distributed task decision module 333 stores the storage of the portable computer 100-1, the mobile phone 100-4 and the electronic screen 100-5
  • the mobile phone 100-4 can still be used as the virtual hyperterminal 1000 to perform the above steps 1201-1203, while the portable computer 100-1 and the electronic screen 100-5 have a virtual device management module 334 capable of responding to the calling instruction, and the portable computer 100 can be
  • the distributed task decision module 333 of -1 invokes its capability components (that is, the process of the above step 1204), and finally completes the distributed implementation of the photographing application, which is not limited here.
  • the electronic devices 100 under the same virtual hyperterminal 1000 are mutually trustworthy.
  • the device information of the electronic device 100 and the information collected by the application operation and other information that needs to be protected are only composed of the same
  • the flow between devices under the virtual hyperterminal 1000 does not need to pass through the cloud or other external servers, so it can effectively prevent the leakage of the information that needs to be protected, and can further ensure the security of the above-mentioned information to be protected.
  • the above-mentioned distributed operating system 300 does not constitute a limitation on the specific implementation process of the distributed implementation method of the application of the present application, or the specific implementation process of the distributed implementation method of the application of the present application is not based on the installation of distributed operations on electronic devices. system is required.
  • software may be installed on each electronic device that constitutes a distributed system (such as a virtual hyperterminal), and after the software is successfully installed, its non-application layer (such as a framework layer or a hardware abstraction layer) has functions
  • a software module or program with the same functions as the distributed device management module 331 , the capability classification module 332 , the distributed task decision module 333 , and the virtual device management module 334 described above can implement the technical solution of the present application.
  • FIG. 14 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present application.
  • the electronic device 100 may include a processor 110 , an external memory interface 120 , an internal memory 121 , a universal serial bus (USB) interface 130 , a charge management module 140 , a power management module 141 , and a battery 142 , Antenna 1, Antenna 2, Mobile Communication Module 150, Wireless Communication Module 160, Audio Module 170, Speaker 170A, Receiver 170B, Microphone 170C, Headphone Interface 170D, Sensor Module 180, Key 190, Motor 191, Indicator 192, Camera 193 , a display screen 194, and a subscriber identification module (subscriber identification module, SIM) card interface 195 and the like.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the above structure of the electronic device 100 determines the types of capability components that the electronic device 100 has and the types of capabilities that can be implemented.
  • the voice processing capability of the electronic device can be based on the audio in the above structure.
  • the module 170 and the processor 110 are implemented. Due to the different structures and functions of the audio module 170 and the functional differences of different processing units in the processor 110, the voice processing capability of the electronic device can be refined and divided into components corresponding to various capability components.
  • Capabilities for example, include speech acquisition capability, speech recognition capability, speech conversion capability, and speech synthesis capability. For another example, the photographing capability, image processing capability, display capability, etc.
  • the image processing capability can also be disassembled. It is divided into beautification processing capabilities, beauty capabilities, etc., and the capabilities corresponding to various capabilities components, such as camera or camera photography capabilities, image processing capabilities (including), etc. Therefore, various application functions run by the electronic device 100 can finally be realized by a certain capability component or a plurality of capability components, and the capability level of each capability component depends on the system configuration, software and hardware configuration of the electronic device 100 , and Real-time running dynamic information, etc.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural-network processing unit neural-network processing unit
  • the computing capability of the processor 110 is further divided into capability classification with capability components such as CPU computing power (with data processing capability) or GPU computing power (with image processing capability), so as to support application Distributed implementation.
  • the computing capability classification of the processor 110 may further include the capability classification of capability components such as ISP computing power and DSP computing power, which is not limited herein.
  • the controller can generate an operation control signal according to the instruction operation code and the timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data, such as RAM.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
  • the storage capability of the memory may be divided into capability components of smaller units, for example, the storage capability of the memory may include RAM capability and memory capability, etc., and then the capability classification of the corresponding capability components is performed.
  • the RAM capability can be used as a capability component of an electronic device for capability classification, and the RAM capability level can be used as an important decision basis in the above-mentioned rapid decision-making process.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, SIM interface, and/or USB interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM interface SIM interface
  • USB interface etc.
  • the I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may contain multiple sets of I2C buses.
  • the processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces.
  • the processor 110 can couple the camera 193 through the I2C interface, so that the processor 110 and the camera 193 communicate with the camera 193 through the I2C bus interface, so as to realize the photographing application function of the electronic device 100 in the embodiment of the present application.
  • the I2S interface can be used for audio communication.
  • the processor 110 may contain multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit an audio signal to the wireless communication module 160 through the I2S interface, so as to realize the function of the electronic device 100 switching other devices to perform a video call by screen projection in the embodiment of the present application.
  • the PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of the electronic device 100 switching other electronic devices to perform a video call by screencasting in the embodiments of the present application.
  • Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is typically used to connect the processor 110 with the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 may transmit an audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of the electronic device 100 switching other electronic devices to play music in the embodiments of the present application.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc.
  • the processor 110 communicates with the camera 193 through a CSI interface, so as to realize the photographing function of the electronic device 100 .
  • the processor 110 communicates with the display screen 194 through the DSI interface, so as to realize the display function of the electronic device 100 in the embodiment of the present application and the function of switching other electronic devices for display.
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like.
  • the GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100.
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is used to receive charging input from the charger.
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the power information (for example, status information such as sufficient power and low power) in the device dynamic information of the electronic device can be obtained by monitoring the above-mentioned power management module 141 .
  • the wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150
  • the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. Therefore, various electronic devices 100 can mutually acquire or share device information through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • GSM global system for mobile communications
  • GPRS general packet radio service
  • CDMA code division multiple access
  • WCDMA broadband Code Division Multiple Access
  • TD-SCDMA Time Division Code Division Multiple Access
  • LTE Long Term Evolution
  • BT Long Term Evolution
  • GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou navigation satellite system (Beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi satellite system) -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • GSM global system for mobile communications
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information. In this embodiment of the present application, the GPU computing power classification of the electronic device 100 may also partially depend on the number of GPUs set in the processor 110 .
  • Display screen 194 is used to display images, videos, and the like.
  • Display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), MiniLED, MicroLED, Micro-OLED, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
  • the display capability classification of the electronic device 100 may be determined based on the type of display panel, the number of display screens 194 and the like.
  • a corresponding hardware interrupt is sent to the kernel layer 340 .
  • the kernel layer 340 processes the touch operation into raw input events (including touch coordinates, time stamps of the touch operation and other information). Raw input events are stored at the kernel layer.
  • the application framework layer 320 obtains the original input event from the kernel layer 340, and identifies the control corresponding to the input event.
  • the touch operation is a touch click operation
  • the control corresponding to the click operation is the control of the camera application icon
  • the camera application calls the interface of the application framework layer 320 to start the camera application, and then starts the camera driver by calling the kernel layer 340 , and the camera 193 captures a still image or video to implement a photo application.
  • the present disclosure also relates to apparatuses for performing operations in text.
  • This apparatus may be specially constructed for the required purposes or it may comprise a general-purpose computer selectively activated or reconfigured by a computer program stored in the computer.
  • a computer program may be stored on a computer readable medium, such as, but not limited to, any type of disk, including floppy disks, optical disks, CD-ROMs, magneto-optical disks, read only memory (ROM), random access memory (RAM) , EPROM, EEPROM, magnetic or optical cards, application specific integrated circuits (ASICs), or any type of medium suitable for storing electronic instructions, and each may be coupled to a computer system bus.
  • the computers referred to in the specification may include a single processor or may be architectures employing multiple processors for increased computing power.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Telephone Function (AREA)

Abstract

本申请涉及互联网技术领域,具体涉及分布式实现方法、分布式系统、可读介质及电子设备,其中,应用的分布式实现方法应用于包括多个电子设备的分布式系统,分布式系统中的第一电子设备包括多个应用,其中第一应用调用第一能力,第一电子设备上通过独立于应用的分布式调度模块基于各电子设备的第一能力部件的性能参数,从各电子设备中选择至少一个电子设备为第一电子设备上的第一应用提供第一能力。通过分布式调度模块对各电子设备的各种能力部件进行分级,减少了分布式调度对不同应用的依赖,提高了应用的分布式实现过程中的决策准确度及决策效率。

Description

分布式实现方法、分布式系统、可读介质及电子设备
本申请要求于2020年12月25日提交中国专利局、申请号为202011560821.2、申请名称为“分布式实现方法、分布式系统、可读介质及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及互联网技术领域,具体涉及一种分布式实现方法、分布式系统、可读介质及电子设备。
背景技术
随着智能终端技术的成熟发展和终端市场需求的变化,电子设备上各应用的实现方式从由单电子设备实现的方式,逐步转变为由多个电子设备通过网络协同实现的分布式实现方式,分布式实现方式能够基于各电子设备各方面性能的优缺点,集中各电子设备的优势性能实现某一功能,例如,视频聊天时,采用多个电子设备中拍摄性能最佳的设备来进行视频图像采集;再例如,在人机对话时,采用多个电子设备中,采用拾音性能最佳的电子设备来采集用户语音。
目前,现有技术中电子设备上某一应用的分布式实现如图1所示:
电子设备A、电子设备B和电子设备C上安装有同一分布式应用400,例如该分布式应用400为即时通信软件,假如设备A采用该即时通信软件400进行音乐播放时需要从电子设备A、B、C中确定一个播放能力较优的设备进行音乐播放,那么电子设备A-C的播放能力部件的配置参数则需要预先发送给云服务器200或者从电子设备A-C中选择出的主设备(例如可以是电子设备B)进行分析处理,然后,设备A获取云服务器200或者主设备B对上述电子设备A-C的播放能力比较分析结果,并根据该分析结果选取合适的电子设备(例如是电子设备C)执行音乐播放任务。
可以看出,上述分布式实现方式存在如下问题:
对于同一分布式应用,需要借助服务器或者选择出的主设备来进行分布式调度,并且,不同分布式应用的调度策略一般不相同,当需要不同应用间的交互时,容易引起决策失误。此外,不同电子设备之间对于性能参数没有统一的能力分级标准或使用统一的能力语言描述,当分布式应用需要根据不同电子设备的某项能力优势进行决策调度时,可能会造成决策时对各电子设备的某项能力判断不准确,而导致决策错误以至不能准确调度某项能力较优的电子设备使用,最终使得用户体验较差。
发明内容
本申请实施例提供了一种分布式实现方法、分布式系统、可读介质及电子设备,通过在多个电子设备组成的分布式系统中,采用独立于各应用的分布式调度模块对各电子设备的各种能力部件或者说能力进行分级,减少了分布式调度对不同应用的依赖。
第一方面,本申请实施例提供了一种应用的分布式实现方法,应用于包括多个电子设备的分布式系统,该方法包括:所述分布式系统中的第一电子设备包括多个应用,其中,所述多个应用中的第一应用调用第一能力,所述第一电子设备上通过独立于所述多个应用的分布式调度模块,基于所述多个电子设备的第一能力部件的性能参数,从所述多个电子设备中选择至少一个电子设备为所述第一电子设备上的 第一应用提供所述第一能力;其中,所述第一能力部件为实施所述第一能力的部件。
即在本申请的实施例中,分布式调度模块是独立于电子设备上的应用而实现的,由电子设备决定如何进行分布式调度,与应用无关。
其中,第一应用可以是第三方应用,也可以是电子设备的系统应用。
此外,能力部件是指能够实现电子设备的各种能力的部件,如摄像头具有拍摄能力、CPU具有计算能力、麦克风具有拾音能力等。
例如,分布式系统中的多个电子设备可以包括手机、智能音箱,第一电子设备可以是手机,当第一应用是音乐应用时,第一能力可以是播放能力,第一能力部件是具有播放能力的部件比如功放部件。当手机运行音乐应用时,手机上的分布式调度模块采用统一的分级标准得到手机的播放能力等级为5级、智能音箱的播放能力等级为6级,智能音箱的播放能力等级更高,则手机上的分布式调度模块会选择智能音箱为音乐应用提供播放能力。
在上述第一方面的一种可能的实现中,所述第一电子设备的操作系统为安卓操作系统,并且所述多个应用位于所述第一电子设备的应用层,所述分布式调度模块位于所述第一电子设备的框架层或者硬件抽象层;或者所述第一电子设备的操作系统为鸿蒙操作系统,并且所述多个应用位于所述第一电子设备的应用层,所述分布式调度模块位于所述第一电子设备的框架层或者系统服务层;或者所述第一电子设备的操作系统为iOS操作系统,并且所述多个应用位于所述第一电子设备的可触摸层,所述分布式调度模块位于所述第一电子设备的媒体层或核心服务层。
即在本申请的实施例中,从软件架构上来看,可以将用于实现分布式调度的分布式调度模块与电子设备的应用设置在不同的软件层,即分布式调度模块独立于各应用而存在。例如,对于安卓系统,分布式调度模块位于框架层或者硬件抽象层,而应用位于应用层。
在一些操作系统中,分布式调度模块可以包括:用于对各能力部件所实施的能力采用统一的分级标准进行能力分级的能力分级模块、用于从多个电子设备中选择最适合的提供应用所需能力的电子设备的分布式调度决策模块、用于管理各电子设备的各能力部件性能参数的分布式设备管理模块、以及用于响应分布式任务决策模块对所选电子设备的调用指令的虚拟设备管理模块。在一些操作系统中,分布式调度模块还可以包括用于采集分布式系统中各电子设备的各能力部件性能参数的分布式软总线。
在上述第一方面的一种可能的实现中,所述性能参数包括静态性能参数,并且上述方法还包括:所述第一电子设备的所述分布式调度模块从所述分布式系统的多个电子设备获取各电子设备的第一能力部件的静态性能参数,并基于获取的所述第一能力部件的静态性能参数对各电子设备的第一能力部件进行分级,得到各电子设备的第一能力等级;其中,所述多个电子设备包括所述第一电子设备。
可以理解,静态性能参数是指电子设备的能力部件在较长时间稳定具有的性能参数,例如,对于摄像头,传感器类型、光圈、摄像头数量、光学变焦段数等属于静态性能参数,而摄像头所拍摄照片的存储位置则不属于摄像头的静态性能参数。在本申请的实施例中,分布式系统中的多个电子设备的设备静态信息即指各电子设备上的各能力部件的静态性能参数。
在上述第一方面的一种可能的实现中,所述性能参数还包括动态性能参数;并且上述方法还包括:所述第一电子设备的所述分布式调度模块通过以下方式从所述多个电子设备中选择至少一个电子设备为所述第一应用提供第一能力:所述第一电子设备的分布式调度模块基于所述各电子设备的所述第一能力等级和各电子设备的所述第一能力部件的动态性能参数,从所述多个电子设备中选择至少一个电子设备为所述第一应用提供第一能力。
可以理解,为了提高调度的准确性,分布式调度模块是基于各电子设备能力部件的静态性能参数和动态性能参数两者进行的,其中,动态性能参数是指电子设备的能力部件在某一时刻的状态参数,例如,对于摄像头,动态性能参数可以指被调用的摄像头在被拍照应用调用时正处于被视频通话应用占用的状态参数。
例如,在本申请的实施例中,分布式系统中的多个电子设备的设备动态信息包括各电子设备上的各能力部件的动态性能参数。在手机、智能音箱等电子设备组成的分布式系统中,手机上的分布式调度模块在选择为音乐应用提供播放能力的电子设备时,需要综合考虑手机、智能音箱等电子设备的设备动态信息(即动态性能参数),如果智能音箱的设备动态信息提示其电量不足,则即便智能音箱的播放能力等级更高,处于播放持续时间的考虑,分布式调度模块则会选择电量更加充足的手机作为音乐应用的播放设备。
在上述第一方面的一种可能的实现中,所述第一能力包括下列中的至少一项:运算能力、拾音能力、安全能力、显示能力、播放能力、拍照能力、存储能力。
可以理解,电子设备的能力部件的能力不限于上述列举出的各项能力。
可以理解,考虑到第一应用的功能不同,使用场景不同,需要调用的分布式系统中各电子设备的能力也有所不同。例如,手机上运行的音乐应用所需的第一能力为播放能力,手机上运行的视频应用所需的第一能力可以是显示能力,手机上运行的拍照应用所需的第一能力可以是拍照能力等。再比如,手机上运行导航应用在用户规划路线的过程中所需的第一能力可以是运算能力,而当用户启动车载电脑即将进入驾驶状态时,则手机上运行的导航应用所需的第一能力则可能是显示能力,此时可能优选显示屏的屏幕尺寸较大且便于观看的车载电脑屏幕作为显示设备使用。
在上述第一方面的一种可能的实现中,上述方法还包括:所述静态性能参数包括所述第一能力部件的配置参数,并且在所述第一能力为运算能力的情况下,所述第一能力部件包括中央处理器、图形处理器、图像信号处理器中的至少一个,其中,所述第一能力部件的配置参数包括处理器架构、核心数、随机存取存储器空间中的至少一项;在所述第一能力为拾音能力的情况下,所述第一能力部件的配置参数包括麦克风配置及数量、语音识别芯片型号及数量中的至少一项;在所述第一能力为安全能力的情况下,所述第一能力部件的配置参数包括可信任执行环境参数;在所述第一能力为显示能力的情况下,所述第一能力部件的配置参数包括显示屏分辨率、频率、功率、屏幕尺寸中的至少一项;在所述第一能力为播放能力的情况下,所述第一能力部件的配置参数包括功率放大器的频率响应范围、信噪比、分离度中的至少一项;在所述第一能力为拍照能力的情况下,所述第一能力部件的配置参数包括传感器类型、光圈、摄像头数量、光学变焦段数中的至少一项;在所述第一能力为存储能力的情况下,所述第一能力部件的配置参数包括只读存储器类型、数量及容量空间中的至少一项。
可以理解,电子设备的能力部件分级所依据的配置参数不限于上述列举出的各能力对应的各能力部件的配置参数。
在上述第一方面的一种可能的实现中,所述动态性能参数包括以下参数中的至少一种:所述第一能力部件的当前被调用状态参数;所述第一能力部件的当前可用资源参数;所述第一能力部件所属电子设备的剩余电量参数。
可以理解,电子设备及其能力部件的动态性能参数不限于上述列举出的各种参数。
可以理解,为了提高调度的准确性,分布式调度模块进行分布式调度时所基于的动态性能参数包括能力部件的动态性能参数以及电子设备的动态性能参数。例如,在本申请的实施例中,分布式系统中的 手机、智能音箱、便携电脑等电子设备的设备动态信息(即动态性能参数)在一定程度上影响分布式任务决策模块的决策选择结果,当分布式任务决策模块所选择的便携电脑(CPU算力等级最高)上的CPU当前处于被调用状态时,或者可用资源不足(比如CPU处于满载运行状态)时,又或者便携电脑当前的剩余电量不足时,则分布式任务决策模块会选择CPU算力等级较低一些的手机的CPU提供CPU算力。
在上述第一方面的一种可能的实现中,所述分布式系统中的所述多个电子设备均具有所述分布式调度模块。
所述多个电子设备中各分布式调度模块对各电子设备上相同能力部件的分级标准相同。
所述多个电子设备中各分布式调度模块对各电子设备上相同能力部件的分布式调度策略相同,其中,所述分布式调度策略为所述第一电子设备从所述多个电子设备中选择至少一个电子设备为所述第一电子设备上的第一应用提供所述第一能力所用的策略。
例如,在本申请的实施例中,分布式系统中的手机、智能音箱、便携电脑等电子设备均具有分布式调度模块。并且,各电子设备上的分布式调度模块对各电子设备上相同能力部件的分级标准统一、调度决策时所采用的分布式调度策略也相同,因此,对于手机等电子设备上运行的音乐应用所需的播放能力,分布式系统中的手机、智能音箱、便携电脑等电子设备的调度决策结果都是一样的。
在上述第一方面的一种可能的实现中,上述方法还包括:所述第一电子设备的分布式调度模块从所述多个电子设备获取各电子设备的第一能力部件的静态性能参数,并向所述多个电子设备中的第二电子设备分享获取到的所述静态性能参数。
例如,在本申请的实施例中,分布式系统中的手机、智能音箱、便携电脑等多个电子设备中,仅手机具有分布式调度模块,则手机可以将通过分布式调度模块获取的手机、智能音箱、便携电脑等多个电子设备的设备静态信息(即静态性能参数)分享给分布式系统中的智能音箱、便携电脑等其他电子设备。
在上述第一方面的一种可能的实现中,上述方法还包括:所述第一电子设备的分布式调度模块从所述分布式系统的多个电子设备获取各电子设备的第一能力部件的静态性能参数,并基于获取的所述第一能力部件的静态性能参数对各电子设备的第一能力部件进行分级,得到各电子设备的第一能力等级;所述第一电子设备向所述多个电子设备中的第二电子设备分享得到的各电子设备的第一能力等级。
例如,在本申请的实施例中,分布式系统中的手机、智能音箱、便携电脑等多个电子设备中,仅手机具有分布式调度模块,则手机可以通过分布式调度模块获取手机、智能音箱、便携电脑等多个电子设备上的各能力部件的设备静态信息(即静态性能参数)、并对各电子设备上的各能力部件进行能力分级,得到各电子设备上的各能力部件对应的能力等级。手机再将得到的手机、智能音箱、便携电脑等各电子设备上的各能力部件对应的能力等级分享给分布式系统中的智能音箱、便携电脑等其他电子设备。
第二方面,本申请实施例提供了一种应用的分布式系统,该系统包括多个电子设备,所述多个电子设备中的第一电子设备包括多个应用,其中,所述第一电子设备用于在所述第一电子设备的第一应用调用第一能力的情况下,采用第一电子设备上独立于所述多个应用的分布式调度模块,基于所述多个电子设备的第一能力部件的性能参数,从所述多个电子设备中选择至少一个电子设备为所述第一电子设备上的第一应用提供所述第一能力;其中,所述第一能力部件为实施所述第一能力的部件。
即在本申请的实施例中,分布式调度模块是独立于电子设备上的应用而实现的,由电子设备决定如何进行分布式调度,与应用无关。
其中,第一应用可以是第三方应用,也可以是电子设备的系统应用。
此外,能力部件是指能够实现电子设备的各种能力的部件,如摄像头具有拍摄能力、CPU具有计算 能力、麦克风具有拾音能力等。
在上述第二方面的一种可能的实现中,上述系统中,所述第一电子设备的操作系统为安卓操作系统,并且所述多个应用位于所述第一电子设备的应用层,所述分布式调度模块位于所述第一电子设备的框架层或者硬件抽象层;或者所述第一电子设备的操作系统为鸿蒙操作系统,并且所述多个应用位于所述第一电子设备的应用层,所述分布式调度模块位于所述第一电子设备的框架层或者系统服务层;或者所述第一电子设备的操作系统为iOS操作系统,并且所述多个应用位于所述第一电子设备的可触摸层,所述分布式调度模块位于所述第一电子设备的媒体层或核心服务层。
可以理解,从软件架构上来看,可以将用于实现分布式调度的分布式调度模块与电子设备的应用设置在不同的软件层,即分布式调度模块独立于各应用而存在。例如,对于安卓系统,分布式调度模块位于框架层或者硬件抽象层,而应用位于应用层。
在上述第二方面的一种可能的实现中,上述系统中,所述性能参数包括静态性能参数;并且所述第一电子设备的所述分布式调度模块用于从所述分布式系统的多个电子设备获取各电子设备的第一能力部件的静态性能参数,并基于获取的所述第一能力部件的静态性能参数对各电子设备的第一能力部件进行分级,得到各电子设备的第一能力等级;其中,所述多个电子设备包括所述第一电子设备。
可以理解,静态性能参数是指电子设备的能力部件在较长时间稳定具有的性能参数,例如,对于摄像头,传感器类型、光圈、摄像头数量、光学变焦段数等属于静态性能参数,而摄像头所拍摄照片的存储位置则不属于摄像头的静态性能参数。
在上述第二方面的一种可能的实现中,上述系统中,所述性能参数还包括动态性能参数;并且所述第一电子设备的所述分布式调度模块用于通过以下方式从所述多个电子设备中选择至少一个电子设备为所述第一应用提供第一能力:所述第一电子设备的分布式调度模块基于所述各电子设备的所述第一能力等级和各电子设备的所述第一能力部件的动态性能参数,从所述多个电子设备中选择至少一个电子设备为所述第一应用提供第一能力。
可以理解,为了提高调度的准确性,分布式调度模块是基于各电子设备能力部件的静态性能参数和动态性能参数两者进行的,其中,动态性能参数是指电子设备的能力部件在某一时刻的状态参数,例如,对于摄像头,动态性能参数可以指被调用的摄像头在被拍照应用调用时正处于被视频通话应用占用的状态参数。
在上述第二方面的一种可能的实现中,上述系统中,所述第一能力包括:运算能力、拾音能力、安全能力、显示能力、播放能力、拍照能力、存储能力中的至少一项。
可以理解,电子设备的能力部件的能力不限于上述列举出的各项能力。
在上述第二方面的一种可能的实现中,上述系统中,所述静态性能参数包括所述第一能力部件的配置参数,并且在所述第一能力为运算能力的情况下,所述第一能力部件包括中央处理器、图形处理器、图像信号处理器中的至少一个;其中,所述第一能力部件的配置参数包括处理器架构、核心数、随机存取存储器空间中的至少一项;在所述第一能力为拾音能力的情况下,所述第一能力部件的配置参数包括麦克风配置及数量、语音识别芯片型号及数量中的至少一项;在所述第一能力为安全能力的情况下,所述第一能力部件的配置参数包括可信任执行环境参数;在所述第一能力为显示能力的情况下,所述第一能力部件的配置参数包括显示屏分辨率、频率、功率、屏幕尺寸中的至少一项;在所述第一能力为播放能力的情况下,所述第一能力部件的配置参数包括功率放大器的频率响应范围、信噪比、分离度中的至少一项;在所述第一能力为拍照能力的情况下,所述第一能力部件的配置参数包括传感器类型、光圈、 摄像头数量、光学变焦段数中的至少一项;在所述第一能力为存储能力的情况下,所述第一能力部件的配置参数包括只读存储器类型、数量及容量空间中的至少一项。
可以理解,电子设备的能力部件分级所依据的配置参数不限于上述列举出的各能力对应的各能力部件的配置参数。
在上述第二方面的一种可能的实现中,上述系统中,所述动态性能参数包括以下参数中的至少一种:所述第一能力部件的当前被调用状态参数;所述第一能力部件的当前可用资源参数;所述第一能力部件所属电子设备的剩余电量参数。
可以理解,电子设备及其能力部件的动态性能参数不限于上述列举出的各种参数。
在上述第二方面的一种可能的实现中,上述系统中,所述分布式系统中的所述多个电子设备均具有所述分布式调度模块。
所述多个电子设备中各分布式调度模块对各电子设备上相同能力部件的分级标准相同。
所述多个电子设备中各分布式调度模块对各电子设备上相同能力部件的分布式调度策略相同,其中,所述分布式调度策略为所述第一电子设备从所述多个电子设备中选择至少一个电子设备为所述第一电子设备上的第一应用提供所述第一能力所用的策略。
例如,在本申请的实施例中,分布式系统中的手机、智能音箱、便携电脑等电子设备均具有分布式调度模块。并且,各电子设备上的分布式调度模块对各电子设备上相同能力部件的分级标准统一、调度决策时所采用的分布式调度策略也相同,因此,对于手机等电子设备上运行的音乐应用所需的播放能力,分布式系统中的手机、智能音箱、便携电脑等电子设备的调度决策结果都是一样的。
在上述第二方面的一种可能的实现中,上述系统中,所述第一电子设备的分布式调度模块还用于从所述多个电子设备获取各电子设备的第一能力部件的静态性能参数,并向所述多个电子设备中的第二电子设备分享获取到的所述静态性能参数。
例如,在本申请的实施例中,分布式系统中的手机、智能音箱、便携电脑等多个电子设备中,仅手机具有分布式调度模块,则手机可以将通过分布式调度模块获取的手机、智能音箱、便携电脑等多个电子设备的设备静态信息(即静态性能参数)分享给分布式系统中的智能音箱、便携电脑等其他电子设备。
在上述第二方面的一种可能的实现中,上述系统中,所述第一电子设备的分布式调度模块还用于从所述多个电子设备获取各电子设备的第一能力部件的静态性能参数,并基于获取的所述第一能力部件的静态性能参数对各电子设备的第一能力部件进行分级,得到各电子设备的第一能力等级,并且所述第一电子设备还用于向所述多个电子设备中的第二电子设备分享得到的各电子设备的第一能力等级。
例如,在本申请的实施例中,分布式系统中的手机、智能音箱、便携电脑等多个电子设备中,仅手机具有分布式调度模块,则手机可以通过分布式调度模块获取手机、智能音箱、便携电脑等多个电子设备上的各能力部件的设备静态信息(即静态性能参数)、并对各电子设备上的各能力部件进行能力分级,得到各电子设备上的各能力部件对应的能力等级。手机再将得到的手机、智能音箱、便携电脑等各电子设备上的各能力部件对应的能力等级分享给分布式系统中的智能音箱、便携电脑等其他电子设备。
第三方面,本申请实施例提供了一种计算机可读存储介质,该存储介质上存储有指令,所述指令在计算机上执行时使所述计算机执行上述应用的分布式实现方法。
第四方面,本申请实施例提供了一种电子设备,该电子设备包括:一个或多个处理器;一个或多个存储器;其中,所述一个或多个存储器存储有一个或多个程序,当所述一个或者多个程序被所述一个或多个处理器执行时,使得所述电子设备执行上述应用的分布式实现方法。
第五方面,本申请实施例提供了一种计算机程序产品,包括计算机程序/指令,该计算机程序/指令被处理器执行时实现上述应用的分布式实现方法。
附图说明
图1所示为现有技术中应用的分布式实现场景示意图。
图2所示为本申请实施例提供的多电子设备组成虚拟超级终端的场景示意图。
图3所示为本申请实施例提供的一种应用在电子设备上的分布式操作系统300的系统框图示意图。
图4所示为本申请实施例提供的分布式系统中能力框架所包含的能力部件示意图。
图5所示为本申请实施例提供的一种分布式系统中基于电子设备的能力部件配置参数的统一分级标准中的部分能力等级以及分布式决策过程示意图。
图6所示为本申请实施例一提供的一种导航应用的分布式实现场景示意图。
图7所示为本申请实施例一提供的一种导航应用的分布式实现方法流程示意图。
图8所示为本申请实施例提供的一种与用户交互的提醒界面示意图。
图9所示为本申请实施例二提供的一种语音助手应用及音乐应用的分布式实现场景示意图。
图10所示为本申请实施例二提供的一种语音助手应用及音乐应用的分布式实现方法流程示意图。
图11所示为本申请实施例三提供的一种拍照应用的分布式实现场景示意图。
图12所示为本申请实施例三提供的一种拍照应用的分布式实现方法流程示意图。
图13所示为本申请实施例三提供的一种拍照应用分布式实现的决策过程示意图。
图14所示为本申请实施例提供的一种电子设备100的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面通过结合附图和实施方案,对本申请实施例的技术方案做进一步地详细描述。
为解决上述技术问题,本申请提供了一种应用的分布式实现方法,在该方法中,在由多个电子设备组成的分布式系统(如虚拟超级终端)中,各电子设备上安装的操作系统中具有独立于应用的分布式调度模块,该分布式调度模块能够按照统一的能力分级标准对各电子设备的各能力部件或者说能力进行分级,减少了分布式调度对不同应用的依赖,从而在电子设备上的某个应用调用某项能力时,该分布式调度模块能够按照统一的调度策略为应用选择实现该应用所需能力的最佳电子设备。如此,对于分布式系统中的不同电子设备,能力分级标准统一,不存在由于不同电子设备能力分级标准不同而导致的决策误判,同时,分布式调度独立于电子设备上的应用而实现,由电子设备决定如何进行分布式调度,与应用无关,各电子设备的调度策略一致并且是由操作系统来实施,对于每个电子设备上不同的应用,均采用相同的调度策略,不依赖云端或者主设备,从而避免了现有技术中不同应用调度策略不同,应用间交互时容易出现决策失误的问题。此外,由于本申请的分布式能力分级和分布式调度均由电子设备的操作系统实现,对于一些本身不具有分布式功能的应用,也可以依托于电子设备的操作系统实现分布式功能。下文将以多个电子设备组成的分布式系统——虚拟超级终端为例,说明本申请的技术方案。
图2所示为本申请实施例提供的一种多电子设备组成虚拟超级终端的场景示意图。如图2所示,在该场景中,由多个电子设备100(例如,电子设备100-1至100-n)组成虚拟超级终端1000。具体地,虚拟超级终端1000中的电子设备可以看作一个整体,即电子设备100-1至100-n中的任意一个电子设 备上运行的应用,要实现某项功能时,可以调用虚拟超级终端1000中适于执行该功能的一个或者多个电子设备的相关资源。由于虚拟超级终端1000中的各电子设备上都设置有相同的用于实现分布式调用的模块,故各电子设备所遵循的能力分级标准、分布式调度策略等均相同,此外,用于实现分布式调用的模块均设置在各电子设备的操作系统的非应用层(如框架层或者系统服务层),故电子设备上各应用(包括系统应用和第三方应用)需要实现某项功能时,无需参与各设备性能参数的采集、电子设备各能力的分级以及分布式调用的决策,仅仅发送所需实现的功能给实现分布式调用的模块即可。即在本申请的技术方案中,组成虚拟超级终端1000的各电子设备上各应用的实现不受应用类型和设备类型的限制,有效避免了上文所述的分布式决策失误,并大大提高了分布式决策的效率。
例如,假设上述虚拟超级终端1000中的某个电子设备100-1正在运行音乐应用程序(Application,App),需要使用播放能力,且电子设备100-1上实现分布式调用的模块预先基于统一的能力分级标准对虚拟超级终端1000中的其他电子设备的播放能力进行了分级,故该电子设备100-1的音乐APP将需要进行音乐播放的需求发送给电子设备100-1上实现分布式调用的模块后,该模块根据各电子设备的音乐播放能力等级,基于已有的分布式调用策略决策出最适合实现该音乐播放功能的电子设备,例如,选择出的为电子设备100-3,该电子设备为一智能音箱。
可以理解,上述电子设备100包括但不限于膝上型计算机、台式计算机、平板计算机、智能音箱、手机、可穿戴设备、头戴式显示器、大屏显示设备(包括大屏电视、大屏显示器等)、车载电脑、车载语音导航等车载智能系统以及智能机器人、便携式音乐播放器、阅读器设备以及其中嵌入或耦接有一个或多个处理器的能够访问网络的其他电子设备。例如,在图2所示场景中电子设备100-1至100-n可以包括便携电脑100-1、车载电脑100-2、智能音箱100-3、手机100-4、电子屏幕100-5等,并且本申请的技术方案所适用的多电子设备场景可以包括任意数量的电子设备,不限于上述示例的5个。
可以理解,虚拟超级终端1000中至少一个电子设备上安装有分布式操作系统,该分布式操作系统具有上述分布式调度模块,能够按照统一的能力分级标准对各电子设备的各种能力进行分级,并且能够在某个应用调用某项能力时,对各电子设备按照统一的调度策略为该应用选择最佳的实现所需能力的电子设备。
可以理解,虚拟超级终端1000的分布式决策调度中心可以虚拟超级终端1000中安装有分布式操作系统的任一电子设备,为了便于描述,下述实施例主要以虚拟超级终端1000中的手机100-4作为分布式决策调度中心为例进行描述。
下面结合附图3对分布式操作系统进行详细介绍。
可以理解,电子设备100上安装的操作系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。电子设备100的本发明实施例以分层架构的分布式操作系统作为说明示例,在此不做限制。
图3示出了一种在电子设备100上安装的分布式操作系统300的示例性系统框图。如图3所示,由多个电子设备100(例如电子设备100-1至100-3)组成虚拟超级终端1000中,各电子设备100之间通过底层网路实现互联。其中,底层网路包括但不限于分布式软总线、无线保真(Wireless-Fidelity,WIFI)、无线局域网(Wireless Local Area Network,WLAN)、蓝牙(Bluetooth,BT)、近场通信(Near Field Communication,NFC)等,在此不做限制。另外,上述各电子设备100之间经过用户统一授权认证,即电子设备100之间互为可信任设备,例如,各电子设备100可以通过用户进行PIN码认证、人脸识别认证、指纹认证、声纹认证等完成统一授权认证,在此不做限制。
如图3所示,各电子设备100上安装的分布式操作系统300采用分层架构。分层架构将分布式操作系统300分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将分布式操作系统300分为四层,从上至下分别为应用层310、应用框架层320、系统服务层330以及内核层340。在另一些实施例中,分布式操作系统300也可以分为其他数量的层级结构,在此不做限制。
其中,应用层310可以包括系统应用311、扩展应用312(或第三方应用)等一系列应用程序。本申请提供的应用的分布式实现方法适用于应用层310中各应用(包括系统应用311和扩展应用312)的能力调用。系统应用311包括桌面、设置、相机、无线局域网(Wireless Local Area Networks,WLAN)、蓝牙、导航等;扩展应用312包括拍照应用(例如美拍、激萌等)、导航应用(例如高德地图、百度地图等)、音乐应用(例如酷狗音乐、网易云音乐等)等第三方开发的软件应用程序。
应用框架层320为应用层310提供多语言框架,包括界面(User Interface,UI)框架321、用户程序框架322和能力框架323,以及多语言框架应用编程接口(application programming interface,API)和多种编程语言的框架API。其中,应用框架层320包括一些预先定义的函数。
其中,UI框架321包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等,在此不做赘述。
用户程序框架322和能力框架323是应用框架层为应用程序提供的多语言框架,例如为应用程序提供应用所需的各能力部件的能力等级,即这些能力部件用于实现应用层的各种应用程序功能。如图4所示,作为示例,能力框架323可以包括但不限于运算能力(可以包括CPU算力、图形处理器(Graphics Processing Unit,GPU)算力、图像信号处理器(Image Signal Processor,ISP)算力等)、拾音能力(可以包括麦克风拾音能力、语音识别能力等)、设备安全防护方面的安全能力(可以包括可信任运行环境安全等级等)、显示能力(可以包括屏幕分辨率、屏幕尺寸等)、播放能力(包括扩音能力、立体声效能力等、以及存储能力(可以包括设备的内存能力、随机存取存储器(random access memory,RAM)能力等)等,在此不做限制。
系统服务层330是分布式操作系统300的核心,系统服务层330通过应用框架层320对应用层310中的应用程序提供服务。系统服务层330包括分布式设备管理模块331、能力分级模块332、分布式任务决策模块333、虚拟设备管理模块334以及分布式软总线335。
其中,分布式设备管理模块331用于对通过底层网路互联的各电子设备100的各能力部件配置参数等设备静态信息、以及各电子设备100的各能力部件当前的运行使用状态数据等设备动态信息进行集中管理。如上所述,分布式设备管理模块331集中管理的设备静态信息及设备动态信息基于底层网路(例如,分布式软总线335)采集得到。
能力分级模块332用于采用统一的能力分级标准对各电子设备100的各能力部件进行能力分级。在统一的分级标准中,每种能力分别设置若干等级,其中每个等级对应一个能力部件配置参数范围。因此,在统一的分级标准下,各电子设备100的每个能力部件基于其配置参数可以获得相应的能力等级。统一的分级标准,利于统一化描述不同电子设备之间的各能力部件的能力等级,为分布式任务决策模块333快速决策提供决策依据。
例如,如图5所示,CPU算力的分级标准中有18个能力等级,例如基于手机100-4、便携电脑100-1以及电子屏幕100-5的CPU配置参数分别经过上述能力分级模块332中的统一的分级标准得到三者的CPU算力部件的能力等级。如图5所示的统一的分级标准以及基于该分级标准的决策调度过程将在下文 详细介绍,在此不再赘述。
分布式任务决策模块333用于响应应用的任务需求,并基于应用的任务需求筛选相应的能力部件,并对所筛选的能力部件的能力等级进行比较分析,同时基于所筛选的能力部件所属电子设备100的设备动态信息进行决策,最终决策选择出能力等级较优且无其他应用占用的能力部件,之后,分布式任务决策模块333向所选能力部件所属的电子设备100发送对该能力部件的调用指令,该电子设备100接收调用指令后运行该能力部件来执行相关应用任务。
虚拟设备管理模块334用于响应分布式任务决策模块333发来的调用指令,并运行其所属电子设备100上被调用的能力部件来执行上述应用的任务。
分布式软总线335,作为底层网路的一个示例结构,用于采集各电子设备100的各能力部件配置参数等设备静态信息、以及各电子设备100设备动态信息,包括各能力部件当前的运行使用状态数据等。其中,对于分布式软总线335功能的理解,可以参考计算机硬件总线。例如,分布式软总线335是在1+8+N设备(1为手机;8代表车机、音箱、耳机、手表、手环、平板、大屏、个人计算机(personal computer,PC)、增强现实(Augmented Reality,AR)、虚拟现实(Virtual Reality,VR);N泛指其他物联网(Internet of Things,IOT)设备)之间搭建一条“无形”的总线,其具备自动发现、即连即用、自组网(异构网络组网)、高带宽、低时延、可靠性高等特点。也就是说,通过分布式软总线技术,上述各电子设备100之间不仅可以实现全部数据的共享,还可以与其在同一局域网络或与其通过蓝牙连接的任意设备实现即时互联。另外,分布式软总线335还能够在蓝牙、无线保真(Wireless-Fidelity,WIFI)等异构网络之间共享文件(例如一方面通过蓝牙接收文件,另一方面通过WIFI传输文件)。
可以理解,在分布式操作系统300中,上述应用框架层320中的UI框架321、用户程序框架322和能力框架323与系统服务层330中的分布式设备管理模块331、能力分级模块332、分布式任务决策模块333、虚拟设备管理模块334以及分布式软总线335可以共同构成系统基本能力子系统集,在此不做限制。
内核层340是硬件和软件之间的层。分布式操作系统300的内核层包括:内核子系统341和驱动子系统342。
其中,内核子系统341介于分布式操作系统300可以采用多内核设计,因此内核子系统341支持针对不同资源受限设备选用适合的OS内核。内核子系统341上的内核抽象层(Kernel Abstract Layer,KAL)通过屏蔽多内核差异,对上层提供基础的内核能力,包括进程/线程管理、内存管理、文件系统、网络管理和外设管理等。
驱动子系统342分布式操作系统300的驱动框架(HDF)是分布式系统硬件生态开放的基础,提供统一外设访问能力和驱动开发、管理框架。内核层340至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
基于上述图3所示的分布式操作系统300,下面进一步结合附图及具体实施场景详细介绍本申请的技术方案。
实施例一
为了便于描述,下面先结合图5详细介绍在上述分布式操作系统300中应用的分布式实现方法的原理,主要包括基于统一的分级标准对各能力部件进行能力分级,并基于各能力部件的能力等级和电子设备100的设备动态信息进行决策的过程。
如图5所示,作为示例,组成虚拟超级终端1000的电子设备100包括便携电脑100-1、车载电脑 100-2、智能音箱100-3、手机100-4、电子屏幕100-5,其中,上述电子设备100上安装有上述分布式操作系统300。可以理解,分布式操作系统300中的能力分级模块332所采用的统一的分级标准可以按照不同能力部件进行分类并对每类能力部件进行等级划分,也可以按照不同能力类型进行分类并对每类能力类型下的能力部件进行统一的等级划分,在此不做限制。
可以理解,在另一些实施例中,组成虚拟超级终端1000的电子设备100中至少有一个设备安装有上述分布式操作系统300,并且安装了分布式操作系统300的电子设备100作为虚拟超级终端1000中的分布式决策调度中心完成应用的分布式实现。
如图5所示,电子设备100的设备静态信息(例如能力部件配置参数)可以包括但不限于CPU配置参数(例如CPU的架构、核心数、随机存取存储器(Random Access Memory,RAM)空间大小等)、存储配置参数(例如只读存储器(Read Only Memory,ROM)空间大小等)、安全配置参数(例如有无可信任执行环境(Trusted Execution Environment,TEE)等)、播放配置参数(例如频率响应范围、信噪比、分离度等)以及显示配置参数(例如显示屏的分辨率、屏幕尺寸大小等)等。
相应地,分布式操作系统300中的能力分级模块332所采用的统一的分级标准可以包括但不限于:0-18级CPU算力等级、0-12级存储能力等级、0-8级安全能力等级、0-23级播放能力等级以及0-15级显示能力等级等。可以理解,上述电子设备100的能力部件配置参数决定了该能力部件的能力等级,同种能力部件,其配置参数越高相应的能力等级也越高。例如CPU配置参数(包括CPU的架构、核心数、频率、快取内存等)决定了CPU算力等级,安全配置参数(包括操作系统版本、是否具备TEE、支持硬件或软件密钥算法、是否有防物理攻击手段等)决定其安全能力等级,显示配置参数(包括显示屏的分辨率、频率、功率、屏幕尺寸大小等)决定其安全能力等级。
可以理解,在统一的分级标准中,可以按照各能力部件配置参数范围设置能力等级,其中每个能力等级对应一个配置参数范围;也可以按照各能力部件的综合性能评分范围设置能力等级,其中每个能力等级对应一个综合性能评分范围。可以理解,在统一的分级标准中,各能力部件的能力等级设置可以按照自然数顺序依次设置(例如,能力等级依次为1、2、3、4、5、6等),也可以在设置能力等级时预留部分能力等级而跳跃至更高等级,预留部分能力等级主要是考虑在设置能力等级时采样的能力部件配置参数中可能存在的配置参数差距较大的情况,由于采样的能力部件配置参数客观上不可能覆盖所有电子设备的该能力部件的配置参数,因此预留部分能力等级用于补充当前未采集到的配置参数范围对应的能力等级。例如,如图5所示,安全能力对应的能力等级可能为1、5、6、7、8等,中间分别预留了2、3、4等级。统一的分级标准中各能力部件的能力等级设置在此不做限制。
作为示例,按照各能力部件配置参数范围设置能力等级的情况,例如,对显示能力以屏幕尺寸由小到大可以设置为15个等级,其中,1英寸以下为0级,1英寸至5英寸为1级,5英寸至10英寸为2级,10英寸至15英寸为3级,以此类推,45英寸至50英寸为10级,70至75英寸为15级。按照各能力部件的综合性能评分范围设置能力等级,例如,对CPU算力设置能力等级可以通过对CPU算力进行综合评分(例如通过跑分软件对CPU进行多线程跑分得到CPU的综合评分),然后基于CPU算力的综合评分对CPU算力设置18个能力等级,其中,可以设置CPU综合评分在5000分以下为0级、在(5000,10000)范围内为1级、在(10000,15000)范围内为2级、在(15000,20000)范围内为3级,以此类推,得到CPU算力分级的18个等级。
可以理解,随着技术发展,当能力部件的超过统一的分级标准中的最高能力等级对应的配置参数范围时,则上述分级规范中的相应能力等级向上拓展至更高等级,而既定的能力等级保持不变。例如,当 更大屏幕尺寸被制造出来并用于电子设备之后,则显示能力等级可以适应性的拓展一个或多个等级。
如图5所示,各电子设备100的各能力部件通过统一的分级标准进行能力分级后,各能力部件上可以标记上相应的能力等级标记,以供分布式操作系统300中的分布式任务决策模块331作为决策依据。分布式任务决策模块331在决策选择时,一方面依据各能力部件的能力等级,另一方面还依赖于各电子设备100的设备动态信息,主要包括各能力部件的当前占用状态信息。
例如,各电子设备100的各能力部件对应的能力等级分别为:便携电脑100-1(CPU算力7级、GPU算力7级、拾音能力4级、拍照能力5级、存储能力6级、安全能力5级、播放能力5级、显示能力3级);车载电脑100-2(CPU算力5级、GPU算力2级、拾音能力4级、拍照能力0级、存储能力3级、安全能力0级、播放能力5级、显示能力3级);智能音箱100-3(CPU算力2级、GPU算力0级、拾音能力6级、拍照能力0级、存储能力3级、安全能力0级、播放能力6级、显示能力0级);手机100-4(CPU算力6级、GPU算力6级、拾音能力6级、拍照能力7级、存储能力5级、安全能力5级、播放能力5级、显示能力2级);电子屏幕100-5(CPU算力4级、GPU算力4级、拾音能力3级、拍照能力3级、存储能力3级、安全能力0级、播放能力4级、显示能力10级)。
因此,分布式任务决策模块331基于以上各能力部件的能力等级,以及应用的任务需求可以快速决策选择出较优的能力部件。例如,当应用需要进行较大的运算能力时,虚拟超级终端1000中便携电脑100-1的CPU算力和GPU算例等级均最高,则分布式任务决策模块331会优选先择便携电脑100-1的CPU(运算能力部件之一)执行运算;当应用需要使用屏幕显示时,虚拟超级终端1000中电子屏幕100-5的显示能力等级最高,则分布式任务决策模块331会优先选择电子屏幕100-5的显示屏(显示能力部件)执行显示任务。
下面本实施例将通过导航应用的分布式实现场景来介绍本申请的应用的分布式实现方法。
图6示出了一种导航应用的分布式实现场景,如图6所示,该场景中,组成虚拟超级终端1000的电子设备100包括车载电脑100-2和手机100-4,其中,车载电脑100-2和手机100-4上安装有分布式操作系统300,并且二者已完成同一用户的授权认证、互为可信任设备,手机100-4上正在运行导航应用。例如,用户携带手机100-4启动汽车或者走进已启动的汽车后,手机100-4可以基于正在运行的导航应用的任务需求,决策选择出当前最合适的显示能力部件是车载电脑100-2的显示屏,并调用车载电脑100-2的显示屏执行导航应用的导航界面显示任务,以便用户在汽车行驶过程中更好地使用导航应用功能,可以理解,车载电脑100-2随汽车的启动会自行启动运行。
以上应用的分布式实现过程参考以下示例。
下面以结合附图7详细说明本实施例的应用的分布式实现方法的具体流程。其中,作为示例,在车载电脑100-2和手机100-4组成的虚拟超级终端1000中,以手机100-4作为虚拟超级终端1000中的决策调度中心进行决策调度为例进行描述,图7所示流程以手机100-4为实施主体。
如图7所示,基于上述分布式操作系统300的应用的分布式实现方法包括以下步骤:
701:手机100-4采集各电子设备100的各能力部件配置参数等设备静态信息以及设备动态信息,以集中管理。
在本实施例中,手机100-4可以一方面通过分布式软总线335采集车载电脑100-2的各能力部件配置参数(例如,车载电脑100-2的运算能力部件中CPU的架构、核心数、快取内存等配置参数;车载电脑100-2的显示能力部件中显示屏的屏幕尺寸、频率、分辨率等配置参数,参考图5及相关描述),手机100-4的分布式操作系统300中的分布式设备管理模块331对采集到的能力部件配置参数进行集中管 理,其中,集中管理的能力部件配置参数还包括手机100-4自身的能力部件配置参数。
手机100-4另一方面可以通过分布式软总线335采集自身及车载电脑100-2的设备动态信息,包括但不限于自身及车载电脑100-2的电量信息、正在运行中的应用信息以及运行中的应用当前已占用的能力部件的运行信息等。可以理解,车载电脑100-2与汽车内的供电电路连接对其供电,因此,车载电脑100-2可以一直保持电量充足的状态。
可以理解,在另一些实施例中,安装了分布式操作系统300的车载电脑100-2也可以作为虚拟超级终端1000执行本步骤701,在此不做限制。
702:手机100-4采用统一的分级标准对各电子设备100的各能力部件进行能力分级,以确定各能力部件的能力等级。
手机100-4的分布式操作系统300中的能力分级模块332可以将各能力部件配置参数参照统一的分级标准对应得到各能力部件的能力等级。如图5所示,例如手机100-4可以得到自身和车载电脑100-2的部分能力部件的能力等级分别是:车载电脑100-2(CPU算力5级、存储能力3级、播放能力5级、显示能力3级);手机100-4(CPU算力6级、存储能力5级、播放能力5级、显示能力2级),手机100-4可以对完成能力分级的各能力部件标记其相应的能力等级,在此不再赘述。
可以理解,手机100-4也可以直接获取同样安装了分布式操作系统300的电子设备100中对自身各能力部件已经完成标记的各能力部件的能力等级,在此不做限制。
可以理解,在另一些实施例中,安装了分布式操作系统300的车载电脑100-2也可以作为虚拟超级终端1000执行本步骤702,在此不做限制。
703:手机100-4基于导航应用的任务需求,以及相关能力部件的能力等级和设备动态信息,决策选择出当前最适合的能力部件进行调用。具体地,手机100-4的分布式操作系统300的分布式任务决策模块333基于导航应用的任务需求筛选能力部件,再对所筛选的能力部件的能力等级进行比较,选择出能力等级最高的能力部件执行导航应用任务,同时分布式任务决策模块333会综合设备动态信息(例如电量信息、CPU运行信息等)判断所筛选的能力部件当前是否可用,最终决策选择出当前最适合的能力部件(例如,选择手机100-4的CPU算力部件执行导航应用的运算任务,选择车载电脑100-2的显示能力部件执行导航应用界面显示),并向相应能力部件的所属电子设备100发出调用指令,以调用相应的能力部件执行应用任务。
可以理解,上述分布式任务决策模块333决策选择当前最适合实现应用(例如导航应用)的能力部件过程不影响应用程序的执行,或者说应用对分布式操作系统300中分布式任务决策模块333的决策选择过程无感。
在图6所示的场景中,例如,导航应用的任务需求包括运算能力和显示能力等方面需求,如上所示,手机100-4的CPU算力等级高于车载电脑100-2的CPU算力等级,因此在手机100-4的CPU运行正常(或者说非满载运行)状态下,分布式任务决策模块333决策选择手机100-4的CPU算力部件执行导航应用的运算任务;同样地,如上所示,车载电脑100-2的显示能力等级高于手机100-4的显示能力等级,并且车载电脑100-2可能包含有专用于车载场景的附加信息,因此,分布式任务决策模块333优选车载电脑100-2的显示能力部件执行导航应用界面显示任务。可以理解,导航应用的任务需求可能还包括播放能力方面的需求,因此,分布式任务决策模块333还可以基于播放能力的能力等级选择调用与由车载电脑100-2控制调度的车载音响来播放导航语音,在此不做限制。
704:被选择的能力部件所属电子设备100响应手机100-4的调用,运行被选择的能力部件执行相应 的应用任务。
可以理解,电子设备100上设置有能够响应调用指令的虚拟设备管理模块334,当有外部可信任设备调用该电子设备上的某个能力部件时,虚拟设备管理模块334能够响应该调用指令,控制运行被调用的能力部件。
例如,在图6所示的场景中,分布式任务决策模块333选择手机100-4的CPU算力部件执行导航应用的运算任务,选择车载电脑100-2的显示能力部件执行导航应用界面显示任务。因此,手机100-4的虚拟设备管理模块334响应分布式任务决策模块333向手机100-4发出的调用指令,控制运行手机100-4的CPU执行导航应用的运算任务;车载电脑100-2的虚拟设备管理模块334响应分布式任务决策模块333向车载电脑100-2发出的调用指令,控制运行车载电脑100-2的显示能力部件执行导航应用的界面显示任务。
可以理解,在图7所示的导航应用的分布式实现场景中,如果手机100-4安装分布式操作系统300,而车载电脑100-2未采用分布式操作系统300,仍然可以将手机100-4作为虚拟超级终端1000中的决策调度中心执行上述步骤701-703,而车载电脑100-2具备能够响应调用指令的虚拟设备管理模块334即可响应手机100-4的分布式任务决策模块333对其能力部件的调用(即上述步骤704的过程),最终完成导航应用的分布式实现,在此不做限制。
可以理解,在另一些实施例中,在图6所示的场景中,手机100-4在决策选择出当前最适合的显示能力部件是车载电脑100-2的显示能力部件时,可以通过手机100-4的显示界面提醒用户确认是否将导航应用界面转换到车载电脑100-2上进行显示(如图8所示),并在用户确认转换的情况下,将导航应用界面转换到车载电脑100-2上进行显示。上述手机100-4的显示界面上的显示内容可以参考图8所示,也可以设置为其他内容,在此不做限制。
实施例二
基于上述图3所示的分布式系统,本实施例通过语音助手应用及音乐应用的分布式实现场景来介绍本申请的应用的分布式实现方法。
图9示出了一种语音助手应用及音乐应用的分布式实现场景,如图9所示,该场景中,组成虚拟超级终端1000的电子设备100包括智能音箱100-3、手机100-4和电子屏幕100-5,其中,智能音箱100-3、手机100-4和电子屏幕100-5上安装有分布式操作系统300,并且三者为经过同一用户授权认证的互为信任设备。作为示例,在本实施例中以手机100-4作为虚拟超级终端1000中的决策调度中心进行决策调度,完成语音助手应用以及音乐应用的分布式实现。
具体地,如图10所示,本实施例的语音助手应用及音乐应用的分布式实现方法包括以下步骤:
步骤1001-1002与实施例一中的701-702相同,在此不再赘述。
作为示例,在1002步骤中,结合图5及相关描述,手机100-4可以得到各电子设备100的各能力部件能力等级,例如包括:智能音箱100-3(拾音能力6级、存储能力3级、播放能力6级、显示能力0级),手机100-4(拾音能力6级、存储能力5级、播放能力5级、显示能力2级);电子屏幕100-5(拾音能力3级、存储能力3级、播放能力4级、显示能力10级)。其中,智能音箱100-4的拾音能力与手机100-4的拾音能力的能力等级相同。
1003:手机100-4基于语音助手应用和音乐应用的任务需求,以及相关能力部件的能力等级和设备动态信息,决策选择出当前最适合的能力部件进行调用。
具体地,手机100-4的分布式操作系统300的分布式任务决策模块333基于语音助手应用的任务需 求筛选能力部件(例如拾音能力部件等),并对所筛选的能力部件的能力等级进行比较,选择出能力等级最高的能力部件;同时,分布式任务决策模块333综合智能音箱100-3、手机100-4和电子屏幕100-5的设备动态信息(例如拾音距离信息、CPU运行信息等)判断所筛选的能力部件当前是否可用,最终决策选择出当前最适合的能力部件执行语音助手应用任务。
在本实施例的语音助手应用的分布式实现中,分布式任务决策模块333对智能音箱100-3、手机100-4和电子屏幕100-5的拾音能力部件的能力等级进行比较的过程中,例如,得到的比较结果为智能音箱100-3、手机100-4的拾音能力部件的能力等级相同(拾音能力均为6级)时,则手机100-4的分布式任务决策模块333在决策选择时,可以综合设备动态信息中的拾音距离信息做出选择。作为示例,如图9所示,假设智能音箱100-3、手机100-4和电子屏幕100-5上设置的语音助手应用的唤醒词均是“小艺小艺”,则当用户说出唤醒词“小艺小艺”时,手机100-4采集到的各电子设备100的设备动态信息中包含的拾音距离信息例如是:手机100-4距离用户大约0.3m,电子屏幕100-5距离用户大约1.5m,智能音箱100-3距离用户大约3m,此种情形下,手机100-4的分布式任务决策模块333在决策时优选距离用户最近的手机100-4作为应答设备。各电子设备100的设备动态信息中包含的拾音距离信息可以通过距离传感器、声音传感器等传感器件检测得到,在此不再赘述。
当手机100-4回复应答词(例如应答词可以设置为“我在,请说”)之后,用户说出“播放音乐”这一语音指令。手机100-4接收到用户的语音指令后打开音乐应用,同时手机100-4的分布式任务决策模块333可以基于音乐应用的任务需求,筛选能力部件(例如播放能力部件等),并对所筛选的能力部件的能力等级进行比较,选择出能力等级最高的能力部件;同时,分布式任务决策模块333综合智能音箱100-3、手机100-4和电子屏幕100-5的设备动态信息(例如播放能力当前占用信息、CPU运行信息等)判断所筛选的能力部件当前是否可用,最终决策选择出当前最适合的能力部件执行音乐应用的音频播放任务。
在本实施例中,在分布式任务决策模块333对智能音箱100-3、手机100-4和电子屏幕100-5的播放能力部件的能力等级进行比较的过程中,分布式任务决策模块333优先选择播放能力等级最高的智能音箱100-3的播放能力部件执行音频播放任务。同时,分布式任务决策模块333的决策还需要考虑到设备动态信息的影响,例如,在另一些实施例中,智能音箱100-3的播放能力部件与手机100-4的播放能力部件的能力等级相同,此时手机100-4正在进行语音通话时,分布式任务决策模块333仍可以优选智能音箱100-3的播放能力部件执行音频播放任务,在此不做限制。
在另一些实施例中,例如,智能音箱100-3距离用户较近,也可以选择智能音箱100-3作为应答设备,智能音箱100-3作为应答设备时,则可以将智能音箱100-3作为虚拟超级终端1000进行决策调度以满足用户对其他应用的使用需求,在此不做限制。
步骤1004与上述实施例一中的步骤704相同,在此不再赘述。
可以理解,在图9所示的语音助手应用及音乐应用的分布式实现场景中,如果手机100-4上安装了分布式操作系统300,而智能音箱100-3和电子屏幕100-5均未安装分布式操作系统300,仍然可以将手机100-4作为虚拟超级终端1000进行上述步骤1001-1003,而智能音箱100-3和电子屏幕100-5具备能够响应调用指令的虚拟设备管理模块334即可响应手机100-4的分布式任务决策模块333对其能力部件的调用(即上述步骤1004的过程),最终完成导航应用的分布式实现,在此不做限制。
实施例三
基于上述图3所示的分布式系统,本实施例通过拍照应用的分布式实现场景来介绍本申请的应用的 分布式实现方法。
图11示出了一种拍照应用的分布式实现场景,如图11所示,在该场景中,组成虚拟超级终端1000的电子设备100包括便携电脑100-1、手机100-4和电子屏幕100-5。其中,便携电脑100-1、手机100-4和电子屏幕100-5上安装有分布式操作系统300,并且三者为经过同一用户授权认证的互为可信任设备。作为示例,在本实施例中以手机100-4作为虚拟超级终端1000中的决策调度中心进行决策调度,完成拍照应用的分布式实现过程。
具体地,如图12所示,本实施例的拍照应用的分布式实现方法包括以下步骤:
步骤1201-1202与实施例一中的701-702相同,在此不再赘述。
作为示例,在1202步骤中,结合图5及相关描述,手机100-4可以得到各电子设备100的各能力部件能力等级,例如包括:便携电脑100-1(GPU算力7级、存储能力6级、安全能力5级、拍照能力5级、显示能力3级),手机100-4(GPU算力6级、存储能力5级、安全能力5级、拍照能力7级、显示能力2级)、电子屏幕100-5(GPU算力4级、存储能力3级、安全能力0级、拍照能力3级、显示能力10级)。其中,便携电脑100-1的安全能力部件与手机100-4的安全能力部件的能力等级相同。
1203:手机100-4基于拍照应用的任务需求,以及相关能力部件的能力等级和设备动态信息,决策选择出当前最适合的能力部件进行调用。
具体地,手机100-4的分布式操作系统300的分布式任务决策模块333拍照应用的拍照、照片后处理、照片浏览以及照片存储等方面的任务需求,筛选能力部件(例如拍照能力部件、图像处理能力部件、显示能力部件、存储能力部件以及安全能力部件等),并对所筛选的能力部件的能力等级进行比较,选择出能力等级最高的能力部件;同时,分布式任务决策模块333综合便携电脑100-1、手机100-4和电子屏幕100-5的设备动态信息(例如能力部件占用信息、CPU运行信息等)判断所筛选的能力部件当前是否可用,最终决策选择出最适合的能力部件执行拍照应用的拍照任务、照片后处理任务、照片浏览任务以及照片存储任务。
图13示出了本实施中的拍照应用分布式实现过程中的决策过程示意图。
如图13所示,在本实施例中的拍照应用的拍照任务的分布式实现过程中,分布式任务决策模块333对便携电脑100-1、手机100-4和电子屏幕100-5的拍照能力部件(例如是摄像头)的能力等级进行比较时,优选拍照能力等级最高的手机100-4的拍照能力部件执行拍照过程的拍照任务(其中,各电子设备100的拍照能力部件能力等级比较结果为:手机100-4>便携电脑100-1>电子屏幕100-5)。同时,由于拍照应用的任务需求对拍照能力部件的位置、角度等关系重大,因此分布式任务决策模块333还应综合各电子设备100的位置、摄像头角度等设备动态信息,例如,如果分布式任务决策模块333判断此时便携电脑100-1的摄像头可以拍摄的画面更全、光线角度更好等,也可以选择便携电脑100-1的摄像头执行拍照过程的拍照任务。
可以理解,在另一些实施例中,手机100-4可以提醒用户选择使用手机100-4进行拍照,还是选择使用便携电脑100-1进行拍照,以便用户根据自己的使用需求选择合适的拍照应用执行设备,在此不做限制。上述手机100-4的提醒界面可以参考图8所示,在此不再赘述。
如图13所示,在本实施例中的拍照应用的照片后处理任务的分布式实现过程中,分布式任务决策模块333对便携电脑100-1、手机100-4和电子屏幕100-5的图像处理能力(例如GPU算力)部件的能力等级进行比较时,优选GPU算力等级最高的便携电脑100-1执行照片后处理过程的运算任务(其中,各电子设备100的GPU算力等级比较结果为:便携电脑100-1>手机100-4>电子屏幕100-5),以实现 较高效的完成所拍照片的修饰、美化等后处理过程。同时,分布式任务决策模块333还应综合各电子设备100的设备动态信息(例如GPU算力占用信息等),例如,此时便携电脑100-1正在执行其他的图像处理任务,而手机100-4的GPU未执行运算任务的情况下,分布式任务决策模块333决策时优选GPU算力等级低于便携电脑100-1的手机100-4执行照片后处理过程的运算任务。
如图13所示,在本实施例中的拍照应用的照片浏览任务的分布式实现过程中,分布式任务决策模块333对便携电脑100-1、手机100-4和电子屏幕100-5的显示能力部件的能力等级进行比较时,优选显示能力等级最高的电子屏幕100-5执行照片浏览过程的显示任务(其中,各电子设备100的显示能力等级比较结果为:电子屏幕100-5>便携电脑100-1>手机100-4),为用户呈现当前最优的视觉体验。同时,分布式任务决策模块333还应综合各电子设备100的设备动态信息(例如GPU算力占用信息等),例如,如果此时电子屏幕100-5正在执行视频会议的显示任务,而便携电脑100-1此时未执行显示任务的情况下,分布式任务决策模块333决策时优选显示能力等级低于电子屏幕100-5的便携电脑100-1执行照片浏览过程的显示任务。
如图13所示,在本实施例中的拍照应用的照片存储任务的分布式实现过程中,分布式任务决策模块333对便携电脑100-1、手机100-4和电子屏幕100-5的存储能力部件和安全能力部件的能力等级进行比较时,出于隐私保护分布式任务决策模块333可以优选安全能力等级和存储能力等级的综合能力等级较优的便携电脑100-1执行照片存储任务(其中,各电子设备100的安全能力等级比较结果为:便携电脑100-1=手机100-4>电子屏幕100-5,各电子设备100的存储能力等级比较结果为:便携电脑100-1>手机100-4>电子屏幕100-5),在保证用户隐私安全的前提下,为用户存储所拍摄的照片。
可以理解,在图11所示的拍照应用的分布式实现场景中,如果手机100-4上安装了分布式操作系统300,而便携电脑100-1和电子屏幕100-5均未安装分布式操作系统300,仍然可以将手机100-4作为虚拟超级终端1000进行上述步骤1201-1203,而便携电脑100-1和电子屏幕100-5具备能够响应调用指令的虚拟设备管理模块334即可便携电脑100-1的分布式任务决策模块333对其能力部件的调用(即上述步骤1204的过程),最终完成拍照应用的分布式实现,在此不做限制。
综合上述实施例一、实施例二和实施例三的实施过程,可以理解,本申请的应用的分布式实现方法具备以下有益效果:
(1)能够解决应用的分布式实现过程中,各电子设备能力描述的语言不统一问题带来的判断决策错误率高的问题。
(2)能够合理充分地调度各电子设备100的能力优势,从而减小了决策选择的计算难度、大大缩短了决策时间。
(3)同一虚拟超级终端1000下的各电子设备100互为可信任,在应用的分布式实现过程中,电子设备100的设备信息以及应用运行采集的信息等需要被保护的信息只在组成同一虚拟超级终端1000下的各设备之间流转,无需通过云端或其他外部服务器,因而能够有效防止需要被保护的信息外泄,更能保障上述需要被保护的信息的安全性。
可以理解,上述分布式操作系统300并不构成对本申请的应用的分布式实现方法具体实施过程的限定,或者说本申请的应用的分布式实现方法具体实施过程不以电子设备上安装分布式操作系统为必须。例如,在另一些实施例中,可以在组成分布式系统(例如虚拟超级终端)的各电子设备上安装软件,该软件安装成功后其非应用层(例如框架层或者硬件抽象层)中具有功能与前文的分布式设备管理模块331、能力分级模块332、分布式任务决策模块333、虚拟设备管理模块334功能相同的软件模块或者程 序,从而可以实现本申请的技术方案。
图14所示为本申请实施例提供的一种电子设备100的结构示意图。如图14所示,电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
具体的,如图14所示,电子设备100的上述结构决定了电子设备100具备的能力部件类型及其能够实施的各项能力类型,例如,电子设备的语音处理能力可以基于上述结构中的音频模块170和处理器110实施,由于组成音频模块170的各结构功能不同以及处理器110中的不同处理单元的功能区别,可以将电子设备的语音处理能力细化拆分为多种能力部件对应的能力,例如包括语音采集能力、语音识别能力、语音转换能力及语音合成能力等。再例如,拍照应用所需的拍照能力、图像处理能力、显示能力等可以基于上述结构中的处理器110、摄像头193、显示屏194、以及内部存储器121实施,其中,图像处理能力例如还可以拆分为美化处理能力、美颜能力等,多种能力部件对应的能力,例如相机或摄像头的拍照能力、图像处理能力(包括)等。因此,电子设备100所运行的各种应用功能,最终可以通过某一种能力部件或者多种能力部件配合实现,每种能力部件的能力等级高低取决于电子设备100的系统配置、软硬件配置及实时运行动态信息等。
下面就电子设备100的上述各结构以及基于部分能力部件而具备的部分能力作为示例进行介绍。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
在本申请的实施例中,处理器110的运算能力进一步的拆分为与CPU算力(具备数据处理能力)或GPU算力(具备图像处理能力)等能力部件进行能力分级,以支持应用的分布式实现。在另一些实施例中,处理器110的运算能力分级还可以包括ISP算力、DSP算力等能力部件的能力分级,在此不做限制。
其中,控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据,例如RAM。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。在本申请的一些实施例中,可以对存储器的存储能力拆分为更小单位的能力部件,例如存储器的存储能力可以包括RAM能力和内存能力等,再进行相应能力部件的 能力分级。例如,将RAM能力可以作为电子设备的一种能力部件进行能力分级,RAM能力等级可以作为上述快速决策过程中一个重要的决策依据。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,SIM接口,和/或USB接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合摄像头193使处理器110与摄像头193通过I2C总线接口通信,实现本申请实施例中电子设备100的拍照应用功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现本申请实施例中电子设备100通过投屏切换其他设备进行视频通话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现本申请实施例中电子设备100通过投屏切换其他电子设备进行视频通话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现本申请实施例中电子设备100切换其他电子设备进行播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现本申请实施例中电子设备100的显示功能以及切换其他电子设备进行显示的功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子 设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。电源管理模块141用于连接电池142、充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。在本申请实施例中,电子设备的设备动态信息中的电量信息(例如电量充足、电量低等状态信息)可以通过上述电源管理模块141监测得到。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备进行通信。因此,各电子设备100之间可以通过无线通信技术相互获取或共享设备信息。
所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(Beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备100通过GPU、显示屏194、以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。在本申请实施例中,电子设备100的GPU算力分级还可以部分取决于处理器110中设置的GPU数量。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),MiniLED,MicroLED,Micro-OLED,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。在本申请实施例中,电子设备100的显示能力分级可以基于显示面板的类型、显示屏194的数量等来决定。
下面结合拍照应用场景,示例性说明电子设备100软件以及硬件的工作流程。
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层340。内核层340将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用框架层320从内核层340获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为拍照应用图标的控件为例,相机应用调用应用框架层320的接口,启动拍照应用,进而通过调用内核层340启动摄像头驱动,通过摄像头193捕获静态图像或视频实现拍照 应用。
在说明书对“一个实施例”或“实施例”的引用意指结合实施例所描述的具体特征、结构或特性被包括在根据本申请公开的至少一个范例实施方案或技术中。说明书中的各个地方的短语“在一个实施例中”的出现不一定全部指代同一个实施例。
本申请公开还涉及用于执行文本中的操作装置。该装置可以专门处于所要求的目的而构造或者其可以包括被存储在计算机中的计算机程序选择性地激活或者重新配置的通用计算机。这样的计算机程序可以被存储在计算机可读介质中,诸如,但不限于任何类型的盘,包括软盘、光盘、CD-ROM、磁光盘、只读存储器(ROM)、随机存取存储器(RAM)、EPROM、EEPROM、磁或光卡、专用集成电路(ASIC)或者适于存储电子指令的任何类型的介质,并且每个可以被耦合到计算机系统总线。此外,说明书中所提到的计算机可以包括单个处理器或者可以是采用针对增加的计算能力的多个处理器涉及的架构。
本文所提出的过程和显示器固有地不涉及任何具体计算机或其他装置。各种通用系统也可以与根据本文中的教导的程序一起使用,或者构造更多专用装置以执行一个或多个方法步骤可以证明是方便的。在一下描述中讨论了用于各种这些系统的结构。另外,可以使用足以实现本申请公开的技术和实施方案的任何具体编程语言。各种编程语言可以被用于实施本公开,如本文所讨论的。
另外,在本说明书所使用的语言已经主要被选择用于可读性和指导性的目的并且可能未被选择为描绘或限制所公开的主题。因此,本申请公开旨在说明而非限制本文所讨论的概念的范围。

Claims (26)

  1. 一种应用的分布式实现方法,应用于包括多个电子设备的分布式系统,其特征在于,所述方法包括:
    所述分布式系统中的第一电子设备包括多个应用,其中,所述多个应用中的第一应用调用第一能力,
    所述第一电子设备上通过独立于所述多个应用的分布式调度模块,基于所述多个电子设备的第一能力部件的性能参数,从所述多个电子设备中选择至少一个电子设备为所述第一电子设备上的第一应用提供所述第一能力;
    其中,所述第一能力部件为实施所述第一能力的部件。
  2. 根据权利要求1所述的方法,其特征在于,所述第一电子设备的操作系统为安卓操作系统,并且所述多个应用位于所述第一电子设备的应用层,所述分布式调度模块位于所述第一电子设备的框架层或者硬件抽象层;或者
    所述第一电子设备的操作系统为鸿蒙操作系统,并且所述多个应用位于所述第一电子设备的应用层,所述分布式调度模块位于所述第一电子设备的框架层或者系统服务层;或者
    所述第一电子设备的操作系统为iOS操作系统,并且所述多个应用位于所述第一电子设备的可触摸层,所述分布式调度模块位于所述第一电子设备的媒体层或核心服务层。
  3. 根据权利要求1所述的方法,其特征在于,所述性能参数包括静态性能参数,并且所述方法还包括:
    所述第一电子设备的所述分布式调度模块从所述分布式系统的多个电子设备获取各电子设备的第一能力部件的静态性能参数,并基于获取的所述第一能力部件的静态性能参数对各电子设备的第一能力部件进行分级,得到各电子设备的第一能力等级;
    其中,所述多个电子设备包括所述第一电子设备。
  4. 根据权利要求3所述的方法,其特征在于,所述性能参数还包括动态性能参数;并且
    所述第一电子设备的所述分布式调度模块通过以下方式从所述多个电子设备中选择至少一个电子设备为所述第一应用提供第一能力:
    所述第一电子设备的分布式调度模块基于所述各电子设备的所述第一能力等级和各电子设备的所述第一能力部件的动态性能参数,从所述多个电子设备中选择至少一个电子设备为所述第一应用提供第一能力。
  5. 根据权利要求4所述的方法,其特征在于,所述第一能力包括下列中的至少一项:
    运算能力、拾音能力、安全能力、显示能力、播放能力、拍照能力、存储能力。
  6. 根据权利要求5所述的方法,其特征在于,所述静态性能参数包括所述第一能力部件的配置参数,并且
    在所述第一能力为运算能力的情况下,所述第一能力部件包括中央处理器、图形处理器、图像信号处理器中的至少一个,其中,
    所述第一能力部件的配置参数包括处理器架构、核心数、随机存取存储器空间中的至少一项;
    在所述第一能力为拾音能力的情况下,所述第一能力部件的配置参数包括麦克风配置及数量、语音识别芯片型号及数量中的至少一项;
    在所述第一能力为安全能力的情况下,所述第一能力部件的配置参数包括可信任执行环境参数;
    在所述第一能力为显示能力的情况下,所述第一能力部件的配置参数包括显示屏分辨率、频率、功 率、屏幕尺寸中的至少一项;
    在所述第一能力为播放能力的情况下,所述第一能力部件的配置参数包括功率放大器的频率响应范围、信噪比、分离度中的至少一项;
    在所述第一能力为拍照能力的情况下,所述第一能力部件的配置参数包括传感器类型、光圈、摄像头数量、光学变焦段数中的至少一项;
    在所述第一能力为存储能力的情况下,所述第一能力部件的配置参数包括只读存储器类型、数量及容量空间中的至少一项。
  7. 根据权利要求5所述的方法,其特征在于,所述动态性能参数包括以下参数中的至少一种:
    所述第一能力部件的当前被调用状态参数;
    所述第一能力部件的当前可用资源参数;
    所述第一能力部件所属电子设备的剩余电量参数。
  8. 根据权利要求1至7中任一项所述的方法,其特征在于,所述分布式系统中的所述多个电子设备均具有所述分布式调度模块。
  9. 根据权利要求8所述的方法,其特征在于,所述多个电子设备中各分布式调度模块对各电子设备上相同能力部件的分级标准相同。
  10. 根据权利要求9所述的方法,其特征在于,所述多个电子设备中各分布式调度模块对各电子设备上相同能力部件的分布式调度策略相同,其中,所述分布式调度策略为所述第一电子设备从所述多个电子设备中选择至少一个电子设备为所述第一电子设备上的第一应用提供所述第一能力所用的策略。
  11. 根据权利要求10所述的方法,其特征在于,还包括:
    所述第一电子设备的分布式调度模块从所述多个电子设备获取各电子设备的第一能力部件的静态性能参数,并向所述多个电子设备中的第二电子设备分享获取到的所述静态性能参数。
  12. 根据权利要求11所述的方法,其特征在于,还包括:
    所述第一电子设备的分布式调度模块从所述分布式系统的多个电子设备获取各电子设备的第一能力部件的静态性能参数,并基于获取的所述第一能力部件的静态性能参数对各电子设备的第一能力部件进行分级,得到各电子设备的第一能力等级;
    所述第一电子设备向所述多个电子设备中的第二电子设备分享得到的各电子设备的第一能力等级。
  13. 一种应用的分布式系统,其特征在于,所述分布式系统包括多个电子设备,所述多个电子设备中的第一电子设备包括多个应用,其中,
    所述第一电子设备用于在所述第一电子设备的第一应用调用第一能力的情况下,采用第一电子设备上独立于所述多个应用的分布式调度模块,基于所述多个电子设备的第一能力部件的性能参数,从所述多个电子设备中选择至少一个电子设备为所述第一电子设备上的第一应用提供所述第一能力;
    其中,所述第一能力部件为实施所述第一能力的部件。
  14. 根据权利要求13所述的系统,其特征在于,所述第一电子设备的操作系统为安卓操作系统,并且所述多个应用位于所述第一电子设备的应用层,所述分布式调度模块位于所述第一电子设备的框架层或者硬件抽象层;或者
    所述第一电子设备的操作系统为鸿蒙操作系统,并且所述多个应用位于所述第一电子设备的应用层,所述分布式调度模块位于所述第一电子设备的框架层或者系统服务层;或者
    所述第一电子设备的操作系统为iOS操作系统,并且所述多个应用位于所述第一电子设备的可触摸 层,所述分布式调度模块位于所述第一电子设备的媒体层或核心服务层。
  15. 根据权利要求13所述的系统,其特征在于,所述性能参数包括静态性能参数;并且
    所述第一电子设备的所述分布式调度模块用于从所述分布式系统的多个电子设备获取各电子设备的第一能力部件的静态性能参数,并基于获取的所述第一能力部件的静态性能参数对各电子设备的第一能力部件进行分级,得到各电子设备的第一能力等级;
    其中,所述多个电子设备包括所述第一电子设备。
  16. 根据权利要求15所述的系统,其特征在于,所述性能参数还包括动态性能参数;并且
    所述第一电子设备的所述分布式调度模块用于通过以下方式从所述多个电子设备中选择至少一个电子设备为所述第一应用提供第一能力:
    所述第一电子设备的分布式调度模块基于所述各电子设备的所述第一能力等级和各电子设备的所述第一能力部件的动态性能参数,从所述多个电子设备中选择至少一个电子设备为所述第一应用提供第一能力。
  17. 根据权利要求16所述的系统,其特征在于,所述第一能力包括:
    运算能力、拾音能力、安全能力、显示能力、播放能力、拍照能力、存储能力中的至少一项。
  18. 根据权利要求17所述的系统,其特征在于,所述静态性能参数包括所述第一能力部件的配置参数,并且
    在所述第一能力为运算能力的情况下,所述第一能力部件包括中央处理器、图形处理器、图像信号处理器中的至少一个;其中,
    所述第一能力部件的配置参数包括处理器架构、核心数、随机存取存储器空间中的至少一项;
    在所述第一能力为拾音能力的情况下,所述第一能力部件的配置参数包括麦克风配置及数量、语音识别芯片型号及数量中的至少一项;
    在所述第一能力为安全能力的情况下,所述第一能力部件的配置参数包括可信任执行环境参数;
    在所述第一能力为显示能力的情况下,所述第一能力部件的配置参数包括显示屏分辨率、频率、功率、屏幕尺寸中的至少一项;
    在所述第一能力为播放能力的情况下,所述第一能力部件的配置参数包括功率放大器的频率响应范围、信噪比、分离度中的至少一项;
    在所述第一能力为拍照能力的情况下,所述第一能力部件的配置参数包括传感器类型、光圈、摄像头数量、光学变焦段数中的至少一项;
    在所述第一能力为存储能力的情况下,所述第一能力部件的配置参数包括只读存储器类型、数量及容量空间中的至少一项。
  19. 根据权利要求18所述的系统,其特征在于,所述动态性能参数包括以下参数中的至少一种:
    所述第一能力部件的当前被调用状态参数;
    所述第一能力部件的当前可用资源参数;
    所述第一能力部件所属电子设备的剩余电量参数。
  20. 根据权利要求13至19中任一项所述的系统,其特征在于,所述分布式系统中的所述多个电子设备均具有所述分布式调度模块。
  21. 根据权利要求20所述的系统,其特征在于,所述多个电子设备中各分布式调度模块对各电子设备上相同能力部件的分级标准相同。
  22. 根据权利要求21所述的系统,其特征在于,所述多个电子设备中各分布式调度模块对各电子设备上相同能力部件的分布式调度策略相同,其中,所述分布式调度策略为所述第一电子设备从所述多个电子设备中选择至少一个电子设备为所述第一电子设备上的第一应用提供所述第一能力所用的策略。
  23. 根据权利要求22所述的系统,其特征在于,所述第一电子设备的分布式调度模块还用于从所述多个电子设备获取各电子设备的第一能力部件的静态性能参数,并向所述多个电子设备中的第二电子设备分享获取到的所述静态性能参数。
  24. 根据权利要求23所述的系统,其特征在于,所述第一电子设备的分布式调度模块还用于从所述多个电子设备获取各电子设备的第一能力部件的静态性能参数,并基于获取的所述第一能力部件的静态性能参数对各电子设备的第一能力部件进行分级,得到各电子设备的第一能力等级,并且
    所述第一电子设备还用于向所述多个电子设备中的第二电子设备分享得到的各电子设备的第一能力等级。
  25. 一种计算机可读存储介质,其特征在于,所述存储介质上存储有指令,所述指令在计算机上执行时使所述计算机执行权利要求1至12中任一项所述的应用的分布式实现方法。
  26. 一种电子设备,其特征在于,包括一个或多个处理器;一个或多个存储器;其中,
    所述一个或多个存储器存储有一个或多个程序,当所述一个或者多个程序被所述一个或多个处理器执行时,使得所述电子设备执行权利要求1至12中任一项所述的应用的分布式实现方法。
PCT/CN2021/137514 2020-12-25 2021-12-13 分布式实现方法、分布式系统、可读介质及电子设备 WO2022135214A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011560821.2 2020-12-25
CN202011560821.2A CN114697348B (zh) 2020-12-25 2020-12-25 分布式实现方法、分布式系统、可读介质及电子设备

Publications (1)

Publication Number Publication Date
WO2022135214A1 true WO2022135214A1 (zh) 2022-06-30

Family

ID=82130374

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/137514 WO2022135214A1 (zh) 2020-12-25 2021-12-13 分布式实现方法、分布式系统、可读介质及电子设备

Country Status (2)

Country Link
CN (1) CN114697348B (zh)
WO (1) WO2022135214A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116248657A (zh) * 2023-05-09 2023-06-09 深圳开鸿数字产业发展有限公司 投屏系统的控制方法、装置、计算机设备及存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116527435A (zh) * 2022-11-30 2023-08-01 深圳开鸿数字产业发展有限公司 储物系统的控制方法、储物系统及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101056254A (zh) * 2007-06-06 2007-10-17 杭州华三通信技术有限公司 一种网络存储设备的扩展方法、系统及其装置
CN101771707A (zh) * 2010-02-08 2010-07-07 中兴通讯股份有限公司 实现终端间资源共享的方法、资源处理系统及终端
CN102546722A (zh) * 2010-12-27 2012-07-04 北京爱国者信息技术有限公司 云服务共享与交易平台及其系统
US20140006474A1 (en) * 2012-06-28 2014-01-02 Netflix, Inc. Application Discovery
CN107749894A (zh) * 2017-11-09 2018-03-02 吴章义 一种安全、简单、智能的物联网系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014209401A1 (en) * 2013-06-28 2014-12-31 Intel Corporation Techniques to aggregate compute, memory and input/output resources across devices
CN114666435B (zh) * 2019-04-19 2023-03-28 华为技术有限公司 使用电子设备的增强功能的方法、电子设备、芯片及存储介质
CN111459592B (zh) * 2020-03-31 2021-10-22 华为技术有限公司 分布式处理ux元素的方法及装置
CN111782401A (zh) * 2020-07-17 2020-10-16 Oppo广东移动通信有限公司 数据处理方法、装置以及电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101056254A (zh) * 2007-06-06 2007-10-17 杭州华三通信技术有限公司 一种网络存储设备的扩展方法、系统及其装置
CN101771707A (zh) * 2010-02-08 2010-07-07 中兴通讯股份有限公司 实现终端间资源共享的方法、资源处理系统及终端
CN102546722A (zh) * 2010-12-27 2012-07-04 北京爱国者信息技术有限公司 云服务共享与交易平台及其系统
US20140006474A1 (en) * 2012-06-28 2014-01-02 Netflix, Inc. Application Discovery
CN107749894A (zh) * 2017-11-09 2018-03-02 吴章义 一种安全、简单、智能的物联网系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116248657A (zh) * 2023-05-09 2023-06-09 深圳开鸿数字产业发展有限公司 投屏系统的控制方法、装置、计算机设备及存储介质

Also Published As

Publication number Publication date
CN114697348A (zh) 2022-07-01
CN114697348B (zh) 2023-08-22

Similar Documents

Publication Publication Date Title
WO2021052263A1 (zh) 语音助手显示方法及装置
WO2021027267A1 (zh) 语音交互方法、装置、终端及存储介质
WO2021063343A1 (zh) 语音交互方法及装置
WO2020168929A1 (zh) 对特定路线上的特定位置进行识别的方法及电子设备
WO2020151387A1 (zh) 一种基于用户运动状态的推荐方法及电子设备
WO2021213164A1 (zh) 应用界面交互方法、电子设备和计算机可读存储介质
WO2020207354A1 (zh) 任务处理方法、装置、终端以及计算机可读存储介质
WO2022135214A1 (zh) 分布式实现方法、分布式系统、可读介质及电子设备
WO2021233079A1 (zh) 一种跨设备的内容投射方法及电子设备
WO2020150917A1 (zh) 一种应用权限的管理方法及电子设备
WO2022127787A1 (zh) 一种图像显示的方法及电子设备
WO2022199509A1 (zh) 应用执行绘制操作的方法及电子设备
WO2020077540A1 (zh) 一种信息处理方法及电子设备
WO2020073288A1 (zh) 一种触发电子设备执行功能的方法及电子设备
WO2021253975A1 (zh) 应用程序的权限管理方法、装置和电子设备
WO2021052415A1 (zh) 资源调度方法及电子设备
WO2022033320A1 (zh) 蓝牙通信方法、终端设备及计算机可读存储介质
WO2022017474A1 (zh) 任务处理方法及相关装置
WO2021104122A1 (zh) 呼叫需求响应方法、装置及电子设备
WO2022160991A1 (zh) 权限控制方法和电子设备
WO2022078105A1 (zh) 内存管理方法、电子设备以及计算机可读存储介质
WO2021218429A1 (zh) 应用窗口的管理方法、终端设备及计算机可读存储介质
WO2023066395A1 (zh) 一种应用运行方法以及相关设备
WO2022007707A1 (zh) 家居设备控制方法、终端设备及计算机可读存储介质
WO2022135157A1 (zh) 页面显示的方法、装置、电子设备以及可读存储介质

Legal Events

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

Ref document number: 21909211

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21909211

Country of ref document: EP

Kind code of ref document: A1