CN115002939B - Method and device for joining WiFi group - Google Patents

Method and device for joining WiFi group Download PDF

Info

Publication number
CN115002939B
CN115002939B CN202210841284.1A CN202210841284A CN115002939B CN 115002939 B CN115002939 B CN 115002939B CN 202210841284 A CN202210841284 A CN 202210841284A CN 115002939 B CN115002939 B CN 115002939B
Authority
CN
China
Prior art keywords
wifi direct
direct connection
group
wifi
resources
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210841284.1A
Other languages
Chinese (zh)
Other versions
CN115002939A (en
Inventor
邱利松
邹任乾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210841284.1A priority Critical patent/CN115002939B/en
Publication of CN115002939A publication Critical patent/CN115002939A/en
Application granted granted Critical
Publication of CN115002939B publication Critical patent/CN115002939B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • H04W4/08User group management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application provides a method and a device for joining a WiFi group, wherein the method comprises the following steps: the WiFi direct connection module receives a session request from a service APP; the WiFi direct connection module determines the use condition of WiFi direct connection resources of the initiating equipment according to the session request; the WiFi direct connection module determines the use condition of WiFi direct connection resources of target equipment of the conversation; when the initiating device does not have available WiFi direct connection resources, and when the target device has available WiFi direct connection resources, the WiFi direct connection module sends connection information of a first WiFi direct connection group to the target device; or when the initiating device has available WiFi direct connection resources and when the target device does not have available WiFi direct connection resources, the WiFi direct connection module receives connection information of the second WiFi direct connection group from the target device, and the WiFi direct connection module joins the second WiFi direct connection group according to the connection information of the second WiFi direct connection group. The method can reduce the influence on the existing WiFi direct connection service.

Description

Method and device for joining WiFi group
Technical Field
The present application relates to the field of communications, and in particular, to a method and an apparatus for joining a WiFi group.
Background
WiFi (wireless fidelity) is a wireless local area network technology based on the Institute of Electrical and Electronics Engineers (IEEE) 802.11 standard. WiFi direct, which may also be referred to as WiFi peer-to-peer (P2P) connection, enables easy connection between terminal devices to each other without requiring a wireless Access Point (AP) as an intermediary.
WiFi directly links and has extensive application in the terminal equipment field, for example, the super terminal function of cell-phone establishes the WiFi directly and links between cell-phone and the smart audio amplifier and the WiFi directly links between cell-phone and the projecting apparatus for the user can shift the conversation to the smart audio amplifier on, can also make the user play the video on the cell-phone on the projecting apparatus.
Limited by the chip capability, the number of WiFi direct connection which can be established by one terminal device is limited, after the number of WiFi direct connection of the terminal device reaches the maximum value, if new WiFi direct connection service requirements appear, the terminal device needs to disconnect the existing WiFi direct connection, and therefore the existing WiFi direct connection service can be greatly influenced.
Disclosure of Invention
The embodiment of the application provides a method and a device for joining a WiFi group (short for WiFi direct connection group), which can meet the requirement of a new WiFi direct connection service under the condition that the number of WiFi direct connection reaches the maximum value, and simultaneously reduce the influence on the existing WiFi direct connection service.
In a first aspect, a method for joining a WiFi group is provided, where the method is applied to an initiating device of a session, where the initiating device includes a WiFi direct connection module, and the method includes:
the WiFi direct-connection module receives a session request from a service APP, and the session request requests to establish a session based on WiFi direct-connection;
the WiFi direct connection module determines the use condition of WiFi direct connection resources of the initiating equipment according to the session request;
the WiFi direct connection module determines the use condition of WiFi direct connection resources of the target equipment of the session;
when the initiating device does not have available WiFi direct connection resources and when the target device has available WiFi direct connection resources, the WiFi direct connection module sends connection information of a first WiFi direct connection group to the target device, wherein the connection information of the first WiFi direct connection group is used for the target device to join the first WiFi direct connection group, and the first WiFi direct connection group is the WiFi direct connection group of the initiating device; or,
when the initiating device has available WiFi direct connection resources and when the target device does not have available WiFi direct connection resources, the WiFi direct connection module receives connection information of a second WiFi direct group from the target device, the WiFi direct module joins the second WiFi direct group according to the connection information of the second WiFi direct group, and the second WiFi direct group is the WiFi direct group of the target device.
The number of the WiFi direct connection resources, namely the number of the WiFi direct connections which can be created by the terminal equipment is 0 when the terminal equipment does not have the available WiFi direct connection resources; when the terminal device has available WiFi direct connection resources, the number of WiFi direct connections which can be created by the terminal device is a positive integer. When the initiating device and the target device do not have available WiFi direct connection resources, the existing WiFi direct connection can only be disconnected to create a new WiFi direct connection. However, when only one of the initiator and the target does not have available WiFi direct resources, the one having available WiFi direct resources may join the existing WiFi group of the other without disconnecting the existing WiFi group of the other. Compared with a method for directly disconnecting the existing WiFi direct connection to create a new WiFi direct connection without dividing the situation, the method and the device for establishing the WiFi direct connection can meet the requirements of the new WiFi direct connection service and reduce the influence on the existing WiFi direct connection service.
Optionally, the initiating device does not have available WiFi direct resources, including:
the number of WiFi direct connections of the initiating device reaches the maximum value, and all WiFi direct connections have the condition of opposite terminal devices;
the initiating device has available WiFi direct resources, including:
in case the number of WiFi direct connections of the initiating device does not reach a maximum value, or,
the number of WiFi direct connections of the initiating device reaches a maximum value, and the condition that opposite-end devices do not exist in part or all of the WiFi direct connections.
The WiFi direct connection has two conditions, one is effective connection, the other is invalid connection, the effective connection refers to the WiFi direct connection with opposite terminal equipment, and the invalid connection refers to the WiFi direct connection without the opposite terminal equipment. When the number of connections of the WiFi-direct network reaches a maximum value, some connections may not be active connections, and this state of the WiFi-direct network may be referred to as an inactive connection state. The initiating device can disconnect the invalid connection to acquire WiFi direct connection resources, and this embodiment can release the potential WiFi direct connection resources by distinguishing the valid connection from the invalid connection, which is beneficial for the initiating device to make a correct decision, for example, to avoid the initiating device considering that both parties do not have WiFi direct connection resources under the condition of the invalid connection.
Optionally, the target device does not have available WiFi direct resources, including:
the number of WiFi direct connection of the target equipment reaches the maximum value, and all the WiFi direct connection has the condition of opposite terminal equipment;
the target device has available WiFi direct resources, including:
in case the number of WiFi direct connections of the target device does not reach the maximum value, or,
the number of WiFi direct connections of the target device reaches a maximum value, and the condition that opposite-end devices do not exist in part or all of the WiFi direct connections.
The WiFi direct connection has two conditions, one is effective connection, the other is invalid connection, the effective connection refers to the WiFi direct connection with opposite terminal equipment, and the invalid connection refers to the WiFi direct connection without the opposite terminal equipment. When the number of connections of the WiFi-direct network reaches a maximum value, some connections may not be active connections, and this state of the WiFi-direct network may be referred to as an inactive connection state. The initiating device can disconnect the invalid connection to acquire WiFi direct connection resources, and this embodiment can release the potential WiFi direct connection resources by distinguishing the valid connection from the invalid connection, which is beneficial for the initiating device to make a correct decision, for example, to avoid the initiating device considering that both parties do not have WiFi direct connection resources under the condition of the invalid connection.
Optionally, the method further comprises:
the WiFi direct connection module monitors state changes of the first WiFi direct connection group or the second WiFi direct connection group;
when the first WiFi direct connection group or the second WiFi direct connection group is dissolved, the WiFi direct connection module establishes a third WiFi direct connection group, and the third WiFi direct connection group is a special WiFi direct connection group of the initiating device and the target device.
The first WiFi direct connection group or the second WiFi direct connection group can influence the WiFi direct connection between the initiating device and the target device when being dissolved, and therefore when the first WiFi direct connection group or the second WiFi direct connection group is dissolved, the special WiFi direct connection group is established, and the influence of the dissolution of the first WiFi direct connection group or the second WiFi direct connection group on the current session can be reduced.
In a second aspect, a method for joining a WiFi group is provided, where the method is applied to a target device of a session, where the target device includes a WiFi direct module, and the method includes:
the WiFi direct connection module receives a session request from initiating equipment of the session, and the session request requests to establish the session based on WiFi direct connection;
the WiFi direct connection module determines the use condition of WiFi direct connection resources of the initiating equipment according to the session request;
the WiFi direct connection module determines the use condition of WiFi direct connection resources of the target equipment;
when the initiating device does not have available WiFi direct connection resources and when the target device has available WiFi direct connection resources, the WiFi direct connection module receives connection information of a first WiFi direct connection group from the target device, the WiFi direct connection module joins the first WiFi direct connection group according to the connection information of the first WiFi direct connection group, and the first WiFi direct connection group is the WiFi direct connection group of the initiating device; or,
when the initiating device has available WiFi direct connection resources and when the target device does not have available WiFi direct connection resources, the WiFi direct connection module sends connection information of a second WiFi direct connection group to the initiating device, the connection information of the second WiFi direct connection group is used for the initiating device to join the second WiFi direct connection group, and the second WiFi direct connection group is the WiFi direct connection group of the target device.
The number of the WiFi direct connection resources, namely the number of the WiFi direct connections which can be created by the terminal equipment is 0 when the terminal equipment does not have the available WiFi direct connection resources; when the terminal device has available WiFi direct connection resources, the number of WiFi direct connections which can be created by the terminal device is a positive integer. When the initiating device and the target device do not have available WiFi direct connection resources, the existing WiFi direct connection can only be disconnected to create a new WiFi direct connection. However, when only one of the initiator and the target does not have available WiFi direct resources, the one having available WiFi direct resources may join the existing WiFi group of the other without disconnecting the existing WiFi group of the other. Compared with a method for directly disconnecting the existing WiFi direct connection to create a new WiFi direct connection without dividing the situation, the method and the device for establishing the WiFi direct connection can meet the requirements of the new WiFi direct connection service and reduce the influence on the existing WiFi direct connection service.
Optionally, the initiating device does not have available WiFi direct resources, including:
the number of WiFi direct connection of the initiating device reaches the maximum value, and all the WiFi direct connection has the condition of opposite terminal devices;
the initiating device has available WiFi direct resources, including:
in case the number of WiFi direct connections of the initiating device does not reach a maximum value, or,
the number of WiFi direct connections of the initiating device reaches a maximum value, and the condition that opposite-end devices do not exist in part or all of the WiFi direct connections.
The WiFi direct connection has two conditions, one is effective connection, the other is invalid connection, the effective connection refers to the WiFi direct connection with opposite terminal equipment, and the invalid connection refers to the WiFi direct connection without the opposite terminal equipment. When the number of connections of the WiFi-direct network reaches a maximum value, some connections may not be active connections, and this state of the WiFi-direct network may be referred to as an inactive connection state. The initiating device may disconnect the invalid connection to obtain the WiFi direct connection resource, and this embodiment can release the potential WiFi direct connection resource by distinguishing the valid connection from the invalid connection, which is beneficial for the target device to make a correct decision, for example, to avoid the target device considering that both parties do not have the WiFi direct connection resource under the condition of the invalid connection.
Optionally, the target device does not have available WiFi direct resources, including:
the number of WiFi direct connection of the target equipment reaches the maximum value, and all the WiFi direct connection has the condition of opposite terminal equipment;
the target device has available WiFi direct resources, including:
in case the number of WiFi direct connections of the target device does not reach the maximum value, or,
the number of WiFi direct connections of the target device reaches a maximum value, and the condition that opposite-end devices do not exist in part or all of the WiFi direct connections.
The WiFi direct connection has two situations, one is an active connection, the other is an invalid connection, the active connection refers to the WiFi direct connection where the opposite terminal device exists, and the invalid connection refers to the WiFi direct connection where the opposite terminal device does not exist. When the number of connections of the WiFi-direct network reaches a maximum value, some connections may not be active connections, and this state of the WiFi-direct network may be referred to as an inactive connection state. The initiating device may disconnect the invalid connection to obtain the WiFi direct connection resource, and this embodiment can release the potential WiFi direct connection resource by distinguishing the valid connection from the invalid connection, which is beneficial for the target device to make a correct decision, for example, to avoid the target device considering that both parties do not have the WiFi direct connection resource under the condition of the invalid connection.
Optionally, the method further comprises:
the WiFi direct connection module monitors state changes of the first WiFi direct connection group or the second WiFi direct connection group;
when the first WiFi direct connection group or the second WiFi direct connection group is dissolved, the WiFi direct connection module establishes a third WiFi direct connection group, and the third WiFi direct connection group is a special WiFi direct connection group of the initiating device and the target device.
The first WiFi direct connection group or the second WiFi direct connection group can influence the WiFi direct connection between the initiating device and the target device when being dissolved, and therefore when the first WiFi direct connection group or the second WiFi direct connection group is dissolved, the special WiFi direct connection group is established, and the influence of the dissolution of the first WiFi direct connection group or the second WiFi direct connection group on the current session can be reduced.
In a third aspect, an apparatus is provided that joins a WiFi group, comprising means for performing any of the methods of the first or second aspects. The device can be a terminal device and also can be a chip in the terminal device. The apparatus may include an input unit and a processing unit.
When the apparatus is a terminal device, the processing unit may be a processor, and the input unit may be a communication interface; the terminal device may further comprise a memory for storing computer program code which, when executed by the processor, causes the terminal device to perform the method of any of the first or second aspects.
When the apparatus is a chip in a terminal device, the processing unit may be a logic processing unit inside the chip, and the input unit may be an output interface, a pin, a circuit, or the like; the chip may also include a memory, which may be a memory within the chip (e.g., registers, cache, etc.) or a memory external to the chip (e.g., read only memory, random access memory, etc.); the memory is adapted to store computer program code which, when executed by the processor, causes the chip to perform any of the methods of the first or second aspects.
In a fourth aspect, a computer-readable storage medium is provided, which stores computer program code, which, when executed by an apparatus for joining a WiFi group, causes the apparatus to perform any one of the methods of the first or second aspects.
In a fifth aspect, there is provided a computer program product comprising: computer program code which, when run by an apparatus joining a WiFi group, causes the apparatus to perform any one of the methods of the first or second aspects.
Drawings
FIG. 1 is a schematic diagram of an application scenario suitable for use in the present application;
fig. 2 is a schematic diagram of a WiFi direct connection interface provided herein;
fig. 3 is a schematic diagram illustrating a scenario in which a WiFi direct connection is failed to be created according to the present application;
fig. 4 is a schematic diagram of another scenario provided in the present application where a WiFi direct connection is failed to be created;
FIG. 5 is a schematic diagram of a hardware architecture suitable for use in the apparatus of the present application;
FIG. 6 is a schematic diagram of a software architecture suitable for use in the apparatus of the present application;
fig. 7 is a schematic diagram of establishing a WiFi direct connection and a data transmission flow after the WiFi direct connection is established according to the present application;
fig. 8 is a schematic diagram of a method for joining a WiFi group provided herein;
fig. 9 is a schematic diagram of a scenario for joining a WiFi direct group provided in the present application;
fig. 10 is a schematic diagram of another scenario for joining a WiFi direct group provided by the present application;
fig. 11 is a schematic diagram of determining a current status of a WiFi direct group provided by the present application;
fig. 12 is a schematic diagram illustrating a method for an initiating device to join a WiFi direct group when there is no available WiFi direct resource provided by the present application;
fig. 13 is a schematic diagram illustrating a method for an initiating device to join a WiFi direct connection group when there are available WiFi direct connection resources;
fig. 14 is a schematic diagram of a processing flow after a status of a WiFi direct connection group is changed.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of an application scenario suitable for the present application. The mobile phone, the smart sound box, the projector and the tablet personal computer respectively have WiFi functions, and a user can turn on WiFi switches of the mobile phone, the smart sound box, the projector and the tablet personal computer, so that the mobile phone, the smart sound box, the projector and the tablet personal computer can find surrounding electronic equipment.
A user may use a mobile phone as a main device to establish a WiFi direct connection between the mobile phone and other terminal devices, as shown in fig. 2, the mobile phone may start a super terminal function, transmit data of a service Application (APP) through the WiFi direct connection, and the WiFi direct connection is shown by a bidirectional arrow in fig. 1.
For example, after a WiFi direct connection is established between the mobile phone and the smart speaker, the mobile phone may transmit voice data to the smart speaker through the WiFi direct connection, and answer an incoming call through the smart speaker; after WiFi direct connection is established between the mobile phone and the projector, the mobile phone can transmit video data to the projector through the WiFi direct connection, and videos are played through the projector; after WiFi direct connection is established between the mobile phone and the tablet personal computer, the mobile phone can transmit the document to the tablet personal computer through the WiFi direct connection, the document is edited by using the tablet personal computer, and after the document is edited, a user can also transmit the edited document to the mobile phone through the WiFi direct connection.
The above application scenarios are exemplary, and application scenarios applicable to the present application are not limited thereto.
Limited by the chip capability, the number of WiFi direct connections that can be created by one terminal device is limited, for example, the maximum number of WiFi direct connections of a mobile phone is usually 1 or 2, and after the number of WiFi direct connections of the mobile phone reaches the maximum value, if a service requirement for creating WiFi direct connections occurs again, a result of creation failure may occur.
A few examples of scenarios where the creation of a WiFi direct connection fails are given below.
As shown in fig. 3, the maximum number of WiFi direct connections of the mobile phone is 1, and after the screen projection service of the mobile phone establishes WiFi direct connection with the projector, the screen projection service uses the WiFi direct connection to transmit video data to the projector for playing. If the file sharing service of the tablet personal computer needs to share a document with the mobile phone, the file sharing service requests to establish a session based on WiFi direct connection, and the WiFi direct connection of the file sharing service fails to be established because the WiFi direct connection of the mobile phone reaches the maximum value.
As shown in fig. 4, the maximum number of WiFi direct connections of the mobile phone is 2, after the screen projection service and the file sharing service of the mobile phone establish WiFi direct connections with the projector, respectively, the screen projection service transmits video data to the projector for playing using one WiFi direct connection, and the file sharing service transmits a document to the projector using another WiFi direct connection. If the file sharing service of the mobile phone needs to share a document with the mobile phone, the file sharing service of the mobile phone requests to establish a session based on WiFi direct connection, and the WiFi direct connection of the file sharing service fails to be established because the WiFi direct connection of the mobile phone reaches the maximum value.
The following describes a method and an apparatus for transmitting over a WiFi direct connection according to an embodiment of the present application.
Fig. 5 is a schematic diagram of a hardware structure of an apparatus suitable for the present application, where the apparatus 100 may be any one of a mobile phone, a foldable electronic device, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a Personal Digital Assistant (PDA), an Augmented Reality (AR) device, a Virtual Reality (VR) device, an Artificial Intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device, or a smart city device. The embodiment of the present application does not set any limit to the specific type of the apparatus 100.
The apparatus 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identification Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
The configuration shown in fig. 1 is not intended to specifically limit the apparatus 100. In other embodiments of the present application, the apparatus 100 may include more or fewer components than those shown in FIG. 1, or the apparatus 100 may include a combination of some of the components shown in FIG. 1, or the apparatus 100 may include sub-components of some of the components shown in FIG. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units. For example, the processor 110 may include at least one of the following processing units: an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and a neural Network Processor (NPU). The different processing units may be independent devices or integrated devices.
The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. For example, the processor 110 may include at least one of the following interfaces: an inter-integrated circuit (I2C) interface, an inter-integrated circuit audio (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 SIM interface, and a USB interface.
The I2C interface is a bidirectional synchronous serial bus including a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc., respectively, through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, such that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement the touch function of the apparatus 100.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 through an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through the I2S interface, so as to implement a function of receiving a call through a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement a function of answering a call through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
MIPI interfaces may be used to connect processor 110 with peripheral devices such as display screen 194 and camera 193. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing function of apparatus 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal interface and may also be configured as a data signal interface. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, and the sensor module 180. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, or a MIPI interface.
The USB interface 130 is an interface conforming to a USB standard specification, and may be a Mini (Mini) USB interface, a Micro (Micro) USB interface, or a USB Type C (USB Type C) interface, for example. The USB interface 130 may be used to connect a charger to charge the apparatus 100, to transmit data between the apparatus 100 and a peripheral device, and to connect an earphone to play audio through the earphone. The USB interface 130 may also be used to connect other apparatuses 100, such as AR devices.
The connection relationship between the modules shown in fig. 1 is merely illustrative and does not limit the connection relationship between the modules of the apparatus 100. Alternatively, the modules of the apparatus 100 may also adopt a combination of the connection manners in the above embodiments.
The charge management module 140 is used to receive power from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive the current of the wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive electromagnetic waves through a wireless charging coil of the device 100 (current path shown as dashed line). The charging management module 140 may also supply power to the device 100 through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle number, and battery state of health (e.g., leakage, impedance). Alternatively, the power management module 141 may be disposed in the processor 110, or the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the apparatus 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication applied on the device 100, for example, the followingAt least one of the cases: second generation (2) th generation, 2G) mobile communication solution, third generation (3) th generation, 3G) mobile communication solution, fourth generation (4) th generation, 5G) mobile communication solution, fifth generation (5) th generation, 5G) mobile communication solutions. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, and perform filtering, amplification, and other processes on the received electromagnetic waves, and then transmit the electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 may further amplify the signal modulated by the modem processor, and the amplified signal is converted into electromagnetic waves by the antenna 1 and radiated. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (e.g., speaker 170A, microphone 170B) or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
Similar to the mobile communication module 150, the wireless communication module 160 may also provide a wireless communication solution applied on the apparatus 100, such as at least one of the following: wireless Local Area Networks (WLANs), bluetooth (BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), near Field Communication (NFC), infrared (IR). The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency-modulates and filters electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive, frequency modulate and amplify the signal to be transmitted from the processor 110, which is converted to electromagnetic waves via the antenna 2 for radiation.
In some embodiments, antenna 1 of apparatus 100 and mobile communication module 150 are coupled and antenna 2 of apparatus 100 and wireless communication module 160 are coupled such that apparatus 100 may communicate with networks and other devices via wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), general Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The device 100 may implement display functionality through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 may be used to display images or video. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini light-emitting diode (Mini LED), a Micro light-emitting diode (Micro LED), a Micro OLED (Micro OLED), or a quantum dot light-emitting diode (QLED). In some embodiments, the device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The device 100 may implement a photographing function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can perform algorithm optimization on the noise, brightness and color of the image, and can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to be converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into a standard Red Green Blue (RGB), YUV, or the like format image signal. In some embodiments, device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the apparatus 100 selects a frequency bin, the digital signal processor is configured to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The apparatus 100 may support one or more video codecs. In this way, the apparatus 100 can play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.
The NPU is a processor which uses biological neural network structure for reference, for example, the NPU can rapidly process input information by using a transfer mode between human brain neurons, and can also continuously self-learn. The NPU can implement functions of the apparatus 100, such as intelligent recognition, for example: image recognition, face recognition, speech recognition and text understanding.
The external memory interface 120 may be used to connect an external memory card, such as a Secure Digital (SD) card, to implement the memory capability of the expansion device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. Wherein the storage program area may store an operating system, an application program required for at least one function (e.g., a sound playing function and an image playing function). The storage data area may store data (e.g., audio data and a phonebook) created during use of the device 100. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a nonvolatile memory such as: at least one magnetic disk storage device, a flash memory device, and a universal flash memory (UFS), and the like. The processor 110 performs various processing methods of the apparatus 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The apparatus 100 may implement audio functions, such as music playing and recording, through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.
The audio module 170 is used to convert digital audio information into an analog audio signal for output, and may also be used to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a horn, converts the audio electrical signal into a sound signal. The device 100 may listen to music or hands-free talk through the speaker 170A.
The receiver 170B, also called an earpiece, is used to convert the electrical audio signal into a sound signal. When the user uses the device 100 to receive a call or voice information, the voice can be received by placing the receiver 170B close to the ear.
The microphone 170C, also referred to as a microphone or microphone, is used to convert sound signals into electrical signals. When a user makes a call or sends voice information, a voice signal may be input into the microphone 170C by sounding near the microphone 170C. The apparatus 100 may be provided with at least one microphone 170C. In other embodiments, the apparatus 100 may be provided with two microphones 170C to implement the noise reduction function. In other embodiments, three, four or more microphones 170C may be provided in the apparatus 100 to identify the source of the sound and direct the recording. The processor 110 may process the electrical signal output by the microphone 170C, for example, the audio module 170 and the wireless communication module 160 may be coupled via a PCM interface, and the microphone 170C converts the ambient sound into an electrical signal (e.g., a PCM signal) and then transmits the electrical signal to the processor 110 via the PCM interface; from processor 110, the electrical signal is subjected to a volume analysis and a frequency analysis to determine the volume and frequency of the ambient sound.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile device 100 platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used for sensing a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A may be of a wide variety, and may be, for example, a resistive pressure sensor, an inductive pressure sensor, or a capacitive pressure sensor. The capacitive pressure sensor may be a sensor that includes at least two parallel plates having conductive material, and when a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes, and the apparatus 100 determines the strength of the pressure based on the change in capacitance. When a touch operation is applied to the display screen 194, the device 100 detects the touch operation from the pressure sensor 180A. The apparatus 100 may also calculate the position of the touch from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but have different touch operation intensities may correspond to different operation instructions. For example: when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for checking the short message; and when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the apparatus 100. In some embodiments, the angular velocity of device 100 about three axes (i.e., the x-axis, y-axis, and z-axis) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects the shake angle of the apparatus 100, calculates the distance to be compensated for the lens module according to the shake angle, and allows the lens to counteract the shake of the apparatus 100 by the reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used in scenes such as navigation and motion sensing games.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, the device 100 calculates altitude from barometric pressure values measured by the barometric pressure sensor 180C, aiding in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the apparatus 100 is a flip phone, the apparatus 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. The device 100 can set the flip cover to automatically unlock according to the detected opening and closing state of the leather sheath or the detected opening and closing state of the flip cover.
Acceleration sensor 180E may detect the magnitude of acceleration of device 100 in various directions, typically the x-axis, y-axis, and z-axis. The magnitude and direction of gravity can be detected when the device 100 is at rest. The acceleration sensor 180E may also be used to recognize the attitude of the device 100 as an input parameter for applications such as landscape and portrait screen switching and pedometers.
The distance sensor 180F is used to measure a distance. The device 100 may measure distance by infrared or laser. In some embodiments, for example in a shooting scene, the device 100 may utilize the distance sensor 180F to range to achieve fast focus.
The proximity light sensor 180G may include, for example, a light-emitting diode (LED) and a photodetector, for example, a photodiode. The LED may be an infrared LED. The device 100 emits infrared light outward through the LED. The apparatus 100 uses a photodiode to detect infrared reflected light from nearby objects. When reflected light is detected, the apparatus 100 may determine that an object is present nearby. When no reflected light is detected, the apparatus 100 can determine that there is no object nearby. The device 100 can detect whether the user holds the device 100 close to the ear by using the proximity light sensor 180G, so as to automatically turn off the screen to save power. The proximity light sensor 180G may also be used for automatic unlocking and automatic screen locking in a holster mode or a pocket mode.
The ambient light sensor 180L is used to sense ambient light brightness. Device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the device 100 is in a pocket to prevent inadvertent contact.
The fingerprint sensor 180H is used to collect a fingerprint. The device 100 can utilize the collected fingerprint characteristics to achieve the functions of unlocking, accessing an application lock, taking a picture, answering an incoming call, and the like.
The temperature sensor 180J is used to detect temperature. In some embodiments, the apparatus 100 implements a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the apparatus 100 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the device 100 heats the battery 142 when the temperature is below another threshold to avoid a low temperature causing the device 100 to shut down abnormally. In other embodiments, when the temperature is below a further threshold, the apparatus 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also referred to as a touch device. The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also referred to as a touch screen. The touch sensor 180K is used to detect a touch operation applied thereto or in the vicinity thereof. The touch sensor 180K may pass the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the device 100 at a different location than the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human vocal part vibrating the bone mass. The bone conduction sensor 180M may also contact the human pulse to receive the blood pressure pulsation signal. In some embodiments, the bone conduction sensor 180M may also be disposed in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone block vibrated by the sound part obtained by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
The keys 190 include a power-on key and a volume key. The keys 190 may be mechanical keys or touch keys. The device 100 can receive a key input signal and realize the function related to the case input signal.
The motor 191 may generate vibrations. The motor 191 may be used for incoming call prompts as well as for touch feedback. The motor 191 may generate different vibration feedback effects for touch operations applied to different applications. The motor 191 may also produce different vibratory feedback effects for touch operations applied to different areas of the display screen 194. Different application scenarios (e.g., time reminders, received information, alarms, and games) may correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a change in charge status and charge level, or may be used to indicate a message, missed call, and notification.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195 to make contact with the device 100, or may be removed from the SIM card interface 195 to make separation from the device 100. The apparatus 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The same SIM card interface 195 may be inserted with multiple cards at the same time, which may be of the same or different types. The SIM card interface 195 may also be compatible with external memory cards. The device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the device 100 employs an embedded SIM (eSIM) card, which can be embedded in the device 100 and cannot be separated from the device 100.
The hardware system of the apparatus 100 is described in detail above, and the software system of the apparatus 100 is described below. The software system may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture or a cloud architecture, and the software system of the apparatus 100 is exemplarily described in the embodiment of the present application by taking the layered architecture as an example.
As shown in fig. 6, the software system adopting the layered architecture is divided into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the software system may be divided into four layers, an application layer, an application framework layer, an Android Runtime (Android Runtime) and system library, and a kernel layer from top to bottom, respectively.
The application layer may include a business APP and a super terminal service.
The service APP is used for providing services required by the user, for example, the service APP can provide super-call services for the user, and calls are transferred from the mobile phone to the smart speaker.
The super terminal service is used for creating and managing the WiFi direct connection.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application of the application layer. The application framework layer may include some predefined functions. The application framework layer may include an explorer, a notification manager, an activity manager, an input manager, a view system, and the like.
The resource manager provides various resources for the application program, such as localized character strings, icons, pictures, layout files, and video files, and may facilitate the generation of a User Interface (UI).
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a brief dwell, and does not require user interaction. Such as notification managers, are used for download completion notifications and message reminders. The notification manager may also manage notifications that appear in a chart or scrollbar text form in a status bar at the top of the system, such as notifications for applications running in the background. The notification manager may also manage notifications that appear on the screen in dialog windows, such as prompting for text messages in a status bar, sounding an alert tone, vibrating the electronic device, and flashing an indicator light.
The campaign Manager may provide a campaign Manager Service (AMS), which may be used for the start-up, switching, scheduling of system components (e.g., campaigns, services, content providers, broadcast receivers), and the management and scheduling of application processes.
The Input Manager may provide an Input Manager Service (IMS) that may be used to manage inputs to the system, such as touch screen inputs, key inputs, sensor inputs, and the like. The IMS takes events from the input device nodes and assigns them to the appropriate windows through interaction with the WMS.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
Android Runtime includes a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
Android runtime mainly includes adopting Advanced Or Time (AOT) compilation technology and Just In Time (JIT) compilation technology.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The core library is mainly used for providing the functions of basic Java class libraries, such as basic data structure, mathematics, IO, tools, database, network and the like libraries. The core library provides an API for android application development of users.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform the functions of object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
The system library may include a plurality of functional modules, such as: surface managers (surface managers), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), and 2D graphics engines (e.g., SGL).
The surface manager is used for managing the display subsystem and providing fusion of the 2D layer and the 3D layer for a plurality of application programs.
The media library supports playback and recording of multiple audio formats, playback and recording of multiple video formats, and still image files. The media library may support a variety of audio-video encoding formats such as MPEG4, h.264, MP3, AAC, AMR, JPG and PNG.
The three-dimensional graphics processing library may be used to implement three-dimensional graphics drawing, image rendering, compositing, and layer processing.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The kernel layer may include a system framework WiFi direct interface, a network service interface, a display driver, and a modem driver, where the system framework WiFi direct interface is a physical layer interface of a WiFi direct connection, and the network service interface is a transport layer interface of the WiFi direct connection.
It is understood that the hardware structure and software architecture shown in fig. 5 and 6 are only exemplary descriptions of the apparatus 100, and do not limit the apparatus 100 in hardware and software, and the apparatus 100 may be implemented by other types of hardware structures and software architectures.
The software system and hardware system workflow of the apparatus 100 are exemplarily described below with reference to a scenario of establishing a WiFi direct connection.
In some cases, the device 100 may display an interface including a prompt message on the display screen 194 through the display driver, so that the user may instruct the device 100 to perform the next process based on the prompt message. When a user needs to operate on the interface of the device 100, the touch sensor 180K generates a hardware interrupt, the hardware interrupt is sent to the kernel layer, the kernel layer processes the touch operation into an interaction event, and the interaction event includes information such as a touch coordinate and a time stamp of the touch operation; subsequently, the kernel layer identifies a control corresponding to the interaction event, and notifies an Application (APP) corresponding to the control. And when the touch operation is the operation of establishing the WiFi direct connection, the service APP calls a WiFi direct connection module through the API according to the interaction event to establish the WiFi direct connection.
Fig. 7 shows the establishment of the WiFi direct connection and a data transmission flow after the establishment of the WiFi direct connection. After a service APP of the mobile phone generates a service requirement (for example, the service requirement is a requirement triggered after a user clicks a screen projection button), a session management interface can be used for requesting a WiFi direct connection module to create a session, the WiFi direct connection module can send a WiFi direct connection request through a system framework WiFi direct connection interface, and the WiFi direct connection request is modulated in a wireless signal and transmitted after being transmitted to a modem driver.
And after receiving the wireless signal, the projector carries out demodulation processing to obtain a WiFi direct connection request. If the number of the WiFi direct connections of the projector does not reach the maximum value, the projector may send a reply message that carries the information that the WiFi direct connections can be established.
After receiving the wireless signal carrying the reply message, the mobile phone demodulates the wireless signal through the modem drive to acquire the reply message, and the reply message is transmitted to the WiFi direct connection module through the WiFi direct connection interface of the system framework. The WiFi direct connection module executes a process of establishing WiFi direct connection, and after the WiFi direct connection is established, the WiFi direct connection module can inform a service APP of a message of the completion of the establishment through the session management interface. The WiFi direct connection module can also send the parameters of the WiFi direct connection to the transmission module so that the transmission module transmits the service data of the service APP based on the parameters of the WiFi direct connection, and the parameters of the WiFi direct connection include: a Service Set Identifier (SSID), a Basic Service Set Identifier (BSSID), a pre-shared key, and a channel.
After receiving the message of finishing the establishment of the WiFi direct connection, the service APP transmits service data (such as video data) to the transmission module through the data transmission interface, the transmission module transmits the service data to the modem drive through the network service interface, and the modem drive modulates the service data in a wireless signal to be transmitted. The modem driver can also demodulate a received wireless signal containing service data (such as a shared document), and transmit the service data to the transmission module, and the transmission module transmits the service data to the service APP through the data transmission interface, so that the function of transmitting the service data through WiFi direct connection is realized.
Hereinafter, a method for joining a WiFi direct group provided in an embodiment of the present application will be described in detail. As shown in fig. 8, the method is applied to an initiating device of a session including a WiFi direct connection module, where the initiating device may be a mobile phone or other terminal devices. The method includes the following.
And S810, the WiFi direct connection module receives a session request from the service APP, and the session request requests to establish a session based on WiFi direct connection.
The service APP can be a screen-casting service APP, a file sharing service APP, or other APPs requiring data transmission through WiFi direct connection.
S820, the WiFi direct connection module determines the using condition of the WiFi direct connection resource of the initiating device according to the session request.
And the session request triggers a WiFi direct connection module to determine the use condition of the WiFi direct connection resource of the initiating equipment. The use cases of the WiFi direct resources include two types, one type is that there are available WiFi direct resources, and the other type is that there are no available WiFi direct resources.
The case where there are WiFi direct resources available refers to: the number of WiFi direct connection of the terminal equipment does not reach the maximum value; or the number of the WiFi direct connections of the terminal device reaches the maximum value, but an invalid connection exists in the WiFi direct connections of the terminal device, where the invalid connection means that the WiFi direct connection of the opposite terminal device does not exist. The terminal device can disconnect the invalid connection to obtain the WiFi direct connection resource, so that the situation that the invalid connection exists is regarded as that the WiFi direct connection resource is available.
The case of no WiFi direct resources available refers to: the number of WiFi direct connection of the terminal equipment reaches the maximum value, the WiFi direct connection of the terminal equipment is all effective connection, and the effective connection refers to the WiFi direct connection of opposite terminal equipment.
By distinguishing the valid connection and the invalid connection, the potential WiFi direct connection resources can be released, which is beneficial for the initiating device and the target device to make a correct decision, for example, the initiating device or the target device is prevented from considering that both parties do not have WiFi direct connection resources under the condition that the invalid connection exists.
S830, the WiFi direct connection module determines the using condition of WiFi direct connection resources of the target device of the conversation.
The WiFi direct connection module may obtain a use condition of a WiFi direct connection resource of the target device through a negotiation channel, where the negotiation channel may be a bluetooth connection or a bluetooth broadcast, or may be another type of transmission channel, such as a WLAN broadcast channel, and the present application is not limited thereto.
And S840, when the initiating device does not have available WiFi direct connection resources and when the target device has available WiFi direct connection resources, the WiFi direct connection module sends connection information of a first WiFi direct connection group to the target device, wherein the connection information of the first WiFi direct connection group is used for the target device to join the first WiFi direct connection group, and the first WiFi direct connection group is the WiFi direct connection group of the initiating device. Or,
and S850, when the initiating device has available WiFi direct connection resources and the target device does not have available WiFi direct connection resources, the WiFi direct connection module receives connection information of a second WiFi direct connection group from the target device, the WiFi direct connection module joins the second WiFi direct connection group according to the connection information of the second WiFi direct connection group, and the second WiFi direct connection group is the WiFi direct connection group of the target device.
The number of the WiFi direct connection resources, namely the number of the WiFi direct connections which can be created by the terminal equipment is 0 when the terminal equipment does not have the available WiFi direct connection resources; when the terminal device has available WiFi direct connection resources, the number of WiFi direct connections which can be created by the terminal device is a positive integer.
When both the initiator device and the target device have available WiFi direct connection resources, the initiator device and the target device may directly establish a new WiFi direct connection to transmit session data.
When the initiating device and the target device do not have available WiFi direct connection resources, the existing WiFi direct connection can only be disconnected to create a new WiFi direct connection.
When only one of the initiator and the target device does not have available WiFi direct connection resources, the party with the available WiFi direct connection resources can be added into the existing WiFi direct connection group of the other party, and the existing WiFi direct connection group of the other party does not need to be disconnected.
Compared with a method for directly disconnecting the existing WiFi direct connection to create a new WiFi direct connection without dividing the situation, the method and the device for establishing the WiFi direct connection can meet the requirements of the new WiFi direct connection service and reduce the influence on the existing WiFi direct connection service.
A few examples of scenarios for joining a WiFi direct group are given below.
As shown in fig. 9. The maximum number of WiFi direct connection of the mobile phone is 1, after the WiFi direct connection between the screen-casting service APP of the mobile phone and the projector is established, the screen-casting service APP uses the WiFi direct connection to transmit video data to the projector for playing.
If the file sharing service of the tablet personal computer needs to share the document with the mobile phone, the file sharing service APP requests to establish a session based on WiFi direct connection. At this time, the tablet computer is the initiating device, and the tablet computer may execute the method shown in fig. 8 to determine the use conditions of the WiFi direct connection resources of the mobile phone and the WiFi direct connection resources of the tablet computer. Accordingly, the mobile phone may be used as a target device to perform the method of the second aspect, and determine the use conditions of the WiFi direct connection resources of the mobile phone and the WiFi direct connection resources of the tablet computer. In fig. 9, the mobile phone does not have available WiFi direct connection resources, the tablet pc does not establish WiFi direct connection, and the tablet pc can acquire information of a current WiFi direct connection group (i.e., a WiFi direct connection group between the mobile phone and the projector) of the mobile phone, join the WiFi direct connection group, and establish a session based on the WiFi direct connection.
If the file sharing service of the mobile phone needs to share the document with the tablet computer, the file sharing service APP requests to establish a session based on the WiFi direct connection. At this time, the mobile phone is an initiating device, and the mobile phone may execute the method shown in fig. 8 to determine the use conditions of the WiFi direct connection resources of the mobile phone and the WiFi direct connection resources of the tablet computer. Accordingly, the tablet computer may be used as the target device to execute the method of the second aspect, and determine the use conditions of the WiFi direct connection resource of the mobile phone and the WiFi direct connection resource of the tablet computer. In fig. 9, if the available WiFi direct connection resources do not exist in the mobile phone, the tablet computer does not establish a WiFi direct connection, and the available WiFi direct connection resources exist, the tablet computer may obtain information of a current WiFi direct connection group (that is, a WiFi direct connection group between the mobile phone and the projector) of the mobile phone, join the WiFi direct connection group, and establish a session based on the WiFi direct connection.
As shown in fig. 10. The maximum number of WiFi direct connection of the projector is 1, after the screen throwing service APP of the mobile phone is established and connected with the WiFi direct connection of the projector, the screen throwing service APP uses the WiFi direct connection to transmit video data to the projector for playing.
If the file sharing service of the tablet computer needs to share a document with the projector, the file sharing service APP requests to create a session based on WiFi direct connection. At this time, the tablet computer is the initiating device, and the tablet computer may execute the method shown in fig. 8 to determine the usage of the WiFi direct resources of the projector and the WiFi direct resources of the tablet computer. Accordingly, the projector may be used as a target device, and the method of the second aspect may be performed to determine the usage of the WiFi direct resources of the projector and the WiFi direct resources of the tablet computer. In fig. 10, the projector does not have available WiFi direct connection resources, the tablet computer does not establish WiFi direct connection, and the tablet computer has available WiFi direct connection resources, so that the tablet computer can acquire information of a current WiFi direct connection group (i.e., a WiFi direct connection group between the mobile phone and the projector) of the projector, join the WiFi direct connection group, and establish a session based on WiFi direct connection.
If the file sharing service of the projector needs to share the document with the tablet computer, the file sharing service APP requests to establish a session based on the WiFi direct connection. At this time, the projector is an initiating device, and the projector may execute the method shown in fig. 8 to determine the usage of the WiFi direct resources of the projector and the WiFi direct resources of the tablet computer. Accordingly, the tablet computer as a target device may execute the method of the second aspect to determine the usage of the WiFi direct resources of the projector and the WiFi direct resources of the tablet computer. In fig. 10, the projector does not have available WiFi direct connection resources, the tablet computer does not establish WiFi direct connection, and the tablet computer has available WiFi direct connection resources, so that the tablet computer can acquire information of a current WiFi direct connection group (i.e., a WiFi direct connection group between the mobile phone and the projector) of the projector, join the WiFi direct connection group, and establish a session based on WiFi direct connection.
How to determine the usage of WiFi direct resources for the initiating device and the target device is described below.
Optionally, the case that the initiating device does not have available WiFi direct resources includes:
the number of WiFi direct connections of the initiating device reaches the maximum value, and all the WiFi direct connections have the condition of opposite terminal devices.
The case that the initiating device has available WiFi direct resources includes:
the method includes the steps that the number of WiFi direct connection of the initiating device does not reach the maximum value, or the number of WiFi direct connection of the initiating device reaches the maximum value and part or all of the WiFi direct connection does not have opposite terminal devices.
Optionally, the case that the target device does not have available WiFi direct resources includes:
the number of WiFi direct connection of the target equipment reaches the maximum value, and all the WiFi direct connection has the condition of opposite terminal equipment;
the case that the target device has available WiFi direct resources includes:
in case the number of WiFi direct connections of the target device does not reach the maximum value, or,
the number of WiFi direct connections of the target device reaches the maximum value, and partial or all of the WiFi direct connections have no opposite terminal device.
The WiFi direct connection has two conditions, one is effective connection, the other is invalid connection, the effective connection refers to the WiFi direct connection with opposite terminal equipment, and the invalid connection refers to the WiFi direct connection without the opposite terminal equipment. When the number of connections of the WiFi-direct network reaches a maximum value, some connections may not be active connections, and this state of the WiFi-direct network may be referred to as an inactive connection state. The initiating device can disconnect the invalid connection to acquire the WiFi direct connection resource, and this embodiment can release the potential WiFi direct connection resource by distinguishing the valid connection from the invalid connection, which is beneficial for the initiating device to make a correct decision, for example, it is avoided that the initiating device considers that both parties do not have the WiFi direct connection resource under the condition that the invalid connection exists.
An example of determining the current status of a WiFi-direct group is presented below. As shown in fig. 11.
S1101, the WiFi direct connection module analyzes the broadcast message, and the connection state of the WiFi direct connection group is obtained.
The WiFi direct module may be a mobile phone or a tablet computer in fig. 9, and may also be a projector or a tablet computer in fig. 10.
And S1102, the WiFi direct connection module judges whether the WiFi direct connection service is started or not.
If not, executing S1103; if yes, S1104 is performed.
And S1103, emptying the WiFi direct connection list by the WiFi direct connection module.
And S1104, the WiFi direct connection module acquires WiFi direct connection group information from the broadcast message.
S1105, the WiFi direct connection module determines whether the role of the local device in the WiFi direct connection group is a Group Owner (GO).
If yes, go to S1106; if not, then S1109 is executed.
S1106, the WiFi direct connection module determines whether there is a connected Group Client (GC) device in the WiFi direct connection group.
If not, determining that the WiFi direct connection resources are occupied inefficiently; if yes, S1107 is executed.
S1107, the WiFi direct connection module determines whether the GC device in the WiFi direct connection group is the target device.
If not, determining that the WiFi direct connection resources are effectively occupied; if yes, go to S1108.
And S1108, the WiFi direct connection module judges whether the GO equipment in the WiFi direct connection group is the target equipment.
If not, determining that the WiFi direct connection resources are effectively occupied; if so, then S1109 is performed.
S1109, the WiFi direct module updates the WiFi direct connection list.
The following three cases exist in the example of fig. 11.
a) The local terminal device starts the WiFi direct connection service, the wireless local terminal device is decided to be in the GO role, and no GC device is connected to the local terminal device.
b) The local terminal device starts the WiFi direct connection service and makes a decision to become a GO role, and the GC device is connected to the local terminal device.
c) The local terminal device starts the WiFi direct connection service, the local terminal device decides to become a GC role, and the GO device connected to the local terminal device is different from the target device.
And under the condition that the number of the WiFi direct connections of the local terminal equipment reaches the maximum value, the WiFi direct connection resources in the condition a) are occupied inefficiently, and the WiFi direct connection resources in the conditions b) and c) are occupied effectively.
The following further describes an example of joining a WiFi direct connection group provided by the present application based on an occupation situation of WiFi direct connection resources of an originating device.
Fig. 12 is an illustration of an initiating device joining a WiFi-direct group when there are no WiFi-direct resources available.
S1201, the service APP requests to establish a session to the target device.
The service APP may request the WiFi direct module to establish a session with a target device (e.g., a projector) based on a service requirement of the user (e.g., a service requirement triggered after the user clicks a screen projection button).
And S1202, the WiFi direct connection module judges whether available WiFi direct connection resources exist.
For example, when the maximum WiFi direct connection number of the mobile phone is 1, if 0 WiFi direct connection is established for the current mobile phone, the WiFi direct connection module determines that there is an available WiFi direct connection resource; if 1 WiFi direct connection is established in the current mobile phone and the opposite terminal equipment exists in the WiFi direct connection, the WiFi direct connection module determines that no available WiFi direct connection resources exist.
For another example, when the maximum number of WiFi direct connections of the mobile phone is 2, if 1 or 0 WiFi direct connections are established for the current mobile phone, the WiFi direct connection module determines that there are available WiFi direct connection resources; if 2 WiFi direct connections have been established on the current mobile phone, and there is an opposite terminal device in the 2 WiFi direct connections, the WiFi direct connection module determines that there is no available WiFi direct connection resource.
If the determination result of S1202 is yes, the initiator may perform steps subsequent to S1303 in fig. 13.
If the determination result of S1202 is no, the initiating device may execute S1203.
S1203, acquiring connection information of the created or connected WiFi direct connection group.
The created WiFi direct group refers to a WiFi direct group in which the originating device serves as a GO device, and the connected WiFi direct group refers to a WiFi direct group in which the originating device serves as a GC device.
And S1204, sending a connection request to the target device through the negotiation channel, and carrying connection information of the WiFi direct connection group.
The connection information of the WiFi direct group is, for example: SSID, BSSID, pre-shared key, and channel.
S1205, the target device processes the connection request.
And S1206, the WiFi direct connection module of the target equipment judges whether the target equipment has available WiFi direct connection resources.
The determination method is the same as S1202.
If the determination result in S1206 is no, the target device performs S1207; if the determination result in S1206 is yes, the target device performs S1210.
S1207, the WiFi direct connection module of the target device returns a connection reply indicating that there is no available WiFi direct connection resource.
And S1208, the WiFi direct connection module of the initiating device receives the connection reply and determines that both the two parties have no available WiFi direct connection resources.
At this time, the target device cannot join the WiFi direct connection group of the initiator device, and the WiFi direct connection module of the initiator device may perform S1209.
S1209, notifying the service APP of the creating session encountering conflict.
The service APP can prompt the user to create a session encounter conflict through an interface, and can disconnect the current WiFi direct connection according to the indication of the user, or can abandon the establishment of the session to the target device according to the indication of the user.
And S1210, the WiFi direct-connection module of the target device uses the connection information in the connection request to connect the WiFi direct-connection group.
And S1211, after the WiFi direct connection group is successfully connected, the WiFi direct connection module of the target device returns a connection reply to prompt that the connection is successful.
And S1212, the WiFi direct connection module of the initiating device receives the connection reply, and creates a session after determining that the target device is successfully connected with the WiFi direct connection group.
S1213, the WiFi direct connection module of the initiating device reports the message of successful session creation to the service APP.
And after receiving the message of successful session creation, the service APP transmits service data through the session.
Fig. 13 is an illustration of an initiating device joining a WiFi-direct group when there are WiFi-direct resources available.
S1301, the service APP requests to establish a session to the target device.
The service APP may be based on the service requirements of the user (e.g., a service requirement triggered by a user clicking a screen-projection button) to request the WiFi direct connection module to establish a session with a target device (e.g., a projector).
S1302, the WiFi direct connection module judges whether available WiFi direct connection resources exist.
For example, when the maximum number of WiFi direct connections of the mobile phone is 1, if 0 WiFi direct connections are established for the current mobile phone, the WiFi direct connection module determines that there are available WiFi direct connection resources; if 1 WiFi direct connection is established in the current mobile phone and the opposite terminal equipment exists in the WiFi direct connection, the WiFi direct connection module determines that no available WiFi direct connection resources exist.
For another example, when the maximum number of WiFi direct connections of the mobile phone is 2, if 1 or 0 WiFi direct connections are established for the current mobile phone, the WiFi direct connection module determines that there are available WiFi direct connection resources; if 2 WiFi direct connections have been established for the current mobile phone, and there is peer equipment in the 2 WiFi direct connections, the WiFi direct connection module determines that there is no available WiFi direct connection resource.
If the determination result of S1302 is no, the initiator may execute the steps after S1203 in fig. 12.
If the determination result in S1302 is yes, the initiator may execute S1303.
And S1303, sending a connection request to the target device through the negotiation channel.
S1304, the target device processes the connection request.
S1305, the WiFi direct connection module of the target device determines whether the target device has available WiFi direct connection resources.
The determination method is the same as S1302.
If the judgment result in S1305 is yes, the target device performs S1306; if the determination result in S1305 is no, the target device executes S1308.
S1306, the WiFi direct module of the target device establishes a WiFi direct group.
After receiving the message that the WiFi direct connection group is successfully connected, the initiator performs S1310.
S1307, acquiring connection information of the created or connected WiFi direct connection group.
The created WiFi direct group refers to a WiFi direct group of the target device as a GO device, and the connected WiFi direct group refers to a WiFi direct group of the target device as a GC device.
And S1308, returning a connection reply and carrying the connection information of the WiFi direct connection group.
The connection information of the WiFi direct group is, for example: SSID, BSSID, pre-shared key, and channel.
S1309, connect the WiFi direct group using the connection information in the connection reply.
And S1310, the WiFi direct connection module of the initiating device receives the connection reply, and establishes a session after the target device is successfully connected with the WiFi direct connection group.
S1311, the WiFi direct connection module of the initiating device reports the message that the session is successfully created to the service APP.
And after receiving the message of successful session creation, the service APP transmits service data through the session.
Since the WiFi direct connection group may be disconnected by other APPs, the WiFi direct connection module needs to monitor a system broadcast message in order to determine a change of a state of the WiFi direct connection group. As shown in fig. 14.
S1401, the WiFi direct connection module of the initiating device monitors the broadcast message, analyzes the content of the broadcast message and acquires the connection state of the WiFi direct connection group.
S1402, the WiFi direct connection module of the initiating device determines whether the WiFi direct connection group is in a connected state.
If the determination result in S1402 is yes, the initiating device continues to use the WiFi direct connection group to transmit the service data. If the determination result in S1402 is negative, the WiFi direct connection module executes the following steps.
S1403, the WiFi direct connection module of the initiating device clears the connection list information.
And S1404, the WiFi direct connection module of the initiating device sends a connection request to the target device through the negotiation channel.
And S1405, the WiFi direct connection module of the target device processes the connection request and determines whether the target device has available WiFi group resources.
And S1406, if the target device has the available WiFi group resources, the WiFi direct connection module of the target device returns a connection reply to prompt that WiFi direct connection conditions are met.
And S1407, the WiFi direct connection module of the initiating device processes the connection reply, and the WiFi direct connection role decision, the channel decision and the like are completed.
S1408, the WiFi direct module of the initiating device creates a WiFi direct group.
S1409, the WiFi direct connection module of the initiating device sends a connection request to the target device through the negotiation channel, and carries connection information of the WiFi direct connection group.
The connection information of the WiFi direct group is, for example: SSID, BSSID, pre-shared key, and channel.
And S1410, the WiFi direct connection module of the target device processes the connection request carrying the connection information and starts to connect the WiFi direct connection group.
S1411, after the WiFi direct connection module of the target device is successfully connected with the WiFi direct connection group, returning a connection reply to indicate that the connection is successful.
S1412, the WiFi direct connection module of the initiating device receives a reply indicating that the connection is successful.
S1413, the WiFi direct connection module of the initiating device notifies the transmission module that the WiFi direct connection is interrupted and successfully connected.
S1414, the transmission module of the initiating device reconstructs the transmission channel, and continues to transmit or retransmit the service data.
The application also provides a device for joining the WiFi group, which is applied to the initiating equipment of the session, wherein the initiating equipment comprises a WiFi direct connection module, and the WiFi direct connection module comprises a receiving unit, a processing unit and a sending unit.
The receiving unit is used for: receiving a session request from a service APP, wherein the session request requests to establish a session based on WiFi direct connection;
the processing unit is configured to: determining the use condition of WiFi direct connection resources of the initiating equipment according to the session request; determining the use condition of WiFi direct connection resources of the target equipment of the session;
when the initiator device does not have available WiFi direct resources, and when the target device has available WiFi direct resources, the sending unit is configured to: sending connection information of a first WiFi direct connection group to the target device, wherein the connection information of the first WiFi direct connection group is used for the target device to join the first WiFi direct connection group, and the first WiFi direct connection group is a WiFi direct connection group of the initiating device; or,
when the initiating device has available WiFi direct resources, and when the target device has no available WiFi direct resources, the receiving unit is further configured to: receiving connection information for a second WiFi direct group from the target device, the processing unit further to: and joining the second WiFi direct connection group according to the connection information of the second WiFi direct connection group, wherein the second WiFi direct connection group is the WiFi direct connection group of the target device.
Optionally, the initiating device does not have available WiFi direct resources, including:
the number of WiFi direct connection of the initiating device reaches the maximum value, and all the WiFi direct connection has the condition of opposite terminal devices;
the initiating device has available WiFi direct resources, including:
in case the number of WiFi direct connections of the initiating device does not reach a maximum value, or,
the number of WiFi direct connections of the initiating device reaches a maximum value, and the condition that opposite-end devices do not exist in part or all of the WiFi direct connections.
Optionally, the target device does not have available WiFi direct resources, including:
the number of WiFi direct connections of the target device reaches the maximum value, and all WiFi direct connections have opposite terminal devices;
the target device has available WiFi direct resources, including:
in case the number of WiFi direct connections of the target device does not reach the maximum value, or,
the number of WiFi direct connections of the target device reaches a maximum value, and the condition that opposite-end devices do not exist in part or all of the WiFi direct connections.
Optionally, the processing unit is further configured to: monitoring state changes of the first WiFi direct connection group or the second WiFi direct connection group;
when the first WiFi direct connection group or the second WiFi direct connection group is dissolved, a third WiFi direct connection group is established, wherein the third WiFi direct connection group is a special WiFi direct connection group of the initiating device and the target device.
The application also provides another device for joining the WiFi group, which is applied to target equipment of a conversation, wherein the target equipment comprises a WiFi direct connection module, and the WiFi direct connection module comprises a receiving unit, a processing unit and a sending unit.
The receiving unit is used for: receiving a session request from an initiating device of the session, the session request requesting establishment of a session based on a WiFi direct connection;
the processing unit is configured to: determining the use condition of WiFi direct connection resources of the initiating equipment according to the session request; the WiFi direct connection module determines the use condition of WiFi direct connection resources of the target equipment;
when the initiating device does not have available WiFi direct resources, and when the target device has available WiFi direct resources, the receiving further means for: receiving connection information for a first WiFi direct group from the target device, the processing unit further to: adding the first WiFi direct connection group according to the connection information of the first WiFi direct connection group, wherein the first WiFi direct connection group is the WiFi direct connection group of the initiating device; or,
when the initiating device has available WiFi direct resources, and when the target device has no available WiFi direct resources, the sending unit is configured to: sending connection information of a second WiFi direct connection group to the initiating device, wherein the connection information of the second WiFi direct connection group is used for the initiating device to join the second WiFi direct connection group, and the second WiFi direct connection group is the WiFi direct connection group of the target device.
Optionally, the initiating device does not have available WiFi direct resources, including:
the number of WiFi direct connections of the initiating device reaches the maximum value, and all WiFi direct connections have the condition of opposite terminal devices;
the initiating device has available WiFi direct resources, including:
in case the number of WiFi direct connections of the initiating device does not reach a maximum value, or,
the number of WiFi direct connections of the initiating device reaches a maximum value, and the condition that opposite-end devices do not exist in part or all of the WiFi direct connections.
Optionally, the target device does not have available WiFi direct resources, including:
the number of WiFi direct connection of the target equipment reaches the maximum value, and all the WiFi direct connection has the condition of opposite terminal equipment;
the target device has available WiFi direct resources, including:
in case the number of WiFi direct connections of the target device does not reach the maximum value, or,
the number of WiFi direct connections of the target device reaches a maximum value, and the condition that opposite-end devices do not exist in part or all of the WiFi direct connections.
Optionally, the processing unit is further configured to:
monitoring state changes of the first WiFi direct connection group or the second WiFi direct connection group;
when the first WiFi direct connection group or the second WiFi direct connection group is dissolved, a third WiFi direct connection group is established, wherein the third WiFi direct connection group is a special WiFi direct connection group of the initiating device and the target device.
The present application also provides a computer program product which, when executed by a processor, implements the method of any of the method embodiments of the present application.
The computer program product may be stored in a memory and eventually transformed into an executable object file that can be executed by a processor via preprocessing, compiling, assembling and linking.
The computer program product may also solidify the code in the chip. The present application is not intended to be limited to the particular form of the computer program product.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a computer, implements the method of any of the method embodiments of the present application. The computer program may be a high-level language program or an executable object program.
The computer readable storage medium may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash memory. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate SDRAM, enhanced SDRAM, SLDRAM, synchronous Link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working process and the generated technical effect of the apparatus and the device described above may refer to the corresponding process and technical effect in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the disclosed system, apparatus and method can be implemented in other ways. For example, some features of the method embodiments described above may be omitted, or not performed. The above-described embodiments of the apparatus are merely exemplary, the division of the unit is only one logical function division, and there may be other division ways in actual implementation, and a plurality of units or components may be combined or integrated into another system. In addition, the coupling between the units or the coupling between the components may be direct coupling or indirect coupling, and the coupling includes electrical, mechanical or other connections.
It should be understood that, in the various embodiments of the present application, the sequence numbers of the processes do not mean the execution sequence, and the execution sequence of the processes should be determined by the functions and the inherent logic thereof, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Additionally, the terms "system" and "network" are often used interchangeably herein. The term "and/or" herein is only one kind of association relationship describing the association object, and means that there may be three kinds of relationships, for example, a and/or B, and may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
In short, the above description is only a preferred embodiment of the present disclosure, and is not intended to limit the scope of the present disclosure. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method for joining a WiFi group, wherein the method is applied to an initiating device of a session, the initiating device comprises a WiFi direct connection module, and the method comprises the following steps:
the WiFi direct-connection module receives a session request from a service APP, and the session request requests that a session based on WiFi direct-connection is established;
the WiFi direct connection module determines the use condition of WiFi direct connection resources of the initiating equipment according to the session request;
the WiFi direct connection module determines the use condition of WiFi direct connection resources of target equipment of the session;
when the initiating device does not have available WiFi direct connection resources and when the target device has available WiFi direct connection resources, the WiFi direct connection module sends connection information of a first WiFi direct connection group to the target device, wherein the connection information of the first WiFi direct connection group is used for the target device to join the first WiFi direct connection group, and the first WiFi direct connection group is the WiFi direct connection group of the initiating device; or,
when the initiating device has available WiFi direct connection resources and when the target device does not have available WiFi direct connection resources, the WiFi direct connection module receives connection information of a second WiFi direct group from the target device, the WiFi direct module joins the second WiFi direct group according to the connection information of the second WiFi direct group, and the second WiFi direct group is the WiFi direct group of the target device.
2. The method of claim 1,
the initiating device does not have available WiFi direct connection resources, and the method comprises the following steps:
the number of WiFi direct connections of the initiating device reaches the maximum value, and all WiFi direct connections have the condition of opposite terminal devices;
the initiating device has available WiFi direct resources, including:
in case the number of WiFi direct connections of the initiating device does not reach a maximum value, or,
the number of WiFi direct connections of the initiating device reaches a maximum value, and the condition that opposite-end devices do not exist in part or all of the WiFi direct connections.
3. The method of claim 1,
the target device does not have available WiFi direct connection resources, and the method comprises the following steps:
the number of WiFi direct connection of the target equipment reaches the maximum value, and all the WiFi direct connection has the condition of opposite terminal equipment;
the target device has available WiFi direct resources, including:
in case the number of WiFi direct connections of the target device does not reach the maximum value, or,
the number of WiFi direct connections of the target device reaches a maximum value, and the condition that opposite-end devices do not exist in part or all of the WiFi direct connections.
4. The method of any of claims 1 to 3, further comprising:
the WiFi direct connection module monitors state changes of the first WiFi direct connection group or the second WiFi direct connection group;
when the first WiFi direct connection group or the second WiFi direct connection group is dissolved, the WiFi direct connection module establishes a third WiFi direct connection group, and the third WiFi direct connection group is a special WiFi direct connection group of the initiating device and the target device.
5. A method for joining a WiFi group, wherein a target device applied to a session comprises a WiFi direct connection module, the method comprising:
the WiFi direct connection module receives a session request from initiating equipment of the session, and the session request requests to establish the session based on WiFi direct connection;
the WiFi direct connection module determines the use condition of WiFi direct connection resources of the initiating equipment according to the session request;
the WiFi direct connection module determines the use condition of WiFi direct connection resources of the target equipment;
when the initiating device does not have available WiFi direct connection resources and when the target device has available WiFi direct connection resources, the WiFi direct connection module receives connection information of a first WiFi direct connection group from the target device, the WiFi direct connection module joins the first WiFi direct connection group according to the connection information of the first WiFi direct connection group, and the first WiFi direct connection group is the WiFi direct connection group of the initiating device; or,
when the initiating device has available WiFi direct connection resources and when the target device does not have available WiFi direct connection resources, the WiFi direct connection module sends connection information of a second WiFi direct connection group to the initiating device, the connection information of the second WiFi direct connection group is used for the initiating device to join the second WiFi direct connection group, and the second WiFi direct connection group is the WiFi direct connection group of the target device.
6. The method of claim 5,
the initiating device does not have available WiFi direct connection resources, and the method comprises the following steps:
the number of WiFi direct connections of the initiating device reaches the maximum value, and all WiFi direct connections have the condition of opposite terminal devices;
the initiating device has available WiFi direct resources, including:
in case the number of WiFi direct connections of the initiating device does not reach a maximum value, or,
the number of WiFi direct connections of the initiating device reaches the maximum value, and the condition that opposite terminal devices do not exist in part or all of the WiFi direct connections.
7. The method of claim 5,
the target device does not have available WiFi direct resources, including:
the number of WiFi direct connection of the target equipment reaches the maximum value, and all the WiFi direct connection has the condition of opposite terminal equipment;
the target device has available WiFi direct resources, including:
in case the number of WiFi direct connections of the target device does not reach the maximum value, or,
the number of WiFi direct connections of the target device reaches a maximum value, and the condition that opposite-end devices do not exist in part or all of the WiFi direct connections.
8. The method of any of claims 5 to 7, further comprising:
the WiFi direct connection module monitors state changes of the first WiFi direct connection group or the second WiFi direct connection group;
when the first WiFi direct connection group or the second WiFi direct connection group is dissolved, the WiFi direct connection module establishes a third WiFi direct connection group, and the third WiFi direct connection group is a special WiFi direct connection group of the initiating device and the target device.
9. An apparatus for joining a WiFi group comprising a processor and a memory, the processor and the memory coupled, the memory for storing a computer program that, when executed by the processor, causes the apparatus to perform the method of any of claims 1 to 8.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes an apparatus comprising the processor to perform the method of any of claims 1 to 8.
CN202210841284.1A 2022-07-18 2022-07-18 Method and device for joining WiFi group Active CN115002939B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210841284.1A CN115002939B (en) 2022-07-18 2022-07-18 Method and device for joining WiFi group

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210841284.1A CN115002939B (en) 2022-07-18 2022-07-18 Method and device for joining WiFi group

