Calling method and related apparatus

By automatically acquiring and storing the country code of a phone number in electronic devices, the problem of users failing to dial domestic phone numbers after going abroad has been solved, enabling successful cross-border calls.

WO2026056830A1PCT designated stage Publication Date: 2026-03-19HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-09-08
Publication Date
2026-03-19

AI Technical Summary

Technical Problem

When users go abroad and use electronic devices to dial domestic phone numbers, they may experience dialing failures because they have not added the country code.

Method used

After an electronic device successfully makes a domestic phone call, it automatically obtains and stores the country code of that phone number, and adds the country code as needed to ensure the success of subsequent calls.

Benefits of technology

This ensures that users can successfully call domestic phone numbers both domestically and internationally, reducing dialing failures caused by the lack of a country code and improving call success rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025119890_19032026_PF_FP_ABST
    Figure CN2025119890_19032026_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses a calling method and a related apparatus. In the method, upon successfully calling a telephone number, an electronic device may determine a country code of the telephone number, and store the country code, wherein the country code of the telephone number is a country code of a country where the electronic device is located when making a successful call. Then, when the electronic device calls the telephone number again, the electronic device may make a successful call by adding the stored country code before the telephone number. In this way, an electronic device successfully calls a certain telephone number in the home country, and once a user travels abroad, the electronic device still can successfully call the telephone number again.
Need to check novelty before this filing date? Find Prior Art

Description

Method of calling and related apparatus

[0001] The present application claims priority to the Chinese patent application No. 202411266547.6, filed on September 10, 2024, and entitled "Method of calling and related apparatus", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application relates to the field of communication, and in particular, to a method of calling and related apparatus. BACKGROUND

[0003] A user can use an electronic device to dial a domestic phone number in the domestic country. However, after the user goes abroad, the electronic device may fail to dial the domestic phone number. How to enable the user to successfully dial the domestic phone number using the electronic device abroad is a problem to be solved in the field. SUMMARY

[0004] The present application provides a method of calling and related apparatus, which can obtain the country code of a phone number, and avoid dialing failure due to the absence of the country code when the user dials a domestic phone number after going abroad.

[0005] In a first aspect, the present application provides a method of calling, characterized in that the method is applied to a first electronic device, and the method comprises: in a case where the first electronic device is located in a first country, the first electronic device calls a first number, the first number comprising a first phone number and not comprising a country code; after the calling succeeds, the first electronic device stores a country code of the first country as a country code of the first phone number.

[0006] Implementing the above method, the electronic device can successfully obtain the country code of the first phone number, so as to successfully call the first phone number again subsequently.

[0007] In combination with the first aspect, in some implementations, after the first electronic device determines that the country code of the first phone number is the country code of the first country, the method further comprises: the first electronic device receives a first operation, the first operation comprising: an operation of inputting the first phone number in a dial pad and dialing, or an operation of dialing a number of a first contact, the number of the first contact being the first phone number, or an operation of selecting the first phone number in a call record and dialing; the first electronic device calls a second number, the second number comprising the country code of the first phone number and the first phone number.

[0008] In this way, the first phone number can be called successfully regardless of the country where the electronic device is located when receiving the first operation, and the power consumption of the electronic device in determining whether the country codes are consistent can be reduced.

[0009] With reference to the first aspect, in some implementations, after the first electronic device determines that the country code of the first phone number is the country code of the first country, the method further includes: in a case where the first electronic device is located in a second country, the first electronic device receives a first operation, the first operation including: an operation of inputting the first phone number in a dial pad and dialing, or an operation of dialing a number of a first contact, the number of the first contact being the first phone number, or an operation of selecting the first phone number in a call log and dialing; the first electronic device calls a second number, the second number including the country code of the first phone number and the first phone number.

[0010] In this way, the electronic device can call the second number successfully in a case where the country code of the country where the electronic device is located is inconsistent with the country code of the first phone number after the country code of the first phone number is stored.

[0011] With reference to the first aspect, in some implementations, before the first electronic device calls the second number, the method further includes: the first electronic device determines, based on a public land mobile network, that the first electronic device is located in the second country; and the first electronic device determines that the country code of the second country where the first electronic device is located is inconsistent with the country code of the first phone number. In some implementations, the electronic device can also determine that the first electronic device is located in the second country by other manners.

[0012] With reference to the first aspect, in some implementations, the first operation includes: an operation of inputting the first phone number in a dial pad and dialing, or an operation of selecting the first phone number in a call log and dialing, and after the operation, the method further includes: during calling the second number, the first electronic device displays a first call interface, the first call interface including: the first phone number, the country code of the first phone number. In this way, the electronic device can display a call interface including only a phone number when calling the first number, and display a call interface including a phone number and a country code when calling the second number, which can reduce the situation that the user considers the call interface to be redundant to a certain extent.

[0013] With reference to the first aspect, in some implementations, before the first electronic device calls the first number, the method further includes: the first electronic device determines, based on a public land mobile network, that the first electronic device is located in the first country; and the first electronic device obtains the country code of the first country based on the first country. In some implementations, the electronic device can also determine that the first electronic device is located in the first country by other manners.

[0014] With reference to the first aspect, in some implementations, after the first electronic device determines that the country code of the first phone number is the country code of the first country, the method further includes: in a case that the first electronic device is located in the first country, the first electronic device receives a third operation, the third operation including: an operation of inputting the first phone number in a dial pad and dialing, or an operation of dialing a number of a first contact, the number of the first contact being the first phone number, or an operation of selecting the first phone number in a communication record and dialing; and the first electronic device calls the first number.

[0015] In this way, the electronic device can call the first number successfully in a case that the country code of the country where the electronic device is located is consistent with the country code of the first phone number after the country code of the first phone number is stored.

[0016] With reference to the first aspect, in some implementations, after the first electronic device determines that the country code of the first phone number is the country code of the first country, the method further includes: the first electronic device displays a first interface for creating a new contact, the first interface including: a name of the first contact input by a user, the first phone number and the country code of the first phone number filled by the first electronic device. The first electronic device stores the name of the first contact, the first phone number, and the country code of the first phone number.

