[go: up one dir, main page]

CN113938890B - Data sharing method and terminal equipment - Google Patents

Data sharing method and terminal equipment Download PDF

Info

Publication number
CN113938890B
CN113938890B CN202111080481.8A CN202111080481A CN113938890B CN 113938890 B CN113938890 B CN 113938890B CN 202111080481 A CN202111080481 A CN 202111080481A CN 113938890 B CN113938890 B CN 113938890B
Authority
CN
China
Prior art keywords
user
data
user group
mediaprovider
group
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111080481.8A
Other languages
Chinese (zh)
Other versions
CN113938890A (en
Inventor
张亚芹
荆楠楠
孙哲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN202410294541.3A priority Critical patent/CN118400742A/en
Priority to CN202111080481.8A priority patent/CN113938890B/en
Publication of CN113938890A publication Critical patent/CN113938890A/en
Application granted granted Critical
Publication of CN113938890B publication Critical patent/CN113938890B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/30Security of mobile devices; Security of mobile applications
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72463User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions to restrict the functionality of the device
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/03Protecting confidentiality, e.g. by encryption
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Human Computer Interaction (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Automation & Control Theory (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to the technical field of terminals, and discloses a data sharing method and terminal equipment, which are used for solving the problem that user data sharing based on a user space file system Fuse cannot be realized in the prior art. The method comprises the following steps: displaying a user group creation page; based on the user operation of creating the page in the user group, obtaining a plurality of users input by the user; and combining the multiple users into the same user group, and authorizing the access authority of the user space file system Fuse of any user in the user group to other users in the user group. The method provides a user group concept, and in the aspect of operating data in the Fuse system, a plurality of users operate according to the identity of the user group, and different users are subdivided in the user space, so that the data sharing in the same user group and the Fuse system can be realized.

Description

数据共享方法和终端设备Data sharing method and terminal device

技术领域Technical Field

本申请涉及终端技术领域,尤其涉及一种数据共享方法和终端设备。The present application relates to the field of terminal technology, and in particular to a data sharing method and terminal device.

背景技术Background technique

同一终端设备可支持不同用户使用。为了保护用户数据,安卓提出了Fuse(Filesystem inUserspace,用户空间文件系统)。在Fuse中,每个用户的数据放在内核层,由Fuse来进行管理和维护。The same terminal device can support different users. In order to protect user data, Android proposed Fuse (Filesystem in Userspace). In Fuse, each user's data is placed in the kernel layer and managed and maintained by Fuse.

例如,Android(安卓)手机设备上创建多个用户,包括用户1和用户2,但是每个用户只能访问自己的数据,目前还不能实现基于Fuse文件系统的用户数据共享。For example, multiple users are created on an Android mobile device, including User 1 and User 2, but each user can only access his own data, and user data sharing based on the Fuse file system cannot be achieved currently.

发明内容Summary of the invention

本申请的目的是提供一种数据共享方法和终端设备,用以解决现有技术中还不能实现基于Fuse文件系统的用户数据共享的问题。The purpose of the present application is to provide a data sharing method and terminal device to solve the problem that user data sharing based on the Fuse file system cannot be realized in the prior art.

第一方面,本申请提供一种数据共享方法,所述方法包括:In a first aspect, the present application provides a data sharing method, the method comprising:

显示用户组创建页面;Display the user group creation page;

基于在所述用户组创建页面的用户操作,获得用户输入的多个用户;Based on the user operation on the user group creation page, obtaining multiple users input by the user;

将所述多个用户合并到同一用户组,并将所述用户组内任一用户的用户空间文件系统Fuse的访问权限授权给所述用户组内的其他用户。The multiple users are merged into the same user group, and the access rights of the user space file system Fuse of any user in the user group are authorized to other users in the user group.

在一种可能的实施方式中,所述将所述用户组内任一用户的Fuse的访问权限授权给所述用户组内的其他用户,包括:In a possible implementation manner, authorizing the Fuse access rights of any user in the user group to other users in the user group includes:

为所述用户组创建共用的媒体提供者组件MediaProvider,为每个用户分别创建对应的连接组件connection和Fuse进程;Create a common media provider component MediaProvider for the user group, and create a corresponding connection component connection and Fuse process for each user;

所述方法还包括:The method further comprises:

将所述用户组内任一第一用户对第二用户的数据操作请求发送给所述MediaProvider,由所述MediaProvider将所述数据操作请求存储到所述第二用户的connection的待执行指令队列中;其中,所述第二用户的Fuse进程用于从所述待执行指令队列中获取所述数据操作请求并执行后返回执行结果到所述第二用户的connection的结果队列中;Send a data operation request of any first user in the user group to the second user to the MediaProvider, and the MediaProvider stores the data operation request in the pending instruction queue of the connection of the second user; wherein the Fuse process of the second user is used to obtain the data operation request from the pending instruction queue and return the execution result to the result queue of the connection of the second user after execution;

接收所述MediaProvider返回的针对所述数据操作请求的执行结果,所述执行结果是所述MediaProvider从所述第二用户的connection的结果队列中查询得到的。Receive an execution result for the data operation request returned by the MediaProvider, where the execution result is obtained by the MediaProvider from a result queue of the second user's connection.

在一种可能的实施方式中,为所述用户组创建共用的MediaProvider,包括:In a possible implementation, creating a common MediaProvider for the user group includes:

从所述用户组中选择一个主用户,其余用户作为从用户;Select a master user from the user group, and the remaining users serve as slave users;

为所述主用户创建MediaProvider;Create a MediaProvider for the primary user;

针对所述用户组中的任一从用户,在创建所述从用户的MediaProvider之前,查询所述从用户所在的用户组;For any slave user in the user group, before creating the MediaProvider of the slave user, query the user group to which the slave user belongs;

若查询到所述从用户所在的用户组,则将所述主用户的MediaProvider绑定给所述从用户。If the user group to which the slave user belongs is found, the MediaProvider of the master user is bound to the slave user.

在一种可能的实施方式中,数据操作请求中保存操作的数据对象;In a possible implementation, the data operation request stores the operated data object;

所述将所述用户组内任一第一用户对第二用户的数据操作请求发送给所述MediaProvider之前,所述方法还包括:Before sending a data operation request of any first user in the user group to the second user to the MediaProvider, the method further includes:

确定所述第一用户具有对所述第二用户的所述数据对象的访问权限。It is determined that the first user has access rights to the data object of the second user.

在一种可能的实施方式中,若所述第一用户不具有对所述第二用户的所述数据对象的访问权限,则输出无权限操作所述数据对象的提示信息。In a possible implementation manner, if the first user does not have access rights to the data object of the second user, a prompt message indicating that the user has no right to operate the data object is output.

在一种可能的实施方式中,确定所述第一用户对所述第二用户的访问权限,包括:In a possible implementation manner, determining the access permission of the first user to the second user includes:

显示权限设置界面;Display the permission setting interface;

基于在所述权限设置界面中针对所述第一用户和第二用户的用户操作,确定所述第一用户对所述第二用户的访问权限。Based on user operations on the first user and the second user in the permission setting interface, the first user's access rights to the second user are determined.

在一种可能的实施方式中,所述第一用户对所述第二用户的访问权限包括所述第二用户的即时通信工具的图片库或所述第二用户的图片应用的图片库。In a possible implementation manner, the first user's access permission to the second user includes a picture library of the second user's instant messaging tool or a picture library of the second user's picture application.

在一种可能的实施方式中,所述方法还包括:In a possible implementation, the method further includes:

响应于撤销所述用户组的撤销请求,删除所述用户组;并,In response to a cancellation request to cancel the user group, deleting the user group; and,

在重启终端设备之后,为每个用户分别创建对应的MediaProvider、connection和Fuse进程。After restarting the terminal device, create corresponding MediaProvider, connection, and Fuse processes for each user.

第二方面,本申请提供一种终端设备,包括:In a second aspect, the present application provides a terminal device, including:

显示器、处理器和存储器;Display, processor and memory;

所述显示器用于显示二维码;The display is used to display a QR code;

所述存储器,用于存储所述处理器可执行指令;The memory is used to store the processor executable instructions;

所述处理器被配置为执行所述指令以实现如上述第一方面中任一项所述的数据共享方法。The processor is configured to execute the instructions to implement the data sharing method as described in any one of the first aspects above.

第三方面,本申请提供一种计算机可读存储介质,当所述计算机可读存储介质中的指令由终端设备执行时,使得所述终端设备能够执行如上述第一方面中任一项所述的数据共享方法。In a third aspect, the present application provides a computer-readable storage medium. When instructions in the computer-readable storage medium are executed by a terminal device, the terminal device can execute the data sharing method as described in any one of the first aspects above.

第四方面,本申请提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上述第一方面中任一项所述的数据共享方法。In a fourth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the data sharing method as described in any one of the first aspects above.

本申请的实施例提供的技术方案至少带来以下有益效果:The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:

本申请实施例中通过显示用户组创建页面;并基于在所述用户组创建页面的用户操作,获得用户输入的多个用户;之后将所述多个用户合并到同一用户组,并将所述用户组内任一用户的用户空间文件系统Fuse的访问权限授权给所述用户组内的其他用户,由此可以实现同一用户组内对,Fuse系统中的数据共享,以及多用户系统中指定用户间的数据共享。In the embodiment of the present application, a user group creation page is displayed; and based on the user operation on the user group creation page, multiple users input by the user are obtained; then the multiple users are merged into the same user group, and the access rights of the user space file system Fuse of any user in the user group are authorized to other users in the user group, thereby realizing data sharing within the same user group, data sharing in the Fuse system, and data sharing between specified users in a multi-user system.

本申请的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请而了解。本申请的目的和其他优点可通过在所写的说明书、权利要求书、以及附图中所特别指出的结构来实现和获得。Other features and advantages of the present application will be described in the subsequent description, and partly become apparent from the description, or understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例中所需要使用的附图作简单地介绍,显而易见地,下面所介绍的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. Obviously, the drawings introduced below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

图1为本申请实施例提供的各个用户独立访问数据的流程示意图;FIG1 is a schematic diagram of a process flow of each user independently accessing data provided by an embodiment of the present application;

图2为本申请实施例提供的一种终端设备的结构示意图;FIG2 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application;

图3为本申请实施例提供的终端设备的软件结构框图;FIG3 is a software structure block diagram of a terminal device provided in an embodiment of the present application;

图4为本申请实施例提供的应用场景示意图;FIG4 is a schematic diagram of an application scenario provided by an embodiment of the present application;

图5为本申请实施例提供的一种数据共享方法的流程示意图;FIG5 is a schematic diagram of a flow chart of a data sharing method provided in an embodiment of the present application;

图6为本申请实施例提供的创建多个用户的示意图;FIG6 is a schematic diagram of creating multiple users according to an embodiment of the present application;

图7为本申请实施例提供的用户组创建页面的示意图;FIG7 is a schematic diagram of a user group creation page provided in an embodiment of the present application;

图8为本申请实施例提供的指定用户间的数据共享管理的架构示意图;FIG8 is a schematic diagram of the architecture of data sharing management between designated users provided in an embodiment of the present application;

图9为本申请实施例提供的创建共用的MediaProvider的流程示意图;FIG9 is a schematic diagram of a process for creating a shared MediaProvider according to an embodiment of the present application;

图10为本申请实施例提供的多用户共享数据的流程示意图;FIG10 is a schematic diagram of a process of multiple users sharing data according to an embodiment of the present application;

图11为本申请实施例提供的权限设置页面的示意图。FIG11 is a schematic diagram of a permission setting page provided in an embodiment of the present application.

具体实施方式Detailed ways

为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。其中,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Among them, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

并且,在本申请实施例的描述中,除非另有说明,″/″表示或的意思,例如,A/B可以表示A或B;文本中的″和/或″仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,另外,在本申请实施例的描述中,″多个″是指两个或多于两个。Furthermore, in the description of the embodiments of the present application, unless otherwise specified, “/” means or. For example, A/B can mean A or B. The “and/or” in the text is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and/or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “plurality” refers to two or more than two.

以下,术语″第一″、″第二″仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐合指明所指示的技术特征的数量。由此,限定有″第一″、″第二″、的特征可以明示或者隐合地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,″多个″的含义是两个或两个以上。In the following, the terms "first", "second", and "second" are used for descriptive purposes only and should not be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first", "second", and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more.

以下,对本申请实施例中的部分用语进行解释说明,以便于本领域技术人员理解。Below, some terms in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.

1)多用户系统:可以支持多个用户使用系统。通常,第一个在系统中注册的用户为系统管理员用户。不同用户的设置各不相同,并且不同用户安装的应用及应用数据也不相同。但是系统中和硬件相关的设置则是共用的,例如网络设置等。1) Multi-user system: It can support multiple users to use the system. Usually, the first user registered in the system is the system administrator. The settings of different users are different, and the applications and application data installed by different users are also different. However, the hardware-related settings in the system are shared, such as network settings.

2)MediaProvider(媒体提供者组件):安卓系统下统一扫描、控制系统所有目录下媒体文件的一个系统服务。这里的媒体包括图片、视频、音乐等等。2) MediaProvider (Media Provider Component): A system service that uniformly scans and controls media files in all directories of the system under the Android system. The media here include pictures, videos, music, etc.

