Cross-device access control method, related apparatus and system

By using cross-device access control methods and comprehensively considering the caller's information to determine the priority of access requests, the problem of unreasonable resource scheduling in distributed device scenarios is solved, the actual needs of users are met, and the user experience is improved.

CN114996667BActive Publication Date: 2026-04-10HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2022-03-02
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In distributed device scenarios, existing technologies cannot effectively solve the problem of how to reasonably schedule the demand of multiple devices to access the same resource at the same time and meet the access needs of each device.

Method used

By using cross-device access control methods, the relevant information of each caller is comprehensively considered, such as logged-in user, device type, caller status and type, to determine the priority of access requests and respond to requests with higher priority.

Benefits of technology

It enables the rational allocation of resources based on the caller's relevant information, thereby meeting the user's actual needs and improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114996667B_ABST
    Figure CN114996667B_ABST
Patent Text Reader

Abstract

The application provides a cross-device access control method, related device and system. In the method, when an electronic device receives access requests for accessing a same resource initiated by multiple electronic devices respectively, the electronic device can determine priorities of the access requests according to a user currently logged into the multiple electronic devices, device types of the multiple electronic devices, running states of callers initiating the access requests, types of the callers and the like, and preferentially respond to the access requests with higher priorities. In this way, the electronic device can comprehensively consider relevant information of the callers to reasonably schedule resources of the electronic device and provide services for the callers, thereby meeting actual demands of the user.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to the Chinese Patent Application No. 202110230407.3, filed on March 2, 2021, entitled “Cross-device Access Control Method, Related Device and System”, the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application relates to the field of computer and communication technology, and in particular to a cross-device access control method, related device and system. BACKGROUND

[0003] In a single device scenario, each application (APP) in the device can access various types of resources in the device. When multiple APPs in the single device simultaneously access a certain resource, the resource management module in the device can determine how to respond to the request of multiple APPs accessing the same resource according to the state of the multiple APPs, so as to reasonably schedule resources and meet user needs.

[0004] With the development of intelligent terminals, the types and quantities of devices in users' lives are also increasing, and distributed scenarios in which various devices interwork and interconnect are gradually being realized. In distributed scenarios, devices share resources with each other, such as computing power, storage resources, network resources, etc., which will become a future trend. When multiple devices simultaneously access resources in the same device, how to reasonably schedule resources to meet the needs of various devices accessing resources is a problem that needs to be solved at present. SUMMARY

[0005] The present application provides a cross-device access control method, related device and system, and an electronic device can comprehensively consider the relevant information of each invoker to reasonably schedule its own resources and provide services for each invoker, thereby meeting the actual needs of users.

[0006] In a first aspect, an embodiment of the present application provides a cross-device access control method. The method is applied to a communication system including a first device, a second device, and a third device. A first invoker is installed in the first device, and a second invoker is installed in the second device. The first invoker and the second invoker are application programs (APPs) or function components. An APP is a program entity that implements multiple functions, and a function component is a program entity that implements a single function. The method includes the following steps. The first device sends a first access request to the third device. The first access request is used for the first invoker to access a first resource in the third device. The second device sends a second access request to the third device. The second access request is used for the second invoker to access the first resource. The third device determines a priority of the first access request according to one or more of the following: a user logged into the first device, a type of the first device, a running state of the first invoker, and a type of the first invoker. The third device determines a priority of the second access request according to one or more of the following: a user logged into the second device, a type of the second device, a running state of the second invoker, and a type of the second invoker. If the priority of the first access request is higher than the priority of the second access request, the third device accesses the first resource in response to the first access request and rejects the second access request.

[0007] In a second aspect, an embodiment of the present application provides an access control method. The method is applied to a third device. The method includes the following steps. The third device receives a first access request sent by a first device. The first access request is used for a first invoker to access a first resource in the third device. The first invoker is installed in the first device. The third device receives a second access request sent by a second device. The second access request is used for a second invoker to access the first resource. The second invoker is installed in the second device. The first invoker and the second invoker are application programs (APPs) or function components. An APP is a program entity that implements multiple functions, and a function component is a program entity that implements a single function. The third device determines a priority of the first access request according to one or more of the following: a user logged into the first device, a type of the first device, a running state of the first invoker, and a type of the first invoker. The third device determines a priority of the second access request according to one or more of the following: a user logged into the second device, a type of the second device, a running state of the second invoker, and a type of the second invoker. If the priority of the first access request is higher than the priority of the second access request, the third device accesses the first resource in response to the first access request and rejects the second access request.

[0008] The method of the first aspect or the second aspect can be implemented as follows: when an electronic device receives access requests for accessing the same resource initiated by multiple electronic devices respectively, the priority of each access request can be determined according to the user currently logged in to the multiple electronic devices, the device type of the multiple electronic devices, the running state of the caller initiating the access request, the type of the caller, and the like, and the access request with a higher priority can be responded to preferentially. In this way, the electronic device can comprehensively consider the relevant information of each caller to reasonably schedule the resources of the electronic device and provide services for each caller, thereby meeting the actual needs of the user.

[0009] In some embodiments of the method of the first aspect or the second aspect, the third device can determine that the priority of the first access request is higher than the priority of the second access request in any one or more of the following cases:

[0010] 1. The user logged in to the first device is the same as the first user, the user logged in to the second device is different from the first user, and the first user is the user logged in to the third device or a preset user. In this way, the access request initiated by the user of the device where the first resource is located can be preferentially met.

[0011] 2. The running state of the first caller is foreground running, and the running state of the second caller is background running. In this way, the access request initiated by the caller running in the foreground can be preferentially met.

[0012] 3. The first caller is a first application in the first device, and the second caller is a non-first application in the second device. In this way, the access request initiated by the first application can be preferentially met.

[0013] 4. The first caller is an application that has been run by the first device within a first time, and the second caller is an application that has not been run by the second device within the first time. In this way, the access request initiated by the application that has been used by the user in the recent period of time can be preferentially met.

[0014] 5. The priority of the type to which the first caller belongs is higher than the priority of the type to which the second caller belongs, and the priority of the type to which the first caller and the second caller belong is set by default by the third device or set by the user.

[0015] 6. The priority of the type to which the first device belongs is higher than the priority of the type to which the second device belongs, and the priority of the type to which the first device and the second device belong is set by default by the third device or set by the user.

[0016] In some embodiments of the method of the first aspect or the second aspect, the third device can determine the information required by the access request sent by each device in the following two ways:

[0017] 1. The third device synchronizes the information required for determining the priority from the other devices after establishing a connection with the other devices.

[0018] Specifically, before receiving the first access request sent by the first device, the third device can establish a first communication connection with the first device, and can receive, based on the first communication connection, one or more of the following sent by the first device: information of a user logged into the first device, a type of the first device, a running state of the first invoker, an identifier of the first application in the first device, and an identifier of an application that has been run within a first time period.

[0019] Specifically, before receiving the second access request sent by the second device, the third device can establish a second communication connection with the second device, and can receive, based on the second communication connection, one or more of the following sent by the second device: information of a user logged into the second device, a type of the second device, a running state of the second invoker, an identifier of the first application in the second device, and an identifier of an application that has been run within a first time period.

[0020] 2. The access request sent by the other device and received by the third device carries the information required for determining the priority.

[0021] Specifically, the first access request can carry one or more of the following: information of a user logged into the first device, a type of the first device, a running state of the first invoker, an identifier of the first application in the first device, and an identifier of an application that has been run within a first time period.

[0022] Specifically, the second access request can carry one or more of the following: information of a user logged into the second device, a type of the second device, a running state of the second invoker, an identifier of the first application in the second device, and an identifier of an application that has been run within a first time period.

[0023] In some embodiments, in combination with the method of the first aspect or the second aspect, before the third device accesses the first resource in response to the first access request, the third device can also generate a third access request for accessing the first resource. The third device can access the first resource in response to the first access request after determining that the priority of the first access request is higher than the priority of the third access request.

[0024] In some embodiments, in combination with the method of the first aspect or the second aspect, the first resource is partially idle or entirely idle. If the priority of the first access request is higher than the priority of the second access request, the third device accesses the idle part of the first resource in response to the first access request. In this way, the idle first resource can be used to respond to the first access request without affecting other access requests that are currently accessing the first resource.

[0025] In some embodiments of the method of the first aspect or the second aspect, the first resource is occupied. Before the third device accesses the first resource in response to the first access request, the third device can determine a priority of a fourth access request that is currently accessing the first resource, and if the priority of the first access request is higher than the priority of the fourth access request, the third device can stop accessing the first resource in response to the fourth access request and access the first resource in response to the first access request. In this way, the priorities of all access requests accessing the first resource are considered comprehensively, and the actual needs of the user are met.

[0026] In some embodiments of the method of the first aspect or the second aspect, if the priority of the first access request and the priority of the second access request are the same, the third device can display a first user interface, the first user interface being configured to display a first option and a second option, the first option corresponding to the first access request and the second option corresponding to the second access request. The third device receives a user operation acting on the first option. The third device accesses the first resource in response to the first access request corresponding to the first option and rejects the second access request. In this way, the electronic device can give priority to the access request selected by the user voluntarily when the priorities of the access requests are the same, and the actual needs of the user can be met and the user experience can be improved.

[0027] In some embodiments of the method of the first aspect or the second aspect, the first resource is an exclusive resource or a shared resource. The exclusive resource can be accessed by only one invoker (for example, an APP) at the same time, and can include, for example, a camera, a fingerprint sensor, a motor, and the like. The shared resource can be accessed by multiple invokers (for example, APPs) at the same time, and can include, for example, a display screen, a memory resource, a computing capability, and the like.

[0028] In a third aspect, an embodiment of the present application provides a cross-device access control method, which is applied to an electronic device, and the electronic device is installed with a first invoker and a second invoker. The first invoker and the second invoker are application programs (APPs) or function components. An APP is a program entity that implements multiple functions, and a function component is a program entity that implements a single function. The method comprises the following steps: the electronic device generates a first access request and a second access request, the first access request being used for the first invoker to access a first resource in the electronic device, and the second access request being used for the second invoker to access the first resource; the electronic device determines a priority of the first access request according to one or more of the following: a running state of the first invoker and a type of the first invoker; the electronic device determines a priority of the second access request according to one or more of the following: a running state of the second invoker and a type of the second invoker; and if the priority of the first access request is higher than the priority of the second access request, the electronic device accesses the first resource in response to the first access request and rejects the second access request.

