Method for determining personal relationship and electronic device

By acquiring and analyzing images in electronic devices, the correlation relationship between characters is determined, and the problem of inconvenience in determining the relationship between characters in the prior art is solved, and convenient and efficient relationship determination and expansion is achieved.

WO2025113182A1PCT designated stage expired Publication Date: 2025-06-05HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/131756
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-30
Filing Date
2024-11-13
Publication Date
2025-06-05

AI Technical Summary

Technical Problem

The prior art is difficult to easily determine the relationship between people in electronic devices, especially when it is necessary to find specific contacts from a large number of contacts, and the operation is not convenient enough.

Method used

By acquiring and analyzing images, determine the relationship between characters, use the character relationship sub-map and the target character relationship diagram in the image, and combine auxiliary information such as shooting time and place to determine the character relationship.

Benefits of technology

It realizes convenient determination of character relationships in electronic devices, improves operational efficiency, and further optimizes the accuracy of relationship determination by expanding character relationships.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024131756_05062025_PF_FP_ABST
    Figure CN2024131756_05062025_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses a method for determining for a personal relationship and an electronic device. The method is applicable to the field of terminals. The method comprises: acquiring a first image, the first image comprising a first person, and the first person being a person for which a personal relationship is to be determined; acquiring a second image, the second image comprising a second person, and the second person being the owner of an electronic device; on the basis of an image in the electronic device, determining a third person having a first association with the first person, the third person having a second association with the second person; and, on the basis of the first association and the second association, determining the personal relationship between the first person and the second person. By mining the personal relationship between the first person and the second person by means of the third person having associations with both the first person and the second person, the personal relationships of the second person can be further expanded.
Need to check novelty before this filing date? Find Prior Art

Description

Method for determining character relationship and electronic device

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of the People's Republic of China on November 30, 2023, with application number 202311636297.6 and application name "A method for determining character relationships and electronic equipment", the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The present application relates to the field of terminals, and in particular to a method for determining a relationship between people and an electronic device. Background Art

[0004] Electronic devices are becoming increasingly essential to people's daily lives. For example, mobile phones are used by people to establish social connections. For example, user A can share content (e.g., via an instant messaging app) with user B on their phone. However, user A must find user B's contact information among the numerous contact options in the instant messaging app before sharing the content with user B, making the process inconvenient.

[0005] Summary of the Invention

[0006] The present application provides a method for determining character relationships and an electronic device for mining and applying character relationships.

[0007] In a first aspect, the present application provides a method for determining a person relationship, which is applied to an electronic device. The method comprises: acquiring a first image, the first image including a first person, the first person being the person whose person relationship is to be determined; acquiring a second image, the second image including a second person, the second person being the owner of the electronic device; determining, based on the image in the electronic device, a third person having a first association relationship with the first person, the third person having a second association relationship with the second person; and determining, based on the first association relationship and the second association relationship, a person relationship between the first person and the second person.

[0008] In an embodiment of the present application, when determining the relationship between a first person appearing in a first image and the phone owner, the mobile phone can determine, through the image in the mobile phone, a third person who has a first association relationship with the first person, and who also has a second association relationship with the second person. The relationship between the first and second persons can then be determined based on the first and second association relationships. Therefore, by exploring the relationship between the first and second persons through the third person who has an association relationship with both the first and second persons, the relationship between the second person can be further expanded.

[0009] In some embodiments, the electronic device can determine the relationship between characters based on images in the gallery.

[0010] For example, the electronic device retrieves a third image and a fourth image from a gallery. The third image includes a second person and a third person, and the fourth image includes the third person and the first person. A first association relationship between the second and third persons is determined based on the distance and / or posture between the second and third persons in the third image. A second association relationship between the first and third persons is determined based on the distance and / or posture between the third and first persons in the fourth image.

[0011] In an embodiment of the present application, if there is a photo of the second person and the third person (i.e., the third image) and a photo of the third person and the first person (i.e., the fourth image) in the gallery at the same time, the third image and the fourth image can be directly obtained, and the relationship between the characters can be determined by the distance and / or posture between the characters in the image, and the third person can be determined based on the first relationship and the second relationship.

[0012] In other embodiments, the electronic device may also determine character relationships based on images in a gallery and auxiliary information.

[0013] In the first case, the auxiliary information may include: the shooting time and shooting location of the image and other information.

[0014] For example, if the first image includes person B, the electronic device can obtain the shooting time and / or shooting location of the first image and determine the relationship between person B and person A (the owner) based on the shooting time and / or shooting location. For example, if the shooting time is October 2014 and the shooting location is XXX University, the mobile phone 100 can determine that person B is a classmate of person A.

[0015] In the second case, the auxiliary information may also include information in other applications in the electronic device, such as an address book, a mailbox application, a calendar application, a memo application, and the like.

[0016] For example, the electronic device obtains a third image from a gallery, where the third image includes a first person B and a third person C. Based on the distance and / or posture between the first and third persons in the third image, a first association relationship between the first and third persons in the third image is determined. The electronic device determines that relevant information about the third person C exists in a first application within the electronic device, and based on the description of the third person C in the first application, determines a second association relationship between the third person C and the second person A.

[0017] In an embodiment of the present application, when the gallery contains only a photo of a first person and a third person, i.e., a third image, a first association between the first person and the third person can be determined based on the third image. A search is then performed in the electronic device to find a first application that includes relevant information about the third person C, such as the third person's profile picture and / or name. Assuming that the electronic device finds relevant information about the third person in the first application, a second association between the third person and the second person is determined based on the description of the third person in the first application.

[0018] Taking the first application as an address book, the electronic device finds that there is a third person's portrait and / or name in the address book, and then determines the second association relationship between the third person and the second person based on the description information of the third person in the address book (for example, remarks information, group information, etc.).

[0019] Taking the first application as an email application as an example, the electronic device queries that there is a third person's avatar and / or name in the email application, then determines the second association relationship between the third person and the second person based on the description information of the third person in the email application (for example, note information, group information, email address information, etc.).

[0020] Taking the first application as a calendar application as an example, the electronic device queries the name of a third person in the calendar application, and then determines the second association relationship between the third person and the second person based on the description information of the third person in the calendar application (for example, keyword extraction in the schedule information).

[0021] It should be noted that this article uses the example of the first application being an address book, email application, or calendar application. In fact, the first application can also be other applications, such as a memo application, and the embodiments of this application do not give examples one by one.

[0022] In one possible design, determining a third person having a first association relationship with a first person includes: identifying a scene of the first image, where the scene includes one of a family scene, a party scene, and an office scene; determining, based on the scene recognition result, that description information of the third person C exists in a first application on the electronic device, where the description information matches the scene recognition result; and determining, based on the description information, a first association relationship between the first person and the third person, and a second association relationship between the second person and the third person.

[0023] In an embodiment of the present application, when there is no photo of the first person and other people in the gallery, scene recognition can be performed on the first image to obtain a scene recognition result. Based on the scene recognition result, a search can be performed on the electronic device to find a first application that contains relevant information about a third person C, such as the third person's profile picture and / or name. Assuming that the electronic device finds relevant information including the third person in the first application, the second association relationship between the third person and the second person is determined based on the description of the third person in the first application.