3)Fuse(用户空间文件系统,Filesystem in Userspace):是Linux(类Uni×操作系统,GNU/Linu×)中用于挂载某些网络空间,如SSH(安全外壳协议,Secure Shell),到本地文件系统的模块,在SourceForge(源码炉)上可以找到相关内容。具有简单的API(应用程序接口,Application Programming Interface)库,可以被非特权用户访问,并可以安全的实施,具有稳定性。3) Fuse (Filesystem in Userspace): It is a module used in Linux (GNU/Linux) to mount certain network spaces, such as SSH (Secure Shell), to the local file system. Related content can be found on SourceForge. It has a simple API (Application Programming Interface) library that can be accessed by non-privileged users, and can be implemented safely and stably.

现有技术中,同一终端设备可支持不同用户使用。为了保护用户数据,安卓提出了Fuse(Filesystemin Userspace,用户空间文件系统)。在Fuse中,每个用户的数据放在内核层,由Fuse来进行管理和维护。In the prior art, the same terminal device can support different users. In order to protect user data, Android proposed Fuse (Filesystem in Userspace). In Fuse, each user's data is placed in the kernel layer and managed and maintained by Fuse.

参照图1,示出了各个用户独立访问数据的流程示意图。Android(安卓)手机设备上创建多个用户,包括用户1和用户2,但是每个用户只能访问自己的数据,目前还不能实现基于Fuse文件系统的用户数据共享。具体如图1所示:Android手机包括用户1和用户2,用户1最早创建,则用户1为管理员。用户1的应用数据存放在data/user/0中,用户2的应用数据存放在data/user/1/中。Fuse系统中也同样存在两个目标,其中storage/emulated/0对应用户1的data/user/0,storage/emulated/2对应用户2的data/user/1/。用户1对应三个组件分别为MediaProvider1、connection1和Fuse进程1,用户2对应三个主要组件分别为MediaProvider2、connection2和Fuse进程2。用户1通过自己的MediaProvider1、connection1和Fuse进程1实现对用户1数据的操作,同理,用户2通过MediaProvider2、connection2和Fuse进程2实现对用户2的数据访问。Fuse实现了隔离不同用户,但是一些特殊场景例如分享图片的场景,Fuse难以满足该场景需求,故此,如何在Fuse系统中实现数据共享有待解决。Referring to FIG. 1 , a schematic diagram of the process of each user accessing data independently is shown. Multiple users are created on an Android mobile device, including user 1 and user 2, but each user can only access his own data, and user data sharing based on the Fuse file system cannot be realized at present. Specifically as shown in FIG. 1 : The Android phone includes user 1 and user 2. User 1 is created first, so user 1 is the administrator. User 1's application data is stored in data/user/0, and user 2's application data is stored in data/user/1/. There are also two targets in the Fuse system, where storage/emulated/0 corresponds to user 1's data/user/0, and storage/emulated/2 corresponds to user 2's data/user/1/. User 1 corresponds to three components, namely MediaProvider1, connection1, and Fuse process 1, and user 2 corresponds to three main components, namely MediaProvider2, connection2, and Fuse process 2. User 1 implements operations on user 1's data through its own MediaProvider1, connection1, and Fuse process 1. Similarly, user 2 implements access to user 2's data through MediaProvider2, connection2, and Fuse process 2. Fuse can isolate different users, but it is difficult for Fuse to meet the needs of some special scenarios, such as sharing pictures. Therefore, how to realize data sharing in the Fuse system needs to be solved.