[0029] The method provided in the third aspect is implemented, and in a single field scenario, when multiple callers of the electronic device call the same resource, the electronic device can determine the priority of each access request according to the running state of the caller who initiates the access request, the type of the caller, and the like, and preferentially respond to the access request with higher priority. In this way, the electronic device can comprehensively consider the relevant information of each caller to reasonably schedule the resources of the electronic device and provide services for each caller, thereby meeting the actual needs of the user.

[0030] The operation performed by the first device, the second device, or the third device in the first aspect or the second aspect or any of the foregoing embodiments is performed by the same electronic device in the method provided in the third aspect, and details can be referred to the foregoing description, which will not be repeated here.

[0031] In the fourth aspect, the embodiments of the present application provide an electronic device, including: a memory, one or more processors; the memory is coupled with the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors invoke the computer instructions to make the electronic device execute the method in the second aspect or any of the embodiments of the second aspect.

[0032] In the fifth aspect, the embodiments of the present application provide a communication system, including a first device, a second device and a third device, and the third device is used to execute the method in the second aspect or any of the embodiments of the second aspect.

[0033] In the sixth aspect, the embodiments of the present application provide an electronic device, including: a memory, one or more processors; the memory is coupled with the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors invoke the computer instructions to make the electronic device execute the method in the third aspect or any of the embodiments of the third aspect.

[0034] In the seventh aspect, the embodiments of the present application provide a computer readable storage medium, including instructions, when the instructions run on an electronic device, make the electronic device execute the method in the second aspect or any of the embodiments of the second aspect.

[0035] In the eighth aspect, the embodiments of the present application provide a computer program product, when the computer program product runs on a computer, makes the computer execute the method in the second aspect or any of the embodiments of the second aspect.

[0036] By implementing the technical solutions provided in the present application, when an electronic device receives access requests for accessing the same resource initiated by multiple electronic devices respectively, the priority of each access request can be determined according to the user currently logged in the multiple electronic devices, the device type of the multiple electronic devices, the running state of the caller initiating the access request, the type of the caller, and the like, and the access request with a higher priority is responded to preferentially. In this way, the electronic device can comprehensively consider the relevant information of each caller to reasonably schedule its own resources and provide services for each caller, thereby meeting the actual needs of the user. BRIEF DESCRIPTION OF DRAWINGS

[0037] Figure 1 A structural schematic diagram of a communication system 10 provided for an embodiment of the present application is shown in FIG. 1.

[0038] Figure 2 A distributed scenario provided for an embodiment of the present application is shown in FIG. 2.

[0039] Figure 3A A hardware structural diagram of an electronic device 100 provided for an embodiment of the present application is shown in FIG. 3.

[0040] Figure 3B A software structural diagram of the electronic device 100 provided for an embodiment of the present application is shown in FIG. 4.

[0041] Figure 3C Another software structural diagram of the electronic device 100 provided for an embodiment of the present application is shown in FIG. 5.

[0042] Figure 4 A flowchart of a cross-device access control method provided for an embodiment of the present application is shown in FIG. 6.

[0043] Figure 5A Figure 5B A user interface provided for an embodiment of the present application is shown in FIG. 7. DETAILED DESCRIPTION

[0044] The technical solutions in the embodiments of the present application will be described in detail below with reference to the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " represents the meaning of or, for example, A / B can represent A or B; the "and / or" in the text only represents a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases of A alone, A and B together, and B alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0045] ​Hereinafter, the terms "first", "second", "third", "fourth", "fifth", "sixth", "seventh" and "eighth" are used only for descriptive purposes and should not be construed as implying or suggesting relative importance or an implied direction indicating the number of technical features indicated. Therefore, the features defined with "first", "second", "third", "fourth", "fifth", "sixth", "seventh" and "eighth" can explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, the meaning of "a plurality of" is two or more, unless otherwise specified.

[0046] The term "user interface (UI)" in the following embodiments of the present application is a medium interface for interaction and information exchange between an application program or an operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is source code written in a specific computer language such as Java, extensible markup language (XML), etc., and the interface source code is parsed, rendered and finally presented as content recognizable by the user on the electronic device. The commonly used form of user interface is graphic user interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be a visual interface element such as text, icon, button, menu, tab, text box, dialog box, status bar, navigation bar, Widget, etc. displayed in the display screen of the electronic device.

[0047] The resources available for use or access in a device can include hardware resources, software resources in the device, and can also include peripheral resources or accessory resources of the device, etc. The hardware resources can include, for example, the camera, fingerprint sensor, audio device, display screen, motor, flash, etc. possessed by the device. The software resources can include, for example, the memory resources, computing power (such as beautifying algorithm capability, audio and video coding and decoding capability), network capability, positioning function, etc. possessed by the device.

[0048] On the other hand, the resources in the device can also be divided into exclusive resources and shared resources.

[0049] The exclusive resources can be accessed by only one invoker (such as APP) at the same time. When the exclusive resources are being accessed by a certain invoker, the exclusive resources cannot be accessed by other invokers in response to other access requests. The exclusive resources can include, for example, the camera, fingerprint sensor, motor, etc.

[0050] The shared resources can be accessed by multiple invokers (such as APP) at the same time. When the shared resources are being accessed by a certain invoker, the shared resources can still be accessed by other invokers in response to other access requests. The shared resources can include, for example, the display screen, memory resources, computing power, etc.

[0051] In a single device scenario, when one APP in the device accesses an exclusive resource, the device restricts or limits other APPs from accessing the exclusive resource again, so that there is no case that multiple APPs request to access the same exclusive resource at the same time. However, in a distributed scenario including multiple devices, since each caller (e.g., APP) independently initiates an access request, there is a case that multiple callers request to access the exclusive resource in the same device at the same time.

[0052] In a single device scenario, when multiple APPs in the device access a shared resource, the device decides the priority of responding to the access request according to the state (e.g., foreground or background state) of the multiple APPs. For example, the device can preferentially respond to the access request of a foreground APP, and when there is still available part of the shared resource, respond to the access request of a background APP. However, in a distributed scenario including multiple devices, each caller (e.g., APP) independently initiates an access request, and in addition to the foreground or background state, the caller also includes other more attributes, so that only relying on the foreground or background state to decide the order of accessing the shared resource cannot meet the user demand.

[0053] The following embodiments of the present application provide a cross-device access control method. The method is applied to a communication system including multiple electronic devices. In the method, when one electronic device receives access requests from multiple electronic devices respectively initiated to access the same resource, the priority of each access request can be determined according to the user currently logged into the multiple electronic devices, the device type of the multiple electronic devices, the running state of the caller initiating the access request, the type of the caller, and the like, and the access request with higher priority is preferentially responded. In this way, the electronic device can comprehensively consider the related information of each caller to reasonably schedule its own resources and provide services for each caller, thereby meeting the actual demand of the user.

[0054] The definition of the caller and the called can refer to the related description of the following embodiments.

[0055] The strategy or way of the electronic device to determine the priority of each access request can refer to the related description of the following method embodiments, which will not be repeated here.

[0056] Next, first, the communication system provided by the embodiments of the present application is introduced.

[0057] As shown in Figure 1 The embodiments of the present application provide a communication system 10. The communication system 10 includes multiple electronic devices. The communication system 10 can also be referred to as a distributed system 10.

[0058] The plurality of electronic devices included in the distributed system 10 are intelligent terminal devices, which can be of various types, and the embodiments of the present application do not limit the specific types of the plurality of electronic devices. For example, the plurality of electronic devices include mobile phones, and can also include tablets, desktop computers, laptop computers, handheld computers, notebook computers, smart screens, wearable devices, augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, car machines, smart earphones, game consoles, and can also include internet of things (IOT) devices or smart home devices such as smart water heaters, smart lamps, smart air conditioners, and the like. Without limitation, the plurality of devices in the distributed system 10 can also include non-portable terminal devices such as laptops with touch-sensitive surfaces or touch panels, desktop computers with touch-sensitive surfaces or touch panels, and the like.

[0059] When the plurality of electronic devices in the distributed system 10 are all devices deployed in a home, the distributed system 10 can also be referred to as a home distributed system.

[0060] The plurality of electronic devices in the distributed system 10 can be connected by logging in to the same account. For example, the plurality of electronic devices can log in to the same Huawei account and remotely connect and communicate through a server.

[0061] The plurality of electronic devices in the distributed system 10 can also log in to different accounts, but are connected through a binding manner. For example, after the electronic device 100 logs in to an account, the electronic device 100 can bind the electronic device 200 that logs in to a different account or does not log in to an account in a device management application, and then the electronic device 100 and the electronic device 200 can communicate through the device management application. In the following embodiments of the present application, the electronic device 100 can be any one of the plurality of electronic devices in the distributed system 10, and the electronic device 200 can also be any one of the plurality of electronic devices in the distributed system 10. For example, the electronic device 100 is a smart phone and the electronic device 200 is a smart screen.

[0062] The plurality of electronic devices in the distributed system 10 can also establish a connection through scanning a two-dimensional code, NFC, and the like, which are not limited here.

[0063] The communication connection established between the plurality of electronic devices in the distributed system 10 can include, but is not limited to, a wired connection, a wireless connection such as a Bluetooth (BT) connection, a wireless local area network (WLAN) such as a wireless fidelity point to point (Wi-Fi P2P) connection, a near field communication (NFC) connection, an infrared (IR) connection, a remote connection, and the like.

[0064] In addition, the plurality of electronic devices in the distributed system can also be connected and communicate in combination of any of the above manners, which is not limited in the embodiments of the present application.

[0065] The plurality of electronic devices can be configured with different software operating systems (OS), including but not limited to and the like. Among them, Harmony system of Huawei.

[0066] The plurality of electronic devices can also be configured with the same software operating system, for example, can be configured with When the software systems of the plurality of electronic devices are The distributed system 10 can be regarded as a super terminal.

[0067] In the embodiments of the present application, each device in the distributed system 10 can install an application (APP), such as a traditional camera application, a gallery application, a settings application, and the like. In subsequent embodiments, the traditional APP can be referred to as APP.

[0068] In addition, the distributed system 10 provided by the embodiments of the present application can install a distributed application. The distributed application can be a system application or a third-party application, which is not limited here.