[0024] Assuming that the scene recognition result is an office scene, the electronic device can search in the mailbox application (i.e., the first application) to see whether there is relevant information of the third person, such as an avatar and / or name. If so, the second association relationship between the third person and the second person is determined based on the description information of the third person in the mailbox application (for example, note information, group information, email address information, etc.).

[0025] Assuming that the scene recognition result is a home scene, the electronic device can search in the address book (i.e., the first application) to see whether there is relevant information about the third person, such as an avatar and / or name. If so, the second association relationship between the third person and the second person is determined based on the description information of the third person in the address book (e.g., remarks information, grouping information, etc.).

[0026] In a possible design, the character relationship between the first character B and the second character A is a first character relationship, and the electronic device can also determine the intimacy between each character in the first character relationship and the owner. For example, the first character relationship is a family relationship, the owner is A, and the first character relationship includes B (spouse), C (child) and D (parents). The electronic device can determine the intimacy between B and A as 1, the intimacy between C and A as 2, and the intimacy between D and A as 3. Optionally, the more interactions, the higher the intimacy. When the electronic device determines that the first content needs to be shared with the characters in the first character relationship, it can sort them according to intimacy. For example, if B has the highest intimacy, then B's contact information is ranked first, and if D has the lowest intimacy, then D's contact information is ranked last. Alternatively, when the electronic device sets the emergency contact to be a character in the first character relationship (family relationship), when there is a need for emergency contact, the character with the highest intimacy is contacted first.

[0027] In one possible design, the electronic device can implement the character relationship determination method of the embodiment of the present application through an algorithm model. For example, after the algorithm model determines the character relationship (for example, family relationship) between the first character B and the second character A, it can also output a probability value, which is used to indicate the probability that the first character and the second character are in a family relationship. Optionally, if the probability is low (for example, less than a threshold), a prompt message is output to prompt the user to determine whether the character relationship (for example, family relationship) between the first character and the second character is correct. Of course, if the probability is high (for example, greater than or equal to the threshold), there is no need to output a prompt.

[0028] In one possible design, identifying the scene of the first image includes: identifying the scene of the first image through at least one of the first person's handheld objects, attachments, clothing, and environment in the first image.

[0029] In one possible design, the character relationship between the first character and the second character is a first character relationship, and the method further includes: receiving a sharing operation for the first content; determining, based on the first content, to share the first content with a person in the first character relationship; and displaying a sharing method for the first character, the sharing method being used to share the first content with the first character.

[0030] In an embodiment of the present application, the mobile phone can apply the first person relationship to the content sharing scenario, and specify to share the first content with the person in the first person.

[0031] In a possible design, the first content includes content related to the fourth person in the first person relationship, but does not include content related to the first person B.

[0032] In the embodiment of the present application, even if the first content does not include content related to the first person, since the first person is in the first person relationship, the first content can also be shared with the first person.

[0033] In one possible design, the character relationship between the first character B and the second character A is a first character relationship, and the method further includes: according to user operation, setting the mode to be in Do Not Disturb mode, and in the Do Not Disturb mode, new messages from characters not in the first character relationship are not responded to.

[0034] In an embodiment of the present application, the first character relationship can be applied to the scenario where the do not disturb mode is set, and the mobile phone only rings, vibrates or pops up reminders for messages or calls from the characters in the first character relationship.

[0035] In one possible design, the character relationship between the first character B and the second character A is a first character relationship, and the method further includes: according to a user operation, setting the emergency contact in the first application to the character in the first character relationship. In response to the emergency contact operation, the first character B is contacted.

[0036] In the embodiment of the present application, the first character relationship can be applied to the scenario of emergency contact setting to automatically improve the information of the emergency contact.

[0037] In one possible design, obtaining the second image includes at least one of the following: obtaining a head portrait of the owner of the electronic device; or obtaining a selfie image in a gallery application; or obtaining an image of a person that appears most frequently in a gallery application.

[0038] In the embodiment of the present application, there are multiple ways for the electronic device to obtain the second image including the mobile phone owner, and the specific use of one or more of these ways can be flexibly selected according to actual conditions. For example, if the owner's portrait exists in the electronic device, the portrait can be directly obtained as the second image. When the owner's portrait does not exist in the electronic device, a selfie image in the gallery can be obtained as the second image. For another example, a selfie image in the gallery can also be directly obtained, and so on. Optionally, the owner's portrait can be a portrait in "My Business Card" in the electronic device. Among them, "My Business Card" can be located in an application of the electronic device, which can be an address book application, a settings application, or other applications. The embodiment of the present application does not limit its specific location.

[0039] In a second aspect, an electronic device is further provided, including:

[0040] a processor, a memory, and one or more programs;

[0041] The one or more programs are stored in the memory, and the one or more programs include instructions. When the instructions are executed by the processor, the electronic device executes the method steps provided in the first aspect above.

[0042] In a third aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store a computer program. When the computer program is run on a computer, the computer is caused to execute the method according to the first aspect.

[0043] In a fourth aspect, a computer program product is provided, comprising a computer program, which, when executed on a computer or a processor, enables the computer or processor to execute the method described in the first aspect above.

[0044] In the fifth aspect, a chip is also provided, which is coupled to a memory in an electronic device and is used to call a computer program stored in the memory and execute the technical solution of the first aspect of the embodiment of the present application. In the embodiment of the present application, "coupling" refers to the direct or indirect combination of two components with each other.

[0045] For the technical effects that can be achieved in the above-mentioned second to fifth aspects, please refer to the description of the technical effects that can be achieved by the corresponding design scheme in the above-mentioned first aspect, and this application will not repeat them here. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] FIG1 is a schematic diagram of the hardware structure of a mobile phone 100 provided in an embodiment of the present application;

[0047] FIG2 is a schematic diagram of the software structure of the mobile phone 100 provided in an embodiment of the present application;

[0048] FIG3 is a schematic diagram of images in a gallery provided in an embodiment of the present application;

[0049] FIG4 is a schematic diagram of identifying relationships between people in an image according to an embodiment of the present application;

[0050] FIG5 is a flow chart of a method for determining a relationship between characters according to an embodiment of the present application;

[0051] FIG6 is a schematic diagram of a head portrait of a mobile phone owner provided in an embodiment of the present application;

[0052] FIG7 is a schematic diagram of a multi-level character relationship provided by an embodiment of the present application;

[0053] FIG8A is a schematic diagram of a content sharing interface provided by an embodiment of the present application;

[0054] FIG8B is a schematic diagram of a family sharing settings interface provided by an embodiment of the present application;

[0055] FIG9A is a schematic diagram of an interface of an emergency medical card provided in one embodiment of the present application;

[0056] FIG9B is a schematic diagram of a setting interface for a family account according to an embodiment of the present application;

[0057] FIG9C is a schematic diagram of an interface for automatically setting associated persons according to an embodiment of the present application;

[0058] FIG10 is a schematic diagram of an interface for setting the Do Not Disturb mode according to an embodiment of the present application;

[0059] FIG11 is a schematic diagram of an interface for identifying character relationships provided in an embodiment of the present application;

[0060] FIG12 is a schematic structural diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0061] Below, some terms used in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.

[0062] The at least one involved in the embodiment of the present application includes one or more; wherein, more means greater than or equal to two. In addition, it should be understood that, in the description of this specification, words such as "first" and "second" are only used for the purpose of distinguishing the description, and cannot be understood as expressing or implying relative importance, nor can they be understood as expressing or implying order. For example, the first image and the second image do not represent the importance of the two or the order of the two, but are only for distinguishing the description. In the embodiment of the present application, "and / or" is only a description of the association relationship, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship.