[0017] In this way, the electronic device can create the first contact after determining the country code of the first phone number, and the electronic device can automatically fill the country code of the first phone number in the process of creating the first contact.

[0018] With reference to the first aspect, in some implementations, before the first electronic device calls the first number, the method further includes: the first electronic device displays a second interface for creating a new contact, the second interface including: a name of the first contact input by a user, and the first phone number; the first electronic device stores the name of the first contact and the first phone number; and after the first electronic device determines that the country code of the first phone number is the country code of the first country, the method further includes: the first electronic device stores the name of the first contact, the first phone number, and the country code of the first phone number.

[0019] In this way, the electronic device can create the first contact before determining the country code of the first phone number. The electronic device can automatically fill the country code of the first phone number after determining the country code of the first phone number.

[0020] With reference to the first aspect, in some implementations, after the first electronic device stores the name of the first contact, the first phone number, and the country code of the first phone number, the method further includes: the first electronic device receiving a second operation; and the first electronic device modifying or deleting the country code of the first phone number in response to the second operation.

[0021] In this way, the user can modify the country code of the first phone number when the country code obtained by the electronic device does not meet the user's intention.

[0022] With reference to the first aspect, in some implementations, before the first electronic device determines that the country code of the first phone number is the country code of the first country, the method further includes: the first electronic device maintaining a call with the electronic device having the first phone number for a duration exceeding a first threshold. In this way, when the duration of maintaining the call between the electronic device and the device having the first phone number exceeds the preset threshold, the device having the first phone number can be considered as the target device dialed by the user using the electronic device, thereby increasing the reliability of determining the country code of the first phone number.

[0023] With reference to the first aspect, in some implementations, the first number does not include a country prefix, and the second number includes the country prefix. In some implementations, after determining that the country code of the first phone number is the country code of the first country, the electronic device can store the country code of the first country. Further, since the country code needs to be used together with the country prefix in use, the electronic device can also store the country prefix together with the country code of the first country in the electronic device.

[0024] The second aspect provides an electronic device, which includes a memory, a processor, and computer instructions stored in the memory. The processor executes the computer program to implement the method of the first aspect or any of the implementations of the first aspect.

[0025] The third aspect provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the method of the first aspect or any of the implementations of the first aspect.

[0026] The fourth aspect provides a computer program product, which includes computer instructions. When the computer instructions are executed by a processor, the method of the first aspect or any of the implementations of the first aspect is implemented.

[0027] The advantages of the second aspect to the fourth aspect can refer to the advantages of the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0028] FIG. 1 is a flowchart of a method for calling according to an embodiment of the present application;

[0029] FIGS. 2A-2C are a set of user interfaces before calling a phone number according to an embodiment of the present application;

[0030] FIGS. 3A-3C are a set of user interfaces provided by a contacts application according to an embodiment of the present application;

[0031] FIGS. 4A-4B are another set of user interfaces before calling a phone number according to an embodiment of the present application;

[0032] FIGS. 5A-5B are a set of user interfaces during calling a phone number according to an embodiment of the present application;

[0033] FIG. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application;

[0034] FIG. 7 is a schematic diagram of a software structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

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

[0036] Hereinafter, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" is two or more than two.

[0037] Some terms related to the embodiments of the present application will be introduced below.

[0038] A telephone number refers to a number set by a telephone management department for an electronic device (e.g., a mobile phone), which can be used by the electronic device to call other electronic devices. An electronic device that initiates a call can be referred to as a calling device, and an electronic device that receives a call can be referred to as a called device. The number of digits of a telephone number used in different countries can or can not be consistent. For example, a telephone number used in China is 11 digits, in which the first 3 digits are a network identification number, used to identify the operator to which the user belongs, for example, the network identification number of China Mobile includes 136, 137, etc., and the network identification number of China Telecom includes 133, 180, etc. The 4th-7th digits are an area code, used to indicate the user's home location; and the 8th-11th digits are a user number, randomly assigned to each user.

[0039] A country code refers to a unique digital code used to identify a target country when dialing a telephone number to a foreign country, which is added before the telephone number. The country code can be understood as an international long-distance telephone area code, also known as a country code or a country number. Each country or region has its own specific country code, for example, the country code of China is "86", the country code of the United States is "1", and the country code of the United Kingdom is "44".

[0040] A country prefix refers to a group of digits or symbols added before the international code when dialing a telephone number to a foreign country. The country prefix is used to inform the telephone communication network that the number of this call is an international number. For example, the country prefix can include "+" and "00".

[0041] A roaming area refers to an area in which a user uses a mobile phone service of an electronic device in other countries and regions outside the home operator network. A non-roaming area refers to an area in which a user uses a mobile phone service of an electronic device in the home operator network. The non-roaming area is also referred to as a home location. For example, the operator of telephone number A is China Mobile, and the China Mobile network covers China, so other countries and regions outside China are the roaming area of telephone number A, and China is the non-roaming area of telephone number A.

[0042] A local number refers to a telephone number used in a home operator network. For example, a local number in China can refer to a telephone number used in China, but not necessarily a telephone number registered in China.

[0043] A domestic number refers to a telephone number registered and used in a country. For example, a domestic number in China can refer to a telephone number of China Mobile, China Telecom, and China Unicom used in China.

[0044] In some implementations, the following situations can be successfully called by an electronic device:

[0045] 1. When the electronic device dials a domestic number in a non-roaming area, the country prefix and country code are not added before the domestic number. For example, an electronic device with a China Mobile phone number A in China dials a phone number B registered and used in China without adding the country prefix "00" or "+" and the country code "86" before the phone number B, and the call is successful.

[0046] Optionally, when the electronic device dials a domestic number in a non-roaming area, the call can be successful after adding the country prefix and country code before the domestic number.