[0069] Unlike the APP containing multiple abilities, the distributed application supports deployment in a single ability unit. A distributed application includes one or more functional components.

[0070] The functional component is the smallest ability unit that can be independently run in the electronic device, and is a concept of abstract encapsulation of a single ability. The APP groups multiple functions together, while the functional component exists independently as a service-based basic ability for each function. That is, the functional component is a program entity that implements a single function.

[0071] Each functional component can be independently downloaded, installed and run. Multiple functional components constituting the same distributed application can be deployed in the same electronic device in the distributed system 10 or in different electronic devices.

[0072] The functional component is only a term used in the present embodiment, and its meaning has been described in the present embodiment, and its name does not constitute any limitation on the present embodiment. In addition, in some other embodiments of the present application, the functional component can also be referred to as a system component, a system service, a business function or other terms. The subsequent embodiments of the present application are uniformly described as "functional component".

[0073] For example, The functional component in the may include the following two categories:

[0074] (1) feature ability, FA.

[0075] The FA is a functional component containing one or more sets of UIs, and can provide the ability to interact with the user. For example, the navigation interface in the map application, the video call interface in the instant messaging application, etc. can be implemented as FA.

[0076] In some embodiments, the FA is developed based on the MVVM (model-view-view-model) mode, which separates the view UI and the business logic. The business logic code and the view UI code are deployed separately, and the view UI code can be integrated into other APPs. The view UI code can communicate with the business logic code during the running process to obtain the data required for UI display.

[0077] The FA supports the ability of page templates, such as Empty Ability, Login Ability, Setting Ability, etc. The FA uses a script language (java script, JS) to provide a declarative development mode, uses a class HTML and a cascading style sheet (CSS) declarative programming language as a development language for page layout and page style, and supports the JS language of the ECMAScript specification to provide page business logic.

[0078] The FA has the ability of installation-free, independent running, cross-device UI migration, cross-device binary migration, etc. The FA also has the characteristics of multi-end deployment and distributed execution.

[0079] The FA can call the AA or the APP to realize more and more complex functions.

[0080] (2) particle ability, PA.

[0081] The PA is a UI-free functional component and can provide support for the FA. For example, the PA can provide computing capability as a background service or provide data access capability as a data warehouse. For example, a beautifying function, a positioning function, and an audio / video codec function can be encapsulated as a PA.

[0082] The PA also has the characteristics of multi-end deployment and distributed execution. The PA has only a dependency relationship with a system service and has no dependency relationship with other PAs.

[0083] The PA actually encapsulates remote virtualization, remote calling, PA management, cross-platform compatibility, security, and the like, and exposes a cross-device service enablement and invocation to a developer, so that the computing capability of the device can be called by other devices to complete the computing work in cooperation with other devices. The PA supports a Service Ability and a Data Ability. The Service Ability is used to provide the capability of a background running task. The Data Ability is used to provide a unified data access abstraction to the outside.

[0084] The PA can call the FA or the APP to implement more and more complex functions.

[0085] It can be understood that the “FA” and the “PA” are only a word used in the embodiments, and in some other embodiments of the present application, the “FA” and the “PA” can also be referred to as other names. For example, the “FA” and the “PA” can also be referred to as, for example, an atomic ability (AA), an atomic application, a meta ability, an atomized service, a characteristic ability, and the like.

[0086] The multiple functional components constituting a distributed application can be developed or provided by the same developer or can be developed or provided by multiple developers, and the present application does not limit this. Different developers jointly develop the functional components, which can improve the development efficiency of the distributed application.

[0087] In the embodiments of the present application, the functional components provide standardized interfaces to the outside for calling. The APP can call the functional components. In some cases, the functional components can also call other functional components or APPs. In addition, the called functional components can also continue to call other functional components or APPs, and the multi-level calling manner can be referred to as chain calling.

[0088] After each device in the distributed system 10 establishes a communication connection, each device synchronizes the function component information and APP information of other devices in the distributed system. Specifically, each device can synchronize the names of the function components and APPs installed by itself to other devices, so as to subsequently call the FA, PA and other function components of other devices in the distributed system 10. Which callers can call the FA, PA and other function components, and which other function components can be called, can be pre-set and recorded in each electronic device. In some other embodiments, each device can also synchronize its own device identifier, device type and the like to other devices in the distributed system.

[0089] Reference Figure 2 , Figure 2 An exemplary distributed remote teaching service scenario is shown.

[0090] As shown in Figure 2 , the distributed system includes electronic devices such as smartphones, tablets, smart screens, etc. Each device in the distributed system is connected to each other. The smartphones, tablets and smart screens can be configured with different software operating systems (OS), for example, the smartphones and tablets can be configured with systems, and the smart screens can be configured with systems.

[0091] The smartphone is installed with an "online classroom". The "online classroom" is an application installed in an electronic device that provides teachers and students with various functions required for remote teaching. The name of the "online classroom" is not limited in the embodiments of the present application. The "online classroom" can include the following function components: blackboard function component, whiteboard function component, audio and video codec function component, network connection function component. Among them, the blackboard function component and the whiteboard function component belong to the FA, and the audio and video codec function component and the network connection function component belong to the PA. The blackboard function component provides the function of remote course explanation. The whiteboard function component provides the function of remote question answering. The audio and video codec function component provides the video and audio codec function.

[0092] On the teacher side, when the teacher uses the "online classroom" on the smartphone, the blackboard function component can be migrated or switched to the smart screen, so as to explain the course on the smart screen.

[0093] On the student side, when the student uses the "online classroom" on the smartphone, the whiteboard function component can be migrated or switched to the tablet, so as to answer questions on the tablet.

[0094] Migrating or switching the functional component from one device A to another device B can include the following two: 1, UI migration. When the view UI and business logic of the FA are separated, device A can run the business logic code, and device B can be triggered to run the code of the view UI. From the perspective of the user, it seems that the functional component is migrated from device A to device B. 2, Overall migration. Overall migration refers to device B downloading and installing the functional component from device A or from the network, running the functional component and providing corresponding functions.

[0095] In the remote teaching business scenario, the "online classroom" is the invoker, and the whiteboard functional component in the tablet computer and the blackboard functional component in the smart screen are the invoked.

[0096] Figure 2 Another possible distributed video call business scenario is also shown.

[0097] As Figure 2 shown, the smart phone can also be installed with other distributed applications, such as an instant messaging application. The instant messaging application can provide video call, voice call and other communication functions. The instant messaging application can include the following functional components: a video call functional component, an audio and video codec functional component, and a network connection functional component.

[0098] When the user uses the instant messaging application on the smart phone, the user can migrate or switch the video call functional component of the application to the smart screen, so as to use the camera and display screen of the smart screen to perform video call.

[0099] The blackboard functional component in the "online classroom" described above and the video call functional component in the instant messaging application can be the same functional component. That is, the functional component in the smart screen can be invoked by the "online classroom" and the instant messaging application installed on the smart phone.

[0100] In the video call business scenario, the instant messaging application is the invoker, and the video call functional component (i.e., the video call functional component) in the smart screen is the invoked.

[0101] It should be noted that the business scenario shown in Figure 2 is only used to assist in the description of the technical solutions of the embodiments of the present application. In actual business scenarios, Figure 2 the distributed system shown in

[0102] Through Figure 1 the distributed system 10 shown in Figure 2The distributed scenario shown can integrate the software and hardware capabilities of different devices to achieve intelligent full-scene experience.

[0103] In subsequent embodiments of the present application: the party that initiates to call a functional component or an APP can be referred to as a caller. The caller may, for example, be an APP, a service, an FA or a PA. The initial initiator of the entire calling chain can be referred to as a first caller. The first caller may, for example, be an APP or an FA. For example, the calling chain is: APP1 calls PA1, PA1 calls PA2, and PA2 calls FA1. APP1 is the first caller. For another example, the calling chain is: FA1 calls PA1, and PA1 calls PA2. FA1 is the first caller.

[0104] In the entire calling chain, the party that is called in the middle and the party that is called at the end can be referred to as a callee. The callee may, for example, be an APP, an FA or a PA.

[0105] In some embodiments of the present application, the caller can also be referred to as a subject application, and the callee can also be referred to as an object application.

[0106] In the calling chain, the caller and the callee can be deployed in the same electronic device or in different electronic devices.

[0107] The device where the caller is located is referred to as a subject device, and the device where the callee is located is referred to as an object device.

[0108] The application referred to in the following embodiments of the present application can include an APP or a functional component.

[0109] In embodiments of the present application, when an electronic device in a distributed system receives access requests for accessing the same resource initiated by multiple electronic devices respectively, the priority of each access request can be determined according to the user currently logged in to the multiple electronic devices, the running state of the caller that initiates the access request, the type of the caller, and the like, and the access request with higher priority is responded to preferentially.

[0110] Reference Figure 3A , Figure 3A A hardware structure diagram of an electronic device 100 provided in embodiments of the present application is shown. The electronic device 100 can be any electronic device in the distributed system 10 shown. The electronic device 100 is an object device. Figure 1 As shown in FIG. 1, the distributed system 10 includes a plurality of electronic devices 100, 200, 300 and 400.

[0111] As shown in FIG. 1, the distributed system 10 includes a plurality of electronic devices 100, 200, 300 and 400. Figure 3AAs shown, the electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric 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, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0112] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements. The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0113] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices, or can be integrated into one or more processors.

[0114] In the embodiments of the present application, the processor is configured to, after the electronic device receives access requests for accessing the same resource in the electronic device 100 sent by other electronic devices, determine the priority of each access request according to the user currently logged into the other electronic device, the device type of the other electronic device, the running state of the caller initiating the access request, the type of the caller, and the like, and preferentially respond to the access request with higher priority.

[0115] The controller can generate operation control signals according to the instruction operation code and the timing signal, and complete the control of fetching and executing instructions.

[0116] The processor 110 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can store instructions or data that have just been used or are used repeatedly by the processor 110. If the processor 110 needs to use the instructions or data again, it can be directly called from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thereby improving the efficiency of the system.

[0117] The wireless communication function of the electronic device can be realized through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, etc.

[0118] The antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0119] The mobile communication module 150 can provide a solution including 2G / 3G / 4G / 5G wireless communication applied to the electronic device. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves radiated through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be arranged in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 can be arranged in the same device.