[0063] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of the specification. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0064] As used in this specification, the terms “when” or “after” may be interpreted to mean “if” or “after” or “in response to determining that” or “in response to detecting that”, depending on the context. Similarly, the phrases “upon determining that” or “if (stated condition or event) is detected” may be interpreted to mean “if it is determined that” or “in response to determining that” or “upon detecting (stated condition or event)” or “in response to detecting (stated condition or event)”, depending on the context.

[0065] The method for determining character relationships provided in the embodiments of the present application is applicable to electronic devices. For example, the electronic device can be a portable electronic device such as a mobile phone, a tablet computer, a laptop computer, or a wearable device such as a watch or a bracelet, or a virtual reality (VR) device, an augmented reality (AR) device, a mixed reality (MR) device, etc. In short, the embodiments of the present application do not limit the specific type of electronic device. For the convenience of description, this article mainly takes the electronic device as an example.

[0066] FIG1 is a schematic diagram of the hardware structure of an electronic device. The electronic device may be, for example, a mobile phone 100. As shown in FIG1 , the electronic device 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 button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195. 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, etc.

[0067] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors. The controller may serve as the nerve center and command center of the electronic device. The controller may generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. The processor 110 may also include memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a high-speed cache memory. This memory may store instructions or data that have just been used or are being recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids duplicate accesses, reduces the processor 110's waiting time, and thus improves system efficiency.

[0068] Among them, the processor 110 can execute the process of the character relationship determination method provided in the embodiment of the present application. For example, the processor 110 can obtain a first image, which includes a first person, and the first person is the person whose character relationship is to be determined. The processor 110 can also obtain a second image, which includes a second person, and the second person is the owner of the electronic device. After the processor 110 obtains the second image, it can further determine a third person who has an associated relationship with the first person based on the image in the electronic device, and determine the character relationship between the first person and the second person through the third person. The subsequent introduction will explain this process in detail.

[0069] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0070] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.

[0071] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.

[0072] The PCM interface can 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 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0073] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.

[0074] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0075] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0076] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.

[0077] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0078] The wireless communication function of the electronic device can be implemented using antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, a modem processor, and a baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antenna can be used in conjunction with a tuning switch.

[0079] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied in electronic devices. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0080] The wireless communication module 160 can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0081] In some embodiments, antenna 1 of the electronic device is coupled to mobile communication module 150 , and antenna 2 is coupled to wireless communication module 160 , so that the electronic device can communicate with the network and other devices through wireless communication technology.

[0082] The display screen 194 is used to display the display interface of the application, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device may include one or more display screens 194.

[0083] The electronic device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor, etc. Among them, the ISP is used to process the data fed back by the camera 193.

[0084] The internal memory 121 can be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, and the software code of at least one application, etc. The data storage area can store data (such as images, videos, etc.) generated during the use of the electronic device. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash memory, etc.

[0085] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as pictures and videos can be stored on the external memory card.

[0086] The electronic device can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0087] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.

[0088] The speaker 170A, also called a "speaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to external speaker scenarios such as hands-free calls through one or more speakers 170A.

[0089] The receiver 170B, also called "earpiece", can be one or more and is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be heard by placing the receiver 170B close to the human ear.

[0090] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.

[0091] The headphone jack 170D is used to connect a wired headphone.

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

[0093] The gyro sensor 180B can be used to determine the motion posture of the electronic device. In some embodiments, the gyro sensor 180B can be used to determine the angular velocity of the electronic device around three axes (i.e., the x, y, and z axes). The gyro sensor 180B can also be used for anti-shake photography.

[0094] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.

[0095] The magnetic sensor 180D includes a Hall sensor. For example, the electronic device can use the magnetic sensor 180D to detect the opening and closing of a flip leather case.

[0096] The acceleration sensor 180E can detect the magnitude of the electronic device's acceleration in various directions (generally three axes) and the magnitude and direction of gravity when the electronic device is stationary.

[0097] The distance sensor 180F is used to measure distance. The electronic device can measure distance using infrared or laser.

[0098] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device emits infrared light through the light emitting diode. The electronic device uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device. When insufficient reflected light is detected, the electronic device can determine that there is no object near the electronic device.

[0099] The ambient light sensor 180L is used to sense the brightness of the ambient light. The electronic device can adaptively adjust the brightness of the display screen 194 according to the sensed ambient light brightness.

[0100] The fingerprint sensor 180H is used to collect fingerprints.

[0101] The temperature sensor 180J is used to detect temperature.

[0102] The touch sensor 180K, also known as a "touch panel," can be mounted on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also known as a "touch screen." The touch sensor 180K is used to detect touch operations applied to or near it. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event.

[0103] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone mass in a human vocal part.

[0104] The buttons 190 include a power button, a volume button, etc. The button 190 can be a mechanical button. It can also be a touch button. The electronic device can receive button input and generate key signal input related to the user settings and function control of the electronic device. The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect the SIM card. The SIM card can be connected to and separated from the electronic device by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195.

[0105] It is understood that the components shown in FIG1 do not constitute a specific limitation on the electronic device. The electronic device in the embodiment of the present application may include more or fewer components than those shown in FIG1. ​​In addition, the combination / connection relationship between the components in FIG1 can also be adjusted and modified.

[0106] FIG2 is a schematic diagram of the software structure of the electronic device provided in the embodiment of the present application. The electronic device may be, for example, a mobile phone. As shown in FIG2 , the software structure of the electronic device may be a layered structure, wherein the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. The layered architecture may be, for example, an event-driven architecture, a micro-kernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present application is based on a layered architecture. The system is used as an example to illustrate the software structure of the electronic device. In some embodiments, The system is divided into five layers, from top to bottom: application layer, application framework layer, Android runtime and system library, kernel layer and hardware layer.

[0107] The application layer can include a series of application packages. As shown in Figure 2, the application package can include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.

[0108] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions. As shown in Figure 2, the application framework layer may include a window manager, content provider, view system, telephony manager, resource manager, and notification manager. The window manager manages window programs. It can obtain the display size, determine whether a status bar is present, lock the screen, and take screenshots. The content provider stores and retrieves data and makes it accessible to applications. This data may include video, images, audio, incoming and outgoing calls, browsing history and bookmarks, and the phone book. The view system includes visual controls, such as those for displaying text and images. The view system can be used to build applications. The display interface can be composed of one or more views. For example, the display interface containing a text notification icon may include a view for displaying text and a view for displaying images. The telephony manager provides communication functions for the electronic device, such as managing call status (including connected and ended calls). The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, and video files. The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.

[0109] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for scheduling and management of the Android system. The core library consists of two parts: one for Java-based functions and the other for the Android core library. The application layer and the application framework layer run in the virtual machine. The virtual machine executes Java files from the application layer and application framework layer as binary files. The virtual machine performs functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection. The system library includes multiple functional modules, such as the surface manager, media libraries, 3D graphics libraries (such as OpenGL ES), and 2D graphics engines (such as SGL). The surface manager manages the display subsystem and provides fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of various common audio and video formats, as well as still image files. The media library supports a variety of audio and video codecs, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing. The 2D graphics engine is a drawing engine for 2D drawing.

[0110] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.