[0047] 2. When the electronic device dials a local number in a roaming area, the country prefix and country code are not added before the local number. For example, an electronic device with a China Mobile phone number A in country B dials a phone number B used in country B without adding the country prefix "00" or "+" and the country code of country B before the phone number B, and the call is successful. Country B refers to a country or region other than China.

[0048] Optionally, when the electronic device dials a local number in a roaming area, the call can be successful after adding the country prefix and country code before the local number.

[0049] 3. When the electronic device dials a phone number used in a foreign country in a non-roaming area or a roaming area, the country prefix and the country code of the corresponding country are added before the phone number. For example, an electronic device with a China Mobile phone number A in China or in country B dials a phone number B used in country C, and the call is successful only after adding the country prefix "00" or "+" and the country code of country C before the phone number B.

[0050] If the electronic device dials a phone number used in a foreign country in a non-roaming area or a roaming area without adding the country prefix and the country code of the corresponding country before the phone number, the call fails.

[0051] Based on the above, an electronic device in country A does not need to add the country prefix and the country code of the home country when dialing a phone number used in country A. That is, when the electronic device calls a phone number, it defaults to calling a phone number used in the country where the electronic device is currently located.

[0052] An electronic device in country A needs to add the country prefix and the country code of the corresponding country when dialing a phone number used in country B. This is because, based on the characteristics of the phone number alone, it is impossible to determine which country the phone number belongs to, and the country code must be added to determine the specific country where the phone number is used, so that the call can be successful.

[0053] In some implementations, there is a scenario that the electronic device successfully calls a phone number in a country, and then the electronic device fails to call the phone number again after the user goes abroad, which brings a bad experience to the user and makes the user doubt whether the user has made a mistake in remembering the phone number. The reasons for the call failure include that the electronic device does not add a country prefix and a country code when calling the phone number in a foreign country. This is because the user only uses the phone number when successfully calling a phone number in a country, which makes the electronic device only obtain the phone number and does not obtain the country code of the phone number, and then the electronic device only saves the phone number and does not save the country prefix and the country code. Therefore, when the electronic device calls again using the phone number, the electronic device does not add the country prefix and the country code before the phone number, and thus the call fails.

[0054] To reduce the occurrence of the above problem, an embodiment of the present application provides a calling method. In the method, the electronic device successfully calls a phone number, which indicates that the calling device and the called device are in the same country, for example, country A. At this time, the calling device can determine the country code of country A as the country code of the phone number. Then, if the calling device calls the phone number again after moving to country B, the calling device actively adds the country prefix and the country code before the phone number. If the called device is still in country A, the call can be successful.

[0055] In this way, the electronic device successfully calls a phone number in country A, and then the electronic device can still successfully call the phone number again after the user goes abroad.

[0056] The following describes a calling method provided by an embodiment of the present application.

[0057] FIG. 1 exemplarily shows a calling method flowchart provided by an embodiment of the present application. The method includes the following steps.

[0058] S101, in a case where the electronic device is located in a first country, the electronic device calls a first number, the first number including a first phone number and not including a country prefix and a country code.

[0059] The first country can refer to any country that provides communication services.

[0060] In some implementations, the electronic device can call the first number in the following ways: the electronic device can receive an operation of inputting and dialing the first number through a dial pad, and call the first number. The electronic device can also receive an operation of selecting a contact to which the first number belongs and dialing, and call the first number. The electronic device can also receive an operation of selecting the first number in a call log and dialing.

[0061] The first number can be input by the user to the electronic device when S101 is performed, can be stored in the address book of the electronic device before S101 is performed, or can be stored in the call record of the electronic device before S101 is performed.

[0062] In a possible implementation, the electronic device can store the first number in the address book by copying the contact information to which the first number belongs in another electronic device.

[0063] If the electronic device successfully calls the first number, S102 is performed.

[0064] If the electronic device fails to call the first number, it is indicated that the first number is not used in the first country, and the electronic device cannot know in which country the first number is used, and the process is ended.

[0065] Optionally, before S101 is performed, the electronic device has called the first number, but the call fails. In this case, the first number can be stored in the call record, but the country code of the first number is not stored in the electronic device because the call fails.

[0066] An example is shown in a user interface 200 of FIG. 2A. The user interface 200 is a user interface of a dialing function provided by a call application. The user interface 200 includes a dial pad 201, an input box 202, and a call control 203. The electronic device can receive an operation of inputting a first number, for example, a telephone number "12311111111" displayed in the input box 202, by the user through the dial pad 201, and calling the first number by clicking the call control 203 when the user interface 200 is displayed.

[0067] An example is shown in a user interface 210 of FIG. 2B. The user interface 210 is a user interface of contact-related information provided by a contact application. The user interface 210 includes a contact name 211, a contact number 212, and a call control 213. The electronic device can receive an operation of calling the first number, for example, a telephone number "12311111111" displayed in the contact number 212, by clicking the call control 213 when the user interface 210 is displayed.

[0068] An example is shown in a user interface 220 of FIG. 2C. The user interface 220 is a user interface of a call record provided by a call application. The user interface 220 includes a call record box 221. The call record box 221 includes a telephone number, a call date, and a call status. The electronic device can receive an operation of calling the first number, for example, a telephone number "12311111111" displayed in the call record box 221, by clicking the call record box 221 when the user interface 220 is displayed.

[0069] It is worth noting that the user interface before the electronic device calls the first number does not contain the country code of the first telephone number and the country prefix.

[0070] In the embodiments of the present application, the user interface presented before the electronic device calls the first number is only illustrative, and there can be more or less user interfaces. For example, the electronic device can call the first number in response to a voice instruction when displaying any user interface, and this is not limited.

[0071] S102, after the call is successful, the electronic device determines and stores the country code of the first telephone number as the country code of the first country.

[0072] The electronic device successfully calls the first number, that is, the electronic device successfully calls the first telephone number without adding the country prefix and the country code, which indicates that the electronic device is in the same country as the device with the first telephone number. In some ways, the electronic device performs S102 after performing S101. After successfully calling the first number, the electronic device can determine that the country code of the first telephone number is the country code of the first country.