有鉴于此,本申请提出了一种数据共享方法,该方法中提出了用户组概念,在操作Fuse系统中数据的层面,多个用户以用户组的身份进行操作,在用户空间再划分出不同用户,由此可以实现同一用户组内对,Fuse系统中的数据共享。In view of this, the present application proposes a data sharing method, in which the concept of user group is proposed. When operating data in the Fuse system, multiple users operate as user groups, and different users are further divided in the user space, thereby realizing data sharing in the Fuse system within the same user group.

本申请的发明构思可概括为:本申请实施例中通过显示用户组创建页面;并基于在所述用户组创建页面的用户操作,获得用户输入的多个用户;之后将所述多个用户合并到同一用户组,并将所述用户组内任一用户的用户空间文件系统Fuse的访问权限授权给所述用户组内的其他用户,由此,本申请实施例中,可以在终端设备系统中实现该方案,使得可以实现同一用户组内对,Fuse系统中的数据共享,以及多用户系统中指定用户间的数据共享。The inventive concept of the present application can be summarized as follows: in the embodiment of the present application, a user group creation page is displayed; and based on the user operation on the user group creation page, multiple users input by the user are obtained; then the multiple users are merged into the same user group, and the access rights of the user space file system Fuse of any user in the user group are authorized to other users in the user group. Therefore, in the embodiment of the present application, the scheme can be implemented in the terminal device system, so that data sharing in the Fuse system within the same user group and data sharing between designated users in a multi-user system can be realized.

在介绍完本申请的发明构思之后,下面先对本申请提供的终端设备进行说明。图2示出了一种终端设备200的结构示意图。应该理解的是,图2所示终端设备200仅是一个范例,并且终端设备200可以具有比图2中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图2中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。After introducing the inventive concept of the present application, the terminal device provided by the present application is described below. FIG. 2 shows a schematic diagram of the structure of a terminal device 200. It should be understood that the terminal device 200 shown in FIG. 2 is only an example, and the terminal device 200 may have more or fewer components than those shown in FIG. 2, may combine two or more components, or may have different component configurations. The various components shown in FIG. 2 may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.

图2中示例性示出了根据示例性实施例中终端设备200的硬件配置框图。如图2所示,终端设备200包括:射频(radio frequency,RF)电路210、存储器220、显示单元230、摄像头240、传感器250、音频电路260、无线保真(Wireless Fidelity,Wi-Fi)模块270、处理器280、蓝牙模块281、以及电源290等部件。Fig. 2 exemplarily shows a hardware configuration block diagram of a terminal device 200 according to an exemplary embodiment. As shown in Fig. 2 , the terminal device 200 includes: a radio frequency (RF) circuit 210, a memory 220, a display unit 230, a camera 240, a sensor 250, an audio circuit 260, a wireless fidelity (Wi-Fi) module 270, a processor 280, a Bluetooth module 281, and a power supply 290 and other components.

RF电路210可用于在收发信息或通话过程中信号的接收和发送,可以接收基站的下行数据后交给处理器280处理;可以将上行数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等器件。The RF circuit 210 can be used to receive and send signals during the process of sending and receiving information or making calls. It can receive downlink data from the base station and hand it over to the processor 280 for processing; it can send uplink data to the base station. Generally, the RF circuit includes but is not limited to antennas, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer and other devices.

存储器220可用于存储软件程序及数据。处理器280通过运行存储在存储器220的软件程序或数据,从而执行终端设备200的各种功能以及数据处理。存储器220可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。存储器220存储有使得终端设备200能运行的操作系统。本申请中存储器220可以存储操作系统及各种应用程序,还可以存储执行本申请实施例所述方法的程序代码。The memory 220 can be used to store software programs and data. The processor 280 executes various functions and data processing of the terminal device 200 by running the software programs or data stored in the memory 220. The memory 220 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. The memory 220 stores an operating system that enables the terminal device 200 to run. In the present application, the memory 220 can store an operating system and various application programs, and can also store program codes for executing the method described in the embodiments of the present application.

显示单元230可用于接收输入的数字或字符信息,产生与终端设备200的用户设置以及功能控制有关的信号输入,具体地,显示单元230可以包括设置在终端设备100正面的触摸屏231,可收集用户在其上或附近的触摸操作,例如点击按钮,拖动滚动框等。The display unit 230 may be used to receive input digital or character information and generate signal input related to user settings and function control of the terminal device 200. Specifically, the display unit 230 may include a touch screen 231 disposed on the front of the terminal device 100, which may collect user touch operations on or near it, such as clicking a button, dragging a scroll box, etc.