[0111] The hardware layer includes various hardware, such as Wi-Fi transceivers, cameras, displays, etc.

[0112] It is understood that the software structure shown in FIG2 does not constitute a specific limitation on the software structure of an electronic device. The software structure of the electronic device in the embodiments of the present application may include more or fewer modules than shown in FIG2, for example, more or fewer layers than shown in FIG2, or a layer may include more or fewer modules than shown in FIG2, etc. In addition, the combination / connection relationship between the modules in FIG2 can also be adjusted and modified.

[0113] The following uses a mobile phone as an example and describes the method for determining character relationships provided in an embodiment of the present application in conjunction with the accompanying drawings.

[0114] Image segmentation technology is becoming increasingly mature. For example, when multiple people appear in an image, image segmentation can be used to identify the people. Alternatively, when multiple animals appear in an image, image segmentation can be used to identify the animals. However, if we want to further understand the relationships between people in an image, simply identifying individual objects is not enough.

[0115] One possible implementation method is to obtain character relationships based on graph learning. For example, multiple character relationship subgraphs are obtained, each character relationship subgraph includes a target node consisting of a user's unique account identifier. For a first character relationship subgraph among multiple character relationship subgraphs, in response to determining that at least one node in the first character relationship subgraph has an association relationship with at least one node in the second character relationship subgraph, a target character relationship graph consisting of the first character relationship subgraph and the second character relationship subgraph is obtained. The similarity between the target node of the first character relationship subgraph and the target node of the second character relationship subgraph in the target character relationship graph is obtained, and the character relationship between the user corresponding to the first character relationship subgraph and the user corresponding to the second character relationship subgraph is determined based on the similarity.

[0116] Another possible implementation is to determine character relationships and make contact recommendations by creating a pattern model. The pattern model can operate on interaction data stored in a database to generate rules based on repetitive patterns of identified features. The rules generated by the model can be applied to the current context of the mobile device to determine a set of rules relevant to the current context. Features can be derived from relevant rules and input into a machine learning model that adapts to user-specific interactions. The machine learning model can provide one or more suggestions for applications to be used and provide suggestions for selection on the user interface. For example, based on the input features, the machine learning model can rank the rules according to the importance of the rules to the recipients of the recommended applications, or both. Recommendations for applications, recipients, or both can be extracted from the ranking rules and can be displayed on the user interface in the order of the user selection probability determined by the machine learning model.

[0117] However, for the characters appearing in the images in the gallery, neither of the above two methods can well identify the relationship between the characters in the images.

[0118] In view of this, an embodiment of the present application provides a method for determining a character relationship. By acquiring a first image and a second image, a first character and a second character are determined, where the second character is the owner of the electronic device. Based on the image in the electronic device, a third character having a first association relationship with the first character is determined, and the third character has a second association relationship with the second character. Based on the first association relationship and the second association relationship, the character relationship between the first character and the second character is determined. Therefore, by mining the character relationship between the first character and the second character through the third character having an association relationship with both the first character and the second character, the character relationship of the second character can be further expanded.

[0119] For example, referring to FIG3 , the gallery application of the mobile phone includes two images, one image includes person A and person C, and the other image includes person C and person B. The mobile phone can determine the relationship between person A and person B through person C in the middle.

[0120] Taking image 1 in (a) of Figure 3 as an example, image 1 includes person A and person C. If you want to determine the relationship between person A and person C, one possible implementation method is that the mobile phone uses image recognition to determine the distance and / or posture between person A and person C in image 1, and determines the relationship between person A and person C based on the distance and / or posture.

[0121] Another possible implementation is that the mobile phone can use image recognition to determine the scene of image 1 and, based on the scene, determine the relationship between person A and person C. For example, if the scene in image 1 is an office setting, then the relationship between person A and person C in image 1 is that of colleagues. Alternatively, the mobile phone can implement image scene recognition using the method shown in Figure 4. As shown in Figure 4, person detection can be performed in image 1 to identify person A and person C separately. Then, the handheld objects and accessories of each person in image 1 can be detected separately, and the scene can be determined based on the handheld objects and accessories. The handheld objects are items held by the person in the image, and the accessories are objects supported by the person in the image or objects that come into contact with the user. For example, as shown in Figure 4, the mobile phone recognizes the phone and tablet in person A's hand and the umbrella in person B's hand, determining the scene as a beach or outdoor scene. The mobile phone can also perform global semantic recognition on image 1, obtaining a semantic recognition result of "happy" for image 1. The feature extraction module then extracts features from the identified content, and uses the extracted features to model the relationship between person A and person C, such as a friendship.

[0122] The above is an example of image 1 in FIG3(a). The same principle applies to image 2 in FIG3(b).

[0123] Please refer to Figure 5, which is a flowchart of a method for determining a person relationship according to an embodiment of the present application. This method can be applied to a mobile phone having the structure of Figure 1 and / or Figure 2. As shown in Figure 5, the process includes:

[0124] S501: The mobile phone 100 obtains a first image.

[0125] Users can obtain images and store them in the gallery in a variety of ways. For example, images can be captured by the local front camera and rear camera of the mobile phone 100, and the images obtained after shooting can be saved in the Joint Photographic Experts Group (JPEG) format and stored in the gallery. Alternatively, the user can also take screenshots through the mobile phone 100 and store the screenshots in the gallery. Alternatively, the user can also obtain images from third-party software such as "WeChat" and "QQ" and store them in the gallery. For example, the user can obtain pictures shared by WeChat friends. Since the user's WeChat friends may include the user's family, friends or colleagues, the user may obtain images taken by family, friends or colleagues. Alternatively, the user can obtain images shared by the user's family, friends or colleagues through the shared album in the cloud, and so on.

[0126] The images stored in the gallery include character images, which refer to images taken by users individually and group photos of multiple characters. For example, group photos of characters with scenic spots while traveling, group photos with iconic buildings, etc. Selfies of characters at home, group photos with family, etc. Group photos of characters with family, friends or colleagues in a restaurant, etc. Selfies of characters in the office, group photos with colleagues, etc. Character images include character features, for example, images including facial, body and other features of one or more characters. Taking character A as the central character or reference character in a character relationship as an example, the character image includes images of character A taken individually, and may also include group photos of character A and character B, and group photos of character A and character C. Alternatively, the group photos in the character image may not include character A, and may only include group photos of character B and character C, or may only include individual photos of character B, and only individual photos of character C, etc.

[0127] Furthermore, the environments of person images can be categorized into different scenes, including, for example, home scenes, party scenes, and office scenes. Home scenes include the user's living room, dining room, and bedroom, and person images captured in home scenes may include the person's spouse, parents, children, and other relatives. Party scenes include public places like restaurants and theaters, which often have text descriptions, such as "hot pot" and "cinema." Office scenes generally represent the user's workplace, and person images often include the person's colleagues.

[0128] Multiple images stored in a gallery may include multiple people, such as Persons B, C, D, and E. These people appear in the images stored in the gallery, but the relationship between these people and Person A, the owner of mobile phone 100, is often unclear. For example, mobile phone 100 may capture a first image that includes Person B. The gallery may only contain individual photos of Person B, or photos of Person B with other people. From an image perspective, Person B is separate from Person A and has no direct connection. This application aims to determine the relationship between Person B and the owner of mobile phone 100. The following describes the determination process in detail.