[0073] Specifically, the electronic device can determine the country in which the electronic device is located when the call is successful based on a public land mobile network (PLMN). That is, the electronic device can determine that the electronic device is in the first country based on the PLMN. The PLMN is provided by the network currently used by the electronic device, and each PLMN includes a unique mobile country code (MCC) and a mobile network code (MNC). Each country's mobile communication network has a unique MCC, which consists of 3 digits. For example, the MCC of China is 460. In the embodiments of the present application, the above-mentioned manner of obtaining the country code of the first country is only illustrative, and the electronic device can also obtain the country code of the first country by other manners, such as GPS, and the like, which are not limited.

[0074] In some implementations, after determining that the country code of the first telephone number is the country code of the first country, the electronic device can store the country code of the first country. Further, since the country code needs to be used together with the country prefix in the process of use, the electronic device can also store the country prefix together with the country code of the first country in the electronic device.

[0075] In some implementations, call success can mean that the electronic device establishes a communication connection with the device having the first telephone number. The user can use the electronic device to talk to the user using the device having the first telephone number.

[0076] Further, before determining and storing the country code of the first phone number as the country code of the first country, the electronic device also needs to satisfy that the duration of the electronic device maintaining the call with the device having the first phone number exceeds a preset threshold. For example, more than 30 seconds. Illustratively, the user wants to call a phone number A in Germany, but there can be a device a in China that also registers and uses the phone number A. If the electronic device directly calls the phone number A without adding the country prefix and the country code, it will be connected to the device a in China using the phone number A. Obviously, the device a is not the target device of the user, and the call will be ended immediately after being connected. At this time, the duration of the call is short and does not exceed the preset threshold. The electronic device can consider that the call to the phone number A is unsuccessful, and will not determine the country code of the phone number A as the country code of China. Therefore, the duration of the electronic device maintaining the call with the device having the first phone number exceeding the preset threshold can be considered as the device having the first phone number being the target device of the user using the electronic device to dial, so as to increase the reliability of determining the country code of the first phone number.

[0077] In a possible implementation, if the first number is stored in the address book before S101 is performed, the electronic device needs to determine whether the electronic device stores the country code of the first phone number and / or whether the user processes the country code of the first phone number, such as modifying, adding, deleting and the like, before S102 is performed.

[0078] In some embodiments, if the electronic device stores the first phone number but does not store the country code of the first phone number in the address book, and the user does not process the country code of the first phone number, S102 can be performed before S102 is performed. In this case, the user can not know the country code of the first phone number or can not think of storing the country code of the first phone number in the electronic device. Therefore, after the call is successful, the electronic device can obtain and store the country code of the first number.

[0079] In another embodiment, before S102 is performed, if the electronic device stores the first phone number but does not store the country code of the first phone number in the address book, and the user has processed the country code of the first phone number, S102 can be performed or not. This is because, in this case, the electronic device can have stored the country code of the first phone number, and the user considers that the stored country code of the first phone number is incorrect and deletes the country code, so that the electronic device currently does not store the country code of the first phone number. Therefore, the electronic device can obtain the country code of the first phone number considered correct by the user by performing S102, or can not perform S102, and wait for the user to subsequently actively add the country code of the first phone number.

[0080] In some embodiments, before S102 is performed, if the electronic device stores the first phone number and the country code of the first phone number in the address book, S102 is not performed. This is because, in this case, the electronic device stores the country code of the first phone number that the user considers correct, and thus the user does not process the country code. Alternatively, the country code of the first phone number that the electronic device stores can be added by the user, and the user considers that the country code of the first phone number that the user adds is correct. Therefore, the electronic device does not need to obtain the country code of the first phone number again.

[0081] It is worth noting that in the embodiments of the present application, the country code of the first phone number and the first phone number are stored in the electronic device respectively, so that the electronic device directly reads the country code without the need to confirm which numbers are country codes and which numbers are phone numbers.

[0082] In addition, in the embodiments of the present application, the electronic device can store the country code together with the country code.

[0083] In some implementations, after S102 is performed, the electronic device can store the first phone number and the country code of the first phone number. Based on different scenarios, the electronic device can implement the following storage conditions:

[0084] Storage condition 1: If the electronic device does not store the first phone number and the country code of the first phone number in the address book before S101 is performed, after S102 is performed, the electronic device can store the first phone number and the country code of the first phone number in the address book in response to the user's operation of creating a new contact. For example, referring to the user interface 230 shown in FIG. 3A, the user interface 230 is a user interface for creating a new contact based on the first number after successfully calling the first number. The user interface 230 includes: a contact name 231, a country code of a phone number 232, and a phone number 233. The name displayed in the contact name 231, for example, "Xiaoming", is input by the user. The country code displayed in the country code of the phone number 232, for example, "+86", and the phone number displayed in the phone number 233, for example, "12311111111", are automatically filled by the electronic device.

[0085] Storage condition 2: Before S101 is performed, the electronic device does not store the first phone number and the country code of the first phone number in the address book. After S102 is performed, if the electronic device does not receive the user's operation of creating a new contact, the electronic device only stores the first phone number and the country code of the first phone number in the call log.

[0086] Storage case 3: If the first phone number is stored in the address book of the electronic device before S101 is performed, after S102 is performed, the electronic device can automatically store the country code of the first phone number in the address book, and can also store the first phone number and the country code of the first phone number in the call log. For example, referring to the user interface 240 shown in FIG. 3B, the user interface 240 is a user interface for viewing a contact to which the first phone number belongs after a call to the first number is successful. The user interface 240 includes: a contact name 241, a contact number 242, a call control 243, and a call log 244. The contact number 242 includes: a country prefix, for example, “+”, a country code of the first phone number, for example, “86”, and the first phone number, for example, “12311111111”. The name contained in the contact name 241 and the first phone number contained in the contact number 242 are input by the user and stored in the electronic device before S101 is performed. The country prefix and the country code contained in the contact number 242 are determined by the electronic device and added in the contact number 242 by the electronic device after S102 is performed. The call log 244 is used to indicate the date, time, and call duration of the call to the first phone number in S102.