显示单元230还可用于显示由用户输入的信息或提供给用户的信息以及终端设备200的各种菜单的图形用户界面(graphical user interface,GUI)。具体地,显示单元230可以包括设置在终端设备200正面的显示屏232。其中,显示屏232可以采用液晶显示器、发光二极管等形式来配置。The display unit 230 may also be used to display information input by a user or information provided to a user and a graphical user interface (GUI) of various menus of the terminal device 200. Specifically, the display unit 230 may include a display screen 232 disposed on the front of the terminal device 200. The display screen 232 may be configured in the form of a liquid crystal display, a light emitting diode, or the like.

其中,触摸屏231可以覆盖在显示屏232之上,也可以将触摸屏231与显示屏232集成而实现终端设备200的输入和输出功能,集成后可以简称触摸显示屏。本申请中显示单元230可以显示应用程序以及对应的操作步骤。The touch screen 231 may be covered on the display screen 232, or the touch screen 231 and the display screen 232 may be integrated to realize the input and output functions of the terminal device 200, and the integrated touch screen may be referred to as a touch display screen. In the present application, the display unit 230 may display the application and the corresponding operation steps.

摄像头240可用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给处理器280转换成数字图像信号。The camera 240 can be used to capture still images or videos. The object is projected onto the photosensitive element through the lens to generate an optical image. 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 the processor 280 for conversion into a digital image signal.

终端设备200还可以包括至少一种传感器250,比如加速度传感器251、距离传感器252、指纹传感器253、温度传感器254。终端设备200还可配置有陀螺仪、气压计、湿度计、温度计、红外线传感器、光传感器、运动传感器等其他传感器。The terminal device 200 may further include at least one sensor 250, such as an acceleration sensor 251, a distance sensor 252, a fingerprint sensor 253, and a temperature sensor 254. The terminal device 200 may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, a light sensor, and a motion sensor.

音频电路260、扬声器261、麦克风262可提供用户与终端设备200之间的音频接口。音频电路260可将接收到的音频数据转换后的电信号,传输到扬声器261,由扬声器261转换为声音信号输出。终端设备200还可配置音量按钮,用于调节声音信号的音量。另一方面,麦克风262将收集的声音信号转换为电信号,由音频电路260接收后转换为音频数据,再将音频数据输出至RF电路210以发送给比如另一终端设备,或者将音频数据输出至存储器220以便进一步处理。The audio circuit 260, the speaker 261, and the microphone 262 can provide an audio interface between the user and the terminal device 200. The audio circuit 260 can transmit the electrical signal converted from the received audio data to the speaker 261, which is converted into a sound signal for output. The terminal device 200 can also be configured with a volume button for adjusting the volume of the sound signal. On the other hand, the microphone 262 converts the collected sound signal into an electrical signal, which is received by the audio circuit 260 and converted into audio data, and then the audio data is output to the RF circuit 210 to be sent to, for example, another terminal device, or the audio data is output to the memory 220 for further processing.

Wi-Fi属于短距离无线传输技术,终端设备200可以通过Wi-Fi模块270帮助用户收发电子邮件、浏览网页和访问流媒体等,它为用户提供了无线的宽带互联网访问。Wi-Fi is a short-range wireless transmission technology. The terminal device 200 can help users send and receive emails, browse web pages, and access streaming media through the Wi-Fi module 270, which provides users with wireless broadband Internet access.

处理器280是终端设备200的控制中心,利用各种接口和线路连接整个终端设备的各个部分,通过运行或执行存储在存储器220内的软件程序,以及调用存储在存储器220内的数据,执行终端设备200的各种功能和处理数据。在一些实施例中,处理器280可包括一个或多个处理单元;处理器280还可以集成应用处理器和基带处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,基带处理器主要处理无线通信。可以理解的是,上述基带处理器也可以不集成到处理器280中。本申请中处理器280可以运行操作系统、应用程序、用户界面显示及触控响应,以及本申请实施例所述的数据共享方法。另外,处理器280与显示单元230耦接。The processor 280 is the control center of the terminal device 200. It uses various interfaces and lines to connect various parts of the entire terminal device. It executes various functions of the terminal device 200 and processes data by running or executing software programs stored in the memory 220 and calling data stored in the memory 220. In some embodiments, the processor 280 may include one or more processing units; the processor 280 may also integrate an application processor and a baseband processor, wherein the application processor mainly processes an operating system, a user interface, and an application program, and the baseband processor mainly processes wireless communications. It is understandable that the above-mentioned baseband processor may not be integrated into the processor 280. In this application, the processor 280 can run an operating system, an application program, a user interface display and a touch response, as well as the data sharing method described in the embodiment of the present application. In addition, the processor 280 is coupled to the display unit 230.

蓝牙模块281,用于通过蓝牙协议来与其他具有蓝牙模块的蓝牙设备进行信息交互。例如,终端设备200可以通过蓝牙模块281与同样具备蓝牙模块的可穿戴电子设备(例如智能手表)建立蓝牙连接,从而进行数据交互。The Bluetooth module 281 is used to exchange information with other Bluetooth devices having Bluetooth modules through the Bluetooth protocol. For example, the terminal device 200 can establish a Bluetooth connection with a wearable electronic device (such as a smart watch) that also has a Bluetooth module through the Bluetooth module 281 to exchange data.

终端设备200还包括给各个部件供电的电源290(比如电池)。电源可以通过电源管理系统与处理器280逻辑相连,从而通过电源管理系统实现管理充电、放电以及功耗等功能。终端设备200还可配置有电源按钮,用于终端设备的开机和关机,以及锁屏等功能。The terminal device 200 also includes a power supply 290 (such as a battery) for supplying power to various components. The power supply can be logically connected to the processor 280 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption. The terminal device 200 can also be configured with a power button for turning on and off the terminal device, as well as locking the screen and other functions.

图3是本申请实施例的终端设备200的软件结构框图。FIG. 3 is a software structure block diagram of the terminal device 200 according to an embodiment of the present application.

分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,可将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system can be divided into four layers, from top to bottom: application layer, application framework layer, Android runtime and system library, and kernel layer.

应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.

如图3所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in FIG. 3 , the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.

应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

如图3所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in FIG. 3 , the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.

窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿、短信息等。Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, short messages, etc.

视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信息通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. 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 images.

电话管理器用于提供终端设备200的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide communication functions of the terminal device 200, such as management of call status (including connection, disconnection, etc.).

资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等。The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, etc.

通知管理器使应用程序可以在状态栏中显示通知信息(例如短信息的消息摘要,消息内容),可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,终端设备振动,指示灯闪烁等。The notification manager enables applications to display notification information (such as message summaries and message contents) in the status bar. It can be used to convey notification-type messages and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, the terminal device vibrates, the indicator light flashes, etc.

Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

2D(一种动画方式)图形引擎是2D绘图的绘图引擎。A 2D (animation mode) graphics engine is a drawing engine for 2D drawing.

内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

本申请实施例中的终端设备200可以为包括但不限于手机、移动终端、桌面计算机、移动电脑、平板电脑、家用体征数据采集设备(如血压仪)、电视等电子设备。The terminal device 200 in the embodiment of the present application may be an electronic device including but not limited to a mobile phone, a mobile terminal, a desktop computer, a mobile computer, a tablet computer, a home vital sign data collection device (such as a blood pressure monitor), a television, and the like.