[0129] S502 : The mobile phone 100 obtains a second image, where the second image includes a second person, and the second person is the owner of the mobile phone 100 .

[0130] To determine the relationship between person B and the owner of mobile phone 100, the owner must be identified from images stored in mobile phone 100. Only after the image corresponding to the owner of mobile phone 100 has been determined can the owner's relationship be determined based on the image. Person B can be referred to as the first person, and the owner of mobile phone 100 can be referred to as the second person. In other words, the relationship between person B and person A is determined using the second person as the reference or central person in the relationship. The image containing the second person can be referred to as the second image. The second image includes, but is not limited to, images in a gallery application, and can be determined using various methods.

[0131] In some embodiments, as shown in FIG6 , the owner of the mobile phone 100 sets the owner's profile picture in "My Business Card". If the mobile phone 100 detects the owner's profile picture, the profile picture can be obtained. Considering that the owner may use non-human images when setting the owner's profile picture, for example, landscape photos, animal photos, etc. to set the owner's profile picture. The mobile phone 100 can detect whether the owner's profile picture is a human image. If it is a human image, the owner's profile picture is obtained as the second image. Optionally, "My Business Card" can be located in an application of the electronic device, for example, it can be an address book application, a settings application, or other applications. The embodiments of the present application do not limit its specific location.

[0132] In some embodiments, the mobile phone 100 can also detect whether a selfie image exists in the gallery application and obtain the selfie image as the second image. In some cases, if the user has pre-set a selfie image set in the gallery, the images stored in the selfie image set can be considered to be selfie images of the second person. Alternatively, in other cases, when the user captures an image using the front camera of the mobile phone 100, the user may store the image as a file in a format such as Joint Photographic Experts Group (JPEG) and add a flag to the file to indicate that the image was captured by the front camera. In this case, the mobile phone 100 can also determine, based on the flag, that the image captured by the front camera in the gallery with the flag added can be considered a selfie image. The location of the flag in the file is not limited in this embodiment of the application. In addition, considering that images captured by the front camera are not necessarily images of people, that is, the image may not include a person object, after the mobile phone determines that the image captured by the front camera based on the flag bit contains a person object, it can also determine whether the image contains a person object. If so, it determines that the image is a selfie image of a person.

[0133] In some embodiments, the mobile phone 100 may obtain the most frequently appearing person image in the gallery application as the second image. For example, the gallery application may store images of a certain person that appear the most frequently. Generally, the most frequently appearing person image in the gallery should be the person image of the phone owner, and the mobile phone 100 may obtain that image as the second image.

[0134] It should be understood that when determining the second image, the mobile phone 100 can flexibly select the above-mentioned embodiments. For example, if the electronic device contains the owner's portrait (e.g., "My Business Card"), and the portrait is a portrait of a person, the portrait can be directly obtained as the second image. When the mobile phone 100 detects that the owner's portrait does not exist in the electronic device or the portrait is not a portrait of a person, it can further obtain a selfie image from the gallery as the second image. For another example, the selfie image from the gallery can be directly obtained. Different methods are not strictly mutually exclusive and can be flexibly combined according to actual conditions.

[0135] S503 : The mobile phone 100 determines a third person C having a first association relationship with the first person B based on the image in the mobile phone 100 .

[0136] To further determine the relationship between person A and person B, two scenarios can be described: when the image on mobile phone 100 includes a photo of person A and person B, and when the image does not include a photo of person A and person B. If the image includes a photo of person A and person B, the relationship between person A and person B in the photo can be directly identified using the method shown in FIG4 . If the image does not include a photo of person A and person B, the relationship between person A and person B may need to be determined using other methods.

[0137] In the embodiment of the present application, if the image captured by mobile phone 100 does not include a photo of person A and person B, the relationship between person A and person B is determined by introducing a third person. That is, if a third person can be identified based on the image captured by mobile phone 100, and this third person has an association relationship with person A, such as a first association relationship, and also has a second association relationship with person B, then the relationship between person A and person B can be indirectly determined based on the first and second association relationships. The following describes how to determine the third person and the association relationship between the third person and person A and person B.

[0138] Case 1: The photo gallery includes photos of the third person and the first person, as well as photos of the third person and the second person.

[0139] Mobile phone 100 obtains a third image and a fourth image from a gallery. The third image includes a photo of person A and a third person, and the fourth image includes a photo of the third person and person B. Thus, for the third image, mobile phone 100 can determine the distance and / or posture between person A and the third person in the third image. Mobile phone 100 can extract the features of person A and the third person in the third image using a preset neural network model and determine the distance between the features of person A and the third person in the third image. If the distance between person A and the third person in the third image is relatively close, it can be assumed that person A and the third person have an association relationship. Alternatively, mobile phone 100 can determine the posture between person A and the third person based on the extracted features of person A and the third person. If the posture between person A and the third person is hugging, arm in arm, leaning on each other, or holding hands, it can be assumed that person A and the third person have an association relationship. Furthermore, mobile phone 100 can determine a first association relationship between person A and the third person based on the distance and / or posture between person A and the third person in the third image. For example, if character A is very close to a third person and their gesture is hugging, the first association between character A and the third person can be determined to be "spouse", "children", etc. If character A is very close to a third person and their gesture is "arm-wrapped, leaning on", the first association between character A and the third person can be determined to be "friend", etc. If character A is relatively close to a third person and their gesture is "arm-wrapped, leaning on", the first association between character A and the third person can be determined to be "colleague", etc.

[0140] For the fourth image, the process of determining the second association relationship between person B and the third person is similar to the process of determining the relationship between person A and the third person, and will not be repeated here.

[0141] Case 2: The photo gallery includes photos of the third person and the first person, but does not include photos of the third person and the second person.

[0142] The mobile phone 100 can obtain a third image, which includes a photo of the third person and person B. Based on the obtained third image, the mobile phone 100 can determine the first association relationship between the third person and person B in the same manner as in the first case above, which will not be repeated here. As for the second association relationship between the third person and person A, since person A is the owner of the mobile phone 100, the mobile phone 100 may have stored the contact information of the third person and the avatar of the third person. The mobile phone 100 can determine the first association relationship between the first person and the third person based on the third image, and then search in the mobile phone 100 to find the first application that includes relevant information of the third person C, such as the avatar and / or name of the third person. Assuming that the mobile phone 100 finds relevant information including the third person in the first application, the second association relationship between the third person and the second person is determined based on the description information of the third person in the first application.

[0143] Taking the address book as an example, since the mobile phone 100 knows the facial feature information of the third person through the third image, if the mobile phone 100 determines that the third person's portrait is stored in the address book based on the facial feature information, the second association relationship between the third person and person A can be further determined based on the group and / or notes of the third person in the address book. For example, based on the facial feature information of the third person in the third image, the mobile phone 100 can match the portrait that is consistent with the facial feature information, and the group information and / or notes of the third person are "family", then the second association relationship between person A and the third person can be determined to be "family".

[0144] Taking the mailbox application as an example, the mailbox application may include the portraits and / or names of users such as the sender and recipient. If a third person sends an email to the mobile phone 100 of person A, the mobile phone 100 can query the mailbox application to find the portrait and / or name of the third person. Then, based on the description information of the third person in the mailbox application, such as the notes, group information, and email address information, the second association relationship between the third person and person A is determined. For example, if the mobile phone 100 queries the mailbox application to find the portrait and / or name of the third person, and the description information records the note information of the third person as "colleague", the second association relationship between person A and the third person can be determined as "colleague".