[0087] In some implementations, after the first phone number and the country code of the first phone number are stored in the call log, when the electronic device enters a related interface of the call log to view the call log in S102, the number displayed in the call log can include the country code of the first phone number, or can not include the country code of the first phone number. That is, after the electronic device stores the country code of the first phone number in the call log, the electronic device can present the country code of the first phone number to the user, or can not present the country code of the first phone number to the user.

[0088] It is worth noting that the storage in the call log is different from the storage in the address book. The contents stored are different: the former includes: a country prefix, a phone number, a country code, and a call time; and the latter includes: a contact name, a country prefix, a phone number, and a country code. The storage locations are different: the former is located in a database of the call log, and the latter is located in a database of the address book. The storage invalidations are different: in the case of non-user operation deletion, the former is deleted by the electronic device after a certain time, and the latter is always stored in the electronic device. The storage effects are different: the former can ensure that the electronic device successfully selects and dials a phone number from the call log and from the dialer, and the latter can ensure that the electronic device successfully selects and dials a phone number from the contact.

[0089] In a possible implementation, after S102 is performed, the electronic device stores the first phone number and the country code of the first phone number in the address book. The electronic device can modify the country code of the first phone number stored in the address book in response to a user operation. And the electronic device makes a relevant judgment based on the modified country code of the first phone number subsequently.

[0090] For example, a user wants to call a phone number A in Germany, but there can be a device a in China that also registers and uses the phone number A. If the electronic device in China directly calls the phone number A without adding the country code and the country code, the device a in China using the phone number A will be connected. If the call duration exceeds a preset threshold, the electronic device will confirm the country code of the phone number A as the country code of China and store it in the address book. Apparently, the country code of the phone number A stored in the address book is incorrect in the user's cognition, and the user can modify the country code of the phone number A stored in the address book to the country code of Germany. Subsequently, the electronic device calls the phone number A again based on whether the country currently located by the electronic device is Germany to determine whether the country code of Germany needs to be added when calling the phone number A. If the country currently located by the electronic device is Germany, the country code of Germany does not need to be added when calling the phone number A. If the country currently located by the electronic device is not Germany, the country code of Germany needs to be added when calling the phone number A.

[0091] For example, referring to the user interface 250 described in FIG. 3C, the user interface 250 is a user interface for editing a contact to which the first phone number belongs after the first number is successfully called. The user interface 250 includes a contact name 251, a country code of a phone number 252, and a phone number 253. The electronic device can modify, delete, or add the country code displayed in the country code of the phone number 252 in the user interface 250. And after the modification, the electronic device can store the modified country code of the first phone number.

[0092] S103, the electronic device receives a user operation, which is an operation of inputting or selecting the first phone number and then dialing the first phone number.

[0093] In some implementations, after S102 is performed, the electronic device can perform S103. After determining and storing the country code of the first phone number as the country code of the first country, the electronic device can receive a user operation.

[0094] The user operation can include any one of the following: an operation of inputting the first phone number in a dial pad and dialing, or an operation of selecting a contact to which the first phone number belongs and dialing, or an operation of selecting the first phone number in a call log and dialing. In the embodiments of the present application, the user operation is only illustrative, and can include more operations for indicating that the user wants to dial the first number.

[0095] The time of dialing the first number in S101 can be, for example, “9:00 on August 21, 2024”, and the call time can be, for example, “1 minute”.

[0096] Referring to the user interface 260 shown in FIG. 4A, the user interface 260 is a user interface of a dialing function provided by the call application. The user interface 260 includes a dial pad 261, an input box 262, and a call control 263. The electronic device can receive an operation of the user inputting a first number, for example, a phone number “12311111111” displayed in the input box 262, and then clicking the call control 263 when displaying the user interface 260. Before clicking the call control 263, the electronic device can also display a call record of calling the first number in S101 in the user interface 260. Optionally, if the first phone number is stored in the address book, the call record of calling the first number in S101 displayed in the user interface 260 can also include the name of the contact to which the first phone number belongs.

[0097] Referring to the user interface 240 shown in FIG. 3B, the user interface 240 is a user interface for viewing a contact to which the first phone number belongs after successfully calling the first number. The electronic device can receive an operation of the user clicking the call control 243 when displaying the user interface 240.

[0098] Referring to the user interface 270 shown in FIG. 4B, the user interface 270 is a user interface of a call record provided by the call application. The user interface 270 includes a call record box 271. The call record box 271 is used to indicate a call record of successfully calling the first number in S101. The electronic device can receive an operation of the user clicking the call record box 271 when displaying the user interface 270.

[0099] In some implementations, after the electronic device performs S103, the electronic device can perform S104. After the electronic device receives the user operation described above, the electronic device can directly call the second number without determining whether the country code of the country where the electronic device is currently located is consistent with the country code of the first telephone number. In this way, the electronic device can successfully call the first telephone number regardless of the country where the electronic device is located when performing S103, and the power consumption of the electronic device for determining whether the country codes are consistent can be reduced.

[0100] S104, the electronic device calls the second number, the second number including the country code of the first telephone number and the first telephone number.

[0101] In some implementations, after the electronic device performs S103, the electronic device can perform S104. After the electronic device receives the user operation described above, the electronic device can directly call the second number without determining whether the country code of the country where the electronic device is currently located is consistent with the country code of the first telephone number. In this way, the electronic device can successfully call the first telephone number regardless of the country where the electronic device is located when performing S103, and the power consumption of the electronic device for determining whether the country codes are consistent can be reduced.

[0102] In some implementations, the second number can include the country code of the first telephone number and the first telephone number. Further, the second number can also include a country prefix code.