[0120] The modem processor can include a modulator and a demodulator. The modulator is configured to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal processed by the baseband processor is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a microphone 170B, etc.), or displays an image or a video through the display 194. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of the processor 110 and disposed in the same device as the mobile communication module 150 or other functional modules.

[0121] The wireless communication module 160 can provide a wireless communication solution applied to the electronic device, including wireless local area networks (WLAN) (such as a wireless fidelity (Wi-Fi) network), Bluetooth (BT), a global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, and the like. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives an electromagnetic wave via the antenna 2, demodulates and filters the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and radiate it as an electromagnetic wave via the antenna 2.

[0122] In some embodiments, the antenna 1 and the mobile communication module 150 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device can communicate with a network and other devices through wireless communication technologies. The wireless communication technologies can include 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, and / or IR technologies, etc. The GNSS can include global positioning system (GPS), global navigation satellite system (GLONASS), beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and / or satellite based augmentation systems (SBAS).

[0123] In some embodiments of the present application, the mobile communication module 150 or the wireless communication module 160 can be used to establish a communication connection with other electronic devices in the distributed system 10, and the specific manner of establishing the communication connection can refer to the related description. After the communication connection is established, the mobile communication module 150 or the wireless communication module 160 can also be used to receive the user information of the other electronic devices that is currently logged in to the other electronic devices, the device type of the other electronic devices, the running state of each application in the other electronic devices, the identification of the first application, the identification of the most recently used application, etc. The mobile communication module 150 or the wireless communication module 160 can also be used to receive the access request for accessing the same resource in the electronic device 100 sent by the other electronic devices. Figure 1 Figure 1 In some embodiments of the present application, the mobile communication module 150 or the wireless communication module 160 can be used to establish a communication connection with other electronic devices in the distributed system 10, and the specific manner of establishing the communication connection can refer to the related description. After the communication connection is established, the mobile communication module 150 or the wireless communication module 160 can also be used to receive the user information of the other electronic devices that is currently logged in to the other electronic devices, the device type of the other electronic devices, the running state of each application in the other electronic devices, the identification of the first application, the identification of the most recently used application, etc. The mobile communication module 150 or the wireless communication module 160 can also be used to receive the access request for accessing the same resource in the electronic device 100 sent by the other electronic devices.

[0124] ​The electronic device 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, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs that execute program instructions to generate or change display information.

[0125] The display screen 194 is used to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diode (QLED), and the like. In some embodiments, the electronic device can include 1 or N display screens 194, N being a positive integer greater than 1.

[0126] In the embodiments of the present application, the display screen 194 is used to display the user interface provided in the subsequent embodiments.

[0127] The electronic device can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor, and the like.

[0128] The ISP is used to process data fed back by the camera 193. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing to convert it into an image visible to the naked eye. The ISP can also optimize algorithms for image noise, brightness, and skin color. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be disposed in the camera 193.

[0129] The camera 193 is used to capture still images or videos. An object projects an optical image through a lens to a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transmitted to an ISP to be converted into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into an image signal in a standard format, such as RGB, YUV, etc. In some embodiments, the electronic device can include one or N cameras 193, where N is a positive integer greater than 1.

[0130] The digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.

[0131] The video codec is used to compress or decompress digital videos. The electronic device can support one or more video codecs. In this way, the electronic device can play or record videos in multiple encoding formats, such as moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.

[0132] The NPU is a neural-network (NN) computing processor, which is inspired by the structure of biological neural networks, such as the transmission mode between human brain neurons, and can quickly process input information and continuously self-learn. Through the NPU, the electronic device can realize intelligent cognition applications, such as image recognition, face recognition, speech recognition, text understanding, etc.

[0133] In the embodiments of the present application, the internal memory 121 can be used to store the user information currently logged into another electronic device in the distributed system 10, the device type of the other electronic device, the running state of each application in the other electronic device, and the first application and other information synchronized from the other electronic device.

[0134] The internal memory 121 can also be used to store the calling relationship between the callee and the corresponding caller in the electronic device 100. The calling relationship includes: a calling relationship ID, instance information of the callee, and information of each caller that calls the instance. The specific content of the calling relationship can be referred to the related description of the subsequent embodiments.

[0135] The internal memory 121 can also be used to store priority rules or strategies used by the processor 110 to determine the priority of each access request. The specific content of the priority strategy can be referred to the detailed description of the subsequent method embodiments.

[0136] The internal memory 121 can include one or more random access memories (RAMs) and one or more non-volatile memories (NVMs).

[0137] The random access memory can include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, such as the fifth generation DDR SDRAM commonly referred to as DDR5 SDRAM), etc.; the non-volatile memory can include disk storage devices, flash memory.

[0138] The flash memory can include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operation principle, and can include single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential order, and can include universal flash storage (UFS), embedded multi media Card (eMMC), etc. according to the storage specification.

[0139] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of an operating system or other programs running, and can also be used to store data of users and application programs, etc.

[0140] The non-volatile memory can also store executable programs and data of users and applications, which can be loaded into the random access memory in advance for direct reading and writing by the processor 110.

[0141] The external memory interface 120 can be used to connect an external non-volatile memory to expand the storage capacity of the electronic device. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to realize data storage functions. For example, files such as music and videos are stored in the external non-volatile memory.

[0142] The electronic device can realize audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.

[0143] The pressure sensor 180A is used to sense a pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194.

[0144] The touch sensor 180K is also referred to as a "touch device". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also referred to as a "touch screen". The touch sensor 180K is used to detect a touch operation acting on or near the touch sensor 180K. The touch sensor 180K can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device, which is different from the position of the display screen 194.

[0145] Reference Figure 3B , Figure 3B The software structure schematic diagram of the electronic device 100 provided by the embodiments of the present application is shown.

[0146] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture, etc. Exemplarily, the software system of the electronic device 100 includes but is not limited to Linux or other operating systems.

[0147] The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and the system library, and the kernel layer.

[0148] The application layer can include a series of application packages.

[0149] As shown in Figure 3B , the application packages can include APPs, such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc. The application layer can also include functional components, such as FA, PA, etc.

[0150] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the application layer. The application framework layer includes some pre-defined functions.

[0151] As shown in Figure 3B , the application framework layer can include window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0152] The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, and capture the screen, etc.

[0153] The content provider is used to store and obtain data, and make the data accessible to the application. The data can include video, image, audio, dialed and received calls, browsing history and bookmarks, phonebook, etc.

[0154] The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build an application. A display interface can be composed of one or more views. For example, a display interface including a short message notification icon can include a view for displaying text and a view for displaying pictures.

[0155] The phone manager is used to provide the communication function of the electronic device 100. For example, the management of call status (including call connection, call hang-up, etc.).

[0156] The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, etc.

[0157] The notification manager makes the application display notification information in the status bar, which can be used to convey a type of message that can automatically disappear after a short stay without user interaction. For example, the notification manager is used to inform the completion of download, message reminder, etc. The notification manager can also be a notification in the form of a chart or a scroll bar text appearing in the top status bar of the system, such as a notification of an application running in the background, or a notification in the form of a dialogue window appearing on the screen. For example, the text information is prompted in the status bar, a prompt sound is emitted, the electronic device vibrates, the indicator light flashes, etc.

[0158] The Android Runtime includes a core library and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.

[0159] The core library contains two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.

[0160] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java file of the application layer and the application framework layer into a binary file. The virtual machine is used to perform the management of the object life cycle, the management of the stack, the management of the thread, the management of the security and the exception, and the garbage collection and the like.

[0161] The system library can include a plurality of functional modules. For example: a surface manager, media libraries, a three-dimensional graphics processing library (for example: OpenGL ES), a 2D graphics engine (for example: SGL) and the like.

[0162] The surface manager is used for managing the display subsystem, and provides a plurality of applications with the fusion of 2D and 3D layers.

[0163] The media library supports a plurality of commonly used audio, video format playback and recording, and static image files and the like. The media library can support a plurality of audio and video coding formats, for example: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG and the like.

[0164] The three-dimensional graphics processing library is used for realizing three-dimensional graphics drawing, image rendering, synthesis, and layer processing and the like.

[0165] The 2D graphics engine is a drawing engine for 2D drawing.

[0166] The kernel layer is a layer between hardware and software. The kernel layer at least contains a display driver, a camera driver, an audio driver, and a sensor driver.

[0167] Reference Figure 3C , Figure 3C Another software structure schematic diagram of an electronic device 100 provided by the embodiment of the present application is provided.

[0168] As shown in Figure 3C , the electronic device 100 can include the following modules: a device information management module, a device information library, an application state management module, an application state library, a calling relationship management module, a calling relationship library, a priority management module, a priority policy library, and a distributed resource scheduling module. Among them:

[0169] The device information management module is configured to synchronize user information of other electronic devices in the distributed system, and to synchronize user information of the electronic device 100 to other electronic devices in the distributed system. The user information of the electronic device refers to information of a user currently logged into the electronic device, such as an account, a name, and the like.

[0170] The device information library is configured to store user information of other electronic devices in the distributed system, and to store user information of the electronic device 100.

[0171] The application state management module is configured to synchronize running states of various applications (including APPs and function components) in other devices in the distributed system, and to synchronize running states of various applications in the electronic device 100 to other electronic devices in the distributed system. The running states of the applications can include foreground running and background running.

[0172] The application state library is configured to store running states of various applications in other electronic devices in the distributed system, and to store running states of various applications in the electronic device 100.

[0173] The calling relationship management module is responsible for maintaining a calling relationship composed of a caller and a callee that provides services for the caller, and storing the calling relationship in the calling relationship library.

[0174] The calling relationship library is configured to store a calling relationship composed of a caller and a callee. The calling relationship includes a calling relationship ID, instance information of the callee, and caller information of various callers that call the instance.

[0175] The calling relationship ID can be assigned by a subject device. For the same calling relationship, the object device (i.e., the electronic device 100) and the subject device can share the same calling relationship ID. The calling relationship ID can be carried in an access request sent to the electronic device 100, and assigned by the subject device and sent to the electronic device 100.

[0176] The instance information of the callee can include a device ID of the object device, an APP ID of the callee, a user ID (UID) of the instance, and a process identifier (PID). The PID is an identity of the instance, and the electronic device assigns a unique PID to the instance when running the instance.