[0145] Taking a calendar application as an example, person A can record an event in the calendar application. The event may include event information about certain people related to person A (e.g., a third person C), such as playing football with friend C on October 1st. Therefore, mobile phone 100 can query the calendar application to find the name of third person C. It can then determine the second relationship between the third person and person A based on the description of the third person in the calendar application. For example, if the description of the third person is "playing football with friend C," mobile phone 100 can extract keywords related to the third person, such as "friend," from the description, and determine that third person C and person A are "friends."

[0146] It should be noted that the above description uses the example of the first application being an address book, email application, or calendar application. In fact, the first application may also be other applications, such as a memo application, and the embodiments of this application do not give examples one by one.

[0147] Case 3: The gallery does not include photos of the third person and the first person, nor does it include photos of the third person and the second person.

[0148] In this case, the mobile phone 100 can identify the scene of the first image. The scene of the first image includes one of a home scene, a party scene, and an office scene. The mobile phone 100 can extract feature information of the first image using a preset neural network model, and determine the scene of the first image based on the environment in which the first person is located in the first image based on the feature information. Feature information such as the sofa, dining table, kitchen utensils, and bed in the first image can be used to determine that the scene is a home scene. Feature information such as the extracted dining room and wine glasses can be used to determine that the scene is a party scene. Feature information such as the extracted desk and printer can be used to determine that the scene is an office scene.

[0149] Mobile phone 100 can also determine the scene of the first image based on the objects held by, attached to, and dressed by person B in the first image. For example, if person B's objects are "chopsticks," "books," "toys," or "remote control," or if their objects are "pillows," "blankets," or if their objects are "casual," the scene of the first image can be considered a family scene. For another example, if person B's objects are "wine glasses," or if their objects are "formal," the scene of the first image can be considered a party scene. For another example, if person B's objects are "keyboards," "computers," or "printers," if their objects are "office chairs," and if their objects are "formal," the scene of the first image can be considered an office scene.

[0150] When there are no photos of person B and other people in the gallery, scene recognition can be performed on the first image to obtain a scene recognition result. Based on the scene recognition result, a search can be performed in the mobile phone 100 to find a first application containing relevant information about the third person C, such as the profile picture and / or name of the third person C. Assuming that the electronic device finds relevant information including the third person C in the first application, the second association relationship between the third person and the second person is determined based on the description information of the third person C in the first application.

[0151] Taking the first application as an address book as an example, assuming that the scene recognition result for the first image is a family scene, the mobile phone 100 can search the address book to see whether there is information about a third person, such as a headshot and / or name. If so, the second association relationship between the third person and the second person is determined based on the description information of the third person (for example, remarks, group information, email address information, etc.). The mobile phone 100 can determine the first contact that matches the scene recognition result from the remarks information in the address book based on the scene recognition result, and determine the first contact as the third person. In other words, by performing scene recognition on the first image, the first person can be associated with the scene in the first image. If the address book of person A indicates that the third person is also associated with the scene, and the address book indicates the first association relationship between the third person and person A, then since person B and the third person are associated with the same scene, the first association relationship between person B and the third person, and the second association relationship between person A and the third person can be determined.

[0152] Taking the first application as an email application as an example, assuming that the scene recognition result for the first image is an office scene, the mobile phone 100 can search the emails exchanged with person A in the email application for information about the third person, such as the third person's profile picture and / or name. If the third person's profile picture and / or name exists in the email application, the second association relationship between the third person and the second person can be determined based on the corresponding descriptive information of the third person (e.g., remarks, group information, email address information, etc.).

[0153] S504 : The mobile phone 100 determines the character relationship between the first character B and the second character A according to the first correlation relationship and the second correlation relationship.

[0154] Mobile phone 100 can determine the relationship between person A and person B based on the first and second association relationships. For example, if the first association relationship between the third person and person B is determined to be "children," and the second association relationship between person A and the third person is "husband and / or wife," then the relationship between person A and person B can be determined to be "family." For another example, if the first association relationship between the third person and person B is determined to be "friends," and the second association relationship between person A and the third person is "friends," then the relationship between person A and person B can be determined to be "friends." For another example, if the first association relationship between the third person and person B is determined to be "colleagues," and the second association relationship between person A and the third person is also "colleagues," then the relationship between person A and person B can be determined to be "colleagues," and so on.

[0155] In the above embodiment, when the mobile phone 100 obtains a first image and the first image includes person B, the relationship between person A (the owner) and person B is determined based on the intermediate person C. In other embodiments, the mobile phone 100 can also determine the relationship between person B and person A based on the image information of the first image. For example, the mobile phone 100 can obtain the shooting time and / or shooting location of the first image, and determine the relationship between person B and person A based on the shooting time and / or shooting location. For example, if the shooting time is October 2014 and the shooting location is XXX University, then the mobile phone 100 can determine that person B is a classmate of person A.

[0156] After obtaining character relationships through the above technical solution, the mobile phone can store the character relationships. For example, please refer to Figure 7, which is a schematic diagram of character relationships provided in one embodiment of the present application. The character relationships involved in this application include family, friends, and colleagues. Family can be further divided into spouse, parents, brothers, sisters, children, etc. With character A as the reference character or central character in the character relationship, that is, character A is the second character in the above solution, multiple levels of character relationships of character A can be derived. For example, with character A as the central character or reference character, first-level character relationships of character A can be derived. The first-level character relationships include characters B, C, and D, where characters B, C, and D can be the third character in the above solution. Character B can be character A's spouse, character C can be character A's parent, and character D can be character A's friend. Based on the first-level character relationships, second-level character relationships of character A can be determined. Second-level character relationships include characters E, F, and G, which have indirect relationships with character A. Characters E, F, and G can be the second character in the above solution. Among them, character E can be the father or mother of character B, character F can be the friend of character B, and character G can be the father or mother of character C. That is to say, according to the solution in the embodiment of the present application, if you want to determine the relationship between character E, character F, character G and second character A, you can find the relationship between the third character B, character C and character D and character E, character F and character G, and indirectly determine the relationship between character E, character F and character G and character A through the third character B, character C and character D.

[0157] After the mobile phone obtains the character relationship, it can apply the character relationship. Some application scenarios are listed below.

[0158] Application scenario 1: Content sharing.

[0159] Taking the example of sharing an image on mobile phone 100, when the mobile phone receives an operation for an image in the gallery application, it may display an interface as shown in Figure 8A. To facilitate quick sharing by the user, the mobile phone may recommend sharing partners in the interface of Figure 8A. For example, as shown in Figure 8A, the mobile phone displays the contact information of sharing partners B, C, and D.

[0160] One possible implementation method is that the mobile phone determines the sharing object based on intimacy. For example, the mobile phone has determined the intimacy between each character and the owner in advance, and can select the character with higher intimacy as the sharing object. For example, the sharing objects in Figure 8A include character B, character C, and character D. Among them, character B, character C, and character D are characters with higher intimacy with the owner. Optionally, a possible way for the mobile phone to determine the intimacy between each character and the owner is that when the mobile phone determines that there are more images of a certain character in the gallery, it can be determined that the intimacy between the character and the owner is higher. Alternatively, when the mobile phone determines that there are more photos of a certain character with the owner in the gallery, it can be determined that the intimacy between the character and the owner is higher. Alternatively, when the mobile phone determines that there are more interactions with a certain character, it can be determined that the intimacy between the character and the owner is higher. In short, the embodiment of the present application does not limit the method of determining intimacy.