[0103] In a possible implementation, to avoid the situation that a user considers that the call interface always displays the country code and the telephone number redundantly when the user views the call interface, the electronic device can also perform the following optional S105, S106, and S107 after performing S103.

[0104] S105, the electronic device determines whether the country code of the country where the electronic device is currently located is consistent with the country code of the first telephone number.

[0105] In some implementations, the electronic device can determine whether the country code of the country where the electronic device is currently located is consistent with the country code of the first telephone number based on the positioning of the electronic device or the country code of the country where the electronic device is currently located.

[0106] Specifically, after the electronic device determines the country code of the telephone number that the user desires to dial according to the user operation of S103 and the stored information, that is, after the electronic device determines the country code of the first telephone number, it can be determined whether the country code of the country where the electronic device is currently located corresponds to the country code of the first telephone number.

[0107] Specifically, the electronic device can determine the country where the electronic device is currently located based on the PLMN, and then determine the country code of the country where the electronic device is currently located. For details, reference can be made to the related description in S102 above, which will not be repeated here.

[0108] If the country code of the country where the electronic device is currently located corresponds to the country code of the first telephone number, S106 is performed.

[0109] If the country code of the country where the electronic device is currently located does not correspond to the country code of the first telephone number, S107 is performed.

[0110] S106, the electronic device calls the first number.

[0111] In some implementations, in the case where it is determined that the country code of the country where the electronic device is currently located corresponds to the country code of the first telephone number, it means that the country where the electronic device is currently located corresponds to the country corresponding to the country code of the first telephone number, and the electronic device can successfully call the first telephone number without adding the country code of the first telephone number. Therefore, in this case, the electronic device can directly call the first number, that is, call the first telephone number.

[0112] In one possible implementation, after the electronic device calls the first number, a call interface can be displayed. The call interface includes the first telephone number and does not include the country code of the first telephone number.

[0113] For example, referring to the user interface 280 shown in FIG. 5A, the user interface 280 is a user interface of a call function provided by a call application. The user interface 280 includes a telephone number 281. The telephone number 281 includes the first telephone number dialed by the electronic device, for example, "12311111111", and does not include the country code of the first telephone number.

[0114] S107, the electronic device calls the second number, which includes the country code of the first telephone number and the first telephone number.

[0115] In some implementations, in a case where it is determined that the country code of the country where the current electronic device is located is inconsistent with the country code of the first phone number, it is indicated that the country where the electronic device is currently located is inconsistent with the country corresponding to the country code of the first phone number, and the electronic device needs to add the country code of the first phone number to successfully call the first phone number. Therefore, in this case, the electronic device can call the second number.

[0116] In some implementations, the second number can include the country code of the first phone number and the first phone number. Further, the second number can also include the country prefix code.

[0117] In a possible implementation, after the electronic device calls the second number, a call interface can be displayed. The call interface includes the country code of the first phone number and the first phone number. Further, the call interface can also include the country prefix code.

[0118] For example, referring to the user interface 290 shown in FIG. 5B, the user interface 290 is a user interface of a call function provided by a call application. The user interface 290 includes a phone number 291. The phone number 291 includes a country prefix code, for example, “+”, a country code of a first phone number dialed by the electronic device, for example, “86”, and the first phone number dialed by the electronic device, for example, “12311111111”.

[0119] In some implementations, if the device with the first phone number does not move to other countries, the electronic device can call the second number to be successful.

[0120] In this way, the electronic device can display a call interface including only a phone number when performing S106 described above, and display a call interface including a phone number and a country code when performing S107 described above, to a certain extent, reducing the situation where the user considers the call interface to be redundant.

[0121] Implementing the above method can avoid the situation where the dialing fails due to the absence of a country prefix code and a country code in a case where the user dials a domestic phone number after going abroad.

[0122] Further, in the user interface for creating a new contact provided by the electronic device, an editable box for inputting a country code is displayed separately. In this way, the user can be guided to actively input the country code when creating a new contact. The electronic device can also store the phone number and the country code of the phone number separately to determine whether to add the country code when dialing.

[0123] In a possible implementation, after S107 is performed, the electronic device stores the first telephone number and the country code of the first telephone number in the address book. The electronic device can modify the country code of the first telephone number stored in the address book in response to a user operation, or the electronic device newly creates a contact. For example, after a user moves to Germany, the electronic device stores a telephone number A in China and a country code of China in the address book. The user wants to dial the telephone number A in Germany, but according to S107, the electronic device stores the telephone number A and the country code of China, and thus the electronic device automatically adds "+86" before the telephone number A when dialing. Apparently, the user knows that dialing the country code of China and the telephone number A is incorrect, and the user can modify the country code of the telephone number A in the address book to the country code of Germany, or the user can newly create a contact whose country code of the telephone number A is Germany.

[0124] In a possible implementation, the electronic device can convert a non-standard country code into a standard country code and store the standard country code in the electronic device. The non-standard country code refers to a country code other than "+". The standard country code refers to the country code "+". Specifically, when the electronic device answers a telephone number, the electronic device obtains an incoming number including a country code, a country code, and a telephone number, and the country code is "00", the electronic device automatically converts the country code "00" into "+" and then stores the "+" in the electronic device. When the electronic device receives a user operation of newly creating a contact, the electronic device receives a number input by the user, and the number includes a country code, a country code, and a telephone number, and the country code is "00", the electronic device automatically converts the country code "00" into "+" and then stores the "+" in the electronic device. In this way, the situation that a call fails due to a non-standard country code not being recognized by some countries can be avoided.

[0125] FIG. 6 shows a schematic diagram of a hardware structure of an electronic device 100 according to an embodiment of the present application.

[0126] The embodiments will be described below with reference to the electronic device 100. It should be understood that the electronic device 100 shown in FIG. 6 is merely an example, and the electronic device 100 can have more or fewer components than those shown in FIG. 6, can combine two or more components, or can have a different configuration of components. The various components shown in FIG. 6 can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.

[0127] Exemplarily, the electronic device 100 can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device, and / or a smart city device, and the specific type of the electronic device 100 is not specially limited in the embodiments of the present application.