[0177] The caller information includes an application identifier (APP ID) of the caller, and can further include one or more of the following: a device ID of the subject device, a developer signature of the caller, a user ID (UID) of the caller, and an account ID of the subject device.

[0178] APP ID, used to identify the APP or functional component.

[0179] device ID, used to identify the device. The device ID may be, for example, the name, serial number, media access control (MAC) address, or the like of the device.

[0180] developer signature, used to identify the developer.

[0181] UID, used to identify the user to which the APP or functional component belongs. In general, the electronic device assigns different UIDs to different APPs or functional components installed, for distinction. In some embodiments, the electronic device may assign the same UID to each APP or functional component developed by the same developer. The same APP or functional component may have different UIDs in different electronic devices.

[0182] account ID, used to identify the user currently logged into the electronic device, for example, a Huawei account.

[0183] Referring to Table 1 below, an example of the invocation relationship stored in the invocation relationship library is shown.

[0184]

[0185] Table 1

[0186] As can be seen from Table 1, the APP or functional component with the identifier "ID4" in the electronic device 100 is invoked by 3 invokers. The electronic device 300 creates 2 instances, one of which provides services for the invoker in the electronic device 200, and the other of which provides services for the two invokers developed by the same developer in the electronic device 300 and the electronic device 400.

[0187] The priority policy library is used to store the priority policy used by the electronic device 100 to determine the priority of each access request. The manner of formulating the priority policy and the specific content can be referred to the detailed description of the subsequent method embodiments, and will not be described here.

[0188] The priority policy management module is used to determine the priority of each access request according to the user information of other devices stored in the device information library, the application state of the invoker stored in the application state library, and the priority policy stored in the priority policy library.

[0189] The distributed resource scheduling module is used to respond to the access requests in priority according to the priority of each access request.

[0190] Figure 3CThis is merely an illustrative example; the electronic device 100 provided in this application embodiment may also include more or fewer modules, and no limitation is made here.

[0191] Figure 3C The module of the electronic device 100 shown can be located in Figure 3B The application framework layer, system service layer, kernel layer, etc. of the electronic device 100 are not limited here.

[0192] based on Figure 1 Distributed system 10 shown, Figure 3A The hardware structure of the electronic device 100 shown, and Figure 3B and Figure 3C The software structure of the electronic device 100 shown is described below. The cross-device access control method provided in the embodiments of this application is described in detail below.

[0193] refer to Figure 4 , Figure 4 This is a flowchart illustrating a cross-device access control method provided in an embodiment of this application. Figure 4 As shown, the method may include the following steps:

[0194] S101, Electronic device 100 establishes a communication connection with the main device, and the number of main devices is one or more.

[0195] The number of electronic devices 100 is one, and electronic device 100 can be any electronic device in the distributed system 10.

[0196] The number of main devices can be one or more. The main device can be any electronic device in the distributed system 10 other than electronic device 100.

[0197] This application does not limit the method by which the electronic device 100 and the main device establish a communication connection. For example, a communication connection can be established by logging into the same account, binding the device, scanning a QR code, etc. This application also does not limit the type of communication connection established between the electronic device 100 and the main device. For example, it may include wired connections, wireless connections such as Bluetooth connections, Wi-Fi P2P connections, NFC connections, IR connections, and remote connections, etc. See details for further information. Figure 1 The relevant description in the document.

[0198] Optional step S102: The main device synchronizes its own device information to the electronic device 100.

[0199] After the electronic device 100 and the host device establish a communication connection, the electronic device 100 and the host device can synchronize application (including APP and functional component) information in each other based on the communication connection, for example, an identifier or a name of the application. In this way, resources can be called between each device and resource sharing can be achieved.

[0200] In the embodiments of the present application, the electronic device 100 and the host device can also synchronize device information of each other. Exemplarily, the device information in the host device includes one or more of the following: information of a user logged into the host device, a device type of the host device, a running state of each application in the host device, an identifier of a first application in the host device or an identifier of a recently used application. Each application in the host device includes a caller in the host device involved in the subsequent steps. Wherein:

[0201] A user can log into the electronic device through user information. The user information can include, for example, an account, a mobile phone number, an email address, a name, and the like. The user logs into the host device, including the following two cases: 1. The user logs into a software system of the electronic device. For example, the user logs into an emotion user interface (EMUI) installed in a Huawei mobile phone through a Huawei account. 2. The user logs into an application in the electronic device. For example, the user logs into a social application in the electronic device through a social account.

[0202] The device type of the host device can include, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a smart screen, a wearable device, a car machine, a smart earphone, a game machine, a smart home device, and the like.

[0203] The running state of the application can include foreground running and background running. One electronic device can run multiple applications (including APP and functional component) at the same time, and the application providing the content displayed on the current display screen of the electronic device is in a foreground running state, and other applications running in the electronic device are in a background running state.

[0204] The first application can include one or more applications, and the first application can be an application set by default of the host device or set by the user. For example, the first application can include a home screen application, which refers to an application directly started by a software system in the electronic device after the software system is started. After the user clicks the home key, the electronic device always displays an interface provided by the home screen application. The home screen application is usually a desktop containing multiple application icons, or other interfaces set by the user, which are not limited here. The first application in different host devices can be the same or different, which are not limited here.

[0205] The recently used application refers to an application (including an APP and a functional component) that is run by the electronic device in a first time. The first time can be pre-set, for example, 5 minutes, 10 minutes, 15 minutes, and the like, which is not limited herein.

[0206] It can be understood that the information of the user logged into the subject device, the running state of each application in the subject device, the identifier of the first application or the identifier of the recently used application mentioned above can change in the process of the user operating the subject device. Therefore, the device information at different time points can be different.

[0207] In some embodiments of the present application, each device in the distributed system 10 can periodically synchronize its device information to other electronic devices.

[0208] In S103, the subject device sends an access request to the electronic device 100, and the access request carries the identifier of the invoker, the identifier of the invoker, and the indication information of the first resource. The access request is used to invoke the invoker in the subject device to call the invoker in the electronic device 100, and access the first resource in the electronic device 100 through the invoker.

[0209] The invoker is installed in the subject device, and the invoker is installed in the electronic device 100. The invoker and the invoker can be an APP or a functional component. The invoker and the invoker are specific to which application depends on the user operation.

[0210] When the number of subject devices is more than one, the invokers in different subject devices can be different, which is not limited herein. For example, one subject device can invoke the camera of the electronic device 100 when running a video call application, and another subject device can invoke the camera of the electronic device 100 when running a photographing application.

[0211] When the number of subject devices is more than one, the invokers in different subject devices can be different, but the first resource requested to access is the same. The first resource can be a software resource or a hardware resource, which can be referred to the related description in the foregoing.

[0212] In some embodiments, the subject device can send an access request to the electronic device 100 in response to the received user operation. For example, when the user uses a video call application on the subject device (for example, a mobile phone), the user can input a user operation to trigger the subject device to send an access request to the electronic device 100 (for example, a smart screen) to invoke the camera and the display screen of the electronic device 100 to perform video call.

[0213] In some embodiments, the subject device can also autonomously initiate the access request to the electronic device 100 in some cases. For example, when the subject device is running a take-out application, it can autonomously call the positioning function in the electronic device 100 to obtain positioning data.

[0214] In some embodiments, the subject device can first determine that the caller corresponding to the access request generated by itself has the permission to access the first resource, and then send the access request to the electronic device 100.

[0215] In some embodiments, the access request sent by the subject device to the electronic device 100 can also carry one or more of the following information: information of the user logged into the subject device, device type of the subject device, running state of the caller in the subject device, whether the caller in the subject device is the first application or the recently used application.

[0216] Some of the device information in the subject device, such as information of the user logged into the subject device, device type of the subject device, and identifier of the first application, which do not change or change less frequently, can be synchronized by the subject device to the object device in S102. Information that changes over time or changes more frequently, such as the running state of the caller in the subject device and the identifier of the recently used application, can be carried in the access request sent by the subject device to the electronic device 100.

[0217] Optionally, S104, the electronic device 100 generates an access request for the caller in the electronic device 100 to call the callee in the electronic device 100 and access the first resource in the electronic device 100 through the callee.

[0218] In some embodiments, the caller in the electronic device 100 itself can also have the demand to access the first resource, and therefore, the electronic device 100 itself can also generate an access request for accessing the first resource.

[0219] The electronic device 100 can generate the access request in response to a user operation, or can autonomously generate the access request in some cases, which is not limited here.

[0220] In the access request generated by the electronic device 100, the caller and the callee in the electronic device 100 corresponding to the access request are specific applications, which depends on the user operation.

[0221] S105, the electronic device 100 determines the priority of each access request according to the priority strategy.

[0222] From the above description of the access request, it can be seen that each access request corresponds to an initiating device (for example, a subject device or the electronic device 100) of the access request, a caller, and a callee. The initiating device, the caller, and the callee of each access request can be partially or wholly the same or all different, which is not limited herein.

[0223] In the embodiments of the present application, the priority policy can be formulated according to one or more of the following factors: a user currently logged into the initiating device (i.e., the subject device) of the access request, a device type of the subject device, a running state of the caller, or a type of the caller.

[0224] In the embodiments of the present application, the applications (including APPs and functional components) or services can be classified from different dimensions.

[0225] For example, according to the importance of the service provided by the application, the application can be classified into different types, such as a sports health type application, a payment type application, a map type application, an instant messaging type application, and the like.

[0226] For example, from the degree of user perception during the running of the application, the application can be classified into a perceivable application and a non-perceivable application. The perceivable application refers to an application that can provide perceivable elements (for example, interface elements, audio, vibration) for the user during the running.

[0227] For another example, from the duration of the running of the application, the application can be classified into a persistent application and a non-persistent application. The persistent application refers to an application that needs to be continuously running for a long time, such as a telephone application, a WLAN application, and the like.

[0228] For another example, the service can also be classified into a system service and a third-party service. The system service can include, for example, an activity manager service (AMS), a PMS (package manager service), and the like.

[0229] For another example, the service can also be classified into a native service, such as an init, kswapd, installd, and the like.

[0230] Among the above factors affecting the priority policy, the user currently logged into the initiating device of the access request and the running state of the caller can change with user operations. The type of the caller usually belongs to an objective attribute, and the type of the caller is determined after the caller is determined.

[0231] The priority policy will be described in detail below, which can include one or more of the following:

[0232] 1. The priority of an access request initiated by an electronic device logged in by a specific user is higher than the priority of an access request initiated by an electronic device logged in by another user.

[0233] The specific user can be a user currently logged in to the electronic device 100, that is, an electronic device initiated by a user with the same login user as the electronic device 100 has a higher priority of access request. In this way, the access request initiated by the user of the device where the first resource is located can be prioritized.

[0234] The specific user can also be pre-set by the user, for example, the user can set the priority order of multiple users in advance. The priority of an access request initiated by an electronic device logged in by a high-priority user is higher than the priority of an access request initiated by an electronic device logged in by a low-priority user.

[0235] 2. The priority of an access request corresponding to a caller running in the foreground is higher than the priority of an access request corresponding to a caller running in the background.

[0236] 3. The priority of an access request initiated by a device (i.e., an electronic device) where a callee is located is higher than the priority of an access request initiated by another device.

[0237] 4. The priority of an access request corresponding to a caller of a high-priority type is higher than the priority of an access request corresponding to a caller of a low-priority type.

[0238] The priority of each type of application or service can be set by default or pre-set by the user, which is not limited here. For example, the priority of different types of applications or services set by the user from low to high can be: background running application, recently used application, first application, perceivable application, foreground application, persistent application or service, system service, native service. For another example, the electronic device 100 can default to set the priority of payment class applications, instant messaging class applications, map class applications, and sports health class applications to be successively reduced.

[0239] If the priority of the above different users and the priority of the different types of applications or services are pre-set by the user, the user can set it through any one of the electronic devices in the communication system 10. When the user sets the above content through an electronic device other than the electronic device 100 in the communication system 10, the electronic device 100 can obtain the above content through the connection between the electronic device 100 and the other electronic device.

[0240] 5. The priority of an access request initiated by a device of a high-priority type is higher than the priority of an access request initiated by a device of a low-priority type.

[0241] The priority corresponding to each device type can be set by default or set by the user, which is not limited here. In some implementations, the priority of the corresponding type of the device can be set according to the frequency of use, the importance to the user, and other factors. For example, the priority of a mobile phone, a tablet computer, a watch, a sound box, and a smart lamp can decrease in turn.

[0242] Without being limited to one or more of the above, the priority strategy in the embodiments of the present application can also include more content. For example, the user can also pre-set the priority of each application.

[0243] Specifically, after the electronic device 100 obtains each access request, the priority of each access request can be determined according to the priority strategy described above.

[0244] Here, the factors required by the electronic device 100 to confirm the priority of the access request include one or more of the following: the user currently logged into the initiating device of the access request, the device type of the subject device, the running state of the caller, or the type of the caller, and the like. These factors can be synchronized by other devices in S102, or can be obtained directly from the access request. The influence degree of the above-mentioned several factors on the priority of the access request can be different or the same, which can be pre-set. For example, the electronic device 100 can determine the priority of the access request initiated by each subject device according to the user currently logged into the subject device and the running state of the caller, and the logged-in user of the subject device has a greater influence on the priority of the access request than the running state of the caller. For example, assuming that the subject device 1 initiates the access request 1, the subject device 2 initiates the access request 2, the logged-in user of the subject device 1 and the logged-in user of the guest device are the same, the logged-in user of the subject device 2 and the logged-in user of the guest device are not the same, the caller 1 in the subject device 1 is in the background running, and the caller 2 in the subject device 2 is in the foreground running, then the priority of the access request 1 is higher. In some embodiments, the electronic device 100 can use multiple priority strategies in 1-5 above, but only use one of them at a time, and after determining the priority, the next priority strategy is no longer used, and when the priority cannot be determined, the next priority strategy is used.

[0245] For example, assuming that the subject device 1 initiates the access request 1, and the subject device 2 initiates the access request 2, first determine whether the logged-in users of the subject device 1 and the subject device 2 are the same as the user currently logged into the electronic device 100.

[0246] If the logged-in user of the subject device 1 and the user currently logged into the electronic device 100 are the same, and the logged-in user of the subject device 2 and the user currently logged into the electronic device 100 are not the same, it can be determined that the priority of the access request 1 is higher than the priority of the access request 2.

[0247] If the login users of the subject device 1 and the subject device 2 are both the same as the user currently logged into the electronic device 100, the running states of the invoker 1 in the subject device 1 and the invoker 2 in the subject device 2 are further checked.

[0248] If the invoker 1 is in foreground running and the invoker 2 is in background running, it can be determined that the priority of the access request 1 is higher than the priority of the access request 2.

[0249] If the invoker 1 and the invoker 2 are both in foreground running or background running, it can be determined that the priority of the access request 1 is the same as the priority of the access request 2.

[0250] In some embodiments, the priority can be divided into high, medium, low, or more or less levels.

[0251] In other embodiments, the priority can be measured by a score, and the higher the score, the higher the priority.

[0252] S106, the electronic device 100 responds to the access requests according to the priority of each access request, and the access request with high priority is responded to preferentially.

[0253] In some embodiments, if the electronic device 100 obtains the same priority of each access request, the electronic device 100 can output a user interface for providing the user to select the order of responding to each access request, and can respond to the access request selected by the user preferentially.

[0254] Reference Figure 5A , Figure 5A A possible user interface 51 provided by the electronic device 100 is shown.

[0255] As shown in Figure 5A , the user interface 51 displays a plurality of device and invoker options, such as options 501 and 502. The option 501 corresponds to the access request of the video call application in the mobile phone calling the camera, and the option 502 corresponds to the access request of the photo application in the tablet computer calling the camera. If the electronic device 100 receives a user operation, such as a click operation, a long press operation, etc. acting on the option 501, the electronic device 100 then responds to the access request of the photo application in the mobile phone calling the camera preferentially.

[0256] Not limited to the priority strategy provided by the electronic device 100 in S105-S106 to determine the priority of each access request, and the electronic device 100 responds to the access request with high priority preferentially, in some other embodiments of the present application, the priority of the access request responded to preferentially by the electronic device 100 can also be determined by the subject device.

[0257] For example, when the subject device sends an access request to the electronic device 100, the access request can carry a label of priority processing. After the electronic device 100 receives the access request, the electronic device 100 can directly respond to the access request without performing S105-S106. The access request carrying the label of priority processing can be an access request defined by the subject device in advance, which is not limited here.

[0258] Since the first resource can be an exclusive resource or a shared resource, the following describes how the electronic device 100 responds to the access request after determining the access request to be responded to in the two cases.

[0259] 1. The first resource is an exclusive resource.

[0260] If the exclusive resource is currently idle, that is, the exclusive resource is not currently occupied, the electronic device 100 responds to the access request with the highest priority first.

[0261] If the exclusive resource is currently occupied, the electronic device 100 can select any of the following ways to perform:

[0262] (1) Wait for the exclusive resource to be idle, and then respond to the access request with the highest priority first. In this way, the ongoing access operation of the first resource is not affected.

[0263] (2) Compare the priority of the access request currently occupying the exclusive resource with the priority of each access request obtained by the electronic device 100, and respond to the access request with the highest priority. For example, if the priority of the access request obtained by the electronic device 100 is higher than the priority of the access request currently occupying the exclusive resource, the electronic device 100 can terminate the response to the access request currently occupying the exclusive resource, and respond to the access request obtained by the electronic device 100. In this way, the priority of all access requests accessing the first resource can be considered comprehensively, and the actual needs of the user can be met.

[0264] For example, if the electronic device 100 receives multiple access requests for accessing an exclusive camera (that is, the first resource), after the electronic device 100 determines the access request to be responded to, if the camera is currently idle, the electronic device 100 can directly respond to the access request to access the camera. If the camera is currently occupied, the electronic device 100 can wait for the camera to be idle before accessing the camera, or the electronic device 100 can compare the priority of the access request currently occupying the camera with the priority of the access request determined by the electronic device 100 to be responded to. When the priority of the access request determined by the electronic device 100 to be responded to is higher than the priority of the access request currently occupying the camera, the electronic device 100 can terminate the response to the access request currently occupying the camera, and respond to the access request determined by the electronic device 100 to access the camera.

[0265] 2. The first resource is a shared resource.

[0266] If the shared resource is currently idle, the electronic device 100 responds to each access request using the idle resource as much as possible in order of priority until the shared resource is fully occupied. Responding to each access request using the idle resource can not affect the ongoing access operation of the first resource.

[0267] If the shared resource is currently partially occupied or fully occupied, the electronic device 100 can compare the priority of the access request currently occupying the shared resource and each access request obtained by the electronic device 100, and respond to each access request using the shared resource as much as possible in order of priority until the shared resource is fully occupied. For example, if the access request obtained by the electronic device 100 has a higher priority than the access request currently occupying the shared resource, the electronic device 100 can suspend responding to the access request currently occupying the shared resource and respond to the access request obtained by the electronic device 100. In this way, the priority of all access requests accessing the first resource can be considered comprehensively to meet the actual needs of the user.

[0268] After the electronic device 100 responds to a part of the access requests, for other access requests, the electronic device 100 can refuse to respond or can wait for the first resource to be idle and then respond to the remaining other access requests according to the priority of each access request.

[0269] For example, if the electronic device 100 receives multiple access requests for accessing the shared positioning resource (i.e., the first resource), such as an access request 1 for accessing the positioning resource sent by a map APP in the watch and an access request 2 for accessing the positioning resource sent by a sports health APP in the mobile phone, and the priority of the access request 2 is higher than that of the access request 1. If the idle positioning resource in the electronic device 100 can satisfy the access request 1 and the access request 2 at the same time, the electronic device 100 can simultaneously respond to the access request 1 and the access request 2 to access the positioning resource. If part of the positioning resource in the electronic device 100 is occupied and the idle positioning resource cannot satisfy the access request 1 and the access request 2 at the same time, the electronic device 100 can have the following two solutions: 1, responding to the access request 2 with a higher priority first, and then responding to the access request 1 when there is more idle positioning resource. 2, responding to the access request 2 with a higher priority first, and checking the priority of other access requests currently occupying the positioning resource, and if there is an access request with a lower priority than the access request 1, terminating responding to the access request with a lower priority and responding to the access request 1 to access the positioning resource.

[0270] In some embodiments, the electronic device 100 can first determine that the invoker corresponding to the access request has the permission to access the first resource, and then respond to the access request.