下面对本申请实施例的技术方案能够适用的应用场景做一些简单介绍,需要说明的是,以下介绍的应用场景仅用于说明本申请实施例而非限定。在具体实施时,可以根据实际需要灵活地应用本申请实施例提供的技术方案。The following is a brief introduction to the application scenarios to which the technical solutions of the embodiments of the present application can be applied. It should be noted that the application scenarios introduced below are only used to illustrate the embodiments of the present application and are not limited. In specific implementation, the technical solutions provided by the embodiments of the present application can be flexibly applied according to actual needs.

如图4所示示出了本申请实施例提供的应用场景示意图。该应用场景图包括:用户A、应用401、终端设备402、应用403、用户B。其中:FIG4 shows a schematic diagram of an application scenario provided by an embodiment of the present application. The application scenario diagram includes: user A, application 401, terminal device 402, application 403, and user B. Among them:

用户A使用应用401获取数据,并将数据存储在终端设备402中用户A的外部存储中,用户B可以通过在终端设备401,使用应用403访问用户A的外部存储中存储的数据。例如,用户A在终端设备402中安装了应用401,并用应用401拍摄了一张照片,存储在用户A的文件目录下,而用户B安装在终端设备402中的应用403可以查看这一张照片。User A uses application 401 to obtain data and stores the data in the external storage of user A in terminal device 402. User B can access the data stored in the external storage of user A by using application 403 in terminal device 401. For example, user A installs application 401 in terminal device 402 and takes a photo with application 401, which is stored in the file directory of user A. Application 403 installed by user B in terminal device 402 can view the photo.

当然,本申请实施例提供的方法并不限于图4所示的应用场景,还可以用于其它可能的应用场景,本申请实施例并不进行限制。对于图4所示的应用场景的各个设备所能实现的功能将在后续的方法实施例中一并进行描述,在此先不过多赘述。Of course, the method provided in the embodiment of the present application is not limited to the application scenario shown in Figure 4, and can also be used in other possible application scenarios, which are not limited by the embodiment of the present application. The functions that can be implemented by each device in the application scenario shown in Figure 4 will be described in the subsequent method embodiments, and no further details will be given here.

为进一步说明本申请实施例提供的技术方案,下面结合附图以及具体实施方式对此进行详细的说明。To further illustrate the technical solution provided by the embodiments of the present application, a detailed description is given below in conjunction with the accompanying drawings and specific implementation methods.

参考图5为本申请实施例提供数据共享方法的流程示意图,如图5所示,该方法包括以下步骤:Referring to FIG5 , a flow chart of a data sharing method is provided in an embodiment of the present application. As shown in FIG5 , the method includes the following steps:

在步骤501中,显示用户组创建页面。In step 501, a user group creation page is displayed.

在一种可能的实施方式中,显示用户组创建页面首先需要创建多个用户,如图6所示,创建了用户1和用户2,其中用户1最早创建,则用户1为管理员。因此将用户1的应用数据存放在data/user/0中,用户2的应用数据存放在data/user/1/中。Fuse系统中也同样存在两个目录,其中storage/emulated/0对应用户1的data/user/0,storage/emulated/2对应用户2的data/user/1/。In a possible implementation, to display the user group creation page, multiple users need to be created first. As shown in FIG6 , user 1 and user 2 are created, and user 1 is created first, so user 1 is the administrator. Therefore, the application data of user 1 is stored in data/user/0, and the application data of user 2 is stored in data/user/1/. There are also two directories in the Fuse system, where storage/emulated/0 corresponds to data/user/0 of user 1, and storage/emulated/2 corresponds to data/user/1/ of user 2.

创建完多个用户之后,在设备上预置用户组选择功能,显示用户组创建页面,如图7所示,此时页面上可显示出创建的多个用户。之后在步骤502中,基于在所述用户组创建页面的用户操作,获得用户输入的多个用户。After creating multiple users, a user group selection function is preset on the device to display a user group creation page, as shown in Figure 7, where multiple created users can be displayed on the page. Then in step 502, multiple users input by the user are obtained based on the user operation on the user group creation page.

在一种可能的实施方式中,用户在用户组创建界面可以选择要共享数据的用户,选择方式可以是根据提示触屏选择,也可以通过按键的方式选择,还可以通过搜索指定用户的方式选择,本申请对此不作限定。如图7所示,用户通过触屏选择的方式选择用户1和用户2共享数据。In a possible implementation, the user can select the user with whom to share data in the user group creation interface, and the selection method can be to touch the screen according to the prompt, or to select by pressing a button, or to select by searching for a specified user, which is not limited in this application. As shown in FIG. 7 , the user selects user 1 and user 2 to share data by touching the screen.

在步骤503中,将所述多个用户合并到同一用户组,并将所述用户组内任一用户的用户空间文件系统Fuse的访问权限授权给所述用户组内的其他用户。In step 503, the multiple users are merged into the same user group, and the access rights of the user space file system Fuse of any user in the user group are authorized to other users in the user group.

在一种可能的实施方式中,将所述多个用户合并到同一用户组,可具体实施为,如图7所示,用户在图7中选择用户1和用户2作为共享数据的用户,然后点击创建用户组的按钮,显示提示创建用户组成功的页面,即将用户1和用户2合并到同一用户组,之后在用户组的界面就会显示用户组1包括用户1和用户2。In one possible implementation, merging the multiple users into the same user group can be specifically implemented as shown in FIG. 7 , where the user selects user 1 and user 2 in FIG. 7 as users for sharing data, and then clicks a button to create a user group, and a page prompting successful creation of the user group is displayed, i.e., user 1 and user 2 are merged into the same user group, after which the user group interface will display that user group 1 includes user 1 and user 2.

参见图8,为本申请实施例提供的指定用户间的数据共享管理的架构示意图。在图8中,用户1和用户2共用一个媒体提供者组件MediaProvider,共用一个Fuse进程访问权限,因此用户1和用户2的数据Data1和Data2是可以共享访问的。由此可知,不同用户间共享数据需要为用户所在的用户组创建共用的MediaProvider。See Figure 8, which is a schematic diagram of the architecture of data sharing management between designated users provided in an embodiment of the present application. In Figure 8, user 1 and user 2 share a media provider component MediaProvider and a Fuse process access permission, so the data Data1 and Data2 of user 1 and user 2 can be shared and accessed. It can be seen that sharing data between different users requires creating a common MediaProvider for the user group to which the user belongs.

在一种可能的实施方式中,以两个用户共享数据为例对本申请实施例提供的数据共享方法不仅适用于两个用户共享数据,也适用于三个用户、四个用户等多个用户。In a possible implementation, taking two users sharing data as an example, the data sharing method provided in the embodiment of the present application is not only applicable to two users sharing data, but also applicable to multiple users such as three users, four users, etc.