[0128] The electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a loudspeaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

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

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

[0131] In some implementations, the processor 110 can be configured to determine that the country code of the first phone number is the country code of the first country. The processor 110 can be configured to determine whether the country code of the country where the electronic device is currently located is consistent with the country code of the first phone number, and if so, the processor 110 is configured to initiate a call using only the first phone number; if not, the processor 110 is configured to initiate a call using both the country code of the first phone number and the first number. The processor 110 can also be configured to determine whether the electronic device 100 stores the country code of the phone number when calling the phone number.

[0132] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals to complete the control of fetching and executing instructions.

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

[0134] In some implementations, the memory can be configured to separately store the country code of the first phone number and the first phone number.

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

[0136] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the electronic device 100. In some other embodiments of the present application, the electronic device 100 can also use different interface connection modes or a combination of multiple interface connection modes in the above embodiments.

[0137] The charging management module 140 is configured to receive charging input from a charger.

[0138] The power management module 141 is configured to connect the battery 142 and the charging management module 140. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to supply power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160, etc. The power management module 141 can also be configured to monitor parameters such as battery capacity, battery cycle count, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be arranged in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 can also be arranged in the same device.

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

[0140] Antennas 1 and 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, antenna 1 can be multiplexed as a diversity antenna for wireless local area networks. In some other embodiments, antennas can be used in combination with tuning switches.

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

[0142] In some implementations, mobile communication module 150 can be used to implement a call of electronic device to a first number and a second number.

[0143] Modem processor can include a modulator and a demodulator. Wireless communication module 160 can provide solutions for wireless communication 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) technology, etc. applied on electronic device 100. Wireless communication module 160 can be one or more devices integrated with at least one communication processing module. Wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and transmits the processed signals to processor 110. Wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification on the signals, and convert the signals into electromagnetic waves radiated by antenna 2.

[0144] In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a satellite based augmentation systems (SBAS).

[0145] The electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs, which execute program instructions to generate or change display information.

[0146] The display screen 194 is configured to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display screen panel can also be manufactured using an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a miniled, a microled, a micro-oled, a quantum dot light emitting diodes (QLED), and the like. In some embodiments, the electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1.

[0147] In some implementations, the display screen 194 can be configured to display a user interface before calling the first number or the second number. The display screen 194 can also be configured to display a call interface when talking with a device having the first phone number.

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

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

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

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

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

[0153] The NPU is a neural-network (NN) computing processor that learns from the structure of biological neural networks, such as the transmission mode between human brain neurons, to quickly process input information and continuously self-learn. Through the NPU, the electronic device 100 can implement intelligent cognitive applications, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0154] 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 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement data storage functions. For example, music, video, and other files are saved in the external memory card.

[0155] The internal memory 121 can be used to store computer executable program codes including instructions. The processor 110 performs various functional applications and data processing of the electronic device 100 by executing the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program (e.g., a sound play function, an image play function, etc.) required for at least one function, etc. The data storage area can store data (e.g., audio data, a phone book, etc.) created during the use of the electronic device 100, etc. In addition, the internal memory 121 can include a high-speed random access memory, and can further include a non-volatile memory such as at least one of a magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0156] The electronic device 100 can implement an audio function through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor, etc. For example, music play, recording, etc.

[0157] The audio module 170 is used to convert digital audio information into an analog audio signal output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used to encode and decode an audio signal. In some embodiments, the audio module 170 can be disposed in the processor 110, or part of the functions of the audio module 170 can be disposed in the processor 110.

[0158] The speaker 170A, also referred to as a "loudspeaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0159] The receiver 170B, also referred to as a "earpiece", is used to convert an audio electrical signal into a sound signal. When the electronic device 100 answers a call or a voice message, the voice can be heard by placing the receiver 170B close to the ear.

[0160] The microphone 170C, also referred to as a "microphone", "sound transducer", is used to convert a sound signal into an electrical signal. The earphone interface 170D is used to connect a wired earphone. The earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0161] The motor 191 can generate a vibration prompt. The motor indicator 192 can be an indicator light, which can be used to indicate a charging status, a power change, and can also be used to indicate a message, a missed call, a notification, etc.

[0162] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support a Nano SIM card, a Micro SIM card, a SIM card, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external storage cards. The electronic device 100 interacts with a network through a SIM card to achieve functions such as calling and data communication. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0163] The software system of the electronic device 100 can use a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. Embodiments of the present application take an Android system with a layered architecture as an example to exemplarily illustrate the software structure of the electronic device 100.

[0164] FIG. 7 is a schematic diagram of the software structure of the electronic device 100 according to an embodiment of the present application.

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

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

[0167] As shown in FIG. 7, the application packages can include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.

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

[0169] As shown in FIG. 7, the application framework layer can include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, etc.

[0170] The window manager is used to manage windows. The window manager can acquire the size of a display screen, determine whether there is a status bar, lock a screen, take a screenshot, etc.

[0171] The content provider is used to store and acquire data, and make the data accessible to applications. The data can include videos, images, audios, dialed and received calls, browsing history and bookmarks, a phonebook, etc.

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

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

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

[0175] The notification manager enables an application to display notification information in a status bar, and can be used to convey a message of the notification type, which can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify of a download completion, a message reminder, etc. The notification manager can also be a notification appearing in the form of a graph or a scroll bar text in the top status bar of the system, such as a notification of an application running in the background, or a notification appearing in the form of a dialog window on the screen. For example, a text message is prompted in a status bar, a prompt sound is emitted, the electronic device is vibrated, an indicator light blinks, etc.

[0176] The Android runtime includes a core library and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

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

[0178] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform the management of the object life cycle, the management of the stack, the management of the thread, the management of security and exceptions, and the garbage collection, etc.

[0179] The system library can include a plurality of functional modules. For example, a surface manager, media libraries, a three-dimensional graphics processing library (e.g., OpenGL ES), a 2D graphics engine (e.g., SGL), etc.