[0271] In the embodiments of the present application, when the electronic device 100 determines to respond to the access request, the electronic device 100 can specifically enable the instance of the invoker corresponding to the access request and run the instance to access the first resource in the electronic device 100. The instance is an APP or functional component in a running state. In the embodiments of the present application, the instance can refer to a process or a thread. The process is an execution activity of an application program on a computer. The thread is a single sequential control flow in the execution of an application program. A process can include multiple threads.

[0272] In some embodiments, the electronic device 100 can install the invoker corresponding to each access request in advance. In other embodiments, the electronic device 100 can download and install the invoker from the network after receiving the access request sent by the electronic device 100, or directly download and install the invoker from the subject device.

[0273] The embodiments of the present application do not display the manner in which the electronic device 100 enables the instance in the running process. For example, the electronic device 100 can enable the same instance for the same invoker, and respond to all access requests invoking the invoker through the instance. For another example, the electronic device 100 can enable different instances for different invokers, and the different instances are used to respond to the access requests of different invokers. On this basis, the electronic device 100 can also enable different instances according to one or more of the following: the subject device, the developer of the invoker, the user to which the invoker belongs, or the account of the subject device, etc. When one or more of the above are different, the electronic device 100 can enable different invoker instances to provide services for the invoker.

[0274] In some embodiments, after the electronic device 100 accesses the first resource, the electronic device 100 can perform a series of operations according to the resource, such as displaying a video call interface through a display screen, collecting images through a camera, etc. In some embodiments, after the electronic device 100 accesses the first resource, the electronic device 100 can send the access result back to the initiating device of the access request, such as sending the positioning result or the calculation result to the subject device, etc.

[0275] In some embodiments, the electronic device 100 can output prompt information to prompt the user about the processing result of the electronic device 100 on each access request. The processing result of the electronic device 100 on the access request can include the following: the electronic device 100 successfully responds to the access request, the electronic device 100 refuses to respond to the access request, or the electronic device 100 needs to wait for the first resource to be idle before responding to the access request. The electronic device 100 can output the prompt information in the following ways, but not limited to: displaying visible interface elements in the user interface, playing voice, vibrating, and the like.

[0276] Reference Figure 5B , Figure 5B A possible user interface 52 provided by the electronic device 100 is shown.

[0277] As shown in Figure 5B , the user interface 52 displays prompt information 503, which is used to prompt the user that the electronic device 100 has currently responded to the access request of the camera invoked by the photo application in the mobile phone, and refused to respond to the access request of the camera invoked by the photo application in the tablet computer.

[0278] In some embodiments, the electronic device 100 can also send the processing result of the electronic device 100 on each access request back to the initiating device of the access request. After receiving the processing result, the initiating device of the access request (including the subject device and the electronic device 100) can output prompt information to prompt the user about the processing result of the access request. The initiating device of the access request can output the prompt information in the same way as the electronic device 100, which is not limited here.

[0279] When the access request sent by the subject device is not responded, in some embodiments, the subject device can send the access request to the electronic device 100 again in response to the received user operation, and the electronic device 100 can respond to the same access request in priority. Specifically, the subject device can know that the access request sent by the subject device is not responded through the processing result of the access request fed back by the electronic device, or through the fact that no access result fed back by the electronic device is received within a preset time.

[0280] In some embodiments, when an access request sent by a primary device is not responded to, the primary device may display a user interface indicating that the access request has not been responded to. When the primary device receives a user operation on this user interface, it may send a message to the electronic device 100 to force the electronic device 100 to respond to the access request. Upon receiving this message, if the first resource has a free portion, the electronic device 100 may use the free first resource to respond to the access request sent by the primary device; if the first resource is occupied, it may terminate the response to the currently accessing access request to free up the first resource to respond to the access request sent by the primary device. Here, the primary device that sends the message to the electronic device 100 to force the electronic device 100 to respond to the access request can be any primary device in the distributed system, or a primary device with management authority in the distributed system. A primary device with management authority can be the primary device currently logged into by a user with management authority, or a primary device pre-set by the user; there are no restrictions here. In this way, the primary device can force the object device to execute the access request sent by the primary device under user operation, which can meet the user's actual needs.

[0281] For example, refer to Figure 2 The illustrated distributed remote teaching scenario allows teachers, on their smartphones using the "Online Classroom" feature, to send a request to the FA whiteboard component on a student's tablet to access the camera. If the instant messaging application on the student's tablet is already accessing the camera, the tablet will refuse to respond to the teacher's smartphone's request. Upon receiving the response from the tablet, the teacher's smartphone, knowing its request was unanswered, can send a message to the student's tablet to force the electronic device 100 to respond. Upon receiving this message, the tablet stops responding to the instant messaging application's request to access the camera and responds to the teacher's smartphone's call to the FA whiteboard component to access the camera. This allows the teacher to force students to use the whiteboard component for online learning, meeting the practical needs of remote teaching scenarios.

[0282] exist Figure 4 In the access control methods shown:

[0283] Electronic device 100 can be referred to as a third device, a main device can be referred to as a first device, and another main device can be referred to as a second device.

[0284] The caller in the first device can be referred to as the first caller, and the caller in the second device can be referred to as the second caller.

[0285] The access request sent by the first device to the electronic device 100 can be referred to as a first access request. The access request sent by the second device to the electronic device 100 can be referred to as a second access request.

[0286] The communication connection established between the first device and the third device can be referred to as a first communication connection. The communication connection established between the second device and the third device can be referred to as a second communication connection.

[0287] The instance of the invoker established by the electronic device 100 in response to the first access request can be referred to as a first instance. The instance of the invoker established by the electronic device 100 in response to the second access request can be referred to as a second instance.

[0288] The UID and PID allocated by the electronic device 100 for the first instance can be referred to as a first UID and a first PID respectively. The UID and PID allocated by the electronic device 100 for the second instance can be referred to as a second UID and a second PID respectively.

[0289] The access request generated by the electronic device 100 in S104 can be referred to as a third access request.

[0290] In S106, when the electronic device 100 responds to the access requests according to the priority of each access request in priority, the access request currently accessing the first resource can be referred to as a fourth access request.

[0291] In S106, the user interface (for example, the user interface 51 shown in FIG. 5) output by the electronic device 100 for providing the user to select the order of responding to each access request can be referred to as a first user interface. The option 501 corresponding to the first access request in the first user interface can be referred to as a first option, and the option 502 corresponding to the second access request can be referred to as a second option. Figure 5A

[0292] The above-mentioned cross-device access control method provided by the embodiments of the present application can be implemented. When an electronic device receives access requests for accessing the same resource initiated by multiple electronic devices respectively, the priority of each access request can be determined according to the user currently logged into the multiple electronic devices, the running state of the invoker initiating the access request, the type of the invoker, etc., and the access request with higher priority is responded to in priority. In this way, the electronic device can comprehensively consider the relevant information of each invoker to reasonably schedule its own resources and provide services for each invoker, thereby meeting the actual needs of the user.

[0293] The embodiments of the present application can be combined in any way to achieve different technical effects.

[0294] ​In the above embodiments, all or part of the methods can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the methods can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available media sets. The available media can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)), etc.

[0295] Those of ordinary skill in the art can understand that all or part of the processes in the above embodiments can be implemented by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The storage medium includes ROM or random access memory (RAM), magnetic disk or optical disk, and various media that can store program codes.

[0296] In summary, the above only describes the embodiments of the technical solutions of the present application, and is not used to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made according to the disclosure of the present application shall be included in the protection scope of the present application.

Claims

1. A cross-device access control method, characterized by, The method is applied to a communication system comprising a first device, a second device and a third device, the first device, the second device and the third device are all terminal devices, a first invoker is installed in the first device, a second invoker is installed in the second device; The first invoker and the second invoker are application programs (APPs) or function components; the APP is a program entity for implementing multiple functions, and the function component is a program entity for implementing a single function; The method comprises: The first device and the third device establish a first communication connection, and the first device sends one or more of the following to the third device based on the first communication connection: information of a user logged into the first device, a type of the first device, a running state of the first invoker, an identifier of a first application in the first device, and identifiers of applications run within a first time period; The first device sends a first access request to the third device, the first access request being used for the first invoker to access a first resource in the third device, the first resource comprising a hardware resource and / or a software resource in the third device; The second device and the third device establish a second communication connection, and the second device sends one or more of the following to the third device based on the second communication connection: information of a user logged into the second device, a type of the second device, a running state of the second invoker, an identifier of a first application in the second device, and identifiers of applications run within a first time period; The second device sends a second access request to the third device, the second access request being used for the second invoker to access the first resource; The third device determines a priority of the first access request according to one or more of the following: a user logged into the first device, a running state of the first invoker, and a type of the first invoker; The third device determines a priority of the second access request according to one or more of the following: a user logged into the second device, a running state of the second invoker, and a type of the second invoker; If the priority of the first access request is higher than the priority of the second access request, the third device accesses the first resource in response to the first access request and refuses to respond to the second access request, or accesses the first resource in response to the second access request after the first resource is idle; The priority of the first access request is higher than the priority of the second access request in one or more of the following cases: A user logged into the first device is the same as a first user, and a user logged into the second device is different from the first user, the first user being a user logged into the third device or a preset user; A running state of the first invoker is foreground running, and a running state of the second invoker is background running; The first invoker is a first application in the first device, and the second invoker is a non-first application in the second device. The first application is an application that is set by default in the corresponding device or is set by a user in the corresponding device. The first invoker is an application that is run by the first device at a first time, and the second invoker is an application that is not run by the second device at the first time. The priority of the type to which the first invoker belongs is higher than the priority of the type to which the second invoker belongs. The priorities of the types to which the first invoker and the second invoker belong are set by default by the third device or are set by a user. The type to which an invoker belongs is determined according to one or more of the following: a service provided by the invoker, a degree of awareness of a user when the invoker is running, a duration when the invoker is running, and a provider of the invoker.

2. The method of claim 1, wherein The first access request carries one or more of the following: information of a user logged into the first device, a type of the first device, a running state of the first invoker, an identifier of a first application in the first device, and an identifier of an application that is run at a first time. And / or The second access request carries one or more of the following: information of a user logged into the second device, a type of the second device, a running state of the second invoker, an identifier of a first application in the second device, and an identifier of an application that is run at a first time.