在一种可能的实施方式中,将所述用户组内任一用户的Fuse的访问权限授权给所述用户组内的其他用户,需要为所述用户组创建共用的MediaProvider,为每个用户分别创建对应的connection和Fuse进程以便于基于各个用户的connection和Fuse进程对各用户的信息进行管理。In a possible implementation, to authorize the Fuse access rights of any user in the user group to other users in the user group, it is necessary to create a common MediaProvider for the user group, and create corresponding connection and Fuse processes for each user so as to manage the information of each user based on the connection and Fuse processes of each user.

在一种可能的实施方式中,为所述用户组创建共用的MediaProvider,具体可实施为如图9所示的步骤:In a possible implementation, creating a common MediaProvider for the user group may be specifically implemented as follows:

在步骤901中,从所述用户组中选择一个主用户,其余用户作为从用户。In step 901, a primary user is selected from the user group, and the remaining users are secondary users.

其中,每一个用户可以根据用户的唯一标识进行区分,所述用户唯一标识可以是用户ID,还可以是数据ID。Each user may be distinguished according to a unique identifier of the user, and the unique identifier of the user may be a user ID or a data ID.

在步骤902中,为所述主用户创建MediaProvider。In step 902, a MediaProvider is created for the primary user.

在步骤903中针对所述用户组中的任一从用户在创建所述从用户的MediaProvider之前,查询所述从用户所在的用户组。In step 903, for any slave user in the user group, before creating the MediaProvider of the slave user, the user group to which the slave user belongs is queried.

其中,可以根据所述从用户的唯一标识查询所述从用户所在的用户组。The user group to which the slave user belongs may be queried according to the unique identifier of the slave user.

在步骤904中若查询到所述从用户所在的用户组则将所述主用户的MediaProvider绑定给所述从用户。In step 904, if the user group to which the slave user belongs is found, the MediaProvider of the master user is bound to the slave user.

在一种可能的实施方式中,为所述用户组创建共用的MediaProvider,为每个用户分别创建对应的connection和Fuse进程之后,实现数据共享可实施为:将所述用户组内任一第一用户对第二用户的数据操作请求发送给所述MediaProvider,由所述MediaProvider将所述数据操作请求存储到所述第二用户的connection的待执行指令队列中;然后,所述第二用户的Fuse进程用于从所述待执行指令队列中获取所述数据操作请求并执行后返回执行结果到所述第二用户的connection的结果队列中。MediaProvider从所述第二用户的connection的结果队列中查询得到执行结果。之后,可由MediaProvider返回的针对所述数据操作请求的执行结果给用户。In a possible implementation, after creating a common MediaProvider for the user group and creating a corresponding connection and Fuse process for each user, data sharing can be implemented as follows: a data operation request for a second user from any first user in the user group is sent to the MediaProvider, and the MediaProvider stores the data operation request in the pending instruction queue of the connection of the second user; then, the Fuse process of the second user is used to obtain the data operation request from the pending instruction queue and return the execution result to the result queue of the connection of the second user after execution. The MediaProvider obtains the execution result from the result queue of the connection of the second user. Afterwards, the execution result of the data operation request returned by the MediaProvider is given to the user.

具体如图10所示:用户1和用户2共用一个MediaProvider,且用户1对应connection1和Fuse进程1,用户2对应connection2和Fuse进程2。用户1和用户2通过MediaProvider、connection1和Fuse进程1,以及connection2和Fuse进程2实现对用户1数据和用户2数据的共享。其中用户1的应用想访问storage/emulated/2,首先需要发送操作请求给MediaProvider,用MediaProvider同Fuse进程建立Connection2,将操作请求存储到connection的待执行指令队列中。因为和Fuse建立连接的是同一个MediaProvider,所以此MediaProvider可以向应用提供torage/emulated/0和storage/emulated/2数据的访问。从而实现不同用户下应用对storage/emulated/0和storage/emulated/2的共享访问。As shown in Figure 10, user 1 and user 2 share a MediaProvider, and user 1 corresponds to connection1 and Fuse process 1, while user 2 corresponds to connection2 and Fuse process 2. User 1 and user 2 share user 1 data and user 2 data through MediaProvider, connection1 and Fuse process 1, and connection2 and Fuse process 2. If user 1's application wants to access storage/emulated/2, it must first send an operation request to MediaProvider, use MediaProvider to establish Connection2 with the Fuse process, and store the operation request in the connection's pending instruction queue. Because the same MediaProvider is used to establish a connection with Fuse, this MediaProvider can provide the application with access to storage/emulated/0 and storage/emulated/2 data. This enables applications under different users to share access to storage/emulated/0 and storage/emulated/2.

在一种可能的实施方式中,同一用户组共享的部分数据内容,也即分享给其他用户的数据内容是有限制的。例如,授权的时候可以仅授权用户2的即时通信工具的图片给用户1访问。为了实现访问权限的限制,本申请实施例中数据操作请求中保存操作的数据对象。在将所述用户组内任一第一用户对第二用户的数据操作请求发送给所述MediaProvider之前,还需要确定所述第一用户具有对所述第二用户的所述数据对象的访问权限。若所述第一用户不具有对所述第二用户的所述数据对象的访问权限,则输出无权限操作所述数据对象的提示信息。In a possible implementation, some data content shared by the same user group, that is, data content shared with other users, is limited. For example, during authorization, only user 1 may be authorized to access pictures of user 2's instant messaging tool. In order to implement access permission restrictions, the data object of the operation is saved in the data operation request in the embodiment of the present application. Before sending a data operation request of any first user in the user group to the MediaProvider for a second user, it is also necessary to determine whether the first user has access rights to the data object of the second user. If the first user does not have access rights to the data object of the second user, a prompt message indicating that the user has no right to operate the data object is output.

在一种可能的实施方式中,确定所述第一用户对所述第二用户的访问权限,可实施为:首先显示权限设置界面给用户;然后,基于在所述权限设置界面中针对所述第一用户和第二用户的用户操作,确定所述第一用户对所述第二用户的访问权限。In a possible implementation, determining the access rights of the first user to the second user can be implemented as follows: first displaying a permission setting interface to the user; and then determining the access rights of the first user to the second user based on user operations for the first user and the second user in the permission setting interface.

如图11所示,在图11的权限设置界面中,用户可以根据提示确定所述第一用户对所述第二用户的访问权限。其中,第二用户可以通过触屏或者按键的方式选择同意或者不同意第一用户对第二用户的访问。As shown in Figure 11, in the permission setting interface of Figure 11, the user can determine the access rights of the first user to the second user according to the prompt. The second user can choose to agree or disagree with the first user's access to the second user by touching the screen or pressing a button.

在一种可能的实施方式中,所述第一用户对所述第二用户的访问权限包括所述第二用户的即时通信工具的图片库或所述第二用户的图片应用的图片库。这样,第一用户只能访问第二用户的一些图片库中的信息,对其他信息不能访问。能够实现不同用户间共享图片的需求,还能够保护用户的其他隐私信息。In a possible implementation, the first user's access rights to the second user include the picture library of the second user's instant messaging tool or the picture library of the second user's picture application. In this way, the first user can only access information in some picture libraries of the second user, but cannot access other information. This can meet the need of sharing pictures between different users and protect other privacy information of users.