[0180] The surface manager is used to manage a display subsystem and provides fusion of 2D and 3D layers for a plurality of applications.

[0181] The media libraries support playback and recording of a plurality of commonly used audio, video formats, and static image files, etc. The media libraries can support a plurality of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0182] The three-dimensional graphics processing library is used to implement three-dimensional graphics drawing, image rendering, composition, and layer processing, etc.

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

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

[0185] An electronic device is provided in an embodiment of the present application, which includes a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the method for displaying a notification.

[0186] An embodiment of the present application further provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the steps in the above-mentioned method embodiments.

[0187] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is run on a computer, the computer program causes the computer to implement the steps in the above-mentioned method embodiments.

[0188] An embodiment of the present application further provides a chip system, which includes a processing circuit and an interface circuit. The interface circuit is used to receive code instructions and transmit the code instructions to the processing circuit. The processing circuit is used to run the code instructions to cause the chip system to implement the steps in any method embodiment of the present application. The chip system can be a single chip or a chip module composed of a plurality of chips.

[0189] The above-described embodiments are only used to illustrate the technical solutions of the present application, but not limit the present application; although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method of calling, characterized by, The method is applied to a first electronic device, and the method comprises: When the first electronic device is located in a first country, the first electronic device calls a first number, the first number comprising a first telephone number without a country code; After the call is successful, the first electronic device stores a country code of the first country as a country code of the first telephone number.

2. The method of claim 1, wherein, After the first electronic device stores the country code of the first country as the country code of the first telephone number, the method further comprises: The first electronic device receives a first operation, the first operation comprising: an operation of inputting the first telephone number in a dial pad and dialing, or an operation of dialing a number to a first contact, the number of the first contact being the first telephone number, or an operation of selecting the first telephone number in a call log and dialing; The first electronic device calls a second number, the second number comprising the country code of the first telephone number and the first telephone number.

3. The method of claim 1, wherein, After the first electronic device stores the country code of the first country as the country code of the first telephone number, the method further comprises: When the first electronic device is located in a second country, the first electronic device receives a first operation, the first operation comprising: an operation of inputting the first telephone number in a dial pad and dialing, or an operation of dialing a number to a first contact, the number of the first contact being the first telephone number, or an operation of selecting the first telephone number in a call log and dialing; The first electronic device calls a second number, the second number comprising the country code of the first telephone number and the first telephone number.

4. The method of claim 3, wherein, Before the first electronic device calls the second number, the method further comprises: The first electronic device determines that the first electronic device is located in the second country based on a public land mobile network; The first electronic device determines that the country code of the second country where the first electronic device is located is inconsistent with the country code of the first telephone number.

5. The method according to any one of claims 2-4, characterized in that, The first operation comprises: after the operation of inputting the first telephone number in the dial pad and dialing, or the operation of selecting the first telephone number in the call log and dialing, the method further comprises: During the call of the second number, the first electronic device displays a first call interface, the first call interface comprising: the first telephone number, the country code of the first telephone number.

6. The method according to any one of claims 1-5, characterized in that, Before the first electronic device calls the first number, the method further comprises: The first electronic device determines that the first electronic device is located in the first country based on a public land mobile network; The first electronic device acquires the country code of the first country based on the first country.

7. The method according to claim 3 or 4, characterized in that, After the first electronic device stores the country code of the first country as the country code of the first telephone number, the method further comprises: In a case that the first electronic device is located in the first country, the first electronic device receives a third operation, the third operation comprising: an operation of inputting the first phone number in a dial pad and dialing, or, an operation of dialing a number of a first contact, the number of the first contact being the first phone number, or, an operation of selecting the first phone number in a communication record and dialing; The first electronic device calls the first number.

8. The method according to any one of claims 1 to 7, characterized in that, After the first electronic device stores the country code of the first country as the country code of the first phone number, the method further comprises: The first electronic device displays a first interface of creating a new contact, the first interface comprising: a name of the first contact input by a user, and the first phone number and the country code of the first phone number filled by the first electronic device; The first electronic device stores the name of the first contact, the first phone number, and the country code of the first phone number.

9. The method according to any one of claims 1-8, characterized in that, Before the first electronic device calls the first number, the method further comprises: The first electronic device displays a second interface of creating a new contact, the second interface comprising: a name of the first contact input by a user, and the first phone number; The first electronic device stores the name of the first contact and the first phone number; After the first electronic device stores the country code of the first country as the country code of the first phone number, the method further comprises: The first electronic device stores the name of the first contact, the first phone number, and the country code of the first phone number.

10. The method according to claim 8 or 9, characterized in that, After the first electronic device stores the name of the first contact, the first phone number, and the country code of the first phone number, the method further comprises: The first electronic device receives a second operation; The first electronic device modifies or deletes the country code of the first phone number in response to the second operation.

11. The method according to any one of claims 1-10, characterized in that, Before the first electronic device stores the country code of the first country as the country code of the first phone number, the method further comprises: The first electronic device keeps a call with an electronic device having the first phone number for a duration exceeding a first threshold.

12. The method according to any one of claims 1-11, characterized in that, The first number does not comprise a country prefix, and the second number comprises the country prefix.

13. An electronic device, comprising: The electronic device comprises a memory, a processor, and computer instructions stored in the memory, the processor executes the computer program to implement the method of any one of claims 1-12.

14. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, the computer program is executed by a processor to implement the method of any one of claims 1-12.

15. A computer program product, characterised in that, The computer program product comprises computer instructions, when the computer instructions are executed by a processor, the method of any one of claims 1-12 is implemented.

Citation Information

Patent Citations

  • Telephone dialing automatic conversion device and telephone dialing automatic conversion method

    CN104780251A

  • Method for storing telephone number of mobile terminal and mobile terminal

    CN106210232A

  • Telephone number storage method and mobile telecommunication terminal

    CN1296369A

  • Method and apparatus for providing automatic international and local call dialing in a mobile communication terminal

    US20100184413A1