Data sharing method, terminal equipment and computer readable storage medium
By establishing a short-range wireless connection between devices and redirecting the second device to the sharing interface address, the problem of data sharing between devices on different platforms is solved, achieving fast data transfer and a good user experience.
Patent Information
- Application Number
- CN202411642417.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-16
- Publication Date
- 2026-05-19
AI Technical Summary
High-speed data sharing between devices on different platforms is not possible, and existing cross-platform data sharing methods require users to install third-party applications, leading to compatibility issues and a decline in user experience.
By generating an address for sharing data on the first device and redirecting the second device to that address after establishing a short-range wireless connection with the second device, users can obtain data on the sharing interface, enabling fast data transfer between devices without the need to install any third-party applications.
It enables rapid data transfer between devices across platforms, improves user experience, simplifies the connection process, and avoids the inconvenience of installing additional third-party applications.
Smart Images

Figure CN122069494A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to methods for data sharing, terminal devices, and computer-readable storage media. Background Technology
[0002] With the increasing variety of personal smart terminal devices (such as mobile phones, tablets, PCs, smart screens, etc.), users' demand for interconnection and data sharing between these terminal devices is growing stronger. Under normal circumstances, devices on the same platform (such as Apple devices to Apple devices, or Huawei devices to Huawei devices) can achieve high-speed data sharing through built-in near-field data-free technologies (such as Apple's AirDrop or Huawei's Huawei Share). This method is both fast and does not consume data traffic. However, due to a series of issues such as technical barriers and compatibility, devices on different platforms (such as Apple and Huawei) cannot directly achieve high-speed data sharing through similar near-field data-free technologies.
[0003] In the existing technology, in order to solve the problem of data sharing between devices on different platforms, third-party applications (such as Kuaiya app) have been launched as a solution. These applications allow devices on different platforms to achieve cross-platform data transfer without data usage after the corresponding software is installed. However, the limitation of this method is that it requires all devices participating in data sharing to install the same third-party application, which may cause inconvenience to users in some cases, such as the need to download additional applications, potential compatibility issues, and a decline in the overall user experience. Summary of the Invention
[0004] To this end, this application provides a data sharing method, terminal device, and computer-readable storage medium. The method enables rapid data transfer between cross-platform devices without the need for additional third-party applications and provides a good user experience.
[0005] To achieve the above objectives, this application adopts the following technical solution:
[0006] In a first aspect, a data sharing method is provided, applied to a first device, the method comprising:
[0007] The system receives a first operation, which is used to select first data; generates first information based on the first data, the first information including a first address for sharing the first data; after establishing a short-range wireless connection with a second device, receives first request information from the second device, the first request information being used to determine whether the short-range wireless connection is available; sends first response information to the second device based on the first request information, the first response information including a first address, the first response information being used to instruct the second device to redirect to the first address; receives second request information from the second device, the second request information being sent after the second device redirects to the first address, the second request information being used to obtain the first data; and sends the first data to the second device based on the second request information.
[0008] The above method can be executed by the first device, or by a module (such as a processor, chip, or chip system) applied in the first device, or by a logic module or software that can implement all or part of the functions of the first device.
[0009] In existing technologies, if devices from different platforms (or different manufacturers) (such as mobile phones) need to exchange data, both devices typically need to install the same application (such as the Kuaiya app) to exchange data. This not only limits interoperability between devices but also requires users to install additional application software on each device. To overcome this limitation, this application proposes a data sharing method. In this method, if a first device needs to share first data with a second device, the first device can generate first information based on the first data. After the first device and the second device establish a short-range wireless connection, the first device can instruct (or guide) the second device to redirect to a first address while the second device is probing the availability of the short-range wireless connection. For example, after the second device redirects to the first address, it can display a sharing interface for the first data corresponding to the first address. Users can obtain the first data through the second device on this sharing interface. For instance, after redirecting to the first address, the second device can send a second request message to the first device, so that the first device can send the first data to the second device based on the second request message. This process enables fast data transfer between devices (such as between the first and second devices) without the need for additional third-party applications, resulting in a better user experience.
[0010] In one possible implementation, before establishing a short-range wireless connection with the second device, the method further includes: receiving a connection request from the second device, the connection request including second information, the second information being network information for establishing the short-range wireless connection with the first device; and establishing a short-range wireless connection with the second device in response to the connection request.
[0011] In one possible implementation, before establishing a short-range wireless connection with the second device, the process includes: receiving a second operation to initiate the sharing of first data; and after receiving the second operation, generating second information, which is network information for establishing a short-range wireless connection with the first device.
[0012] In some scenarios, the first device can generate second information after receiving the second operation, so that other devices (such as the second device) can establish a short-range wireless connection with itself based on the second information.
[0013] In one possible implementation, the second operation includes a first sharing operation and a second sharing operation. Receiving the second operation includes: receiving the first sharing operation; in response to the first sharing operation, displaying a first interface, the first interface including a first control; receiving a second sharing operation on the first control; and in response to the second sharing operation, displaying a second interface, the second interface including a pattern code, the pattern code including second information.
[0014] In one possible implementation, the second interface also includes operation illustration information, which illustrates how to use the code.
[0015] In some application scenarios, the second interface can not only display the pattern code (such as a QR code) itself, but also some additional operation instructions. These instructions can provide users with clear guidance on how to use the pattern code correctly, ensuring that users can smoothly perform subsequent scans. This display design can enhance the user experience, especially for users who are not familiar with or need clear guidance on how to use pattern codes. By providing intuitive operation instructions, it can not only lower the barrier to entry, but also improve the usability and acceptance of pattern codes.
[0016] In one possible implementation, the above method further includes: establishing a short-range soft access point (AP), which refers to a soft access point that provides wireless network connectivity over a short distance, and the second information being the network information of the short-range soft access point.
[0017] In some scenarios, when a first device needs to share data with a second device, the first device can create a short-range soft access point internally to facilitate establishing a short-range wireless connection with the second device.
[0018] In one possible implementation, the second information is displayed as a pattern code.
[0019] In some scenarios, the first device can display the second information as a pattern code (such as a QR code), so that other devices (such as the second device) can scan the pattern code using an application that supports pattern code scanning (such as a camera application or a pattern code scanning application) to obtain the second information, thereby establishing a short-range wireless connection with the first device based on the second information; this method eliminates the trouble of manually entering the second information and improves the convenience of connection.
[0020] In one possible implementation, the second information is displayed on the interface where the aforementioned pattern code is located.
[0021] In some scenarios, the first device can display the second information on the interface where the pattern code is located, so that a second device (such as a computer) that does not have pattern code scanning function (or the user does not want to use pattern code scanning function) can establish a short-range wireless connection with the first device when the user manually enters the second information (such as a password).
[0022] In one possible implementation, the above method further includes sending the second information to a second device via near field communication (NFC).
[0023] In some scenarios, the first device can also send the second information to the second device via NFC. For example, the first device can write the second information into the NFC chip. Other devices that need to establish a connection with the first device (such as the second device) can receive the second information sent by the first device by gently touching it (i.e., "tap-to-connect"), thereby establishing a short-range wireless connection with the first device based on the second information. This method utilizes the speed and convenience of NFC technology, simplifies the short-range wireless connection process, and improves the user experience.
[0024] In one possible implementation, the short-range wireless connection is a wireless fidelity (WiFi) connection.
[0025] In some application scenarios, the first device and the second device can share data using a WiFi connection, which can complete the transmission of a large amount of data (such as high-definition pictures and videos) in a short time, reducing waiting time and improving user experience.
[0026] In one possible implementation, the first request information includes a network availability probe request, and the first response information includes redirection information.
[0027] In one possible implementation, the second information includes a service set identifier (SSID), or the second information includes the SSID and a password.
[0028] In scenarios with low security requirements, to simplify the connection process and improve portability, the first device can set an SSID without a password when generating the second information, thereby simplifying the connection steps and improving the user experience. In scenarios with high security requirements, the first device can set both an SSID and a password when generating the second information, thereby enhancing connection security and preventing unauthorized access.
[0029] In one possible implementation, the first request information is sent by the second device after establishing a short-range wireless connection with the first device.
[0030] In one possible implementation, the method further includes, if the second information includes the SSID, the sharing interface includes a second element for entering a password.
[0031] In one possible implementation, the first data includes one or more of the following: images, documents, audio, video, web pages, or Uniform Resource Locator (URL) links.
[0032] In a second aspect, embodiments of this application provide a terminal device, which includes a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the terminal device performs the methods described in the first aspect and various possible implementations of the first aspect.
[0033] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the methods described in the first aspect and various possible implementations of the first aspect.
[0034] Fourthly, embodiments of this application provide a computer program product, which includes: computer program code, which, when executed by a terminal device, causes the terminal device to perform the methods described in the first aspect and various possible implementations of the first aspect.
[0035] Fifthly, embodiments of this application provide a chip system including a processing circuit and a storage medium storing computer program instructions; when the computer program instructions are executed by the processing circuit, they implement the methods described in the first aspect and various possible implementations of the first aspect.
[0036] Optionally, the processing circuitry in the above-mentioned chip system can be replaced by a processor, and the storage medium can be replaced by a memory. Optionally, the chip system may also include a communication interface for enabling communication between the chip system and a receiving device.
[0037] The beneficial effects of the technical solutions in the second to fifth aspects of this application can be the same as the beneficial effects of the technical solutions in the first aspect, and will not be repeated here. Attached Figure Description
[0038] Figure 1 A schematic diagram of the hardware structure of a terminal device 100 provided in an embodiment of this application;
[0039] Figure 2A A schematic diagram of the software architecture of a terminal device 100 provided in an embodiment of this application;
[0040] Figure 2B A schematic diagram of another software architecture of a terminal device 100 provided in an embodiment of this application;
[0041] Figure 3 A schematic diagram of the software architecture of the first device provided in an embodiment of this application;
[0042] Figure 4 A flowchart illustrating a data sharing method 400 provided in an embodiment of this application;
[0043] Figure 5 This application provides an embodiment of an interaction diagram between a first device and a second device.
[0044] Figure 6 This application provides another schematic diagram illustrating the interaction between a first device and a second device.
[0045] Figures 7A to 7H This is a schematic diagram of an application scenario provided by an embodiment of this application;
[0046] Figures 8A to 8C This is a schematic diagram illustrating another application scenario provided by an embodiment of this application;
[0047] Figures 9A to 9B This is a schematic diagram illustrating another application scenario provided by an embodiment of this application;
[0048] Figures 10A to 10D This is a schematic diagram illustrating another application scenario provided by an embodiment of this application;
[0049] Figures 11A to 11G This is a schematic diagram illustrating another application scenario provided by an embodiment of this application;
[0050] Figures 12A to 12D This is a schematic diagram illustrating another application scenario provided by an embodiment of this application;
[0051] Figures 13A to 13B This is a schematic diagram illustrating another application scenario provided by an embodiment of this application;
[0052] Figures 14A to 14BThis is a schematic diagram illustrating another application scenario provided by an embodiment of this application;
[0053] Figures 15A to 15B This is a schematic diagram illustrating another application scenario provided by an embodiment of this application;
[0054] Figures 16A to 16B This is a schematic diagram illustrating another application scenario provided by an embodiment of this application;
[0055] Figures 17A to 17C This is a schematic diagram illustrating another application scenario provided by an embodiment of this application;
[0056] Figure 18 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation
[0057] In the description of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. In the description of this application, "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. "At least one" means one or more, and "more" means two or more. The terms "first" and "second," etc., in the specification and claims of this application are used to distinguish different objects or to distinguish different treatments of the same object, not to describe a specific order of objects. For example, "first device" and "second device," etc., are used to distinguish different terminal devices, not to describe a specific order of terminal devices. Those skilled in the art will understand that the words "first," "second," etc., do not limit the quantity or execution order, and that "first," "second," etc., do not necessarily imply difference.
[0058] It should be noted that, in this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0059] In data sharing scenarios, Bluetooth transfer technology, as one of the earliest data sharing methods, has met users' basic needs to a certain extent. However, Bluetooth has limited bandwidth and relatively slow transmission speed, especially when transferring large amounts of data, which takes a long time. In addition, differences in device models and system versions may lead to poor compatibility and stability of Bluetooth transmission, affecting user experience.
[0060] In recent years, in order to overcome the limitations of Bluetooth technology, some manufacturers (such as Apple and Huawei) have launched built-in near-field data-free technologies (such as Apple's Air Mirroring technology and Huawei's Huawei Share technology) to enable fast file transfer between devices; however, these technologies are usually used to achieve data sharing between devices on the same platform (or the same manufacturer or the same brand or platform) and cannot be used across platforms.
[0061] To facilitate data sharing between devices on different platforms, various third-party applications (such as the Kuaiya app) have been launched on the market, enabling cross-platform data transfer. However, this method has limitations. It requires all devices involved in data sharing to have the same third-party application installed, which causes inconvenience for users, such as the need to download additional applications, potential compatibility issues, and a decline in the overall user experience.
[0062] To this end, this application proposes a data sharing method that enables rapid data transfer between cross-platform devices without requiring the installation of additional third-party applications and provides a good user experience.
[0063] In this data sharing method, when a first device (also known as an initiating device, master device, or sending device) needs to share first data (such as images, videos, URL links, etc.) with a second device (also known as a receiving device or slave device), the first device can generate a first address for sharing the first data based on the first data. This first address can be used by a browser, server, etc., to open the sharing interface of the first data. This first address is the sharing interface address of the first data (also known as a sharing interface link, sharing webpage link, or sharing page link). For example, this sharing interface address can correspond to the address of a World Wide Web page (i.e., an example of a sharing interface). This web page can serve as the sharing interface for the first data, used by users to download the first data or upload the second data. When the second device joins the short-range wireless network created by the first device, the second device can send a network availability probe request (such as a first request message) to the first device. Correspondingly, after receiving the network availability probe request, the first device can send a redirection message including the aforementioned sharing interface address to the second device to guide (or instruct) the second device to access the sharing interface address, thereby opening the web page corresponding to the sharing interface address.
[0064] After the web page is opened, the user can download or open the first data by clicking the download button or the open button (i.e., an example of the first element). When the user clicks the download button (or open button), the second device can send a request message (such as a second request message) to the first device to obtain the first data. Accordingly, after receiving the request message, the first device can send the first data to the second device according to the request message, thereby realizing data transfer (or data sharing) between devices (such as the first device and the second device).
[0065] Of course, the second device can also send data to the first device through this web page. For details, please refer to the relevant embodiments below, which will not be elaborated here.
[0066] It should be noted that in the above method, the first device (or the second device) can be a terminal device or user equipment (UE), or a service data server, etc. This application embodiment does not limit this.
[0067] The terminal device can be a mobile phone, smart screen, tablet computer, wearable device, virtual reality (VR) device, augmented reality (AR) device, or any other device with WiFi capability. This application does not impose any restrictions on the specific type of terminal device.
[0068] To better understand the embodiments of this application, the following describes a hardware and software structure of a terminal device, taking the first device (or the second device) as an example.
[0069] like Figure 1 The diagram shows a hardware structure schematic of a terminal device 100. The terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) connector 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, and a display screen 170, etc.
[0070] The processor 110 may include one or more processing units, such as an application processor, a modem processor, a graphics processing unit (GPU), a controller, a digital signal processor (DSP), a baseband processor, etc. These different processing units may be independent devices or integrated into one or more processors.
[0071] The processor 110 can generate operation control signals based on the instruction opcode and timing signals to control the instruction fetching and execution.
[0072] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 may be a cache memory. This memory can store instructions or data that the processor 110 has used or that are used frequently. If the processor 110 needs to use the instruction or data, it can directly retrieve it from this memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0073] In some embodiments, the processor 110 may include one or more interfaces. These interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc. The processor 110 can connect to modules such as wireless communication modules and displays through at least one of these interfaces.
[0074] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the terminal device 100. In other embodiments of this application, the terminal device 100 may also adopt different interface connection methods or a combination of multiple interface connection methods as described in the above embodiments.
[0075] USB connector 130 is a USB standard-compliant interface used to connect terminal device 100 and peripheral devices. Charging management module 140 receives charging input from a charger, which can be either a wireless or wired charger. Power management module 141 connects to battery 142, and charging management module 140 connects to processor 110. Power management module 141 receives input from battery 142 and / or charging management module 140 to power processor 110, internal memory 121, display screen 170, and wireless communication module 160, etc. In some embodiments, power management module 141 and charging management module 140 may also be housed in the same device.
[0076] The wireless communication function of the terminal device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0077] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the terminal device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the same device as at least some modules of the processor 110.
[0078] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the 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. After processing by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (e.g., a speaker) or displays a sharing interface, data transfer progress, etc., on the display screen 170.
[0079] In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0080] The wireless communication module 160 can provide wireless communication solutions for use on the terminal device 100, including wireless local area networks (WLAN) (such as WiFi communication), Bluetooth (BT), and near field communication (NFC) technologies.
[0081] In some embodiments, antenna 1 of terminal device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling terminal device 100 to communicate with networks and other terminal devices via wireless communication technology. This wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), etc.
[0082] The terminal device 100 can implement display functions through a GPU, a display screen 170, and an application processor. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0083] The external storage interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the terminal device 100. The external storage card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, it can save images, audio, and video files to the external storage card, or transfer images, audio, and video files from the terminal device 100 to the external storage card.
[0084] Internal memory 121 can be used to store computer executable program code, which includes instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (e.g., video applications), etc. The data storage area may store data created during the use of terminal device 100 (e.g., contact information, information about external devices to be connected, etc.).
[0085] In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. The processor 110 executes various functional methods or data processing of the terminal device 100 by running instructions stored in the internal memory 121 and / or instructions stored in memory disposed in the processor.
[0086] The display screen 170 is used to display elements on the user interface (UI) such as download and upload functions. For example, the display screen 170 can display information such as images, videos, or URL links to be downloaded. The display screen 170 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. In some embodiments, the terminal device 100 may include one or more display screens 170. In some embodiments, the display screen 170 may be a foldable or rollable display screen.
[0087] It is understood that the structure illustrated in the embodiments of this application does not constitute a specific limitation on the terminal device 100. In other embodiments of this application, the terminal device 100 may further include... Figure 1 More or fewer components, or combining some components, or splitting some components, or different component arrangements. Figure 1 The components can be implemented in hardware, software, or a combination of both.
[0088] The terminal device provided in this application embodiment can run an operating system (OS). This operating system can be various operating systems used in the industry, such as an operating system developed based on the open HarmonyOS, such as HarmonyOS; or other operating systems such as Android™, iOS; it can also be various open-source operating systems or their derivatives, such as Linux OS, and other embedded operating systems; or it can be a future new operating system, such as an operating system based on artificial intelligence (AI). An operating system is a set of interconnected system software programs that manage and control the operation of terminal devices, utilize and run hardware and software resources, and provide public services to organize user interaction. In the terminal device, the operating system connects downwards to the physical devices at the hardware layer and provides a runtime environment for application software upwards.
[0089] An operating system typically includes a kernel layer, a middleware layer, and an application layer. The application layer includes applications, which can include system applications and third-party applications. The middleware layer includes a suite of software providing various services to application developers, or frameworks providing services such as databases, multimedia, and graphics, or capabilities such as distributed scheduling and system scaling. For example, the middleware layer may include a framework layer and / or a system service layer. The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The system service layer includes the system's core capabilities, providing services to applications through the framework layer. The kernel layer is the layer between hardware and software. The kernel layer may include hardware drivers and the operating system kernel. In addition to providing hardware drivers, the kernel layer also supports functions such as memory management and system process management.
[0090] The types and forms of terminal devices used in daily life vary greatly, and the application scenarios of these devices are also very wide. Therefore, based on the different forms and functions of terminal devices, different application scenarios, and different user needs, the operating systems used on these terminal devices may also be different. The basic functions implemented by the terminal devices provided in this application embodiment can be implemented using a general-purpose operating system or a dedicated operating system. To more clearly illustrate the implementation of this application embodiment under a specific operating system, the architectures of HarmonyOS and Android™ are illustrated below. Those skilled in the art can deduce the implementation of this application embodiment under other specific operating systems, such as iOS and Windows.
[0091] like Figure 2A As shown, taking the HarmonyOS architecture as an example, a software architecture of terminal device 100 is illustrated. The software architecture of the terminal device can be divided into several layers. In some embodiments, from bottom to top, they are: kernel layer, system service layer, framework layer, and application layer. Layers communicate with each other through software interfaces. System functions can be tailored, added, or combined at the subsystem granularity in different device deployment scenarios, and each subsystem can also be tailored, added, or combined at the functional granularity.
[0092] kernel layer
[0093] The kernel abstract layer (KAL) provides basic kernel capabilities to upper layers by shielding the differences between multiple kernels, including but not limited to process / thread management, memory management, file system, network management, and peripheral device management.
[0094] Kernel Subsystem: Supports the selection of a suitable OS kernel for different resource-constrained devices, including but not limited to Linux kernel, HarmonyOS kernel, LiteOS (lite operating system), etc.
[0095] Driver Subsystem: The driver framework is the foundation for the open system hardware ecosystem, providing unified peripheral access capabilities and a framework for driver development and management. The driver framework includes: display drivers, camera drivers, audio drivers, Bluetooth drivers, sensor drivers, etc.
[0096] System service layer
[0097] The system service layer comprises the core capabilities of the system, providing services to applications through the framework layer. This layer includes, but is not limited to, the following subsystems:
[0098] The system's basic capability subsystem set provides fundamental capabilities for the operation, scheduling, and migration of distributed applications across multiple devices. This set may include distributed soft bus, distributed data management, distributed task scheduling, and Ark multi-language runtime; it may also include multi-modal input subsystem, graphics subsystem, security subsystem, and AI subsystem.
[0099] Basic software service subsystem set: provides public and general software services; the basic software service subsystem set may include event notification subsystem, telephone service subsystem, multimedia subsystem, etc.
[0100] Enhanced software service subsystem suite: Provides differentiated enhanced software services for different devices; the enhanced software service subsystem suite may include smart screen proprietary business subsystem, wearable proprietary business subsystem, IoT proprietary business subsystem, etc.
[0101] Hardware service subsystem set: Provides hardware services; the hardware service subsystem set may include location service subsystem, unified identity and access management (IAM) subsystem, wearable proprietary hardware service subsystem, biometric identification, IoT proprietary hardware service, and other subsystems.
[0102] Distributed task scheduling enables distributed service management (discovery, synchronization, registration, and invocation), supporting remote startup, remote invocation, remote connection, and migration of applications across devices.
[0103] Distributed data management enables data synchronization, data storage, data sharing, and data access across all scenarios and devices.
[0104] The distributed soft bus provides communication-related capabilities for seamless interconnection between multiple devices, including: WLAN service capabilities, Bluetooth service capabilities, soft bus, inter-process communication (remote procedure call, RPC), and StarFlash communication capabilities.
[0105] Ark Multilingual Runtime is a unified compilation runtime platform designed to support the joint compilation and execution of multiple programming languages and multiple chip platforms.
[0106] Framework layer
[0107] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The framework layer includes: the ArkUI framework, which provides a complete infrastructure for the development of the system application's user interface (UI); it can include UI functionalities such as components, layouts, animations, and interactive events, as well as a real-time interface preview tool; the user application framework; and the Ability framework (an Ability is a lightweight application, and the Ability framework schedules and manages the operation and lifecycle of Abilities). Different devices may have different operating systems, and the APIs they support may also differ.
[0108] The HarmonyOS API is a set of open capabilities provided to support HarmonyOS application development. The HarmonyOS API can be set at the framework layer or independently of the framework layer. The HarmonyOS API can include audio services (audio API), push services (push API), account services (account API), and more.
[0109] Application layer
[0110] Applications can include system apps and extended / third-party apps. System apps can include the desktop, control bar, settings, contacts, phone, camera, etc., while extended / third-party apps can include social apps, travel apps, etc.
[0111] under Figure 2B Taking the layered architecture of the Android operating system as an example, another software architecture of the terminal device 100 is illustrated. For example... Figure 2BAs shown, the layered architecture of the terminal device 100 divides the software into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the software components, from top to bottom, are the application (APP) layer, the application framework (FW) layer, the Android runtime (ART) and native C / C++ libraries, the hardware abstraction layer (HAL), and the kernel layer.
[0112] The application layer, also known as the application layer, can include a series of application packages. For example, an application layer package may include a gallery application, a video application, and a settings application. When these application packages are run, they can access the various service modules provided by the application framework layer through the application programming interface (API) and execute corresponding intelligent business logic.
[0113] The application framework layer (FWK) provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions. For example... Figure 2B As shown, the application framework layer can include a window manager, content providers, a view system, a resource manager, a notification manager, an activity manager, and an input manager. The window manager manages all windows in the system; the content provider stores and retrieves data (such as videos and images) and makes this data accessible to the application; the view system includes visual controls, such as controls for displaying text and controls for displaying images. The display interface can consist of one or more views. For example, the display interface including the SMS notification icon can include a view for displaying text and a view for displaying images; the resource manager provides various resources to the application, such as images and videos; and the notification manager manages the notification information in the phone's top status bar.
[0114] The Android runtime consists of the core libraries and the Android runtime itself. The Android runtime is responsible for converting source code into machine code. The Android runtime primarily employs ahead-of-time (AOT) compilation and just-in-time (JIT) compilation techniques.
[0115] The core library primarily provides basic Java class library functionalities, such as libraries for fundamental data structures, mathematics, I / O, tools, databases, and networking. It also provides APIs for users to develop Android applications.
[0116] Native C / C++ libraries can include multiple functional modules. Examples include a surface manager and a media framework. The surface manager manages the display subsystem and provides blending of 2D and 3D layers for multiple applications. The media framework supports playback and recording of various common audio and video formats, as well as still image files.
[0117] The Hardware Abstraction Layer (HAL) runs in user space, encapsulates kernel-level drivers, and provides calling interfaces to the upper layers. The HAL includes modules such as the display module, Bluetooth module, and WiFi module.
[0118] The kernel layer is the layer between hardware and software. At a minimum, the kernel layer contains display drivers, Bluetooth drivers, and WiFi drivers to power the display, Bluetooth chip, and WiFi chip.
[0119] The first device is used as an example below. Figure 1 , Figure 2A and Figure 2B Taking the terminal device with the structure shown as an example, combined with Figure 3 The software architecture diagram of the first device shown exemplifies the overall flow of the first device performing the above-described data sharing method.
[0120] With WiFi enabled, a user can open the Gallery app (or other apps) on the first device's display. After opening the Gallery app, the user can select a picture to share (an example of the first data) through a first action (such as a click) and initiate sharing. The Gallery app then sends a picture sharing request to the Notification Manager in response to this action. The Notification Manager generates a picture sharing event based on the request and sends it to the system's native sharing module. The system's native sharing module can, on one hand, respond to the picture sharing event by generating a sharing interface and the image's sharing interface address (an example of the first address) based on the image to be shared. On the other hand, it can create a virtual server and store the image there. When another device (such as a second device) requests the image from the first device, the first device (or its virtual server) can receive the request information from the other device (such as a second request from the second device), retrieve the image from the virtual server based on the request information, and finally send the image to the other device.
[0121] In addition, the system's native sharing module can generate image sharing commands based on image sharing events and send these commands to the WiFi driver. Upon receiving the image sharing command, the WiFi driver can create a WiFi access point (AP) (an example of a short-range soft access point), allowing other devices to interact with the WiFi network. The first device of the AP establishes a WiFi connection (an example of a short-range wireless connection). After the first and second devices establish a WiFi connection, the second device can send a network availability probe request to the first device (an example of a first request message). Correspondingly, after receiving the network availability probe request, the first device can send redirection information to the second device (an example of a first response message). The redirection information may include the address of the image sharing interface. After receiving the redirection information, the second device can open the image sharing interface according to the image sharing interface address. After the sharing interface is opened, the user can download the image through the download button on the sharing interface (an example of a first element). For example, after the user clicks the download button, the second device can respond to the user's download operation (i.e., the operation generated by the user clicking the download button) by sending a request message to the virtual server of the first device to obtain the image (an example of a second request message). Correspondingly, after receiving the request message, the virtual server of the first device can search for and obtain the image from the virtual server and send the image to the second device, thereby realizing image sharing between devices.
[0122] It should be noted that the software architecture of the first device is not limited to Figures 1 to 3 The hardware and software system architecture shown can be adapted to specific application scenarios in practical applications. Figures 1 to 3 The hardware and software system structure shown may be modified, but this application does not limit the specific implementation of the embodiments.
[0123] The following describes, with reference to the accompanying drawings, the data sharing method 400 provided in the embodiments of this application (see...). Figure 4 (The following is an example illustration.)
[0124] like Figure 4 The diagram shown is an interactive schematic of a data sharing method 400 provided in an embodiment of this application. Before introducing the data sharing method 400 provided in this application, a brief description of the execution entities involved in the embodiments of this application will be given; in this application, the first device and the second device can be terminal devices; the above-mentioned data sharing method 400 can be executed by the terminal device, or by a module applied in the terminal device (such as a processor, chip, or chip system, etc.), or by a logic module or software that can implement all or part of the functions of the terminal device.
[0125] This application exemplifies the method 400 proposed in this application by taking a first device (or a second device) as a terminal device, but this application does not limit the executing subject; it should be noted that both the first device and the second device support short-range wireless communication.
[0126] The above method 400 includes steps 401 to 406, which are described in detail below.
[0127] Step 401: The first device receives the first operation.
[0128] The first operation, also known as the selection operation, is used to select the first data. It can be a user gesture operation (such as a finger click operation), a mouse operation (such as a mouse click operation), or a stylus operation (such as a stylus click operation). This application embodiment does not limit the specific operation.
[0129] The first data may include, but is not limited to, images, videos, audio, documents, web pages, software installation packages, and uniform resource locator (URL) links. Among them, image, video, and audio data may be local data or cloud storage data, and this application embodiment does not limit this. In addition, URL links may be product URL links, image URL links, video URL links, document URL links, web page links, or software installation package URL links, etc., and this application does not limit this either.
[0130] In some embodiments, the first data may include one or more of the following: images, documents, audio, video, web pages, or Uniform Resource Locator (URL) links.
[0131] As an example, when a user wants to share first data from a first device to another device (such as a second device), the user can select the first data (such as one or more pictures) to be shared from some applications (such as a gallery, shopping application, etc.) on the first device through a first operation; accordingly, after the first device receives (or detects) the first operation through the application, it can determine the first data that the user currently needs to share.
[0132] Step 402: The first device generates first information based on the first data.
[0133] The first information may include a first address for sharing the first data; the first address is the address of the sharing interface of the first data, which may be a resource link; the resource link may be a URL link (such as http: / / 192.168.0.11:8080 / ...) or other links with similar URL functions, which are not limited in this application embodiment; under normal circumstances, any device that can access the Internet (such as a second device) can access the sharing interface of the first data through the first address; for example, the second device can access the sharing interface of the first data through the first address (such as a URL link) entered (or pasted) by the user into the browser.
[0134] In some examples, the first device may map the first data to a first address (such as http: / / 192.168.0.11:8080 / ...); this first address may serve as a path for a server (such as a virtual server within the first device) to access.
[0135] It should be noted that when the first device maps the first data to the first address, it can also generate some basic information about the first data, such as the name of the first data, the data type of the first data (e.g., a JPEG image), and the date (e.g., the latest modification time or publication time of the first data). This application embodiment does not limit this.
[0136] For example, the first device can map the first data to be shared to a URL link (i.e., an example of a first address); this URL link can be used as the path accessed by a virtual server (such as a virtual web server) within the first device; since this URL link is the address of the sharing interface of the first data, it is also called the sharing interface link of the first data; if the sharing interface of the first data is a web page, then the first device maps the first data to a URL link, which can also be understood as the first device forming a web page link of the first data based on the first data (e.g., http: / / 192.168.0.11:8080 / trans).
[0137] In other examples, the first information also includes a sharing interface for the first data; the first device may also generate a sharing interface for sharing the first data based on the first data.
[0138] In some scenarios, this sharing interface can sometimes be described as a sharing page or a sharing webpage. It can be used to download data (such as the first data) or upload data (such as the second data). The sharing interface can include various UI elements, such as a thumbnail of the first data, a download control, an open control, and a password input box. The download control is used to download the first data; the upload control is used to upload the second data (such as an image or video); the thumbnail of the first data is used by the user to understand what type of data the first data is (such as an image, video, or URL link); and the password input box is used to enter the password.
[0139] For example, in some embodiments, the sharing interface includes a download control (such as a download button) and an upload control; the user can download first data from the sharing interface through the download control, and upload second data (such as pictures, videos, etc.) through the upload control.
[0140] After receiving the first operation, the first device can determine the first data to be shared based on the first operation; after determining the first data, the first device can generate a first address and a sharing interface for the first data based on the first data.
[0141] Step 403: After the first device and the second device establish a short-range wireless connection, the first device receives a first request message from the second device.
[0142] The first request information can be used to determine (or detect) whether a short-range wireless connection is available.
[0143] It should be noted that after the first device and the second device establish a short-range wireless connection, the first device and the second device will form a short-range wireless network. Therefore, the first request information can also be understood as being used to determine (or detect) whether the short-range wireless network is available.
[0144] In some embodiments, the first request information may include a network availability probe request (or network availability probe request information), wherein the network availability probe request may be a hypertext transfer protocol (HTTP) request; the first request information may be carried in a network availability probe message (such as an HTTP request message) or in other request messages, and this application embodiment does not limit this.
[0145] For example, after the first device and the second device establish a short-range wireless connection, the first device and the second device will form a short-range wireless network; the second device can send a first request message including an HTTP request to the first device to detect whether the short-range wireless connection established by the first device and the second device is available (or to detect whether the short-range wireless network formed by the first device and the second device is available); accordingly, the first device can receive the first request message from the second device.
[0146] In some embodiments, the aforementioned short-range wireless connection may be a WiFi connection (such as WiFi Direct), or other short-range (or broadband short-range) wireless connections (such as Nearlink short-range communication connection), etc., and this application embodiment does not limit this.
[0147] It should be noted that in practical applications, the first and second devices use WiFi to connect and transfer data, which can complete the transfer of a large amount of data (such as high-definition pictures and videos) in a short time, reducing waiting time and improving user experience.
[0148] After the first device and the second device establish a short-range wireless connection, the second device needs to detect whether the current short-range wireless connection is available. At this time, the second device can send a first request message to the first device to detect whether the short-range wireless connection is available. Correspondingly, after receiving the first request message, the first device can return a first response message to the second device to instruct (or guide) the second device to redirect to a new network address.
[0149] Step 404: The first device sends a first response message to the second device based on the first request message.
[0150] The first response information may include a first address, which is used to instruct the second device to redirect to the first address.
[0151] For example, in some embodiments, after the first device and the second device establish a short-range wireless connection, the second device may send a first request message to the first device; after receiving the first request message, the first device may return a first response message including a first address to the second device to instruct (or guide) the second device to redirect to the first address.
[0152] In other embodiments, the first response information may include redirection information, which may include a first address; the redirection information may be HTTP response information; for example, taking the HTTP response information including a first address as an example, after the first device receives the first request information sent by the second device, it may return the first response information including the HTTP response information to the second device to instruct (or guide) the second device to redirect to the first address in the HTTP response information.
[0153] After receiving the first response information, the second device can be redirected to the first address based on the first response information, that is, the second device opens the sharing interface of the first data based on the first address.
[0154] It should be noted that the sharing interface for the first data may include a first element, which can be used to trigger the second device to generate a request message for obtaining the first data. In some embodiments, the first element may also be referred to as a first control, which may be a download control (such as a download button) or an open control (such as an open button). This application embodiment does not limit this. When the first element is triggered (or clicked) by the user, the second device may respond to the trigger (or click) operation by generating a request message for obtaining the first data (such as second request information).
[0155] Step 405: The first device receives the second request information from the second device.
[0156] The second request information can be sent by the second device after being redirected to the first address, and it can be used to obtain the first data; in some embodiments, when the second device detects that the first element has been triggered, the second device can respond to the triggering operation to generate the second request information.
[0157] After the second device generates the second request information, it can send the second request information to the first device; after the first device (such as the virtual server of the first device) receives the second request information, it can respond to the second request information and obtain the first data.
[0158] For example, in some embodiments, the first device may include a virtual server, which may pre-store the first data on the virtual server; after the second device generates the second request information, it may send the second request information to the virtual server of the first device; after receiving the second request information, the virtual server may respond to the second request information by searching for the first data on the virtual server and sending the first data to the second device.
[0159] Step 406: The first device sends the first data to the second device according to the second request information.
[0160] In response to the second request information, the first device (such as the virtual server of the first device) finds the first data and can send the first data to the second device; after receiving the first data, the second device can save the first data locally or on a cloud server.
[0161] In summary, in the above method 400, if the first device needs to share first data with the second device, the first device can generate first information including a first address based on the first data. After the first device and the second device establish a short-range wireless connection, the first device can instruct (or guide) the second device to redirect to the first address during the second device's detection of the short-range wireless connection availability. For example, after the second device is redirected to the first address, it can display a sharing interface for the first data corresponding to the first address. The user can obtain the first data shared by the first device through the second device on this sharing interface. For example, the second device can send a second request message to the first device after being redirected to the first address, so that the first device can send the first data to the second device based on the second request message. This process realizes fast data transfer between devices (such as between the first device and the second device) without the need for additional third-party applications and provides a good user experience.
[0162] In some embodiments, before the first device establishes a short-range wireless connection with the second device, the method 400 further includes:
[0163] Step S1: The first device receives a connection request from the second device.
[0164] The connection request is sent by the second device based on second information, which is network information used to establish a short-range wireless connection with the first device.
[0165] In some embodiments, after the second device obtains the second information from the first device, it can send a connection request to the first device based on the second information, so that the first device can perform identity authentication (or access authentication) on the second device based on the connection request.
[0166] In other embodiments, the connection request may include second information; the second device may send a connection request including the second information to the first device, so that the first device can respond to the connection request and authenticate the second device based on the second information in the connection request.
[0167] It should be noted that the connection request may also include other information besides the second information (such as the name of the second device, device identifier, etc.), and this application embodiment does not limit this.
[0168] Furthermore, it should be noted that in some embodiments, when the first device generates the second information, the second information may include an SSID, wherein the SSID is a part of the wireless network used to identify the network name; the network name that a user sees when searching for a wireless network is usually the SSID; the SSID can help the user identify and connect to the correct wireless network.
[0169] For example, in some scenarios, the second information can include the SSID but not the password. In this way, regardless of whether the second device has the function of scanning pattern codes (such as QR codes), as long as the network name is known, the second device can establish a short-range wireless connection with the first device through the second information without the user having to enter a password.
[0170] In other embodiments, when the first device generates the second information, the second information may include an SSID and a password.
[0171] For example, when the second device establishes a short-range wireless connection with the first device using the second information, it needs to provide both the SSID and the password to pass authentication and establish a short-range wireless connection with the first device. This connection establishment method requires the user to know the correct password to successfully establish a connection with the first device, which improves the security of the connection establishment.
[0172] In some other embodiments, where the second information includes the SSID, the sharing interface further includes a second element for entering a password.
[0173] It should be noted that the second element can be a password input box, a password hint control (such as a password question, image verification code, etc.), or other password-related controls (such as a graphic password or gesture password, etc.). This application embodiment does not limit this.
[0174] For example, in some scenarios (such as when the second information includes the SSID but not the password), the above sharing interface may include a second element, which can be used by the first device to further verify the user's identity (such as the identity of the second device); only after the user's identity is verified can the user obtain the first data (or upload the second data) on the sharing interface.
[0175] For example, in other scenarios (such as when the second information includes SSID and password), since the second device has already authenticated itself using the second information with password when establishing a short-range wireless connection with the first device, the user can obtain the first data (or upload the second data) without a password on the sharing interface; of course, the sharing interface can also include a second element for entering a password, so that the first device can further verify the identity of the second device, achieving the purpose of dual authentication.
[0176] In summary, in scenarios with low security requirements, to simplify the connection process and improve portability, the first device can set an SSID without a password when generating the second information, thereby simplifying the connection steps and improving the user experience. In scenarios with high security requirements, the first device can set both an SSID and a password when generating the second information, thereby enhancing connection security and preventing unauthorized access.
[0177] Step S2: The first device responds to the connection request and establishes a short-range wireless connection with the second device.
[0178] After receiving the connection request, the first device can authenticate (or access verify) the second device according to the connection request (such as authenticating the second device according to the second information in the connection request) to ensure that both parties can successfully establish a secure and stable network connection; after successful authentication, the first device can establish a short-range wireless connection with the second device.
[0179] In other embodiments, before the first device establishes a short-range wireless connection with the second device, the method 400 further includes:
[0180] Step S11: The first device receives the second operation.
[0181] The second operation is used to initiate the sharing of the first data; the second operation can be a gesture operation (such as a finger click operation) or a mouse operation (such as a mouse click operation), and this application embodiment does not limit it.
[0182] For example, in some cases, a user can first select first data in the application of the first device through a first operation, and then start the sharing of the first data by the first device through a second operation; when the first device receives (or detects) the second operation, it can respond to the second operation and perform subsequent processing.
[0183] Step S22: After receiving the second operation, the first device generates the second information.
[0184] When the first device receives (or detects) the second operation, it can respond to the second operation by generating second information to facilitate other devices (such as the second device) to establish a short-range wireless connection with itself based on the second information.
[0185] It should be noted that after the first device generates the second information, it can display the second information on the display screen of the first device in a certain way (such as in the form of a pattern code), or it can not display it, or it can write the second information into the NFC chip. This application embodiment does not limit this.
[0186] In some embodiments, the first device may display the second information as a pattern code on the display screen of the first device while generating the second information in response to the second operation; alternatively, the second information may be generated but not displayed temporarily, and then displayed on the display screen of the first device when a pattern code display operation (such as the QR code generation operation below) is received. The pattern code display operation includes, but is not limited to, the QR code generation operation (or QR code display operation), which is used to instruct the first device to display the second information as a pattern code.
[0187] For example, taking a pattern code as a QR code, when the first device receives a QR code generation operation, it can respond to the operation by displaying the second information as a QR code on a certain display interface of the first device.
[0188] As an example, when the first device displays the second information, the first device can display the second information as a pattern code.
[0189] Among them, the pattern code is an encoding method that can represent information such as text and links in a graphic way, making it convenient to scan and read; the pattern code can be a QR code or other types of encoded patterns, and this application embodiment does not limit it.
[0190] For example, taking a pattern code as a QR code, the second information includes the SSID (or SSID and password). The first device can generate a QR code from the second information including the SSID (or SSID and password) (i.e., the first device represents the second information in the form of a QR code), so that other devices (such as the second device) can use applications that support scanning QR codes (such as camera applications or QR code scanning applications) to scan the QR code to obtain the second information, thereby establishing a short-range wireless connection with the first device based on the second information. This method eliminates the trouble of manually entering the second information and improves the convenience of connection.
[0191] In other embodiments, when the first device generates a pattern code (such as a QR code) for the second information, it can also display the second information on the interface where the pattern code is located (for example, the first device can directly display the second information at a certain position on the interface where the pattern code is located) so as to directly obtain the second information; this makes it convenient for devices that do not support the use of pattern code functions to obtain the second information through user input or image recognition and input, and then establish a short-range wireless connection with the first device based on the second information.
[0192] For example, taking the pattern code as a QR code, when the first device generates a QR code from the second information, it can display the second information (such as SSID and password) at a certain position on the interface where the QR code is located (such as below the QR code). If the second device does not support the QR code scanning function and needs to establish a short-range wireless connection with the first device, the user of the second device can manually input the second information displayed on the QR code interface into the second device so that the second device can establish a short-range wireless connection with the first device through the second information.
[0193] It should be noted that in some embodiments, in addition to generating the second information in response to the second operation, the first device may also generate the second information in advance before receiving the second operation. This application embodiment does not limit this.
[0194] For example, if the second information is generated in advance, when the first device needs to display the second information via a QR code, it can respond to the QR code generation operation (i.e., an example of displaying a pattern code operation) and display the second information.
[0195] In some embodiments, the first device may send the second information to the second device via NFC.
[0196] In some examples, when both the first and second devices have NFC enabled, when the second device needs to establish a short-range wireless connection with the first device, the second device can receive a second message sent by the first device by lightly touching (i.e., "tap-to-connect"). For example, when the second device touches the first device, the first device can send the generated second message to the second device. After receiving the second message, the second device can establish a short-range wireless connection with the first device through the second message.
[0197] In other examples, the first device can write the second information into the NFC chip while generating the second information in advance (i.e., the first device writes the second information into the NFC chip in advance); or, the first device can also write the second information into the NFC chip in response to an external operation (such as a second operation); the embodiments of this application do not limit this.
[0198] For example, after the first device generates the second information in advance, it can directly write the second information into the NFC chip. When both the first and second devices have NFC enabled, when the second device touches the first device lightly (i.e., "tap-to-tap"), the first device can send the second information in the NFC chip to the second device. Correspondingly, the second device can receive the second information sent by the first device. After receiving the second information, the second device can establish a short-range wireless connection with the first device through the second information.
[0199] Therefore, based on the speed and convenience of NFC communication, sending second information from the first device to the second device can not only simplify the short-range wireless connection process, but also improve the user experience.
[0200] In some embodiments, the first request information may be information sent by the second device after establishing a short-range wireless connection with the first device.
[0201] For example, the first request information can be sent by the second device after scanning the pattern code (such as a QR code) and establishing a short-range wireless connection with the first device; the second device can obtain the second information by scanning the pattern code; and then establish a short-range wireless connection with the first device based on the second information.
[0202] For example, the first request information can also be the information sent by the second device after it touches the first device and establishes a short-range wireless connection with the first device; in some scenarios, after the first device generates the second information, it can directly write the second information into the NFC chip; when the second device touches the first device, it can receive the second information sent by the first device; then, it can establish a short-range wireless connection with the first device based on the second information.
[0203] In some other embodiments, the second operation described above may include a first sharing operation and a second sharing operation, and step S11 may also be implemented through the following steps:
[0204] Step a): The first device receives the first sharing operation.
[0205] The first sharing operation is used to initiate (or control) the first device to share the first data. For example, the first sharing operation can be an operation generated by the user triggering a sharing control (such as a share button). For instance, after the user selects the first data through the first operation, the user can initiate the first device to share the first data through the first sharing operation.
[0206] Step b): The first device responds to the first sharing operation and displays the first interface.
[0207] The first interface is the interface for the first device to share the first data; the first interface may include the first control, and may also include the basic information of the first data (such as the number of images included in the first data, etc.), etc., which are not limited in this embodiment of the application.
[0208] In some examples, the first control mentioned above can be a pattern code generation control (such as a QR code generation control or a share code generation control); the user can trigger the first device to generate a second sharing operation by operating the first control (such as clicking with a finger or clicking with a mouse); the second sharing operation can be the pattern code display operation mentioned above, used to start (or control) the second device to display the pattern code (such as a QR code).
[0209] After receiving the first sharing operation, the first device can display the first interface according to the first sharing operation; the user can operate the first control on the first interface.
[0210] Step c): The first device receives a second sharing operation on the first control.
[0211] When a user interacts with the first control on the first interface, the first device can receive (or detect) the user's second sharing operation on the first control.
[0212] Step d): The first device responds to the second sharing operation and displays the second interface.
[0213] The second interface can be understood as the interface where the pattern code (such as a QR code) is located; when the second device receives the second information and the second sharing operation, it can generate a pattern code based on the second information and display the pattern code on the second interface.
[0214] It should be noted that the first device may generate the second information upon receiving the first sharing operation; or it may generate the second information upon receiving the second sharing operation; or it may generate the second information in advance. This application embodiment does not limit this.
[0215] In some optional embodiments, the second interface may also include operation illustration information, which can be used to illustrate the method of using the above-mentioned pattern code.
[0216] The operation instructions may refer to additional information attached to the second interface, the purpose of which is to explain to the user how to use the pattern code correctly. The operation instructions may include, but are not limited to, text (such as using text to explain how to use the pattern code), icons (such as using text combined with graphics to explain how to use the pattern code), or other visual elements (such as using animation to explain how to use the pattern code), to guide the user to scan, click, or perform other operations related to the pattern code.
[0217] Therefore, in some scenarios, the second interface can not only display the pattern code itself, but also some additional operation instructions. These instructions can provide users with clear guidance on how to use the pattern code correctly, ensuring that users can smoothly perform subsequent scans. This display design can enhance the user experience, especially for users who are not familiar with or need clear guidance on how to use the pattern code. By providing intuitive operation instructions, it can not only lower the barrier to entry, but also improve the usability and acceptance of the pattern code.
[0218] In some embodiments, the method 400 further includes:
[0219] Step S33: The first device establishes a short-range soft access point.
[0220] Among them, a short-range soft access point can refer to a soft access point that provides wireless network connectivity over a short distance; the second information mentioned above can be understood as the network information of the short-range soft access point.
[0221] Before generating the second information, the first device can create a virtual module internally, which can serve as a short-range soft access point. After creating the short-range soft access point internally, the first device can serve as an access point for a short-range wireless network. Other devices (such as the second device) can establish a short-range wireless connection with the first device.
[0222] It should be noted that the creation of a short-range soft access point by the first device before generating the second information can be understood as follows: the first device can create a short-range soft access point after receiving the second operation and before generating the second information; it can also create a short-range soft access point before receiving the second operation; or it can create a short-range soft access point in advance. The embodiments of this application do not limit the timing of creating the short-range soft access point.
[0223] It should also be noted that when other devices (such as a second device) join the short-range wireless network created by the first device as a station (STA), the first device can be referred to as an AP; when other devices join the short-range wireless network created by the first device as a group client (GC), the first device can be referred to as the group owner (GO).
[0224] For example, taking a short-range soft access point as a WiFi soft access point, when a second device joins the WiFi network created by the first device as a STA, the first device can be called a WiFi AP; when a second device joins the WiFi network created by the first device as a GC, the first device can be called a GO.
[0225] Therefore, when the first device needs to share data with other devices (such as the second device), the first device can create a soft access point internally to facilitate the establishment of short-range wireless connections between itself and other devices (such as the second device).
[0226] In some embodiments, the sharing interface may further include a third element; after the second device displays the sharing interface, in response to an operation on the third element, the second device may send a third request message, the third request message being used to inquire whether the first device should receive the second data, and the method 400 further includes:
[0227] Step S01: The first device receives a third request message from the second device.
[0228] The third element can be a send control (such as a send button) used to trigger the second device to send a third request message to the first device.
[0229] In some embodiments, the sharing interface may further include an upload control; wherein the upload control can be used for the second device to upload second data; the upload control can be an upload button, a file input box, or other forms of upload control, and this application embodiment does not limit this.
[0230] After a user uploads the second data using the upload control on the sharing interface, the user can trigger a third element on the sharing interface to send a third request message from the second device to the first device; after the second device receives the second response message, the second device can send the second data to the first device.
[0231] In some embodiments, after receiving a third request from a second device, the first device may generate a message notification box on the display screen of the first device. The message notification box may include a receive option and a reject option, used to ask the user whether they agree to receive second data sent from the second device. When the user selects the receive option, it means that the user agrees to receive data sent from the second device to the first device. When the user selects the reject option, it means that the user does not agree to receive data sent from the second device to the first device.
[0232] Step S02: The first device sends a second response message to the second device.
[0233] The second response information is used to instruct the second device to send the second data.
[0234] In some embodiments, when a user of the first device agrees to receive second data sent by the second device, the user can select a receive option. At this time, the first device can respond to the receive operation (i.e., the operation generated by the user triggering the receive option) and send a second response message to the second device. Accordingly, after receiving the second response message, the second device can send the second data to the first device. When a user of the first device does not agree to receive the second data sent by the second device, the user can select a refuse option. At this time, the first device can also respond to the refuse operation (i.e., the operation generated by the user triggering the refuse option) and send a third response message to the second device. Accordingly, after receiving the third response message, the second device will stop sending the second data to the first device.
[0235] Step S03: The first device receives the second data from the second device.
[0236] When the second device receives the second response information, it determines that the first device can receive the second data. At this time, the second device can send the second data to the first device. Correspondingly, the first device can receive the second data from the second device. After receiving the second data, the first device can store the second data locally or on a cloud server. This application does not limit the storage method of the second data.
[0237] Therefore, in addition to sending first data to the second device, the first device can also receive second data from the second device through a short-range wireless connection established with the second device. For example, users can trigger a third element (such as a send operation) on the sharing interface to send the second data to the first device. The operation is simple and provides a good user experience.
[0238] To facilitate understanding, the following will be combined with... Figure 5 and Figure 6 The software framework diagram applicable to this application is shown, and the data sharing method proposed in this application is introduced.
[0239] In some embodiments, such as Figure 5 As shown, taking the example of a first device sharing first data with a second device, the first device may include, but is not limited to, a WiFi module and a virtual server, and the second device may also include, but is not limited to, a WiFi module; the process steps for the first device to share the first data with the second device are as follows:
[0240] Step (1): The first device determines the first data.
[0241] For example, the first device can receive the first operation and determine the first data based on the first operation; wherein, the first operation is the operation corresponding to when user 1 selects the first data in the application of the first device (such as a gallery, shopping application, etc.).
[0242] Step (2): The first device can map the first data to the first address (such as a URL link).
[0243] It should be noted that if a virtual server has been created inside the first device, the first device can store the first data on the virtual server; if a virtual server has not yet been created inside the first device, the first device can store the first data on the virtual server after the virtual server is created. This application embodiment does not limit this.
[0244] In other words, the first device can pre-create a virtual server, or it can create a virtual server at the same time as generating the second information after receiving the second operation; or it can create a virtual server after generating the second information. This application embodiment does not limit this.
[0245] Step (3): The first device generates the second information.
[0246] For example, the first device can receive the second operation and generate second information based on the second operation (such as the second information including SSID and password); wherein, the second operation is the operation of user 1 triggering the first device to start sharing the first data; the second information can be written into the NFC chip in advance, or it can be displayed on the display screen of the first device in the form of a QR code (i.e., an example of a pattern code) when the first device responds to the display operation (such as generating a QR code).
[0247] For example, when the first device receives the second operation, the first device can establish a WiFi AP internally and generate (or automatically set) an SSID of "XXX" and a password of "12345678" (i.e., an example of the second information); after the WiFi AP is created (or at the same time as the WiFi AP is created), the first device can establish a virtual server (such as a virtual web server) internally and set the network protocol (internet protocol, IP) address (such as the first device's own IP address: 192.168.0.11) and listening port (such as 8080) for the virtual server.
[0248] For example, the first device can map the first data (such as images, videos, URL links, etc.) to a resource link X (i.e., an example of the first address), and the resource link X (such as http: / / 192.168.0.11:8080 / trans) corresponds to the sharing interface of the first data; the first device can store the first data on this virtual server.
[0249] Step (4): The second device acquires the second information.
[0250] For example, the second device can receive the second information sent by the first device by gently touching it (i.e., "tap"); or it can scan the QR code in step (3) to obtain the second information.
[0251] Step (5): After the second device obtains the second information, it can establish a WiFi connection with the first device through the second information.
[0252] Step (6): After the first device establishes a WiFi connection with the second device, the second device can send a network availability probe request (i.e., an example of the first request information) to the WiFi module of the first device.
[0253] Step (7): The WiFi module of the first device sends a redirection message (such as an example of the first response message) to the second device (such as the WiFi module of the second device).
[0254] For example, the WiFi module of the first device receives a network availability probe request from the second device; in response to the network availability probe request, the WiFi module of the first device sends the aforementioned redirection information to the second device (such as the WiFi module of the second device).
[0255] Step (8): The second device is redirected to the first address.
[0256] For example, after receiving the first address, the second device can display (or automatically pop up) the sharing interface on the second device's display screen based on the first address.
[0257] Step (9): The second device sends a second request message to the virtual server of the first device.
[0258] For example, after receiving a download operation (or open operation), the second device can respond to the download operation (or open operation) by sending a second request to the virtual server of the first device to obtain the first data; wherein, the download operation (or open operation) is the operation corresponding to user 2 clicking the download button or open button on the sharing interface (i.e., an example of the first element).
[0259] Step (10): The virtual server of the first device obtains the first data.
[0260] For example, the virtual server of the first device receives and responds to the second request information, and searches for and retrieves the first data from the virtual server.
[0261] Step (11): The virtual server of the first device sends the first data to the second device to complete the data sharing between the devices.
[0262] In other embodiments, the first device and the second device may also have, for example: Figure 6 The software architecture shown below, combined with Figure 6 The software architecture shown will be used to introduce the data sharing between the first device and the second device.
[0263] Step ①: The file system module 1 of the first device records the first data.
[0264] The first data can be local data or a URL link of a certain type of data (such as an image URL link).
[0265] For example, user 1 can select first data in application 1 (such as shopping application, gallery application or video application) on the first device through the first operation; the first data can be a URL link in application 1 (such as a product link, video link, etc.), or it can be data stored locally on the first device by application 1 (such as photos, videos, documents, etc.).
[0266] It should be noted that if the first data (such as images) is local data, the file system module 1 of the first device can record the storage location and data type (such as image type, video type, document type, etc.) of the first data.
[0267] If the first data is a URL link in application 1 (such as a product link, song link, etc.), then the file system module 1 of the first device can record the relevant string of the URL link.
[0268] Step 2: The native sharing module of the first device can control the WiFi module 1 to generate second information (such as SSID and password).
[0269] It should be noted that the system native sharing module of the first device can pre-control the WiFi module 1 to generate the second information; or it can control the WiFi module 1 to generate the second information in response to the second operation. This application embodiment does not limit this.
[0270] For example, after user 1 selects the first data through the first operation, user 1 can start sharing the first data through the second operation; when the first device detects the second operation, it can respond to the second operation and generate the second information.
[0271] Step 3: The system's native sharing module can also create a virtual server and generate the first address of the first data and the sharing interface of the first data based on the first data in step 1; the first address can be used by a browser (such as the browser of the second device) to open the sharing interface.
[0272] It should be noted that step ③ can also be executed before step ②. This application does not limit the execution order of steps ② and ③.
[0273] It should also be noted that after the native sharing module of the above system generates the second information, it can be displayed as a QR code (an example of a pattern code) or written into the NFC chip. For specific processing methods, please refer to the relevant descriptions of QR codes and NFC chips above, which will not be repeated here.
[0274] Step 4: The WiFi module 2 of the second device obtains the second information.
[0275] For example, the second device can scan a QR code containing the second information or "tap" with the first device, so that the WiFi module 2 of the second device can receive the second information (such as SSID and password) sent by the WiFi module 1 of the first device.
[0276] Step 5: After receiving the second information, the WiFi module 2 of the second device can send a connection request (such as a network connection request) to the WiFi module 1 of the first device; wherein, the connection request may include, but is not limited to, the second information.
[0277] Step 6: After receiving the connection request, the WiFi module 1 of the first device can authenticate the second device according to the connection request; if the authentication is successful, the first device and the second device establish a WiFi connection.
[0278] Step 7: After the first device and the second device establish a WiFi connection, the WiFi module 2 of the second device can send a network availability probe request (i.e., an example of the first request information) to the WiFi module 1 of the first device.
[0279] Step 8: After receiving the network availability probe request, the WiFi module 1 of the first device can send (or respond to) redirection information (i.e., an example of the first response information) to the WiFi module 2 of the second device; the redirection information includes the first address.
[0280] Step 9: After receiving the redirection information, the WiFi module 2 of the second device requests portal interface (or portal page or portal webpage) authentication (or confirms to perform portal interface authentication); at this time, the WiFi module 2 will launch the browser of the second device and send the redirection information to the browser; the browser can redirect the portal interface to the first address according to the redirection information; at this time, the sharing interface of the first data corresponding to the first address will automatically pop up (or pop up at that time) on the screen of the second device; the sharing interface includes a first element; for example, when the first data is local image, video, or other data of the first device, the first element can be a download control (or download button); user 2 can trigger the first element to download the first data through the second device; when the first data is the URL link of application 1 of the first device, the first element can be an open control (or open button); user 2 can trigger the first element to make the second device open the first data.
[0281] When the first element is triggered by the user, the second device can respond to the triggering operation by sending a second request message to the first device in order to obtain the first data from the first device.
[0282] It should be noted that, optionally, after the WiFi module 2 launches the browser of the second device and sends the redirection information to the browser, the browser can also first pop up the portal authentication interface based on the redirection information, and then jump from the portal authentication interface to the first address; at this time, the screen of the second device will display the sharing interface of the first data corresponding to the first address.
[0283] Step 10: The second device sends a second request message to the virtual server of the first device.
[0284] For example, the second device can receive the trigger operation in step 9 through a browser on the sharing interface; after receiving the trigger operation, the second device can respond to the trigger operation and send a second request message to the virtual server of the first device.
[0285] step The virtual server of the first device sends the first data to the second device.
[0286] For example, after the virtual server of the first device receives the second request information in step 10, it can search for and obtain the first data on the virtual server based on the second request information; after the virtual server of the first device obtains the first data, it can send the first data to the second device.
[0287] It should be noted that after the second device receives the first data, if the first data is local data such as pictures or videos on the first device, the second device can store the first data in the file system module 2; if the first data is a URL link of a product in application 1 of the first device, the second device can respond to the user 2's operation on the first element (such as an open operation) and open the sharing interface corresponding to the URL link.
[0288] It should also be noted that in some scenarios, the sharing interface may also include a third element, which can be a send control (such as a send button). When the second device shares the second data with the first device, the second device can receive an operation on the third element and, in response to the operation, send a third request message to the first device to inquire whether the first device should receive the second data. After the first device receives an operation from the user agreeing to receive the second data, the first device can send a second response message to the second device. After the second device receives the second response message, the second device can send the second data to the first device based on the second response message. Accordingly, the first device receives the second data.
[0289] It should also be noted that the above data sharing method is applicable not only to one-to-one data transfer scenarios, but also to one-to-many data transfer scenarios, that is, the first device can simultaneously establish short-range wireless connections with two or more devices (such as the second device, the third device, etc.) and transfer data to each other; this application only uses the one-to-one data transfer method as an example to introduce the above data sharing method; for the one-to-many data transfer method, since the implementation principle is similar to that of the one-to-one method, please refer to the one-to-one data transfer method for details, and it will not be repeated in this article.
[0290] The data sharing method 400 provided in this application has been described in detail above. The following section, in conjunction with the interface embodiment, introduces the application of method 400 in different application scenarios.
[0291] It should be noted that, Figures 7A to 14B In this context, mobile phone 1 (an example of the first device) acts as the sharing device (also known as the initiating device or initiator) and mobile phone 2 (an example of the second device) acts as the receiving device (or receiver).
[0292] In some embodiments, such as Figure 7A As shown, user A can enable Wi-Fi by opening the wireless local area network (WLAN) 702 in the status control bar 701 of phone 1; after enabling Wi-Fi, user A can click the "Gallery" icon 704 on the main interface 703 of phone 1, as shown. Figure 7B As shown; after opening the Gallery app on phone 1, users can then access the image selection interface 705 based on user actions, such as... Figure 7C As shown; User A can select images 706 (an example of the first data) to be sent to the second device on the image selection interface 705 by tapping (an example of the first operation). Image 706 includes 7 images; the tapping operation refers to selecting image 706; User A can initiate sharing of image 706 on phone 1 by tapping the "Share 707" button on the image selection interface 705; when phone 1 receives the operation X1 corresponding to tapping the "Share 707" button (an example of the first sharing operation), it can display the sharing selection interface 708 (an example of the first interface) in response to operation X1, such as... Figure 7D As shown; when user A clicks the "Generate Share Code 709" button on the sharing selection interface 708, mobile phone 1 can display a QR code (i.e., an example of a pattern code) interface 710 (i.e., an example of a second interface) on the sharing selection interface 708 according to the operation X2 corresponding to clicking the "Generate Share Code 709" button (i.e., an example of a second sharing operation). The QR code interface 710 includes a QR code 711 and an operation diagram 712 of the QR code 711 (i.e., an example of operation diagram information), such as... Figure 7E As shown.
[0293] It should be noted that mobile phone 1 can generate the second information upon receiving operation X1, or upon receiving operation X2, or the second information can be generated in advance; when mobile phone 1 receives operation X2, it can generate a QR code 711 based on the second information and display the QR code 711 on the QR code interface 710; optionally, mobile phone 2 can also generate an operation diagram 712 and display the operation diagram 712 on the QR code interface 710.
[0294] like Figure 8A As shown, mobile phone 2 can scan the QR code 711 of mobile phone 1 using the camera application 800; after the camera application 800 scans the QR code 711, a message notification box 801 will pop up on the interface of the camera application 800 to ask whether to join the "XXX01" network, such as... Figure 8BAs shown; if option 802 is selected, phone 2 will send a network connection request to phone 1 (i.e., an example of a connection request); this network connection request may include second information; after receiving the network connection request, phone 1 can complete the authentication of phone 2 according to the network connection request; if the authentication is successful, phone 1 and phone 2 will establish a WiFi connection; after phone 2 and phone 1 establish a WiFi connection, phone 2 can send a network availability probe request to phone 1 (i.e., an example of first request information); after receiving the network availability probe request, phone 1 can send redirection information to phone 2 (i.e., an example of first response information); this redirection information includes the sharing address of image 706 (i.e., an example of the first address); in addition, the device list on the sharing selection interface 708 will also display the icon 713 of phone 2, such as Figure 7F As shown.
[0295] It should be noted that, according to the relevant descriptions in steps 401 and 402 above, mobile phone 1 can generate a corresponding sharing address based on image 706 after receiving a finger tap operation; for example, mobile phone 1 can generate a corresponding sharing address based on image 706 after receiving a finger tap operation and operation X1.
[0296] After receiving the redirection information, mobile phone 2 can be redirected to the sharing address of image 706, that is, open the sharing interface 803 of image 706 according to the sharing address, such as... Figure 8C As shown; User B can see the image information (such as the number of images, image size, etc.) sent (or shared) from Mobile Phone 1 to Mobile Phone 2 on this sharing interface 803; such as Figure 8C As shown, if user B clicks the "One-click Receive 804" button on the sharing interface 803 (i.e., an example of the first element), then mobile phone 2 will respond to the click operation and send an image acquisition request to mobile phone 1 (i.e., an example of the second request information); after receiving the image acquisition request, mobile phone 1 can send image 706 (i.e., 7 images) to mobile phone 2.
[0297] During the process of sending image 706 from phone 1 to phone 2, a sending progress ring and a sending status indicator 901 will appear around icon 713 in the device list of phone 1, such as... Figure 9A As shown; after phone 1 sends image 706 to phone 2, a success status indicator 902 appears around icon 713, as shown. Figure 9B As shown.
[0298] Correspondingly, after phone 1 sends image 706 to phone 2, the "One-click Receive 804" button on the sharing interface 803 of phone 2 is updated to a "Re-receive 1001" button, and a "Reception Completed Indicator 1002" appears around the "Re-receive 1001" button. Figure 10A As shown.
[0299] In some alternative embodiments, when user A clicks the "Generate Share Code 709" button on the sharing selection interface 708 (see... Figure 7D After that, when mobile phone 1 displays the QR code on the QR code interface 710, it can also display the second information on the QR code interface 710, such as... Figure 7G As shown; in which, the display area where the QR code 711 (or operation diagram 712) is located displays the second information (such as SSID: XXX01 and password: 123456).
[0300] In some alternative embodiments, when mobile phone 1 receives a notification that the "Share 707" button has been clicked (see [link]...) Figure 7C After operation X1, the device can respond to operation X1, generate second information, and write the second information into the NFC chip; when the NFC function of mobile phone 1 and mobile phone 2 is activated, mobile phone 2 can receive the second information sent by mobile phone 1 by tapping it with mobile phone 1.
[0301] For example, such as Figure 7H As shown, user A can turn on the NFC switch 714 in the status control bar 701 of mobile phone 1 to activate the NFC function; similarly, as Figure 10B As shown, phone 2 can also enable NFC by turning on the NFC switch 1004 in its status control bar 1003; when both phone 1 and phone 2 have NFC enabled, as shown... Figure 10C As shown, when phone 2 lightly touches phone 1, phone 2 can receive a second message from phone 1; in addition, a message notification box 1005 will pop up on the screen of phone 2, asking phone 2 whether to join the "XXX01" network; if user B selects the join option 1006, phone 2 will send a network connection request to phone 1; after receiving the network connection request, phone 1 will authenticate phone 2 according to the network connection request; after successful authentication, phone 1 and phone 2 will establish a WiFi connection.
[0302] In some alternative embodiments, the second information generated by mobile phone 1 may not include a password; although mobile phone 2 can establish a WiFi connection with mobile phone 1 without a password, mobile phone 1 can set a password on the sharing interface 803 when generating the sharing interface 803 based on image 706; for example, when mobile phone 2 establishes a WiFi connection with mobile phone 1, after mobile phone 2 opens the sharing interface 803 based on the sharing address, a network settings box 1007 will pop up on the sharing interface 803, such as... Figure 10D As shown; before receiving the picture 706 shared by mobile phone 1, user B needs to enter the password 123456 of the XXX01 network in the password input box 1008, and then click the "Enter 1009" button to enter the sharing interface 803 (see...). Figure 8B ).
[0303] In some alternative embodiments, mobile phone 1 may also share a product link (i.e., an example of the first data) from shopping application X with mobile phone 2; for example, such as Figure 11A As shown, user A can click the shortcut icon for "X application 1101" on the main interface 703 of phone 1; at this time, phone 1 enters the main interface 1102 of the X application, as shown... Figure 11B As shown; User A can use their finger to tap operation P (i.e., an example of the first operation) to select the XXX product link 1103 (i.e., an example of the first data) on the main interface 1102 to share with the second device, such as... Figure 11B As shown, the finger tap operation P can refer to the operation of selecting the XXX product link 1103; at this time, mobile phone 1 enters the details page 1104 of the XXX product, as shown... Figure 11C As shown; User A can click the "Share 1105" button on the details page 1104 to initiate sharing of the XXX product link 1103 on mobile phone 1; when mobile phone 1 receives the operation Y1 of clicking the "Share 1105" button (i.e., an example of the first sharing operation), it can respond to the operation Y1 and display the product sharing interface 1106 (i.e., an example of the first interface), as shown. Figure 11D As shown; when user A clicks the "Generate Sharing Code 1107" button on the product sharing interface 1106, mobile phone 1 can display a QR code interface 1108 (an example of the second interface) on the product sharing interface 1106 according to the operation Y2 corresponding to clicking the "Generate Sharing Code 1107" button (i.e., an example of the second sharing operation), as shown. Figure 11E As shown; wherein, the QR code interface 1108 includes a QR code 1109 and an operation diagram 1110 of the QR code 1109 (i.e., an example of operation diagram information), as follows. Figure 11E As shown.
[0304] It should be noted that mobile phone 1 can generate the second information upon receiving operation Y1, or upon receiving operation Y2, or it can generate the second information in advance; when mobile phone 1 receives operation Y2, it can generate QR code 1109 based on the second information and display QR code 1109 on QR code interface 1108; optionally, mobile phone 2 can also generate operation diagram 1110 and display operation diagram 1110 on QR code interface 1108.
[0305] It should also be noted that the process of establishing a WiFi connection between phone 2 and phone 1 can be found in the section above. Figure 8A The relevant descriptions will not be repeated here.
[0306] After mobile phone 2 establishes a WiFi connection with mobile phone 1, mobile phone 2 can send a network availability probe request to mobile phone 1 (i.e., an example of the first request information); after receiving the network availability probe request, mobile phone 1 can send redirection information to mobile phone 2 (i.e., an example of the first response information); the redirection information includes the sharing address D of the XXX product link 1103 (i.e., an example of the first address); after receiving the redirection information, mobile phone 2 can be redirected to the sharing address D according to the redirection information, that is, open the sharing interface 1111 of the XXX product link 1103 according to the sharing address D, such as... Figure 11F As shown; User B can see the basic information (such as XXX product description, price, etc.) sent (or shared) from Mobile 1 to Mobile 2 on the sharing interface 1111; if User B clicks the "Open 1112" button on the sharing interface 1111 (i.e., an example of the first element), Mobile 2 will respond to the click operation by sending a link retrieval request to Mobile 1 (i.e., an example of the second request information); after receiving the link retrieval request, Mobile 1 sends XXX product link 1103 to Mobile 2; after receiving XXX product link 1103, Mobile 2 will open the details page 1113 of the XXX product corresponding to XXX product link 1103, such as... Figure 11G As shown; at this time, user B can also see a floating button on the details page 1113 to open the link 1103 using the X application, such as the floating button for "Open X application 1114", as shown. Figure 11G As shown; when user B clicks the floating button, mobile phone 2 will open product link 1103 of XXX in the X application.
[0307] It should be noted that, according to the relevant descriptions in steps 401 and 402 above, mobile phone 1 can generate a corresponding sharing address based on the XXX product link 1103 after receiving the finger tap operation P; for example, mobile phone 1 can generate a corresponding sharing address based on the XXX product link 1103 after receiving the finger tap operation P and operation Y1.
[0308] In some alternative embodiments, user B can also upload second data (such as images) to be sent to mobile phone 1 via mobile phone 2 on the sharing interface 803; for example, as Figure 12A As shown, user B can click the "+" button 1201 on the sharing interface 803 to upload the second data; after user B clicks the "+" button 1201, a file type selection box 1202 will pop up on the sharing interface 803, as shown. Figure 12B As shown; User B can select the data type of the second data to be uploaded in the file type selection box 1202, for example, image 1203, as shown. Figure 12B As shown; after selecting the data type, mobile phone 2 will enter the gallery interface 1204; the user can select the image 1205 to be uploaded on the gallery interface 1204 (i.e., an example of the second data); after selecting image 1205, user B can click the send button 1206 (i.e., an example of the third element) to send image 1205 to mobile phone 1, as shown. Figure 12C As shown; when user B clicks the send button 1206, the sending status indicator 1207 will appear on the sharing interface 803 of mobile phone 2, as shown. Figure 12D As shown.
[0309] And such Figure 13A As shown, a message notification box 1301 will pop up on the main interface 703 of mobile phone 1 to ask user A whether to receive the picture sent from mobile phone 2 (such as picture 1203); if user A selects the receive option 1302, then mobile phone 1 will receive the picture sent from mobile phone 2; if user A selects the reject option 1303, then mobile phone 1 will reject the picture sent from mobile phone 2, as shown. Figure 13A As shown.
[0310] If user A selects option 1302 to receive, then phone 1 will receive the image sent from phone 2. At this time, an image receiving status box 1304 will pop up on the main interface 703; user A can see the current image receiving progress. After the image receiving is complete, user A can also view the received images by clicking the "View 1305" button, such as... Figure 13B As shown.
[0311] In some alternative embodiments, user A can also open the QR code generated by mobile phone 1 based on the second information on the WLAN interface of mobile phone 1. For example... Figure 14AAs shown, user A opens the WLAN interface 1401 of mobile phone 1 and clicks on network XXX01 1402 on the WLAN interface 1401; at this time, mobile phone 1 will display the network information interface 1403 of network XXX01 1402 on the WLAN interface 1401; the network information interface 1403 includes a QR code 1404 (i.e., a QR code generated by mobile phone 1 based on the second information); the interface where QR code 1404 is located displays the network name XXX01 and the password 123456 (i.e., an example of the second information); mobile phone 2 can scan the QR code 1404 on the network information interface 1403, or enter the password 123456 on the QR code 1404 interface to establish a WiFi connection with mobile phone 1, as shown. Figure 14B As shown.
[0312] like Figure 15A As shown, user B can use the camera application 800 on phone 2 to scan the QR code 1404 on phone 1; after the QR code 1404 is scanned, a pop-up window will appear on the interface of the camera application 800. Figure 15B The message notification box 1501 shown asks mobile phone 2 whether to join the "XXX01" network; if the joining option 1502 is selected, mobile phone 2 will send a network connection request to mobile phone 1 (i.e., an example of a connection request); the network connection request may include second information; after receiving the network connection request, mobile phone 1 can authenticate mobile phone 2 according to the network connection request; if the authentication is successful, mobile phone 1 and mobile phone 2 will establish a WiFi connection.
[0313] In some optional embodiments, the first device can be computer 1, that is, computer 1 can act as a sending device (or sender), and the second device can be computer 2, that is, computer 2 can act as a receiving device (or receiver); such as Figure 16A As shown, User A can select Table X 1601 (an example of the first data) on the desktop of Computer 1 by clicking the mouse (an example of the first operation), and bring up Tab 1602 by right-clicking Table X 1601. The mouse click operation refers to selecting Table X 1601. User A can select the "Share 1603" option on Tab 1602 to initiate sharing of Table X 1601 from Computer 1. When Computer 1 receives the sharing operation R1 corresponding to the selection of the "Share 1603" option (an example of the first sharing operation), it can respond to the sharing operation R1 by displaying Tab 1604 (an example of the first interface). When User A selects the "Generate Sharing Code 1605" option (as shown in the image),... Figure 16AAs shown), computer 1 can display a QR code interface 1606 (an example of the second interface) on its desktop according to operation R2 (i.e., an example of the second sharing operation) corresponding to selecting the "Generate sharing code 1605" option. This QR code interface 1606 may include a QR code 1607 and an operation diagram 1608 (i.e., an example of operation diagram information), such as... Figure 16B As shown.
[0314] It should be noted that computer 1 can generate the second information upon receiving operation R1, or upon receiving operation R2, or the second information can be generated in advance; when mobile phone 1 receives operation R2, it can generate QR code 1607 based on the second information and display QR code 1607 on QR code interface 1606; optionally, mobile phone 2 can also generate operation diagram 1608 and display operation diagram 1608 on QR code interface 1606.
[0315] The method for establishing a WiFi connection between computer 2 and computer 1, and the method for obtaining X table 1401, are similar to the interaction method between mobile phone 1 and mobile phone 2 described above, and will not be repeated here.
[0316] In some alternative embodiments, in addition to establishing a WiFi connection with computer 1 by scanning QR code 1607, computer 2 can also establish a WiFi connection with computer 1 by using a password entered by user B (i.e., the password of the short-range WiFi network created by computer 1).
[0317] For example, computer 2 can establish a WiFi connection with computer 1 based on the password on QR code 1607 entered by user B; Figure 17A As shown, user B can click the network 1701 icon on the dock of computer 2, triggering computer 2 to display the WLAN interface 1702; when user B clicks the XXX02 network 1703 option on the WLAN interface 1702 (see... Figure 17A When user B clicks the "Connect 1705" button on the network settings interface 1704, a password input box for "Enter Network Security Key 1706" will appear on the network settings interface 1704. User B can enter the password displayed on the QR code 1607 (e.g., 123456) in this password input box. After entering the password, user B can click the "Connect 1707" button. Figure 17CAs shown; at this time, computer 2 will send a network connection request to computer 1 (i.e., an example of a connection request); the network connection request may include second information; after receiving the network connection request, computer 1 can authenticate computer 2 according to the network connection request; if the authentication is successful, computer 1 and computer 2 will establish a WiFi connection.
[0318] It should be noted that after computer 1 and computer 2 establish a WiFi connection, the methods for detecting network availability on computer 2 and for exchanging data with computer 1 can be referred to the data interaction method between mobile phone 1 and mobile phone 2 above, and will not be repeated here.
[0319] It should also be noted that the data sharing method proposed in this application is not limited to everyday scenarios such as document sharing, image sharing, video sharing, and product link sharing. This data sharing method is also applicable to scenarios such as meetings and virtual reality. This application does not limit the application scenarios.
[0320] The foregoing has detailed examples of the data sharing methods provided in this application. It is understood that, in order to implement the above functions, the terminal device includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application. This application can divide the data sharing method into functional units based on the above method examples. For example, each function can be divided into separate functional units, or two or more functions can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application is illustrative and only represents one logical functional division; other division methods may exist in actual implementation, and this application does not limit this division.
[0321] Figure 18 A schematic diagram of the structure of a terminal device provided in this application is shown. Figure 18 The dashed line indicates that the unit or module is optional. The terminal device 1800 can be used to implement the methods described in the above method embodiments. The terminal device 1800 can be a server or a chip (system).
[0322] Terminal device 1800 includes one or more processors 1801, which can support terminal device 1800 in implementing Figure 4 The method described in the corresponding method embodiment. Processor 1801 can be a general-purpose processor or a dedicated processor. For example, processor 1801 can be a central processing unit (CPU). The CPU can be used to control terminal device 1800, execute software programs, and process data from the software programs. Terminal device 1800 may also include a communication unit 1805 for implementing signal input (reception) and output (transmission).
[0323] The aforementioned terminal device 1800 may be a chip (system) including a memory and a processor, wherein the processor is configured to execute a computer program stored in the memory to implement the methods shown in the various embodiments above.
[0324] The communication unit 1805 may be an input and / or output circuit of the chip (system), or the communication unit 1805 may be a communication interface of the chip (system), and the chip (system) may be a component of the terminal device 1800.
[0325] For example, the communication unit 1805 may be a transceiver of the terminal device 1800, or the communication unit 1805 may be a transceiver circuit of the terminal device 1800. The terminal device 1800 may include one or more memories 1802, which store a program 1804. The program 1804 may be executed by the processor 1801 to generate instructions 1803, causing the processor 1801 to execute the method described in the above method embodiments according to the instructions 1803.
[0326] Optionally, the memory 1802 may also store data. Optionally, the processor 1801 may also read the data stored in the memory 1802, which may be stored at the same memory address as the program 1804, or the data may be stored at a different memory address than the program 1804.
[0327] The processor 1801 and memory 1802 can be configured separately or integrated together, for example, integrated on a system-on-chip (SOC) of the terminal device. For details on how the processor 1801 performs data sharing, please refer to the relevant description in the method embodiments.
[0328] It should be understood that the steps of the above method embodiments can be implemented by hardware logic circuits or software instructions in the processor 1801. The processor 1801 may be a CPU, a digital signal processor (DSP), a field programmable gate array (FPGA), or other programmable logic devices, such as discrete gate, transistor logic devices, or discrete hardware components.
[0329] This application also provides a computer program product that, when executed by processor 1801, implements the method of any of the method embodiments in this application. The computer program product can be stored in memory 1802, for example, it can be program 1804. Program 1804, after undergoing preprocessing, compilation, assembly, and linking processes, can ultimately be converted into an executable object file that can be executed by processor 1801.
[0330] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer, implements the method of any of the method embodiments of this application. The computer program may be a high-level language program or an executable object program.
[0331] The computer-readable storage medium is, for example, memory 1802. Memory 1802 can be volatile memory or non-volatile memory, or memory 1802 can include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM).
[0332] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process and technical effects of the above-described apparatus and equipment can be referred to the corresponding processes and technical effects in the foregoing method embodiments, and will not be repeated here.
[0333] The systems, apparatuses, and methods disclosed in the embodiments provided in this application can be implemented in other ways. For example, some features of the method embodiments described above may be omitted or not performed. The apparatus embodiments described above are merely illustrative; the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Multiple units or components may be combined or integrated into another system. Furthermore, the coupling between units or components can be direct or indirect, including electrical, mechanical, or other forms of connection.
[0334] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
[0335] Finally, the above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for data sharing, characterized in that, Applied to a first device, the method includes: Receive a first operation, the first operation being used to select first data; First information is generated based on the first data, and the first information includes a first address for sharing the first data; After establishing a short-range wireless connection with the second device, a first request message is received from the second device, the first request message being used to determine whether the short-range wireless connection is available; Based on the first request information, a first response information is sent to the second device. The first response information includes the first address and is used to instruct the second device to redirect to the first address. Receive a second request message from the second device, the second request message being sent after the second device redirects to the first address, and the second request message being used to obtain the first data; The first data is sent to the second device according to the second request information.
2. The method according to claim 1, characterized in that, Before establishing a short-range wireless connection with the second device, the method further includes: Receive a connection request from the second device, the connection request being sent by the second device based on second information, the second information being network information used to establish the short-range wireless connection with the first device; In response to the connection request, a short-range wireless connection is established with the second device.
3. The method according to claim 1 or 2, characterized in that, Before establishing a short-range wireless connection with the second device, the method further includes: Receive a second operation, which is used to initiate the sharing of the first data; After receiving the second operation, second information is generated, which is network information for establishing the short-range wireless connection with the first device.
4. The method according to claim 3, characterized in that, The second operation includes a first sharing operation and a second sharing operation, and the receiving of the second operation includes: Receive the first sharing operation; In response to the first sharing operation, a first interface is displayed, the first interface including a first control; Receive the second sharing operation on the first control; In response to the second sharing operation, a second interface is displayed, the second interface including a pattern code, the pattern code including the second information.
5. The method according to claim 4, characterized in that, The second interface also includes operation illustration information, which is used to illustrate how to use the pattern code.
6. The method according to any one of claims 3 to 5, characterized in that, The method further includes: Establish a short-range soft access point, which refers to an access point that provides wireless network connectivity over a short distance, and the second information is the network information of the short-range soft access point.
7. The method according to any one of claims 3 to 6, characterized in that, The method further includes displaying the second information as a pattern code.
8. The method according to claim 7, characterized in that, The method further includes: displaying the second information on the interface where the pattern code is located.
9. The method according to any one of claims 3 to 8, characterized in that, The method further includes sending the second information to the second device via near field communication (NFC).
10. The method according to any one of claims 1 to 9, characterized in that, The short-range wireless connection is a Wi-Fi WiFi connection.
11. The method according to any one of claims 1 to 10, characterized in that, The first request information includes a network availability probe request, and the first response information includes redirection information.
12. The method according to any one of claims 2 to 11, characterized in that, The second information includes a Service Set Identifier (SSID), or the second information includes the SSID and a password.
13. The method according to any one of claims 4 to 12, characterized in that, The first request information is sent by the second device after establishing the short-range wireless connection with the first device.
14. The method according to any one of claims 1 to 13, characterized in that, The first data includes one or more of the following: Images, documents, audio, video, web pages, or Uniform Resource Locator (URL) links.
15. A terminal device, characterized in that, The terminal device includes a processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program from the memory, causing the terminal device to perform the method of any one of claims 1 to 14.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the method of any one of claims 1 to 14.
17. A computer program product, characterized in that, The computer program product includes: computer program code, which, when executed by a processor, causes the processor to perform the method of any one of claims 1 to 14.
18. A chip system, characterized in that, The chip system includes a processor configured to execute a computer program to implement the method as described in any one of claims 1 to 14.