在一种可能的实施方式中,若第一用户结束访问第二用户的数据,则还可以发出撤销请求,设备响应于所述用户组的撤销请求,删除所述用户组;并,由于用户组被删除,则在重启终端设备之后,为每个用户分别创建对应的MediaProvider、connection和Fuse进程。由此,第一用户和第二用户不再共享数据。In a possible implementation, if the first user ends accessing the second user's data, a revocation request may be issued, and the device deletes the user group in response to the revocation request of the user group; and, since the user group is deleted, after restarting the terminal device, a corresponding MediaProvider, connection, and Fuse process are created for each user. Thus, the first user and the second user no longer share data.

基于前文的描述,本申请实施例通过显示用户组创建页面;并基于在所述用户组创建页面的用户操作,获得用户输入的多个用户;之后将所述多个用户合并到同一用户组,并将所述用户组内任一用户的用户空间文件系统Fuse的访问权限授权给所述用户组内的其他用户,由此可以实现同一用户组内对,Fuse系统中的数据共享,以及多用户系统中指定用户间的数据共享。Based on the foregoing description, the embodiment of the present application displays a user group creation page; and based on the user operations on the user group creation page, obtains multiple users input by the user; then merges the multiple users into the same user group, and authorizes the access rights of the user space file system Fuse of any user in the user group to other users in the user group, thereby realizing data sharing within the same user group, in the Fuse system, and data sharing between specified users in a multi-user system.

本申请提供的实施例之间的相似部分相互参见即可,以上提供的具体实施方式只是本申请总的构思下的几个示例,并不构成本申请保护范围的限定。对于本领域的技术人员而言,在不付出创造性劳动的前提下依据本申请方案所扩展出的任何其他实施方式都属于本申请的保护范围。Similar parts between the embodiments provided in this application can be referenced to each other. The specific implementation methods provided above are only a few examples under the general concept of this application and do not constitute a limitation on the protection scope of this application. For those skilled in the art, any other implementation methods expanded based on the scheme of this application without creative work belong to the protection scope of this application.

本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to the flowchart and/or block diagram of the method, device (system), and computer program product according to the present application. It should be understood that each process and/or box in the flowchart and/or block diagram, as well as the combination of the process and/or box in the flowchart and/or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one process or multiple processes in the flowchart and/or one box or multiple boxes in the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.

显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims (9)

1.一种数据共享方法,其特征在于,所述方法包括:1. A data sharing method, characterized in that the method comprises: 显示用户组创建页面;Display the user group creation page; 基于在所述用户组创建页面的用户操作,获得用户输入的多个用户;用户在所述用户组创建页面选择要共享数据的用户,选择方式包括:根据提示触屏选择、通过按键的方式选择、通过搜索指定用户的方式选择;Based on the user operation on the user group creation page, multiple users input by the user are obtained; the user selects the user with whom to share data on the user group creation page, and the selection method includes: selecting by touching the screen according to the prompt, selecting by pressing a button, and selecting by searching for a specified user; 将所述多个用户合并到同一用户组,并将所述用户组内任一用户的用户空间文件系统Fuse的访问权限授权给所述用户组内的其他用户;其中,所述将所述用户组内任一用户的Fuse的访问权限授权给所述用户组内的其他用户,包括:为所述用户组创建共用的媒体提供者组件MediaProvider,为每个用户分别创建对应的连接组件connection和Fuse进程;Merge the multiple users into the same user group, and authorize the user space file system Fuse access rights of any user in the user group to other users in the user group; wherein, authorizing the Fuse access rights of any user in the user group to other users in the user group includes: creating a common media provider component MediaProvider for the user group, and creating a corresponding connection component connection and Fuse process for each user; 所述方法还包括:将所述用户组内任一第一用户对第二用户的数据操作请求发送给所述MediaProvider,由所述MediaProvider将所述数据操作请求存储到所述第二用户的connection的待执行指令队列中;其中,所述第二用户的Fuse进程用于从所述待执行指令队列中获取所述数据操作请求并执行后返回执行结果到所述第二用户的connection的结果队列中;接收所述MediaProvider返回的针对所述数据操作请求的执行结果,所述执行结果是所述MediaProvider从所述第二用户的connection的结果队列中查询得到的。The method further includes: sending a data operation request of any first user in the user group to the MediaProvider for a second user, and the MediaProvider storing the data operation request in a pending instruction queue of the connection of the second user; wherein the Fuse process of the second user is used to obtain the data operation request from the pending instruction queue and return the execution result to the result queue of the connection of the second user after execution; and receiving the execution result of the data operation request returned by the MediaProvider, wherein the execution result is obtained by the MediaProvider from the result queue of the connection of the second user. 2.根据权利要求1所述的方法,其特征在于,为所述用户组创建共用的MediaProvider,包括:2. The method according to claim 1, wherein creating a common MediaProvider for the user group comprises: 从所述用户组中选择一个主用户,其余用户作为从用户;Select a primary user from the user group, and the remaining users serve as secondary users; 为所述主用户创建MediaProvider;Create a MediaProvider for the primary user; 针对所述用户组中的任一从用户,在创建所述从用户的MediaProvider之前,查询所述从用户所在的用户组;For any slave user in the user group, before creating the MediaProvider of the slave user, query the user group to which the slave user belongs; 若查询到所述从用户所在的用户组,则将所述主用户的MediaProvider绑定给所述从用户。If the user group to which the slave user belongs is found, the MediaProvider of the master user is bound to the slave user. 3.根据权利要求1所述的方法,其特征在于,数据操作请求中保存操作的数据对象;3. The method according to claim 1, characterized in that the data object to be operated is saved in the data operation request; 所述将所述用户组内任一第一用户对第二用户的数据操作请求发送给所述MediaProvider之前,所述方法还包括:Before sending a data operation request of any first user in the user group to the second user to the MediaProvider, the method further includes: 确定所述第一用户具有对所述第二用户的所述数据对象的访问权限。It is determined that the first user has access rights to the data object of the second user. 4.根据权利要求3所述的方法,其特征在于,若所述第一用户不具有对所述第二用户的所述数据对象的访问权限,则输出无权限操作所述数据对象的提示信息。4. The method according to claim 3 is characterized in that if the first user does not have access rights to the data object of the second user, a prompt message indicating that the user has no right to operate the data object is output. 5.根据权利要求3或4所述的方法,其特征在于,确定所述第一用户对所述第二用户的访问权限,包括:5. The method according to claim 3 or 4, characterized in that determining the access rights of the first user to the second user comprises: 显示权限设置界面;Display the permission setting interface; 基于在所述权限设置界面中针对所述第一用户和所述第二用户的用户操作,确定所述第一用户对所述第二用户的访问权限。Based on user operations on the first user and the second user in the permission setting interface, access rights of the first user to the second user are determined. 6.根据权利要求5所述的方法,其特征在于,所述第一用户对所述第二用户的访问权限包括所述第二用户的即时通信工具的图片库或所述第二用户的图片应用的图片库。6 . The method according to claim 5 , wherein the access permission of the first user to the second user includes a picture library of an instant messaging tool of the second user or a picture library of a picture application of the second user. 7.根据权利要求1-4中任一所述的方法,其特征在于,所述方法还包括:7. The method according to any one of claims 1 to 4, characterized in that the method further comprises: 响应于撤销所述用户组的撤销请求,删除所述用户组;并,In response to a cancellation request to cancel the user group, deleting the user group; and, 在重启终端设备之后,为每个用户分别创建对应的MediaProvider、connection和Fuse进程。After restarting the terminal device, create corresponding MediaProvider, connection, and Fuse processes for each user. 8.一种终端设备,其特征在于,包括:8. A terminal device, comprising: 显示器、处理器和存储器;Display, processor and memory; 所述显示器用于显示二维码;The display is used to display a QR code; 所述存储器,用于存储所述处理器可执行指令;The memory is used to store the processor executable instructions; 所述处理器被配置为执行所述指令以实现如权利要求1-7中任一项所述的数据共享方法。The processor is configured to execute the instructions to implement the data sharing method according to any one of claims 1 to 7. 9.一种计算机可读存储介质,其特征在于,包括:9. A computer-readable storage medium, comprising: 当所述计算机可读存储介质中的指令由终端设备执行时,使得所述终端设备能够执行如权利要求1-7中任一项所述的数据共享方法。When the instructions in the computer-readable storage medium are executed by a terminal device, the terminal device is enabled to execute the data sharing method according to any one of claims 1 to 7.
CN202111080481.8A 2021-09-15 2021-09-15 Data sharing method and terminal equipment Active CN113938890B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202410294541.3A CN118400742A (en) 2021-09-15 2021-09-15 Data sharing method and terminal equipment
CN202111080481.8A CN113938890B (en) 2021-09-15 2021-09-15 Data sharing method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111080481.8A CN113938890B (en) 2021-09-15 2021-09-15 Data sharing method and terminal equipment

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202410294541.3A Division CN118400742A (en) 2021-09-15 2021-09-15 Data sharing method and terminal equipment