Publications (2)

Publication Number Publication Date
CN115002939A CN115002939A (en) 2022-09-02
CN115002939B true CN115002939B (en) 2022-10-04

Family

ID=83021380

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210841284.1A Active CN115002939B (en) 2022-07-18 2022-07-18 Method and device for joining WiFi group

Country Status (1)

Country Link
CN (1) CN115002939B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103702291A (en) * 2012-09-27 2014-04-02 中兴通讯股份有限公司 Wi-Fi (wireless fidelity)-based group establishing method and WiFi directly-connecting equipment
EP2934029A1 (en) * 2014-04-14 2015-10-21 MediaTek, Inc Linking method between communication devices and related machine readable medium
CN113141671A (en) * 2021-04-23 2021-07-20 Tcl通讯(宁波)有限公司 Communication method and device of wifi device and computer readable storage medium
WO2022068513A1 (en) * 2020-09-30 2022-04-07 华为技术有限公司 Wireless communication method and terminal device
CN114679732A (en) * 2020-12-24 2022-06-28 华为技术有限公司 Method and electronic equipment for data transmission under Wi-Fi direct connection

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016170687A (en) * 2015-03-13 2016-09-23 キヤノン株式会社 Information processing apparatus, control method thereof, program, and information processing system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103702291A (en) * 2012-09-27 2014-04-02 中兴通讯股份有限公司 Wi-Fi (wireless fidelity)-based group establishing method and WiFi directly-connecting equipment
EP2934029A1 (en) * 2014-04-14 2015-10-21 MediaTek, Inc Linking method between communication devices and related machine readable medium
WO2022068513A1 (en) * 2020-09-30 2022-04-07 华为技术有限公司 Wireless communication method and terminal device
CN114679732A (en) * 2020-12-24 2022-06-28 华为技术有限公司 Method and electronic equipment for data transmission under Wi-Fi direct connection
CN113141671A (en) * 2021-04-23 2021-07-20 Tcl通讯(宁波)有限公司 Communication method and device of wifi device and computer readable storage medium