[0161] Another possible implementation is that the mobile phone determines the sharing object based on the content of the image to be shared and the relationship between the characters (for example, the relationship between the characters determined by the method described above). For example, in Figure 8A, the image to be shared includes two characters, an adult holding a child. The electronic device can determine through image recognition that the two characters in the image (i.e., the adult and the child) are in a family relationship. Therefore, the mobile phone determines that the sharing object is a character in a family relationship. Therefore, the mobile phone displays the contact information of character B, character C, and character D in the family relationship in the interface of Figure 8A. Taking character B as an example, the contact information of character B includes the contact information of character B in an instant messaging application. The instant messaging application can be "HuiTransfer", "Huawei Share", "AirDrop", "Message", "Mail", etc. in the mobile phone, or it can be a third-party software such as "WeChat", "QQ" in the mobile phone, which is not limited in this embodiment of the application. Alternatively, character A can also upload the image to a group set in the shared album in the cloud, and only users in the group can access the image.

[0162] Optionally, continuing with Figure 8A as an example, after the mobile phone determines that the sharing objects include person B, person C, and person D based on the content and the relationship between the characters in the image to be shared, it can also sort them according to the intimacy between each person and person A (the owner of the phone). As shown in Figure 8A, assuming that person B has the highest intimacy, B's contact information is ranked first, and person D has the lowest intimacy, then D's contact information is ranked last.

[0163] In addition, referring to Figure 8A , the phone also displays the logos of applications such as “AirDrop,” “Messages,” and “Mail.” If the user clicks on the logo of the “Messages” application, the phone can open the interface of the “Messages” application (not shown in the figure), in which sharing objects are recommended to the user, for example, the contact information of Person B, Person C, and Person D.

[0164] As shown in Figure 8B, users can also automatically add the identified person relationships to the content sharing group. For example, a person identified as having a "family" relationship with a second person can be added to the "Family Sharing" group, or a person identified as having a "colleague" relationship with a second person can be added to the "colleague Sharing" group. Alternatively, users can manually add person relationships and view the added person relationships.

[0165] After mobile phone 100 obtains the relationship between person A and person B using the technical solution provided in the embodiments of this application, it can be applied to scenario 1. Mobile phone 100 receives a share operation for a first piece of content. The first piece of content can include images from the user's gallery, as well as text, voice, and other content stored on mobile phone 100. The share operation can include the user clicking, dragging, or selecting content within the mobile phone 100 interface to share. After receiving the user's share operation for the first piece of content, mobile phone 100 determines, based on the first piece of content, that the first piece of content should be shared with the person in the first relationship. The first relationship can refer to a first-level relationship in a multi-level relationship, as shown in FIG7 , or a second-level relationship in a multi-level relationship, and is not specifically limited in this embodiment of the application. For example, if the content the user wants to share is a family photo, the content can be shared with "Family" in the first-level relationship or the second-level relationship. If the content the user wants to share is work-related, the content can be shared with "Colleagues" in the first-level relationship or the second-level relationship. After the user selects the person to share the first piece of content with, mobile phone 100 displays the sharing method for person B. Sharing methods include text messaging, third-party software, uploading to the cloud, etc. The user can select a sharing method from the sharing methods available to person B and send the first content to person B via the sharing method.

[0166] Application scenario 2: Related person settings.

[0167] As shown in Figure 9A, the "Medical Emergency Card" function can ensure that if the user loses consciousness in an accident and the phone is not unlocked, others can view the content by clicking the "Emergency"-"Medical Emergency Card" option. Person A can set personal information in the "Medical Emergency Card" function. For example, Person A can set his or her height, weight, blood type, allergy history (not shown in the figure), special disease conditions (not shown in the figure), organ donor, preferred language and other information. The "Medical Emergency Card" function also has an "Emergency Contact" option. When Person A encounters an accident, he or she can view the contact information of the emergency contact through the "Emergency Contact" option.

[0168] One possible implementation is for the phone to determine emergency contacts based on intimacy. For example, the phone may determine a person with a high intimacy as an emergency contact. The method by which the phone determines the intimacy between each person and the phone owner is described above and will not be repeated here.

[0169] Another possible implementation is that the phone can determine emergency contacts based on character relationships. For example, the phone can obtain character relationships (e.g., family relationships) of character A and add the characters in the character relationships as emergency contacts to the "Emergency Contacts" option, enabling automatic setting of associated persons.

[0170] As shown in Figure 9B, the "family account" is used to bind two accounts, which can be a payment account or other account, and is not limited in this embodiment of the application.

[0171] One possible implementation is to bind the mobile phone to a family account based on intimacy. For example, the mobile phone determines that the account of a person with a high intimacy is a family account.

[0172] Another possible implementation is to bind a family account based on the relationship between characters. For example, if character B is identified as character A's "mother," the phone can search for the identified character B's contact information in the address book and set the contact information as a "family account." Users can set up one or more "family accounts," and this application does not limit this.

[0173] As shown in FIG9C , the mobile phone can automatically set the associated person.

[0174] One possible implementation is that the mobile phone determines the associated persons based on the intimacy. For example, the mobile phone determines the associated persons of a person with a high intimacy.

[0175] Another possible implementation is that the mobile phone can determine the associated person based on the character relationship. For example, in Figure 9C, the mobile phone determines that a contact is an assistant based on the character relationship and can set the "assistant" as the associated person.

[0176] Application scenario three: Do Not Disturb mode setting. As shown in Figure 10, the phone can be set to "Do Not Disturb mode." In Do Not Disturb mode, the phone will ring, vibrate, or receive pop-up notifications only when a contact in the "Contacts" list calls or sends a message to the user. Calls or messages from other contacts will be muted.

[0177] One possible implementation method is that the mobile phone determines contacts with a high degree of intimacy. In the Do Not Disturb mode, when the mobile phone receives calls or messages from these contacts, it can ring, vibrate or pop up a reminder to avoid missing calls from people with a high degree of intimacy.

[0178] Another possible implementation method is that the mobile phone determines contacts based on the relationship between people, such as contacts in family relationships. In the Do Not Disturb mode, when the mobile phone receives calls or messages from these contacts, it can ring, vibrate or pop up reminders to avoid missing calls from family members.

[0179] Application scenario 4: Character relationship identification. The mobile phone 100 can implement the character relationship determination method of the embodiment of the present application through an algorithm model. For the character B in the image in Figure 11 (a), after determining the character relationship (e.g., family relationship) between the first character B and the character A (the owner) through the algorithm model, a probability value can also be output, which is used to indicate the probability that the first character B and the second character A are family members. Optionally, if the probability is low (e.g., less than a threshold), a prompt message is output to prompt the user to determine whether the character relationship between the first character and the second character is correct. For example, as shown in Figure 11 (a), when the mobile phone receives an operation (e.g., a swipe up operation), the mobile phone 100 displays an interface as shown in Figure 11 (b), in which the prompt message "Family?" is output, indicating that the mobile phone recognizes that the first character B and the character A are family members, but the probability is low. The user can manually set the relationship between character B and character A, for example, to a family relationship or other relationship. Of course, if the probability is high (e.g., greater than or equal to the threshold), there is no need to output a prompt.