Publications (2)

Publication Number Publication Date
CN113938890A CN113938890A (en) 2022-01-14
CN113938890B true CN113938890B (en) 2024-04-30

Family

ID=79275899

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202410294541.3A Pending CN118400742A (en) 2021-09-15 2021-09-15 Data sharing method and terminal equipment
CN202111080481.8A Active CN113938890B (en) 2021-09-15 2021-09-15 Data sharing method and terminal equipment

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202410294541.3A Pending CN118400742A (en) 2021-09-15 2021-09-15 Data sharing method and terminal equipment

Country Status (1)

Country Link
CN (2) CN118400742A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114780496B (en) * 2022-04-21 2025-08-08 展讯半导体(南京)有限公司 Image processing method, system and device based on FUSE file system
CN115129216B (en) * 2022-06-29 2024-08-09 北京达美盛软件股份有限公司 A cross-organizational data configuration management method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105975876A (en) * 2016-06-29 2016-09-28 北京小米移动软件有限公司 File sharing method and device
CN106970978A (en) * 2017-03-28 2017-07-21 联想(北京)有限公司 Data sharing method and device
CN108196899A (en) * 2017-12-07 2018-06-22 青岛海信移动通信技术股份有限公司 A kind of method and device of the establishment of multi-user
WO2020168692A1 (en) * 2019-02-22 2020-08-27 全球能源互联网研究院有限公司 Mass data sharing method, open sharing platform and electronic device
CN112464208A (en) * 2020-11-25 2021-03-09 努比亚技术有限公司 File access method, mobile terminal and computer readable storage medium
CN112825072A (en) * 2019-11-21 2021-05-21 青岛海信移动通信技术股份有限公司 Communication terminal and data sharing method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7047377B2 (en) * 2002-08-20 2006-05-16 Gruintine Pueche, Inc. System and method for conducting an auction-based ranking of search results on a computer network
US20080208963A1 (en) * 2006-10-19 2008-08-28 Aviv Eyal Online File Sharing
EP2279472A4 (en) * 2008-04-05 2013-11-20 Social Communications Co APPARATUS AND METHODS BASED ON A SHARED VIRTUAL SPACE COMMUNICATION ENVIRONMENT
US20150180980A1 (en) * 2013-12-24 2015-06-25 Dropbox, Inc. Systems and methods for preserving shared virtual spaces on a content management system
US10956371B2 (en) * 2015-12-15 2021-03-23 Hitachi Vantara Llc Team folder conversion and management
US11106813B2 (en) * 2019-09-20 2021-08-31 International Business Machines Corporation Credentials for consent based file access

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105975876A (en) * 2016-06-29 2016-09-28 北京小米移动软件有限公司 File sharing method and device
CN106970978A (en) * 2017-03-28 2017-07-21 联想(北京)有限公司 Data sharing method and device
CN108196899A (en) * 2017-12-07 2018-06-22 青岛海信移动通信技术股份有限公司 A kind of method and device of the establishment of multi-user
WO2020168692A1 (en) * 2019-02-22 2020-08-27 全球能源互联网研究院有限公司 Mass data sharing method, open sharing platform and electronic device
CN112825072A (en) * 2019-11-21 2021-05-21 青岛海信移动通信技术股份有限公司 Communication terminal and data sharing method
CN112464208A (en) * 2020-11-25 2021-03-09 努比亚技术有限公司 File access method, mobile terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN113938890A (en) 2022-01-14
CN118400742A (en) 2024-07-26

Similar Documents

Publication Publication Date Title
EP4095723B1 (en) Permission reuse method, permission reuse-based resource access method, and related device
CN113836540B (en) Method, apparatus, storage medium and program product for managing application rights
CN113938890B (en) Data sharing method and terminal equipment
CN113835569A (en) Terminal device, quick start method for internal function of application and storage medium
CN112114883A (en) Terminal awakening method, terminal and computer storage medium
CN113709026A (en) Method, device, storage medium and program product for processing instant communication message
CN112825072B (en) Communication terminal and data sharing method
CN113835889A (en) Method for acquiring input event and related device
CN113642010B (en) Method for acquiring data of extended storage device and mobile terminal
CN113835928A (en) Application backup and recovery method, device, storage medium, and program product
CN113253905A (en) Touch method based on multi-finger operation and intelligent terminal
CN114595203B (en) File synchronization method, terminal device and storage medium based on dual systems
CN112000411A (en) Mobile terminal and display method of recording channel occupation information thereof
CN114675786B (en) A large-capacity storage mounting method, device, terminal and medium
CN114501389B (en) Mobile terminal, network sharing method and storage medium
CN111600862B (en) User account management method and device
CN115017487B (en) Switching method for login account of electronic equipment and electronic equipment
CN113496039B (en) Authority management method and terminal
CN111163220B (en) Display method, communication terminal and computer storage medium
CN111159734A (en) Communication terminal and multi-application data inter-access processing method
CN115146293A (en) A file encryption and decryption method, device and medium
CN116933219A (en) Application program authority management method, system and related device
CN114510754A (en) A terminal and partition mounting method
CN114154180A (en) Data sharing method and terminal equipment
CN115175266B (en) A data packet sending method, device, terminal and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Country or region after: China

Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Applicant after: Qingdao Hisense Mobile Communication Technology Co.,Ltd.

Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Applicant before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd.

Country or region before: China

GR01 Patent grant
GR01 Patent grant