3. The method of claim 1, wherein, Before the third device accesses the first resource in response to the first access request, the method further comprises: The third device generates a third access request, and the third access request is used to access the first resource. The third device determines a priority of the third access request. The third device determines that the priority of the first access request is higher than the priority of the third access request.

4. The method of claim 1, wherein, The first resource is partially idle or entirely idle. If the priority of the first access request is higher than the priority of the second access request, the third device accesses the first resource in response to the first access request, and specifically comprises: If the priority of the first access request is higher than the priority of the second access request, the third device accesses the idle part of the first resource in response to the first access request.

5. The method of claim 1, wherein, The first resource is occupied. Before the third device accesses the first resource in response to the first access request, the method further comprises: Determining a priority of a fourth access request that is currently accessing the first resource. If the priority of the first access request is higher than the priority of the fourth access request, the third device stops accessing the first resource in response to the fourth access request.

6. The method of claim 1, wherein, The method further comprises: If the priority of the first access request is the same as the priority of the second access request, the third device displays a first user interface. The first user interface is used to display a first option and a second option. The first option corresponds to the first access request, and the second option corresponds to the second access request. The third device receives a user operation acting on the first option; The third device accesses the first resource in response to the first access request corresponding to the first option, and rejects the second access request or accesses the first resource in response to the second access request after the first resource is idle.

7. The method according to any one of claims 1 to 6, characterized in that, The first resource is an exclusive resource or a shared resource.

8. A cross-device access control method, characterized by, The method is applied to a third device, and the method comprises: The third device and the first device establish a first communication connection, and the third device receives one or more of the following information sent by the first device based on the first communication connection: information of a user logged into the first device, a type of the first device, a running state of a first invoker in the first device, an identifier of a first application in the first device, and identifiers of applications run within a first time period; The third device receives a first access request sent by the first device, and the first access request is used for the first invoker to access a first resource in the third device, the first resource comprising a hardware resource and / or a software resource in the third device; the first invoker is installed in the first device; The third device and the second device establish a second communication connection, and the third device receives one or more of the following information sent by the second device based on the second communication connection: information of a user logged into the second device, a type of the second device, a running state of a second invoker in the second device, an identifier of a first application in the second device, and identifiers of applications run within a first time period; The third device receives a second access request sent by the second device, and the second access request is used for the second invoker to access the first resource; the second invoker is installed in the second device, the first invoker and the second invoker are application programs (APPs) or function components, the APP is a program entity implementing multiple functions, the function component is a program entity implementing a single function, and the first device, the second device, and the third device are all terminal devices; The third device determines a priority of the first access request according to one or more of the following: a user logged into the first device, a running state of the first invoker, and a type of the first invoker; The third device determines a priority of the second access request according to one or more of the following: a user logged into the second device, a running state of the second invoker, and a type of the second invoker; If the priority of the first access request is higher than the priority of the second access request, the third device accesses the first resource in response to the first access request and rejects the second access request or accesses the first resource in response to the second access request after the first resource is idle. The priority of the first access request is higher than the priority of the second access request in one or more of the following cases: The user logged into the first device is the same as the first user, the user logged into the second device is different from the first user, and the first user is the user logged into the third device or a preset user; The running state of the first invoker is foreground running, and the running state of the second invoker is background running; The first invoker is a first application in the first device, and the second invoker is a non-first application in the second device, wherein the first application is an application that is set by default in the corresponding device or is set by the user in the corresponding device; The first invoker is an application that is run by the first device at a first time, and the second invoker is an application that is not run by the second device at the first time; The priority of the type to which the first invoker belongs is higher than the priority of the type to which the second invoker belongs, and the priorities of the types to which the first invoker and the second invoker belong are set by default by the third device or are set by the user, and the type to which the invoker belongs is determined according to one or more of the following: the service provided by the invoker, the degree of awareness of the user when the invoker is running, the duration when the invoker is running, and the provider of the invoker.

9. The method of claim 8, wherein The first access request carries one or more of the following: information of the user logged into the first device, the type of the first device, the running state of the first invoker, the identifier of the first application in the first device, and the identifier of the application that is run at the first time; And / or, The second access request carries one or more of the following: information of the user logged into the second device, the type of the second device, the running state of the second invoker, the identifier of the first application in the second device, and the identifier of the application that is run at the first time.

10. The method of claim 8, wherein, Before the third device accesses the first resource in response to the first access request, the method further comprises: The third device generates a third access request, and the third access request is used to access the first resource; The third device determines the priority of the third access request; The third device determines that the priority of the first access request is higher than the priority of the third access request.

11. The method of claim 8, wherein, The first resource is partially idle or entirely idle; If the priority of the first access request is higher than the priority of the second access request, the third device accesses the first resource in response to the first access request, specifically comprising: If the priority of the first access request is higher than the priority of the second access request, the third device accesses the idle part of the first resource in response to the first access request.

12. The method of claim 8, wherein, The first resource is occupied; Before the third device accesses the first resource in response to the first access request, the method further comprises: Determining the priority of a fourth access request that is currently accessing the first resource; If the priority of the first access request is higher than the priority of the fourth access request, the third device stops accessing the first resource in response to the fourth access request.

13. The method of claim 8, wherein, The method further comprises: if the priority of the first access request and the priority of the second access request are same, the third device displays a first user interface, the first user interface is used to display a first option and a second option, the first option corresponds to the first access request, and the second option corresponds to the second access request; the third device receives a user operation acting on the first option; the third device accesses the first resource in response to the first access request corresponding to the first option, and rejects the second access request.

14. The method according to any one of claims 8 to 13, characterized in that, The first resource is an exclusive resource or a shared resource.

15. An electronic device, comprising: Comprise: a memory and one or more processors; the memory is coupled with the one or more processors, the memory is used to store computer program code, the computer program code comprises computer instructions, and the one or more processors invoke the computer instructions to enable the electronic device to perform: establish a first communication connection with a first device, based on the first communication connection, receive one or more of the following information sent by the first device: information of a user logged into the first device, type of the first device, running state of a first invoker in the first device, identification of a first application in the first device, and identification of an application running within a first time; receive a first access request sent by the first device, the first access request is used for the first invoker to access a first resource in the third device, the first resource includes a hardware resource and / or a software resource in the third device; the first invoker is installed in the first device; establish a second communication connection with a second device, based on the second communication connection, receive one or more of the following information sent by the second device: information of a user logged into the second device, type of the second device, running state of a second invoker in the second device, identification of a first application in the second device, and identification of an application running within a first time; receive a second access request sent by the second device, the second access request is used for the second invoker to access the first resource; the second invoker is installed in the second device, the first invoker and the second invoker are application programs (APPs) or function components, the APP is a program entity that realizes multiple functions, the function component is a program entity that realizes a single function, and the first device, the second device and the third device are all terminal devices; determine the priority of the first access request according to one or more of the following: user logged into the first device, running state of the first invoker, and type of the first invoker; determine the priority of the second access request according to one or more of the following: user logged into the second device, running state of the second invoker, and type of the second invoker; if the priority of the first access request is higher than the priority of the second access request, access the first resource in response to the first access request and reject the second access request or access the first resource in response to the second access request after the first resource is idle; the priority of the first access request is higher than the priority of the second access request in one or more of the following cases: the user logged into the first device is the same as the first user, and the user logged into the second device is different from the first user, the first user being the user logged into the third device or a preset user; the running state of the first invoker is foreground running, and the running state of the second invoker is background running; the first invoker is a first application in the first device, and the second invoker is a non-first application in the second device, the first application being an application set by default in the corresponding device or an application set by the user in the corresponding device; the first invoker is an application that has been run by the first device at a first time, and the second invoker is an application that has not been run by the second device at the first time; the priority of the type to which the first invoker belongs is higher than the priority of the type to which the second invoker belongs, the priority of the type to which the first invoker and the second invoker belong being set by default by the third device or by the user, the type to which the invoker belongs being determined according to one or more of the following: the service provided by the invoker, the degree of awareness of the user when the invoker is running, the duration of the invoker when running, and the provider of the invoker.

16. The electronic device of claim 15, wherein the first access request carries one or more of the following: information of the user logged into the first device, the type of the first device, the running state of the first invoker, the identifier of the first application in the first device, and the identifier of the application that has been run at the first time; and / or the second access request carries one or more of the following: information of the user logged into the second device, the type of the second device, the running state of the second invoker, the identifier of the first application in the second device, and the identifier of the application that has been run at the first time.

17. The electronic device of claim 15, wherein, The one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform: generating a third access request before accessing the first resource in response to the first access request, the third access request being used to access the first resource; determining the priority of the third access request; determining that the priority of the first access request is higher than the priority of the third access request.

18. The electronic device of claim 15, wherein, The first resource is partially idle or fully idle; and the one or more processors are specifically configured to invoke the computer instructions to cause the electronic device to perform: if the priority of the first access request is higher than the priority of the second access request, the third device accesses the idle part of the first resource in response to the first access request.

19. The electronic device of claim 15, wherein, the first resource is occupied; the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform: determining, before accessing the first resource in response to the first access request, a priority of a fourth access request that is currently accessing the first resource; if the priority of the first access request is higher than the priority of the fourth access request, stopping accessing the first resource in response to the fourth access request.

20. The electronic device of claim 15, wherein, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform: if the priority of the first access request is the same as the priority of the second access request, displaying a first user interface, the first user interface being configured to display a first option and a second option, the first option corresponding to the first access request, the second option corresponding to the second access request; receiving a user operation acting on the first option; accessing the first resource in response to the first access request corresponding to the first option, and rejecting the second access request.

21. The electronic device of any of claims 15-20, wherein, the first resource is an exclusive resource or a shared resource.

22. A computer-readable storage medium comprising instructions, wherein: the instructions, when executed on the electronic device, cause the electronic device to perform the method of any one of claims 8-14.

23. A computer program product, characterised in that, the computer program product, when executed on the computer, cause the computer to perform the method of any one of claims 8-14.

24. A communication system, characterized by the communication system comprises a first device, a second device, and a third device, the third device being configured to perform the method of any one of claims 8-14.

Citation Information

Patent Citations

  • Data ordering method and device, and node server

    CN109412972A

  • Resource collection method and device and electronic equipment

    CN111638966A

  • Application content cross-device circulation method and apparatus, and electronic device

    CN112398855A