[0180] Based on the same concept, FIG12 shows an electronic device 1200 provided by the present application. The electronic device 1200 may be the mobile phone mentioned above. As shown in FIG12 , the electronic device 1200 may include: one or more processors 1201; one or more memories 1202; a communication interface 1203, and one or more computer programs 1204. The above-mentioned components may be connected via one or more communication buses 1205. The one or more computer programs 1204 are stored in the above-mentioned memories 1202 and are configured to be executed by the one or more processors 1201. The one or more computer programs 1204 include instructions, and the above-mentioned instructions may be used to execute the relevant steps of the mobile phone in the corresponding embodiment above. The communication interface 1203 is used to realize communication with other devices. For example, the communication interface may be a transceiver.

[0181] In the embodiments provided in the present application above, the method provided in the embodiment of the present application is introduced from the perspective of an electronic device (such as a mobile phone) as the execution subject. In order to implement the various functions in the method provided in the embodiment of the present application above, the electronic device may include a hardware structure and / or a software module, and implement the above functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether a function of the above functions is executed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.

[0182] As used in the above embodiments, the terms “when…” or “after…” may be interpreted to mean “if…” or “after…” or “in response to determining…” or “in response to detecting…”, depending on the context. Similarly, the phrases “upon determining…” or “if (the stated condition or event) is detected” may be interpreted to mean “if determining…” or “in response to determining…” or “upon detecting (the stated condition or event)” or “in response to detecting (the stated condition or event)”, depending on the context. In addition, in the above embodiments, relational terms such as first and second are used to distinguish one entity from another, without limiting any actual relationship or order between these entities.

[0183] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0184] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)). In the absence of conflict, the solutions of the above embodiments can be used in combination.

[0185] Note: A portion of this patent application contains material which is subject to copyright protection. The copyright owner reserves all rights reserved except for copies of the materials in the patent file or patent record in the Patent Office.

Claims

1. A method for determining a character relationship, characterized in that: Applied to electronic equipment, the method comprises: Acquire a first image, wherein the first image includes a first person B, and the first person B is a person whose person relationship is to be determined; Acquire a second image, where the second image includes a second person, and the second person is an owner A of the electronic device; Determine, according to the image in the electronic device, a third person C having a first association relationship with the first person B, and the third person C having a second association relationship with the second person A; According to the first association relationship and the second association relationship, the character relationship between the first character B and the second character A is determined.

2. The method according to claim 1, characterized in that The acquiring of the second image includes at least one of the following: Obtaining a headshot of the owner of the electronic device; or, Get a selfie image in the gallery app; or, The most frequently appearing character images are obtained in the gallery application.

3. The method according to claim 1 or 2, characterized in that: Determining, according to the image in the electronic device, a third person C having a first association relationship with the first person B, includes: Acquire a third image from a gallery of the electronic device, where the third image includes the first person B and the third person C; determining a first association relationship between the first person and the third person according to a distance and / or a posture between the first person and the third person on the third image; Before determining the character relationship between the first character B and the second character A according to the first association relationship and the second association relationship, the method further includes: Acquire a fourth image in a gallery of the electronic device, wherein the fourth image includes the third person C and the second person A; A second association relationship between the third person and the second person is determined according to the distance and / or posture between the third person and the second person in the fourth image.

4. The method according to claim 1 or 2, characterized in that: Determining, according to the image in the electronic device, a third person C having a first association relationship with the first person B, includes: Acquire a third image from a gallery of the electronic device, where the third image includes the first person B and the third person C; determining a first association relationship between the first person and the third person according to a distance and / or a posture between the first person and the third person on the third image; Before determining the character relationship between the first character B and the second character A according to the first association relationship and the second association relationship, the method further includes: Determining that relevant information of the third person C exists in the first application in the electronic device; A second association relationship between the third character C and the second character A is determined according to the description information of the third character C in the first application.

5. The method according to claim 1 or 2, characterized in that: Determining a third person C having a first association relationship with the first person B includes: Identifying a scene of the first image, where the scene includes one of a family scene, a party scene, and an office scene; According to the scene recognition result, determining that description information of a third person C exists in the first application in the electronic device, and the description information matches the scene recognition result; Before determining the character relationship between the first character B and the second character A according to the first association relationship and the second association relationship, the method further includes: According to the description information, a first association relationship between the first character and the third character, and a second association relationship between the second character and the third character are determined.

6. The method according to claim 1, characterized in that The step of determining, according to the image in the electronic device, a third person C having a first association relationship with the first person B includes: Acquire a first image, wherein the first image includes the third person C; A first association relationship between the third person C and the first person is determined according to the shooting time and / or shooting location of the first image.

7. The method according to claim 1, characterized in that The method further comprises: Indeed, the first intimacy between the first character and the second character, the second intimacy between the first character and the third character, and the third intimacy between the second character and the third character.

8. The method according to claim 1, characterized in that The character relationship between the first character and the second character is a first character relationship, and the method further includes: Determining a probability that the first person and the second person belong to a relationship with the first person; When it is determined that the probability is less than a threshold, a prompt message is output, where the prompt message is used to prompt that the probability that the first character and the second character belong to the first character relationship is low.

9. The method according to claim 8, characterized in that The method further comprises: A user operation is received, where the user operation is used to determine a character relationship between the first character and the second character.

10. The method according to claim 5, characterized in that Identifying a scene of the first image, comprising: The scene of the first image is identified by at least one of the objects held by the first person, attachments, clothing, and environment in which the first person is located in the first image.

11. The method according to any one of claims 1 to 10, characterized in that The character relationship between the first character B and the second character A is a first character relationship, and the method further includes: Receiving a sharing operation for the first content; Determine, according to the first content, to share the first content with a person in the first person relationship; The sharing method of the first person is displayed, where the sharing method is used to share the first content with the first person.

12. The method according to claim 11, characterized in that The first content includes content related to the fourth character in the first character relationship, but does not include content related to the first character B.

13. The method according to any one of claims 1 to 12, characterized in that The character relationship between the first character B and the second character A is a first character relationship, and the method further includes: According to user operation, the do not disturb mode is set, and new messages from people other than the first person relationship are not responded to in the do not disturb mode.

14. The method according to any one of claims 1 to 13, characterized in that The character relationship between the first character B and the second character A is a first character relationship, and the method further includes: According to the user operation, the emergency contact in the first application is set as the person in the first person relationship; In response to the emergency contact operation, the first person B is contacted.

15. An electronic device, characterized in that: include: Display screen; one or more processors; Memory; one or more programs; The one or more programs are stored in the memory, and the one or more programs include instructions, which, when executed by the electronic device, enable the electronic device to perform the method steps as described in any one of claims 1 to 14.

16. A computer-readable storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method as claimed in any one of claims 1 to 14.

17. A computer program product, characterized in that The method comprises a computer program or an instruction, and when the computer program or the instruction is executed by a processor, the method according to any one of claims 1 to 14 is implemented.

Citation Information

Patent Citations

  • Interpersonal relationship calculation method and interpersonal relationship calculation device

    CN106548405A

  • Method and device used for pushing information

    CN108509611A

  • Method, device and apparatus for generating picture title based on social network

    CN109388765A

  • Discovering social relationships from personal photo collections

    US20090192967A1

  • System and method for identifying relationships in a data graph

    US20160048517A1