Also Published As

Publication number Publication date
CN115002939A (en) 2022-09-02

Similar Documents

Publication Publication Date Title
CN113885759B (en) Notification message processing method, device, system and computer readable storage medium
US20230422154A1 (en) Method for using cellular communication function, and related apparatus and system
CN111371849A (en) Data processing method and electronic equipment
WO2021197071A1 (en) Wireless communication system and method
WO2021073337A1 (en) Method and apparatus for installing plug-in, and storage medium
CN114553814A (en) Method and device for processing push message
CN113645571A (en) Data transmission method and electronic equipment
EP4293997A1 (en) Display method, electronic device, and system
US20240098354A1 (en) Connection establishment method and electronic device
CN113703894A (en) Display method and display device of notification message
CN114928900B (en) Method and apparatus for transmission over a WiFi direct connection
CN114928898B (en) Method and device for establishing session based on WiFi direct connection
CN113746718B (en) Content sharing method, device and system
CN115017498B (en) Method for operating applet and electronic device
CN115686182B (en) Processing method of augmented reality video and electronic equipment
CN115002939B (en) Method and device for joining WiFi group
CN115309547A (en) Method and device for processing asynchronous binder call
CN114567871A (en) File sharing method and device, electronic equipment and readable storage medium
WO2024093703A1 (en) Instance management method and apparatus, and electronic device and storage medium
CN111859418B (en) Atomic capability calling method and terminal equipment
CN114020186B (en) Health data display method and device
CN116684517B (en) Method and device for sending response message
US12032938B2 (en) Plug-in installation method, apparatus, and storage medium
WO2024067037A1 (en) Service calling method and system, and electronic device
CN115225753B (en) Shooting method, related device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant